Skip to content

Commit

Permalink
fix(example): add enable-accurate-seek option, fix #113
Browse files Browse the repository at this point in the history
  • Loading branch information
befovy committed Nov 21, 2019
1 parent 80dc17e commit 7b72f77
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions example/lib/video_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@ class _VideoScreenState extends State<VideoScreen> {
@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
Expand Down

0 comments on commit 7b72f77

Please sign in to comment.