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: 4, text: "Denney - OOLA", overlayText: "Buy on BeatportBuy on Discogs Track (01): Denney - OOLA"} , {time: 217, text: "not identified - yet", overlayText: " Track (02): not identified - yet"} , {time: 371, text: "Gat Decor - Passion (Fake Forward Edit)", overlayText: " Track (03): Gat Decor - Passion (Fake Forward Edit)"} , {time: 560, text: "not identified - yet", overlayText: " Track (04): not identified - yet"} , {time: 724, text: "Latmun feat. Amy Douglas - Footsteps", overlayText: "Buy on iTunesBuy on Beatport Track (05): Latmun feat. Amy Douglas - Footsteps"} , {time: 978, text: "not identified - yet", overlayText: " Track (06): not identified - yet"} , {time: 1244, text: "Gregor Tresher - Goliath", overlayText: "Buy on iTunesBuy on BeatportBuy on Discogs Track (07): Gregor Tresher - Goliath"} , {time: 1523, text: "not identified - yet", overlayText: " Track (08): not identified - yet"} , {time: 1661, text: "CamelPhat - Gypsy King", overlayText: "Buy on iTunesBuy on BeatportBuy on Discogs Track (09): CamelPhat - Gypsy King"} , {time: 1822, text: "Deetron - Photon", overlayText: "Buy on iTunesBuy on BeatportBuy on Discogs Track (10): Deetron - Photon"} , {time: 2103, text: "not identified - yet", overlayText: " Track (11): not identified - yet"} , {time: 2281, text: "Juan Diaz - Synergy", overlayText: " Track (12): Juan Diaz - Synergy"} , {time: 2376, text: "Emmanuel Top - Acid Phase", overlayText: "Buy on iTunesBuy on BeatportBuy on Discogs Track (13): Emmanuel Top - Acid Phase"} , {time: 2498, text: "Green Velvet - La La Land (Prok|Fitch Sweet Sixteen Remix)", overlayText: "Buy on iTunesBuy on BeatportBuy on Discogs Track (14): Green Velvet - La La Land (Prok|Fitch Sweet Sixteen Remix)"} , {time: 2783, text: "DJ Sly - When I Was Child", overlayText: "Buy on iTunesBuy on Beatport Track (15): DJ Sly - When I Was Child"} , {time: 2829, text: "not identified - yet", overlayText: " Track (16): not identified - yet"} , {time: 2898, text: "Dakar - Punch", overlayText: "Buy on BeatportBuy on Discogs Track (17): Dakar - Punch"} , {time: 3134, text: "Gene Farris & Anthony Attalla - Pocket Party", overlayText: "Buy on iTunesBuy on BeatportBuy on Discogs Track (18): Gene Farris & Anthony Attalla - Pocket Party"} , {time: 3340, text: "CamelPhat - The Jungle Cook", overlayText: "Buy on iTunesBuy on BeatportBuy on Discogs Track (19): CamelPhat - The Jungle Cook"} , {time: 3517, text: "not identified - yet", overlayText: " Track (20): 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): Denney - OOLA
' ) ); positionTrackButtons ('.vjs-break-overlay','.tracks-nav'); } , 5000 ); $(window).on("resize", function () { positionTrackButtons ('.vjs-break-overlay','.tracks-nav')}); setTimeout( function(){setDuration(player.duration(),8664)}, 4000 );