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: 4, text: "Leftwing & Kody - Sound Boy", overlayText: "Buy on iTunesBuy on Beatport Track (01): Leftwing & Kody - Sound Boy"} , {time: 116, text: "Honey Dijon ft. Cakes Da Killa - Catch The Beat", overlayText: "Buy on iTunesBuy on Beatport Track (02): Honey Dijon ft. Cakes Da Killa - Catch The Beat"} , {time: 301, text: "Karizma - Work It Out", overlayText: "Buy on iTunesBuy on BeatportBuy on Discogs Track (03): Karizma - Work It Out"} , {time: 532, text: "Al Kent - Come Back Home", overlayText: "Buy on iTunesBuy on BeatportBuy on Discogs Track (04): Al Kent - Come Back Home"} , {time: 828, text: "Fells Point - Jaywick", overlayText: "Buy on iTunesBuy on BeatportBuy on Discogs Track (05): Fells Point - Jaywick"} , {time: 1076, text: "Gorillaz ft. Vince Staples - Ascension (Nic Fanciulli Remix)", overlayText: "Buy on iTunesBuy on BeatportBuy on Discogs Track (06): Gorillaz ft. Vince Staples - Ascension (Nic Fanciulli Remix)"} , {time: 1339, text: "Format:B - Whippp", overlayText: "Buy on iTunesBuy on Beatport Track (07): Format:B - Whippp"} , {time: 1594, text: "Wankelmut & Charlotte OC - Almost Mine (Mat.Joe Remix)", overlayText: "Buy on iTunesBuy on Beatport Track (08): Wankelmut & Charlotte OC - Almost Mine (Mat.Joe Remix)"} , {time: 1889, text: "ONYVA - Tibetan People", overlayText: "Buy on iTunesBuy on Beatport Track (09): ONYVA - Tibetan People"} , {time: 2166, text: "MANT - Cragged", overlayText: "Buy on iTunesBuy on Beatport Track (10): MANT - Cragged"} , {time: 2396, text: "Mario Ochoa - Quantum", overlayText: "Buy on iTunesBuy on Beatport Track (11): Mario Ochoa - Quantum"} , {time: 2765, text: "Underworld - Born Slippy (Remix)", overlayText: "Buy on iTunesBuy on BeatportBuy on Discogs Track (12): Underworld - Born Slippy (Remix)"} , {time: 3087, text: "Enrico Sangiuliano - Ghettoblaster", overlayText: "Buy on iTunesBuy on BeatportBuy on Discogs Track (13): Enrico Sangiuliano - Ghettoblaster"} , {time: 3379, text: "SHDW & Obscure Shape - Gesang Der Toten Dinge (Konstantin Sibold Version)", overlayText: "Buy on iTunesBuy on BeatportBuy on Discogs Track (14): SHDW & Obscure Shape - Gesang Der Toten Dinge (Konstantin Sibold Version)"} ] }); 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): Leftwing & Kody - Sound Boy
' ) ); positionTrackButtons ('.vjs-break-overlay','.tracks-nav'); } , 5000 ); $(window).on("resize", function () { positionTrackButtons ('.vjs-break-overlay','.tracks-nav')}); setTimeout( function(){setDuration(player.duration(),8531)}, 4000 );