|
@@ -252,14 +252,10 @@ class _VideoWidgetNewState extends State<VideoWidgetNew>
|
|
|
|
|
|
void _setVideoController(String url) {
|
|
void _setVideoController(String url) {
|
|
if (mounted) {
|
|
if (mounted) {
|
|
- setState(() async {
|
|
|
|
- try {
|
|
|
|
- await player.setPlaylistMode(PlaylistMode.single);
|
|
|
|
- controller = VideoController(player);
|
|
|
|
- await player.open(Media(url), play: _isAppInFG);
|
|
|
|
- } catch (e, s) {
|
|
|
|
- _logger.severe("failed to set video url", e, s);
|
|
|
|
- }
|
|
|
|
|
|
+ setState(() {
|
|
|
|
+ player.setPlaylistMode(PlaylistMode.single);
|
|
|
|
+ controller = VideoController(player);
|
|
|
|
+ player.open(Media(url), play: _isAppInFG);
|
|
});
|
|
});
|
|
}
|
|
}
|
|
}
|
|
}
|