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: 0, text: "Darlyn Vlys Ft Forrest - Colours (Ruede Hagelstein Remix)", overlayText: "Buy on iTunesBuy on Beatport Track (01): Darlyn Vlys Ft Forrest - Colours (Ruede Hagelstein Remix)"} , {time: 277, text: "Rafael Cerato & Artbat - Uplift", overlayText: "Buy on iTunesBuy on Beatport Track (02): Rafael Cerato & Artbat - Uplift"} , {time: 648, text: "Alevtina, Rich Hila - Near But Far", overlayText: "Buy on iTunesBuy on Beatport Track (03): Alevtina, Rich Hila - Near But Far"} , {time: 945, text: "NORR feat. Cook Strummer - Can't Stand (Magdalena Remix)", overlayText: "Buy on iTunesBuy on Beatport Track (04): NORR feat. Cook Strummer - Can't Stand (Magdalena Remix)"} , {time: 1300, text: "Chicola - Drosera", overlayText: "Buy on iTunesBuy on Beatport Track (05): Chicola - Drosera"} , {time: 1800, text: "Jiggler - Illusions", overlayText: "Buy on iTunesBuy on Beatport Track (06): Jiggler - Illusions"} , {time: 2115, text: "Mario Ochoa - Tripping", overlayText: "Buy on Beatport Track (07): Mario Ochoa - Tripping"} , {time: 2504, text: "Manuel De La Mare, Fabricio Pecanha - Praia Do Rosa", overlayText: "Buy on iTunesBuy on Beatport Track (08): Manuel De La Mare, Fabricio Pecanha - Praia Do Rosa"} , {time: 2845, text: "Landmark - Myself", overlayText: "Buy on iTunesBuy on Beatport Track (09): Landmark - Myself"} , {time: 3215, text: "Christian Smith - Blast Off (Victor Ruiz Remix)", overlayText: "Buy on iTunesBuy on Beatport Track (10): Christian Smith - Blast Off (Victor Ruiz Remix)"} , {time: 3610, text: "Cirez D - Ruby", overlayText: "Buy on iTunesBuy on Beatport Track (11): Cirez D - Ruby"} ] }); 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): Darlyn Vlys Ft Forrest - Colours (Ruede Hagelstein Remix)
' ) ); positionTrackButtons ('.vjs-break-overlay','.tracks-nav'); } , 5000 ); $(window).on("resize", function () { positionTrackButtons ('.vjs-break-overlay','.tracks-nav')}); setTimeout( function(){setDuration(player.duration(),8493)}, 4000 );