diff --git a/example/lib/video_page.dart b/example/lib/video_page.dart index 09580670..92946131 100644 --- a/example/lib/video_page.dart +++ b/example/lib/video_page.dart @@ -21,13 +21,15 @@ class _VideoScreenState extends State { @override void initState() { super.initState(); + startPlay(); + } + + void startPlay() async { + await player.setOption( + FijkOption.playerCategory, "enable-accurate-seek", 1); player.setDataSource(widget.url, autoPlay: true).catchError((e) { - FijkException fe = e as FijkException; - //setState(() { - // errorMsg = fe.message; - //}); - print("setDataSource exception: $fe"); - }, test: (e) => e is FijkException); + print("setDataSource error: $e"); + }); } @override