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: "Makanan - Midlight Lady", overlayText: "Buy on Beatport Track (01): Makanan - Midlight Lady"} , {time: 83, text: "Moonbootica & Teenage Mutants - Mutant Boots", overlayText: "Buy on BeatportBuy on Discogs Track (02): Moonbootica & Teenage Mutants - Mutant Boots"} , {time: 447, text: "KYDUS - Transatlantic", overlayText: "Buy on BeatportBuy on Discogs Track (03): KYDUS - Transatlantic"} , {time: 591, text: "not identified - yet", overlayText: " Track (04): not identified - yet"} , {time: 828, text: "Moonbootica - On The Corner (Format:B Remix)", overlayText: "Buy on BeatportBuy on Discogs Track (05): Moonbootica - On The Corner (Format:B Remix)"} , {time: 1180, text: "BLiSS ft. Fem Fel - I Wanna Feel (KYDUS Remix)", overlayText: "Buy on iTunesBuy on Beatport Track (06): BLiSS ft. Fem Fel - I Wanna Feel (KYDUS Remix)"} , {time: 1451, text: "Format:B - Okeey Yaaah", overlayText: "Buy on Beatport Track (07): Format:B - Okeey Yaaah"} , {time: 1722, text: "Dillon Francis ft. G-Eazy - Say Less (Gorgon City Remix)", overlayText: "Buy on iTunesBuy on Beatport Track (08): Dillon Francis ft. G-Eazy - Say Less (Gorgon City Remix)"} , {time: 2024, text: "Kolombo & Sharam Jey - Nonstop!", overlayText: "Buy on BeatportBuy on Discogs Track (09): Kolombo & Sharam Jey - Nonstop!"} , {time: 2318, text: "not identified - yet", overlayText: " Track (10): not identified - yet"} , {time: 2744, text: "D-Unity - Sinner", overlayText: "Buy on Beatport Track (11): D-Unity - Sinner"} , {time: 3038, text: "Sergio Fernandez - Terranova", overlayText: "Buy on Beatport Track (12): Sergio Fernandez - Terranova"} , {time: 3346, text: "Kölsch - Loreley", overlayText: "Buy on BeatportBuy on Discogs Track (13): Kölsch - Loreley"} ] }); 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): Makanan - Midlight Lady
' ) ); positionTrackButtons ('.vjs-break-overlay','.tracks-nav'); } , 5000 ); $(window).on("resize", function () { positionTrackButtons ('.vjs-break-overlay','.tracks-nav')}); setTimeout( function(){setDuration(player.duration(),8526)}, 4000 );