-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Surface M3U8 tags during playback #48
Comments
We have implemented these changes -- however they are not off-the-shelf ready and are probably not implemented as well as they could be. Would be great to see this in the plugin. |
@mangui any thoughts on supporting this? |
it should be easy to parse custom tags and put their content into org.mangui.hls.model.Fragment. I am not clear yet on how this could be done, maybe injecting custom FLV tags with metadata/cue point. we could also eventually dispatch level update using same technics |
it is possible to inject FLV Tag (TagType=18 : SCRIPTDATAOBJECT) with custom content.
then we should receive a callback on NetStream.client() with tag content when such tag is reached. |
I will start by notifying discontinuity, to validate the model. then we could move to other interesting stuff. |
related to #48 for now, it just displays a debug logs when discontinuity happens this should be wrapped into an HLS event in a second stage.
Exciting! I will test it out when you start committing code |
…ment starts playing fragment info are encapsulated into HLSPlayMetrics.as object move constant classes into org.mangui.hls.constant. move classes related to events into org.mangui.hls.event related to #48
you should now be able to be notified when any new fragment starts playing. you should be able to check for discontinuity. |
Hi, now you should be able to retrieve custom tags as well. |
I have compiled the latest version (chromeless player) but for me onFragmentPlaying is never called in the javascript. Same goes for onFragmentLoaded |
strange. I just double check current flashls/master locally, I got js callback triggered [13:7:45] load URL ../../../../playlists/test_001/stream.m3u8 |
Hi Mangui, My mistake, I was loading an incorrect version of the player. However, I noticed only level and sequence num are exposed. This does not include the custom_tags. Would it not be better to expose the whole playMetrics object? In addition, it would be very useful to me if standard tags like PROGRAM-DATE-TIME also appear via this object (maybe renaming custom_tags to tags). I notice a special case for discontinuity is implemented in the form of a counter. I think it would be useful if tags like this were included alongside custom tags in a tags object/array. |
Additionally there is bug whereby custom tags that precede an EXTINF tag rather than come after it, do not get populated in the custom_tags object. This behaviour is the opposite of the HLS specification:
|
I will send over a pull request of my fixes in a little while. |
Here it is. There is one caveat with this approach in that on the first chunk, tag_list will include tags pertaining to the playlist like #EXT-X-VERSION:3 and #EXT-X-TARGETDURATION:5. This isn't all bad, as their care cases you want access to these to. However, future work may include detecting these tags and adding them to a playlist loaded event rather than the first detected fragment. You unfortunately can't use EXTINF as a delimiter as before due to the HLS spec requiring this tag to be just before the URL and no where else. My only other suggestion would be to introduce a flashls custom tag that acts as the delimiter between tags pertaining to the playlist at the top, and tags pertaining to the first chunk. |
Hi @adamscybot |
Hi mangui, I will get on this later today. |
looks good thanks |
implemented |
You guys rock! I'll check this out next week. |
Hi mangui, first thanks for this implementation, looks very util. |
you should be able to catch any event on OSMF side, using something like
|
thanks for the answer. but still can't catch the event. |
Hi @ZeROZ7 I would advise you to retrieve flashls/master and first check that you can catch the event with chromeless player. you should see traces updated on the web page each time FRAGMENT_LOADING event is received. |
Yes now i am working in ChromelessPlayer and i see the FRAGMENT_PLAYING event , but still can´t capture the event in OSMF. I'm working with Grindplayer, maybe the problem is in this player, i will try with StrobeMediaPlayback to be sure. |
i have not lucky with StrobeMediaPlayback. Any idea what can be the problem?. |
Hi @ZeROZ7 |
…m to internal listeners as well as the traditional client object fix HLSEvent.FRAGMENT_PLAYING event not being fired with OSMF related to #48
Hi @ZeROZ7 |
Hi @mangui, works perfect!. |
Thanks! |
Hi there, I'm really excited to see that your plugin exists! It looks like a great piece! @mangui , forgive my -probable- newbie question but how to listen to var video_object; //<FlowPlayer, Video JS etc...>
video_object.on('onFragmentPlaying', function(custom_tags) {
// enjoying with custom_tags
}); What I want to do is; adding some custom tags to M3U8 file and those custom tags will have some values. I need to use those values from JavaScript in order to trigger some behavior. Do you think that is this something doable using your plugin? Thank you! |
It would be great to know whenever playback (or seeking) crosses an interesting M3U8 tag, e.g.
EXT-X-DISCONTINUITY
or even custom tags, e.g.
EXT-X-MYCUSTOMTAG: Hello World
This would enable storing (and responding to) meta-data inside the M3U, which is a common practice.
The text was updated successfully, but these errors were encountered: