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: "Dinky - Casa (Axel Boman Dub Mix)", overlayText: "Buy on iTunesBuy on BeatportBuy on Discogs Track (01): Dinky - Casa (Axel Boman Dub Mix)"} , {time: 90, text: "Osunlade, Pastaboys - Deep Musique (Rampa Remix)", overlayText: "Buy on iTunesBuy on BeatportBuy on Discogs Track (02): Osunlade, Pastaboys - Deep Musique (Rampa Remix)"} , {time: 485, text: "Rampa - Bimma", overlayText: "Buy on iTunesBuy on BeatportBuy on Discogs Track (03): Rampa - Bimma"} , {time: 761, text: "Neil Flynn, Katie Kim - J.E.N.", overlayText: "Buy on iTunesBuy on BeatportBuy on Discogs Track (04): Neil Flynn, Katie Kim - J.E.N."} , {time: 1141, text: "Rafael Cerato - Sekater", overlayText: "Buy on iTunesBuy on Beatport Track (05): Rafael Cerato - Sekater"} , {time: 1536, text: "Doctor Dru - Praerie", overlayText: "Buy on iTunesBuy on Beatport Track (06): Doctor Dru - Praerie"} , {time: 1707, text: "Fur Coat - Interstellar", overlayText: "Buy on iTunesBuy on BeatportBuy on Discogs Track (07): Fur Coat - Interstellar"} , {time: 1971, text: "Adana Twins - Uncompromising", overlayText: "Buy on iTunesBuy on Beatport Track (08): Adana Twins - Uncompromising"} , {time: 2200, text: "not identified - yet", overlayText: " Track (09): not identified - yet"} , {time: 2562, text: "OXIA - Domino (Rework)", overlayText: "Buy on iTunesBuy on BeatportBuy on Discogs Track (10): OXIA - Domino (Rework)"} , {time: 2873, text: "Patrice Baumel - Glutes", overlayText: "Buy on iTunesBuy on BeatportBuy on Discogs Track (11): Patrice Baumel - Glutes"} , {time: 3083, text: "Alex Niggemann - Virgo", overlayText: "Buy on iTunesBuy on BeatportBuy on Discogs Track (12): Alex Niggemann - Virgo"} , {time: 3342, text: "Amentia - Serpent", overlayText: "Buy on iTunesBuy on BeatportBuy on Discogs Track (13): Amentia - Serpent"} ] }); 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): Dinky - Casa (Axel Boman Dub Mix)
' ) ); positionTrackButtons ('.vjs-break-overlay','.tracks-nav'); } , 5000 ); $(window).on("resize", function () { positionTrackButtons ('.vjs-break-overlay','.tracks-nav')}); setTimeout( function(){setDuration(player.duration(),8539)}, 4000 );