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: 5, text: "Yousef - Life Is Too Short (Original Mix)", overlayText: "Buy on iTunesBuy on Beatport Track (01): Yousef - Life Is Too Short (Original Mix)"} , {time: 346, text: "Darius Syrossian - Andranik (Gorge & Homm Remix)", overlayText: "Buy on iTunesBuy on BeatportBuy on Discogs Track (02): Darius Syrossian - Andranik (Gorge & Homm Remix)"} , {time: 600, text: "Marko Nastic - Eyes Wide", overlayText: "Buy on iTunesBuy on Beatport Track (03): Marko Nastic - Eyes Wide"} , {time: 1066, text: "DkA - Bonjour L'Afrique (Sobek Seven Sisters Remix)", overlayText: "Buy on iTunesBuy on BeatportBuy on Discogs Track (04): DkA - Bonjour L'Afrique (Sobek Seven Sisters Remix)"} , {time: 1361, text: "Christian Burkhardt - Doubledub (Original Mix)", overlayText: "Buy on Beatport Track (05): Christian Burkhardt - Doubledub (Original Mix)"} , {time: 1694, text: "51 Days - Paper Moon", overlayText: "Buy on iTunesBuy on BeatportBuy on Discogs Track (06): 51 Days - Paper Moon"} , {time: 2215, text: "Christian Burkhardt - Enough", overlayText: "Buy on iTunesBuy on BeatportBuy on Discogs Track (07): Christian Burkhardt - Enough"} , {time: 2449, text: "not identified - yet", overlayText: " Track (08): not identified - yet"} , {time: 2866, text: "not identified - yet", overlayText: " Track (09): not identified - yet"} , {time: 3258, text: "not identified - yet", overlayText: " Track (10): not identified - yet"} , {time: 3550, text: "Axel Boman - Nokturn (Grand Finale)", overlayText: "Buy on iTunesBuy on BeatportBuy on Discogs Track (11): Axel Boman - Nokturn (Grand Finale)"} , {time: 4004, text: "Matador - Korrado", overlayText: "Buy on iTunesBuy on BeatportBuy on Discogs Track (12): Matador - Korrado"} , {time: 4425, text: "Dirt Crew - Get Raw (Patrice Bäumel & Nuno Dos Santos Threesixty Mix)", overlayText: "Buy on iTunesBuy on BeatportBuy on Discogs Track (13): Dirt Crew - Get Raw (Patrice Bäumel & Nuno Dos Santos Threesixty Mix)"} ] }); 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): Yousef - Life Is Too Short (Original Mix)
' ) ); positionTrackButtons ('.vjs-break-overlay','.tracks-nav'); } , 5000 ); $(window).on("resize", function () { positionTrackButtons ('.vjs-break-overlay','.tracks-nav')}); setTimeout( function(){setDuration(player.duration(),8541)}, 4000 );