var player = videojs('video-player', {plugins: {videoJsResolutionSwitcher: {default: 'high'}}}, function(){ var player = this; player.on('resolutionchange', function(){ // console.info('Source changed to %s', player.src()); // console.log(player.currentResolution()); }) }); var trackLikesArray = []; player.markers({ markerStyle: {'width':'7px', 'height':'9px', 'margin-bottom':'6px', 'background-color': '#ca588a' }, markerTip:{display: true, text: function(marker) { return marker.text; } }, breakOverlay:{ display: true, displayTime: 1000, text: function(marker) {return marker.overlayText;} } , markers: [ {time: 0, text: "", overlayText: "Track information"} , {time: 4, text: "K.e.e.n.e. - Bocaraca", overlayText: "Buy on iTunesBuy on Beatport Track (01): K.e.e.n.e. - Bocaraca"} , {time: 98, text: "Moodymann - Dem Young Sconies", overlayText: "Buy on iTunesBuy on BeatportBuy on Discogs Track (02): Moodymann - Dem Young Sconies"} , {time: 368, text: "Hyenah - The Wish (Manoo Darkside Remix)", overlayText: "Buy on iTunesBuy on BeatportBuy on Discogs Track (03): Hyenah - The Wish (Manoo Darkside Remix)"} , {time: 819, text: "Madness - One Step Beyond", overlayText: "Buy on iTunesBuy on Discogs Track (04): Madness - One Step Beyond"} , {time: 844, text: "Twinny Tee, Ma V - Just A VM Drum", overlayText: "Buy on iTunesBuy on Beatport Track (05): Twinny Tee, Ma V - Just A VM Drum"} , {time: 1160, text: "Oscar P, Bliss - Part Of You (Enoo Napa Remix)", overlayText: "Buy on iTunesBuy on Beatport Track (06): Oscar P, Bliss - Part Of You (Enoo Napa Remix)"} , {time: 1523, text: "Diephuis - Crossing Borders (Manoo's Refugee Mix)", overlayText: "Buy on iTunesBuy on BeatportBuy on Discogs Track (07): Diephuis - Crossing Borders (Manoo's Refugee Mix)"} , {time: 1767, text: "Culoe De Song - Rambo", overlayText: "Buy on iTunes Track (08): Culoe De Song - Rambo"} , {time: 2063, text: "Ninetoes - Finder", overlayText: "Buy on iTunesBuy on BeatportBuy on Discogs Track (09): Ninetoes - Finder"} , {time: 2324, text: "With You. - Bembé", overlayText: "Buy on iTunesBuy on Beatport Track (10): With You. - Bembé"} , {time: 2593, text: "Herbie Hancock - The Essence (Joe Claussell Sacred Opus Mix)", overlayText: "Buy on Discogs Track (11): Herbie Hancock - The Essence (Joe Claussell Sacred Opus Mix)"} , {time: 3021, text: "Natasha Watts - Everything (Louie Vega Inst)", overlayText: "Buy on iTunesBuy on BeatportBuy on Discogs Track (12): Natasha Watts - Everything (Louie Vega Inst)"} , {time: 3300, text: "London Grammar - Hey Now", overlayText: "Buy on iTunesBuy on Discogs Track (13): London Grammar - Hey Now"} ] }); var positionTrackButtons = function(el, trackbuttons) { var pos = $(el).offset(); var eWidth = $(el).outerWidth(); if (!eWidth) {setTimeout( function(){ positionTrackButtons(el, trackbuttons) }, 1000 );} else { var mWidth = $(trackbuttons).outerWidth(); var left = 1 + "px"; var width = eWidth -2 + "px"; var top = -14 + "px"; $(trackbuttons).css( { opacity: '1', position: 'absolute', zIndex: 150000, width: width, left: left, top: top } ); $(trackbuttons).fadeIn(); } }; setTimeout( function(){ $('.vjs-break-overlay').wrap('
'); $( ".tracks-nav" ).append( $( '
Track (01): K.e.e.n.e. - Bocaraca
' ) ); positionTrackButtons ('.vjs-break-overlay','.tracks-nav'); } , 5000 ); $(window).on("resize", function () { positionTrackButtons ('.vjs-break-overlay','.tracks-nav')}); setTimeout( function(){setDuration(player.duration(),8640)}, 4000 );