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: "Dachshund - Playing The Game", overlayText: "Buy on Beatport Track (01): Dachshund - Playing The Game"} , {time: 42, text: "Riva Starr - Akitune", overlayText: "Buy on Beatport Track (02): Riva Starr - Akitune"} , {time: 273, text: "Hardrive - Deep Inside (Low Steppa Remix)", overlayText: "Buy on iTunesBuy on Beatport Track (03): Hardrive - Deep Inside (Low Steppa Remix)"} , {time: 520, text: "Brett Gould - House Music Is…", overlayText: "Buy on iTunesBuy on Beatport Track (04): Brett Gould - House Music Is…"} , {time: 780, text: "Pablo Say w/ Basement Jaxx - Harmonic Chimes w/ Jump N Shout (Live Mashup)", overlayText: "Buy on iTunes Track (05): Pablo Say w/ Basement Jaxx - Harmonic Chimes w/ Jump N Shout (Live Mashup)"} , {time: 1044, text: "Groove Armada - House With Me", overlayText: "Buy on iTunesBuy on Beatport Track (06): Groove Armada - House With Me"} , {time: 1359, text: "Riva Starr - Another Dimension", overlayText: "Buy on iTunesBuy on BeatportBuy on Discogs Track (07): Riva Starr - Another Dimension"} , {time: 1590, text: "DMS12 - Eno Minimal", overlayText: "Buy on iTunesBuy on Beatport Track (08): DMS12 - Eno Minimal"} , {time: 1796, text: "Urban Soul, Roland Clark - President House (Will Monotone's Beat Driven Mix)", overlayText: "Buy on iTunesBuy on Beatport Track (09): Urban Soul, Roland Clark - President House (Will Monotone's Beat Driven Mix)"} , {time: 1889, text: "Riva Starr, Dajae - The Loft (Emanuel Satie Remix)", overlayText: "Buy on iTunesBuy on Beatport Track (10): Riva Starr, Dajae - The Loft (Emanuel Satie Remix)"} , {time: 2127, text: "Groove Armada - Superstylin' (Riva Starr Edit)", overlayText: "Buy on iTunesBuy on Beatport Track (11): Groove Armada - Superstylin' (Riva Starr Edit)"} , {time: 2564, text: "Armand Van Helden Feat. Duane Harden - U Don't Know Me", overlayText: "Buy on iTunesBuy on Beatport Track (12): Armand Van Helden Feat. Duane Harden - U Don't Know Me"} ] }); 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): Dachshund - Playing The Game
' ) ); positionTrackButtons ('.vjs-break-overlay','.tracks-nav'); } , 5000 ); $(window).on("resize", function () { positionTrackButtons ('.vjs-break-overlay','.tracks-nav')}); setTimeout( function(){setDuration(player.duration(),7743)}, 4000 );