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: 3, text: "Timofti - Blue Effect (Vlad Caia's 610 Remix)", overlayText: " Track (01): Timofti - Blue Effect (Vlad Caia's 610 Remix)"} , {time: 262, text: "Gemini - Take Your Time", overlayText: "Buy on Beatport Track (02): Gemini - Take Your Time"} , {time: 508, text: "not identified - yet", overlayText: " Track (03): not identified - yet"} , {time: 835, text: "Audio Werner & Daniel Paul - Dwelling", overlayText: "Buy on Beatport Track (04): Audio Werner & Daniel Paul - Dwelling"} , {time: 1140, text: "Frank De Wulf - Butterfly", overlayText: "Buy on iTunesBuy on BeatportBuy on Discogs Track (05): Frank De Wulf - Butterfly"} , {time: 1460, text: "Jay Feat. Ricardo - Sunday Prayer", overlayText: "Buy on iTunesBuy on Beatport Track (06): Jay Feat. Ricardo - Sunday Prayer"} , {time: 1726, text: "Problem Kids - Miles Away (2 Bit Whore Mix)", overlayText: "Buy on iTunesBuy on Beatport Track (07): Problem Kids - Miles Away (2 Bit Whore Mix)"} , {time: 2016, text: "Innersphere Aka Shinedoe - Phunk (Ricardo Villalobos Remix)", overlayText: "Buy on iTunesBuy on Beatport Track (08): Innersphere Aka Shinedoe - Phunk (Ricardo Villalobos Remix)"} , {time: 2151, text: "not identified - yet", overlayText: " Track (09): not identified - yet"} ] }); 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): Timofti - Blue Effect (Vlad Caia\'s 610 Remix)
' ) ); positionTrackButtons ('.vjs-break-overlay','.tracks-nav'); } , 5000 ); $(window).on("resize", function () { positionTrackButtons ('.vjs-break-overlay','.tracks-nav')}); setTimeout( function(){setDuration(player.duration(),7761)}, 4000 );