Skip to content

How to listen for ID3 Data With Video.js #8696

Answered by mister-ben
lastpeony asked this question in Q&A
Discussion options

You must be logged in to vote

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);
});

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@lastpeony
Comment options

Answer selected by lastpeony
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants