目前调通了120全局,准备开始介入播放层,在修bug

This commit is contained in:
2026-08-15 23:06:55 +08:00
parent 15683d0bab
commit 902788c736
11 changed files with 1096 additions and 235 deletions
+21
View File
@@ -0,0 +1,21 @@
import 'package:media_kit/media_kit.dart';
class PlayerService {
static final PlayerService _instance = PlayerService._internal();
factory PlayerService() => _instance;
PlayerService._internal();
final Player _player = Player();
void play(String url) {
_player.open(Media(url));
}
void pause() => _player.pause();
void resume() => _player.play();
void stop() => _player.stop();
void dispose() => _player.dispose();
// 状态监听...
}