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: "Luke Hess - Restored", overlayText: "Buy on Discogs Track (01): Luke Hess - Restored"} , {time: 174, text: "XXX - Worked With Your Girl ", overlayText: "Buy on Discogs Track (02): XXX - Worked With Your Girl "} , {time: 310, text: "not identified - yet", overlayText: " Track (03): not identified - yet"} , {time: 366, text: "not identified - yet", overlayText: " Track (04): not identified - yet"} , {time: 573, text: "not identified - yet", overlayText: " Track (05): not identified - yet"} , {time: 673, text: "not identified - yet", overlayText: " Track (06): not identified - yet"} , {time: 929, text: "David Vunk - Something in Your Assid", overlayText: "Buy on Discogs Track (07): David Vunk - Something in Your Assid"} , {time: 1027, text: "not identified - yet", overlayText: " Track (08): not identified - yet"} , {time: 1118, text: "Company B - Perfect Lover (Club Mix)", overlayText: "Buy on iTunesBuy on Discogs Track (09): Company B - Perfect Lover (Club Mix)"} , {time: 1275, text: "Depeche Mode - Enjoy The Silence (Timo Maas Extended Remix)", overlayText: "Buy on iTunesBuy on BeatportBuy on Discogs Track (10): Depeche Mode - Enjoy The Silence (Timo Maas Extended Remix)"} , {time: 1585, text: "Nik Kershaw - Dancing Girls", overlayText: "Buy on iTunesBuy on Discogs Track (11): Nik Kershaw - Dancing Girls"} , {time: 1771, text: "not identified - yet", overlayText: " Track (12): not identified - yet"} , {time: 2026, text: "not identified - yet", overlayText: " Track (13): not identified - yet"} , {time: 2130, text: "not identified - yet", overlayText: " Track (14): not identified - yet"} , {time: 2277, text: "Joe Smooth - Promised Land", overlayText: "Buy on iTunesBuy on BeatportBuy on DiscogsBuy on TraxSource Track (15): Joe Smooth - Promised Land"} , {time: 2440, text: "Stippenlift and Faberyayo - Help Ik Wil Dood (David Vunk Climate Control Remix)", overlayText: "Buy on iTunesBuy on BeatportBuy on Discogs Track (16): Stippenlift and Faberyayo - Help Ik Wil Dood (David Vunk Climate Control Remix)"} , {time: 2636, text: "not identified - yet", overlayText: " Track (17): not identified - yet"} , {time: 2741, text: "Abba - Lay All Your Love On Me (ID Remix)", overlayText: "Buy on iTunesBuy on Discogs Track (18): Abba - Lay All Your Love On Me (ID Remix)"} , {time: 3088, text: "Laurent Garnier - Wake Up", overlayText: "Buy on BeatportBuy on Discogs Track (19): Laurent Garnier - Wake Up"} , {time: 3215, text: "not identified - yet", overlayText: " Track (20): 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): Luke Hess - Restored
' ) ); positionTrackButtons ('.vjs-break-overlay','.tracks-nav'); } , 5000 ); $(window).on("resize", function () { positionTrackButtons ('.vjs-break-overlay','.tracks-nav')}); setTimeout( function(){setDuration(player.duration(),8701)}, 4000 );