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: "Markus Schatz - Restart", overlayText: "Buy on iTunesBuy on BeatportBuy on DiscogsBuy on TraxSource Track (01): Markus Schatz - Restart"} , {time: 155, text: "Masomenos - Jomaso", overlayText: "Buy on iTunesBuy on BeatportBuy on DiscogsBuy on TraxSource Track (02): Masomenos - Jomaso"} , {time: 404, text: "Manik NYC - Ruckus 8OH8", overlayText: "Buy on Beatport Track (03): Manik NYC - Ruckus 8OH8"} , {time: 683, text: "Masomenos - Travel Master", overlayText: "Buy on iTunesBuy on BeatportBuy on DiscogsBuy on TraxSource Track (04): Masomenos - Travel Master"} , {time: 864, text: "Masomenos feat. Ark and Pit Spector - Ok Carole", overlayText: "Buy on iTunesBuy on BeatportBuy on DiscogsBuy on TraxSource Track (05): Masomenos feat. Ark and Pit Spector - Ok Carole"} , {time: 1072, text: "not identified - yet", overlayText: " Track (06): not identified - yet"} , {time: 1351, text: "Lil Louis - Club Lonely (J. Cub Mix)", overlayText: "Buy on Discogs Track (07): Lil Louis - Club Lonely (J. Cub Mix)"} , {time: 1566, text: "Masomenos and Lemos - What The Fuck Baby What", overlayText: "Buy on BeatportBuy on Discogs Track (08): Masomenos and Lemos - What The Fuck Baby What"} , {time: 1987, text: "Atmosfear - Dancing In Outer Space (The Revenge Rework 1)", overlayText: "Buy on iTunesBuy on BeatportBuy on DiscogsBuy on TraxSource Track (09): Atmosfear - Dancing In Outer Space (The Revenge Rework 1)"} , {time: 2319, text: "Martin Waslewski - Clouds (Purple Disco Machine Remix)", overlayText: "Buy on iTunesBuy on BeatportBuy on TraxSource Track (10): Martin Waslewski - Clouds (Purple Disco Machine Remix)"} , {time: 2492, text: "Alex Jones - Latin Dragon", overlayText: "Buy on iTunesBuy on Beatport Track (11): Alex Jones - Latin Dragon"} ] }); 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): Markus Schatz - Restart
' ) ); positionTrackButtons ('.vjs-break-overlay','.tracks-nav'); } , 5000 ); $(window).on("resize", function () { positionTrackButtons ('.vjs-break-overlay','.tracks-nav')}); setTimeout( function(){setDuration(player.duration(),8756)}, 4000 );