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: "Mr. G, Blondewearingblack - Precious Cargo (Mr. G's Out Dub)", overlayText: "Buy on iTunesBuy on Beatport Track (01): Mr. G, Blondewearingblack - Precious Cargo (Mr. G's Out Dub)"} , {time: 83, text: "Schatrax - The Same Fury", overlayText: "Buy on iTunesBuy on Beatport Track (02): Schatrax - The Same Fury"} , {time: 240, text: "Cabin Fever Trax Vol. 34 - Cheryl From The River", overlayText: " Track (03): Cabin Fever Trax Vol. 34 - Cheryl From The River"} , {time: 377, text: "Merca - Back To Cali (Alex Roque Deep Remix)", overlayText: "Buy on Beatport Track (04): Merca - Back To Cali (Alex Roque Deep Remix)"} , {time: 604, text: "Maurice Puls - Nyeri Hill", overlayText: "Buy on iTunesBuy on Beatport Track (05): Maurice Puls - Nyeri Hill"} , {time: 1009, text: "Tiger & Woods - Boca", overlayText: "Buy on iTunesBuy on Discogs Track (06): Tiger & Woods - Boca"} , {time: 1236, text: "Schatrax - Humbug", overlayText: "Buy on Beatport Track (07): Schatrax - Humbug"} , {time: 1513, text: "Boys Noize - Euphoria Feat. Remy Banks", overlayText: "Buy on iTunesBuy on Beatport Track (08): Boys Noize - Euphoria Feat. Remy Banks"} , {time: 1779, text: "Peter Funk - Take My Breath Away", overlayText: "Buy on Beatport Track (09): Peter Funk - Take My Breath Away"} , {time: 1923, text: "Alex Dolby - Calypso (Reboot's Art Is Nothing But Noodlesoup Reshape)", overlayText: "Buy on Beatport Track (10): Alex Dolby - Calypso (Reboot's Art Is Nothing But Noodlesoup Reshape)"} , {time: 2276, text: "Boris Werner - I Didn't Hear This Before", overlayText: "Buy on Beatport Track (11): Boris Werner - I Didn't Hear This Before"} , {time: 2388, text: "Spencer Parker - Silly Club Song No. 5", overlayText: "Buy on Beatport Track (12): Spencer Parker - Silly Club Song No. 5"} , {time: 2427, text: "Djedjotronic - Walk With Me", overlayText: "Buy on Beatport Track (13): Djedjotronic - Walk With Me"} , {time: 2545, text: "Christian Duran - Trust", overlayText: " Track (14): Christian Duran - Trust"} , {time: 2687, text: "Jesper Dahlback - Nyhus (Part 1)", overlayText: "Buy on Beatport Track (15): Jesper Dahlback - Nyhus (Part 1)"} , {time: 2891, text: "not identified - yet", overlayText: " Track (16): not identified - yet"} , {time: 3070, text: "WAX - 10001B", overlayText: "Buy on iTunesBuy on Beatport Track (17): WAX - 10001B"} , {time: 3265, text: "not identified - yet", overlayText: " Track (18): not identified - yet"} , {time: 3453, text: "Tim Xavier - Arco Della Devozione (Dub Version)", overlayText: " Track (19): Tim Xavier - Arco Della Devozione (Dub 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): Mr. G, Blondewearingblack - Precious Cargo (Mr. G\'s Out Dub)
' ) ); positionTrackButtons ('.vjs-break-overlay','.tracks-nav'); } , 5000 ); $(window).on("resize", function () { positionTrackButtons ('.vjs-break-overlay','.tracks-nav')}); setTimeout( function(){setDuration(player.duration(),3558)}, 4000 );