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: "David Byrne - Machu Picchu", overlayText: "Buy on Discogs Track (01): David Byrne - Machu Picchu"} , {time: 72, text: "not identified - yet", overlayText: " Track (02): not identified - yet"} , {time: 305, text: "Planetary Assault Systems - Twelve (Marcel Fengler Rework)", overlayText: "Buy on BeatportBuy on DiscogsBuy on TraxSource Track (03): Planetary Assault Systems - Twelve (Marcel Fengler Rework)"} , {time: 458, text: "not identified - yet", overlayText: " Track (04): not identified - yet"} , {time: 611, text: "DJ Bone - Black Patterns (Hardspace Mix)", overlayText: "Buy on iTunesBuy on BeatportBuy on DiscogsBuy on TraxSource Track (05): DJ Bone - Black Patterns (Hardspace Mix)"} , {time: 789, text: "Green Velvet - La La Land (Dave Clarke Remix)", overlayText: "Buy on BeatportBuy on Discogs Track (06): Green Velvet - La La Land (Dave Clarke Remix)"} , {time: 1011, text: "Osunlade - Idiosyncracy (Osunlade Mix)", overlayText: "Buy on Beatport Track (07): Osunlade - Idiosyncracy (Osunlade Mix)"} , {time: 1167, text: "Donna Summer - I Feel Love (Original 12\" Version)", overlayText: "Buy on iTunesBuy on DiscogsBuy on TraxSource Track (08): Donna Summer - I Feel Love (Original 12\" Version)"} , {time: 1479, text: "not identified - yet", overlayText: " Track (09): not identified - yet"} , {time: 1712, text: "Eddie Niguel - Absolute (Panteros666 Remix)", overlayText: "Buy on iTunesBuy on BeatportBuy on TraxSource Track (10): Eddie Niguel - Absolute (Panteros666 Remix)"} , {time: 1919, text: "Radio Slave feat. Danton Eeproms - Grindhouse (Len Faki Hardspace Mix 1)", overlayText: "Buy on iTunesBuy on BeatportBuy on Discogs Track (11): Radio Slave feat. Danton Eeproms - Grindhouse (Len Faki Hardspace Mix 1)"} , {time: 2127, text: "Samuel L Session - Octomeister (Full On Funk Remix)", overlayText: "Buy on iTunesBuy on BeatportBuy on DiscogsBuy on TraxSource Track (12): Samuel L Session - Octomeister (Full On Funk Remix)"} , {time: 2300, text: "not identified - yet", overlayText: " Track (13): not identified - yet"} , {time: 2390, text: "not identified - yet", overlayText: " Track (14): not identified - yet"} , {time: 2542, text: "Redlight - City Jams", overlayText: "Buy on iTunesBuy on BeatportBuy on DiscogsBuy on TraxSource Track (15): Redlight - City Jams"} , {time: 2775, text: "not identified - yet", overlayText: " Track (16): not identified - yet"} , {time: 3062, text: "not identified - yet", overlayText: " Track (17): not identified - yet"} , {time: 3313, text: "not identified - yet", overlayText: " Track (18): 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): David Byrne - Machu Picchu
' ) ); positionTrackButtons ('.vjs-break-overlay','.tracks-nav'); } , 5000 ); $(window).on("resize", function () { positionTrackButtons ('.vjs-break-overlay','.tracks-nav')}); setTimeout( function(){setDuration(player.duration(),8706)}, 4000 );