How to listen for ID3 Data With Video.js #8696
-
I am trying to listen for id3 metadata on videojs. This is what i tried.
cue change repeatedly fires but When i add id3 to the stream, i cannot find my text data inside any of the cues. (printed track.activeCues) If i use Hls.js i can get the id3 metada fine with
So how can i do the same thing with videojs? |
Beta Was this translation helpful? Give feedback.
Answered by
mister-ben
May 6, 2024
Replies: 1 comment 1 reply
-
The bip bop test video has id3. At that URL, you can log the id3 cues in the console by pasting this in the terminal: // Identify id3 track
const metadataTrack = Array.from(player.textTracks()).find(t => t.label === 'Timed Metadata');
// Add event listener to track. Inspect activeCues on cuechange events.
metadataTrack.addEventListener('cuechange', function() {
console.log(metadataTrack.activeCues[0]?.text, metadataTrack.activeCues);
}); |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
lastpeony
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The bip bop test video has id3. At that URL, you can log the id3 cues in the console by pasting this in the terminal: