TheWidlarzGroup / react-native-video

A <Video /> component for react-native
https://docs.thewidlarzgroup.com/react-native-video/
MIT License
7.2k stars 2.9k forks source link

[Feature]: Support for EXT-X-DATERANGE metadata #4283

Open pravind-hinge opened 2 days ago

pravind-hinge commented 2 days ago

Description

Currently I'm trying to us a an hls playlist to stick 2 separate videos together like so

#EXT-X-VERSION:6

#EXT-X-TARGETDURATION:25
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-INDEPENDENT-SEGMENTS

#EXT-X-DATERANGE:ID="intro",START-DATE="2023-01-01T00:00:00Z",DURATION=60.166666
#EXTINF:12.5,
/videos/project1/intro/1080p/video_000.ts
#EXTINF:8.333333,
/videos/project1/intro/1080p/video_001.ts
...

#EXT-X-DISCONTINUITY

#EXT-X-DATERANGE:ID="outro",START-DATE="2023-01-01T00:01:00.166666Z",DURATION=90.083334
#EXTINF:12.5125,
/videos/project1/outro/1080p/video_000.ts
...

#EXT-X-ENDLIST

I want to be able to get the exact time when the video switches from intro to outro. Using onProgress event is not very consistent. So was planning to use EXT-X-DATERANGE. However I'm not able to get the video player to trigger onTimedMetadata As I'm using hls format embedding ID3 tags to *.ts is not working. An alternative approach with a priority event to sync UI should also be fine

Why it is needed ?

To properly sync transitions UI with video progress dynamically and not rely on a video editor

Possible implementation

No response

Code sample

No response

github-actions[bot] commented 2 days ago

Thank you for your feature request. We will review it and get back to you if we need more information.

github-actions[bot] commented 2 days ago

Thank you for your feature request. We will review it and get back to you if we need more information.