Closed rafa8626 closed 7 years ago
Hi @rafa8626 nothing special needed for ID3 event, event is handled like the others. you can check the logic in flashls chromeless player: this
Flash event listener JS event listener
are you able to get something from the Flash event listener ? (here)
No and actually that's why my question started. I'm executing the demo file I posted on that branch with the file that has that ID3 info and nothing comes up
I don't know if I'm missing anything else here
you can check your stream on flashls chromeless demo page http://www.flashls.org/latest/examples/chromeless/ ID3 event should be visible on the metrics canvas.
This is the hls.js file that shows the data: http://db2.indexcom.com/playertest/mediaelement6/demo/
I don't how to extract that same data with flashls, given that it provides the info about the artist/album/song/etc.
Or am I using the wrong event for this scenario?
Hi @rafa8626
i just rechecked the code, and indeed this is not the right event. id3 tags are dispatched along with FRAGMENT_PLAYING
event
https://github.com/mangui/flashls/blob/c6ddd75afc8a2b2fb841ca8ac49dc6e1239489c0/src/org/mangui/hls/stream/HLSNetStream.as#L115
and expose in HLSPlayMetrics object
Thanks for checking this again @mangui I'll follow your recommendation and let you know the final result
Yes you are right that's the event I was looking for; I guess my last question is how can I pass the whole object through Externalinterface.call
method, given that only is letting me process strings?
well, Flash should JSONify HLSPlayMetrics object ? at least the demo page is able to access inner fields of HLSPlayMetrics see https://github.com/mangui/flashls/blob/dev/examples/chromeless/index.html#L531 then I would guess id3 tags array should also be JSONified ? if not you might need to pass it as a string and deserialize it in JS.
Thanks @mangui for your help. I was able to get the string decoded with JSON. Now I can pass the rest of the events properly.
@mangui The AS3 code used in MEJS to use Flashls works fine, but I'd like to pass Flashls events (i.e., ID3_UPDATE) to the JS code so they could be caught. I tried doing something like this:
so that method exists on MEJS, but nothing is happening. Can you provide some guidance on what could I be doing wrong? If you can check this URL I'd appreciate it: https://github.com/mediaelement/mediaelement/compare/flashls-events
Reason why I'm asking this is because somebody brought up to my attention that they want to parse the ID3 tags and right now is possible with Hls.js using
Hls.Events.FRAG_PARSING_METADATA
, but I think this can be done with Flashls usingID3_UDPATE
since IE11 Win7 requires Flash still do play HLS media. But so far I haven't been able to figure out why the event is not being fired.