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: 1, text: "Audio Werner - Trust", overlayText: "Buy on Beatport Track (01): Audio Werner - Trust"} , {time: 230, text: "Loco Dice Feat. Giggs - Get Comfy (Martin Buttrich Thing)", overlayText: "Buy on iTunesBuy on Beatport Track (02): Loco Dice Feat. Giggs - Get Comfy (Martin Buttrich Thing)"} , {time: 592, text: "Alli Borem - Scotch Your Mind", overlayText: "Buy on iTunesBuy on Beatport Track (03): Alli Borem - Scotch Your Mind"} , {time: 897, text: "Omar S - Triangulum Australe (Say It In Space)", overlayText: "Buy on Beatport Track (04): Omar S - Triangulum Australe (Say It In Space)"} , {time: 1193, text: "Loco Dice - Like In The Movies... Yeah I Want Sum!", overlayText: "Buy on iTunesBuy on Beatport Track (05): Loco Dice - Like In The Movies... Yeah I Want Sum!"} , {time: 1617, text: "Pig & Dan - Sandstorm", overlayText: "Buy on Beatport Track (06): Pig & Dan - Sandstorm"} , {time: 2023, text: "Philip Arruda - Seeds Of Brooklyn (&ME Remix)", overlayText: "Buy on Beatport Track (07): Philip Arruda - Seeds Of Brooklyn (&ME Remix)"} , {time: 2329, text: "Radio Slave - Don't Stop No Sleep", overlayText: "Buy on iTunesBuy on Beatport Track (08): Radio Slave - Don't Stop No Sleep"} , {time: 2560, text: "not identified - yet", overlayText: " Track (09): not identified - yet"} , {time: 3112, text: "Dan Curtin - Slave", overlayText: "Buy on Beatport Track (10): Dan Curtin - Slave"} , {time: 3336, text: "Benno Blome - Abotha (Mihai Popoviciu Remix)", overlayText: "Buy on iTunesBuy on Beatport Track (11): Benno Blome - Abotha (Mihai Popoviciu Remix)"} ] }); 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): Audio Werner - Trust
' ) ); positionTrackButtons ('.vjs-break-overlay','.tracks-nav'); } , 5000 ); $(window).on("resize", function () { positionTrackButtons ('.vjs-break-overlay','.tracks-nav')}); setTimeout( function(){setDuration(player.duration(),3557)}, 4000 );