-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
Use case
The current implementation for the video player plugin has some problems with live streams (videos with "infinite"/unknown/unset duration).
Cross-platform TIME_UNSET
TIME_UNSET is the value used as the "length" of a live video. Its current value comes from ExoPlayer2 directly (C.TIME_UNSET). They had good reasons to pick that value.
The same value was reused when improving the live video features in the iOS implementation, so both platforms would behave the same.
When the Web platform attempted to reuse that same magic value; it was too "wide" to be represented exactly by JavaScript, so we needed to use another one.
- Ensure that all the mobile implementations start returning what the web is returning:
-(2^53) + 2, or-9007199254740990. Note: this is a breaking change!
Provided UI Widgets
package:video_player provides a bunch of Widgets that render different parts of the UI of a Video player, like the _VideoScrubber, the VideoProgressIndicator (and maybe others).
Currently, they all seem to behave as if the duration of the video was always finite, and positive.
- Update UI Widgets to support
TIME_UNSETdurations.
Player logic
Most of the player logic assumes that the video has a finite duration, and uses the duration coming from the video controller to do things like:
- handle the
VideoEventType.completedevent to seek "to the end" - validate if a video can be
seekTo'd to a given position (only if0 < position < duration)
Finally,
- Check that the player logic handles well
TIME_UNSETdurations.