manager.dart 827 B

12345678910111213141516171819202122232425
  1. part of './ijkplayer.dart';
  2. /// create 2019/3/18 by cai
  3. class IjkManager {
  4. /// For the hot reload/ hot restart to release last texture resource. Release version does not have hot reload, so you can not call it.
  5. ///
  6. /// release版本可不调用, 主要是为了释放hot restart/hot reload的资源,因为原生资源不参与热重载
  7. ///
  8. ///
  9. /// If this method is not invoked in the debug version, the sound before the hot reload will continue to play.
  10. static Future<void> initIJKPlayer() async {
  11. _globalChannel.invokeMethod("init");
  12. }
  13. static Future<void> setSystemVolume(int volume) async {
  14. await _globalChannel.invokeMethod("setSystemVolume", {
  15. "volume": volume,
  16. });
  17. }
  18. static Future<int> getSystemVolume() async {
  19. return _globalChannel.invokeMethod("getSystemVolume");
  20. }
  21. }