If you don't find an answer, please click here to post your question.

Accessing Metadata from the Player

0 Kudos
Started ‎09-21-2015 by
Modified ‎09-21-2015 by

Accessing Metadata from the Player

by Community Manager on ‎09-21-2015 09:42 AM (509 Views)

Use the following code on your player implementation to have access to the video's metadata. The metadata will be available as a JSON.

onCreate: function(player) { // This is required when you want to load the message bus
// 'player' is the variable where the player object was saved.
player.mb.subscribe('metadataFetched', 'test', function(event) {// subscribe is used to listen an specific event. In this case 'metadataFetched'
console.log(JSON.stringify(arguments[1].base));
});
}