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: 3, text: "Joey Beltram - Energy Flash", overlayText: "Buy on iTunesBuy on Beatport Track (01): Joey Beltram - Energy Flash"} , {time: 218, text: "Locked Groove - Enigma (Scuba's Warehouse Mix)", overlayText: "Buy on iTunesBuy on Beatport Track (02): Locked Groove - Enigma (Scuba's Warehouse Mix)"} , {time: 525, text: "Customer - Thirteen", overlayText: "Buy on iTunesBuy on Beatport Track (03): Customer - Thirteen"} , {time: 863, text: "Heiko Laux & Joel Mull - Slight Munch", overlayText: " Track (04): Heiko Laux & Joel Mull - Slight Munch"} , {time: 1124, text: "Customer - Hunderpantsie", overlayText: "Buy on iTunesBuy on Beatport Track (05): Customer - Hunderpantsie"} , {time: 1416, text: "Marco Faraone - Replace (Untidy Mix)", overlayText: "Buy on Beatport Track (06): Marco Faraone - Replace (Untidy Mix)"} , {time: 1688, text: "Kamera - Consignia (Truncate Remix)", overlayText: "Buy on iTunes Track (07): Kamera - Consignia (Truncate Remix)"} , {time: 1872, text: "Nima Khak - Beta Bacille", overlayText: "Buy on iTunesBuy on Beatport Track (08): Nima Khak - Beta Bacille"} , {time: 2157, text: "Morning Factory - Raw Tunes Vol. 1", overlayText: "Buy on iTunesBuy on Beatport Track (09): Morning Factory - Raw Tunes Vol. 1"} , {time: 2403, text: "Customer - Easy", overlayText: "Buy on iTunesBuy on Beatport Track (10): Customer - Easy"} , {time: 2656, text: "Skudge - Waveless", overlayText: " Track (11): Skudge - Waveless"} , {time: 2918, text: "Jonas Kopp - Desire", overlayText: "Buy on Beatport Track (12): Jonas Kopp - Desire"} , {time: 3186, text: "Psyk - Distane", overlayText: "Buy on iTunesBuy on Beatport Track (13): Psyk - Distane"} , {time: 3432, text: "Nima Khak - All Ways", overlayText: "Buy on iTunesBuy on Beatport Track (14): Nima Khak - All Ways"} ] }); 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): Joey Beltram - Energy Flash
' ) ); positionTrackButtons ('.vjs-break-overlay','.tracks-nav'); } , 5000 ); $(window).on("resize", function () { positionTrackButtons ('.vjs-break-overlay','.tracks-nav')}); setTimeout( function(){setDuration(player.duration(),3569)}, 4000 );