player.chromecast({overlayButton:false});
player.chromecast({metaTitle: 'Video title', metaSubtitle: 'Video subtitle', metaThuumbnail: 'thumbnail URL'});
player.chromecast({ui:'fixed'});
player.on('chromecastConnected', function() {document.querySelector('.vjs-media').style.padding=0;})player.on('chromecastDisonnected', function() {document.querySelector('.vjs-media').removeAttribute('style');})
player.chromecast({adBreaks: adsArray});
{
id: 'bc0',
position: 30,
vastAdsRequest:{
adTagUrl: 'https://castsample.com/vast?rand=' + Math.floor(Math.random()* 10000)
}
}
{
id: 'bc1',
position:240,
whenSkippable: 5, //optional
contentUrl: 'https://domain.com/mediat/path-to-playlist.m3u8',
contentType: 'application/',
clickThroughUrl: 'https://domain.com/clicktroughtracking', //optional
title: 'Video ad title' //optional
}
{
sources: [{
src: 'http://domain.com/path-to-playlist.m3u8',
type: 'application/x-mpegURL'
}],
title: 'video title',
thumb: 'https://domain.com/path-to-video-thumbnail.jpg', // Suggested size 80x45 px
poster: 'https://domain.c0m/path-to-poster.jpg',
duration: '03:40',
metaTitle: 'title for chromecast',
metaSubtitle: 'subtitle for Chromecast',
metaThumbnail: 'https://path-to-chromecast-thumbnails.jpg'
}