Playback Controller [Feature Request]
See original GitHub issueIs your feature request related to a problem? Please describe. An build in playback queue. It would be handy if there was a build-in way to setup an autoplay queue.
Describe the solution you’d like I imagine a controller type that can be set directly from razor code to queue multiple video sources to play after each other. The usage would look like this:
<BlazoredVideo Play="OnPlay"
class="w-100"
style="max-width:800px;"
controls="controls">
<VideoQueue Delay="0" Repeat="No/Once/Loop">
<VideoItem Source="videos/elephants.mp4" type="video/mp4" />
<VideoItem>
<VideoSource Source="videos/lions.mp4" type="video/mp4" />
<VideoSource Source="videos/lions.avi" type="video/avi" />
</VideoItem>
</VideoQueue>
</BlazoredVideo>
When using the VideoQueue element instead of an <video />
element the VideoQueue queues the containing elements for playback. When using the Delay property it delays the playback of the next element by howmany millisecounds. The Repeat property is an Enum that will ether repeat one element when set to Once
, does not repeat on No
and begins from the start when it got to the last element on Loop
.
In this proposal we need the VideoItem because we would need to be able to supply multiple versions of a source to provide best coverage of browser capabilities.
When allowing to define this in razor code, the user is also able to provide own dynamic lists with for example a @foreach loop like this:
<BlazoredVideo Play="OnPlay"
class="w-100"
style="max-width:800px;"
controls="controls">
<VideoQueue>
@foreach(var source in MYSOURCES)
{
<VideoItem Source="@source.Source" type="@source.MediaType" />
}
</VideoQueue>
</BlazoredVideo>
Describe alternatives you’ve considered Implementing on its own is possible however i believe this would be a great addition to the code base as a feature.
Additional context Add any other context or screenshots about the feature request here.
Issue Analytics
- State:
- Created 9 months ago
- Comments:9
Top GitHub Comments
Just to clarify Backwards compatibility is still granted in my proposal.
and
are functionally the same and are both supported.
Interesting idea indeed, I will keep that in mind and see if I come up with an intuitive way.
That’s cool - as long as we have a “simple” option where we can say “Video player - play these” and it just does it 😄