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: "Architectural - Strain Tensor", overlayText: "Buy on iTunesBuy on BeatportBuy on DiscogsBuy on TraxSource Track (01): Architectural - Strain Tensor"} , {time: 260, text: "Rodriguez Jr. - 2 Miles Away", overlayText: "Buy on iTunesBuy on BeatportBuy on TraxSource Track (02): Rodriguez Jr. - 2 Miles Away"} , {time: 462, text: "Marvin and Guy feat. Fantastic Twins - The Train Of Fantastic", overlayText: "Buy on iTunesBuy on Beatport Track (03): Marvin and Guy feat. Fantastic Twins - The Train Of Fantastic"} , {time: 814, text: "not identified - yet", overlayText: " Track (04): not identified - yet"} , {time: 1307, text: "Marvin and Guy - Arpadia", overlayText: "Buy on iTunesBuy on BeatportBuy on DiscogsBuy on TraxSource Track (05): Marvin and Guy - Arpadia"} , {time: 1508, text: "Ming - Escape", overlayText: "Buy on iTunesBuy on BeatportBuy on TraxSource Track (06): Ming - Escape"} , {time: 1849, text: "Elis M. Feeling - Digital Boy", overlayText: "Buy on iTunesBuy on Beatport Track (07): Elis M. Feeling - Digital Boy"} , {time: 2104, text: "not identified - yet", overlayText: " Track (08): not identified - yet"} , {time: 2400, text: "Francesco Chiocci and Black Soda - Black Sunrise (Olderic Remix)", overlayText: "Buy on iTunesBuy on BeatportBuy on TraxSource Track (09): Francesco Chiocci and Black Soda - Black Sunrise (Olderic Remix)"} , {time: 2769, text: "Henrik Schwarz and Ame and Dixon feat. Derrick L. Carter - Where We At (Version 1)", overlayText: "Buy on iTunesBuy on BeatportBuy on DiscogsBuy on TraxSource Track (10): Henrik Schwarz and Ame and Dixon feat. Derrick L. Carter - Where We At (Version 1)"} , {time: 3066, text: "not identified - yet", overlayText: " Track (11): 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): Architectural - Strain Tensor
' ) ); positionTrackButtons ('.vjs-break-overlay','.tracks-nav'); } , 5000 ); $(window).on("resize", function () { positionTrackButtons ('.vjs-break-overlay','.tracks-nav')}); setTimeout( function(){setDuration(player.duration(),8700)}, 4000 );