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: 2, text: "La Fleur - Nightflow (Kenny Larkin Drama Mix)", overlayText: "Buy on iTunesBuy on Beatport Track (01): La Fleur - Nightflow (Kenny Larkin Drama Mix)"} , {time: 57, text: "Wareika & Miajica - Keen To Rebel (Dewalta & Shannon Remix)", overlayText: "Buy on iTunesBuy on Beatport Track (02): Wareika & Miajica - Keen To Rebel (Dewalta & Shannon Remix)"} , {time: 436, text: "Limpid - Speologie", overlayText: " Track (03): Limpid - Speologie"} , {time: 717, text: "Archie Hamilton - Some Kind Of Arrangement", overlayText: " Track (04): Archie Hamilton - Some Kind Of Arrangement"} , {time: 986, text: "Robin Porter & Mike Carr - Fathernature", overlayText: "Buy on iTunesBuy on Beatport Track (05): Robin Porter & Mike Carr - Fathernature"} , {time: 1282, text: "not identified - yet", overlayText: " Track (06): not identified - yet"} , {time: 1598, text: "Kornel Lemon - La Leona (Alex Celler Remix)", overlayText: "Buy on Beatport Track (07): Kornel Lemon - La Leona (Alex Celler Remix)"} , {time: 1799, text: "Sons Of Tiki - Three-man Attack", overlayText: "Buy on iTunesBuy on Beatport Track (08): Sons Of Tiki - Three-man Attack"} , {time: 2017, text: "John Dimas - Bump", overlayText: "Buy on Beatport Track (09): John Dimas - Bump"} , {time: 2299, text: "Dani Siciliano - I'm The Question (Ben Vedren Remix)", overlayText: "Buy on iTunesBuy on Beatport Track (10): Dani Siciliano - I'm The Question (Ben Vedren Remix)"} , {time: 2585, text: "John Dimas - Smoking Drums", overlayText: "Buy on iTunesBuy on Beatport Track (11): John Dimas - Smoking Drums"} , {time: 2856, text: "Norm Talley - The Journey", overlayText: "Buy on iTunesBuy on Beatport Track (12): Norm Talley - The Journey"} , {time: 3145, text: "not identified - yet", overlayText: " Track (13): 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): La Fleur - Nightflow (Kenny Larkin Drama Mix)
' ) ); positionTrackButtons ('.vjs-break-overlay','.tracks-nav'); } , 5000 ); $(window).on("resize", function () { positionTrackButtons ('.vjs-break-overlay','.tracks-nav')}); setTimeout( function(){setDuration(player.duration(),3552)}, 4000 );