Closed dr-offig closed 5 years ago
Yep, videocontext takes that second argument (the sourceOffset
) as the as the starting point and ignores any existing state of the video element.
It also appears that the end point (from which to loop from) is unaware of the fragment
So it would be a non breaking changes to ensure that
sourceOffset
is relative to the start of the fragment and not the start of the full videoDo you know of the plans for media fragments? No real browser APIs that I can see:
https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement
But would be pretty simple to parse ourselves from the src url. I guess that's the way forward.
Any thoughts?
adding this to my reading list: https://gingertech.net/tag/media-fragment-uri/
Thanks for looking at this Pete. Alternatively, can you suggest any other way to loop a section of a video using the library as it stands? I guess i'm trying to do something a bit different to what the library was designed for; i.e. interactive video stuff rather than compositional.
interactive video stuff rather than compositional.
Thats quite a common use for it. I'd like to make videocontext more user friendly for interactive cases.
We've just released an API for custom nodes. So, for now, you could do a basic implementation in your own node.
https://codesandbox.io/embed/l7wz9qw3kq
If this works ^ for you I'll do the parsing properly and merge it into the actual VideoNode
.
Thanks Pete, that's great! Certainly covers my use-case. API for custom nodes is an awesome development.
Video context doesn't seem to play well with Media Fragments. I am hoping to loop different subsections of a video. But, for example, in the code playground the following doesn't behave as expected
Also tried