Revert "Add missing await" (#1740)

This commit is contained in:
Neeraj Gupta 2024-02-21 15:30:42 +05:30 committed by GitHub
commit 8ebb593642
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -252,14 +252,10 @@ class _VideoWidgetNewState extends State<VideoWidgetNew>
void _setVideoController(String url) {
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);
});
}
}