hyzp_ybqx-Commit189:为了开发测试,暂时恢复支持"x86"模拟器,等发布时再取消。
解决视频播放页面退出后还在获取视频流的问题
R:\FlutterProject\FlutterProject61-hyzp_ybqx_with_ios\hyzp_ybqx\lib\widget\my_superplayer.dart
@override
void dispose() {
Playing = false;
// 云台控制代码:1:停止动作、3:启动雨刷、11:焦距变大、12:焦距变小
setSphericalCameraDio(id: widget.id, dwip: widget.dwip, cmdCode: 1);
_playerController.release(); // 必须显示释放视频播放资源,否则即使退出视频播放页面后台还在获取视频流
super.dispose();
}
This commit is contained in:
@@ -42,7 +42,7 @@ android {
|
|||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
ndk {
|
ndk {
|
||||||
abiFilters "arm64-v8a","armeabi","armeabi-v7a","mips" // 不支持"x86_64","x86"模拟器
|
abiFilters "x86", "arm64-v8a", "armeabi", "armeabi-v7a", "mips" // 不支持"x86_64","x86"模拟器
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ class _SuperPlayerPageState extends State<SuperPlayerPage>
|
|||||||
Playing = false;
|
Playing = false;
|
||||||
// 云台控制代码:1:停止动作、3:启动雨刷、11:焦距变大、12:焦距变小
|
// 云台控制代码:1:停止动作、3:启动雨刷、11:焦距变大、12:焦距变小
|
||||||
setSphericalCameraDio(id: widget.id, dwip: widget.dwip, cmdCode: 1);
|
setSphericalCameraDio(id: widget.id, dwip: widget.dwip, cmdCode: 1);
|
||||||
|
_playerController.release(); // 必须显示释放视频播放资源,否则即使退出视频播放页面后台还在获取视频流
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -74,8 +75,7 @@ class _SuperPlayerPageState extends State<SuperPlayerPage>
|
|||||||
// });
|
// });
|
||||||
// init();
|
// init();
|
||||||
|
|
||||||
WidgetsBinding.instance.addObserver(this);
|
WidgetsBinding.instance.addObserver(this);
|
||||||
|
|
||||||
|
|
||||||
_playerController.setOption(FijkOption.hostCategory, "enable-snapshot", 1);
|
_playerController.setOption(FijkOption.hostCategory, "enable-snapshot", 1);
|
||||||
_playerController.setOption(FijkOption.playerCategory, "mediacodec-all-videos", 1);
|
_playerController.setOption(FijkOption.playerCategory, "mediacodec-all-videos", 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user