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: 3, text: "Giash - Wind Up Bird", overlayText: " Track (01): Giash - Wind Up Bird"} , {time: 144, text: "Unknown Artist - Blindness", overlayText: " Track (02): Unknown Artist - Blindness"} , {time: 355, text: "Topper - Hight Red (Nima Gorji Remix)", overlayText: " Track (03): Topper - Hight Red (Nima Gorji Remix)"} , {time: 478, text: "Local Group - Discredit To The Edit", overlayText: "Buy on iTunesBuy on Beatport Track (04): Local Group - Discredit To The Edit"} , {time: 739, text: "Damian Schwartz - Ride You On", overlayText: "Buy on iTunesBuy on Beatport Track (05): Damian Schwartz - Ride You On"} , {time: 968, text: "Verrina & Ventura - Nihil (Holic Trax)", overlayText: " Track (06): Verrina & Ventura - Nihil (Holic Trax)"} , {time: 1164, text: "NoiDoi - Harp", overlayText: "Buy on iTunesBuy on BeatportBuy on Discogs Track (07): NoiDoi - Harp"} , {time: 1308, text: "Lee Rodriguez - All The Same Family (Mr. Onester Original Mix)", overlayText: "Buy on iTunesBuy on Beatport Track (08): Lee Rodriguez - All The Same Family (Mr. Onester Original Mix)"} , {time: 1398, text: "Aaron Carl - Down", overlayText: "Buy on iTunes Track (09): Aaron Carl - Down"} , {time: 1719, text: "Troubleman - Stereo (Mark Pritchard Remix)", overlayText: "Buy on iTunesBuy on Beatport Track (10): Troubleman - Stereo (Mark Pritchard Remix)"} , {time: 1991, text: "Martinez - Memento", overlayText: "Buy on Beatport Track (11): Martinez - Memento"} , {time: 2152, text: "Plasmic Shape - Cromosom (Echologist Filthy Dub)", overlayText: " Track (12): Plasmic Shape - Cromosom (Echologist Filthy Dub)"} , {time: 2380, text: "Akkord - Navigate", overlayText: "Buy on iTunesBuy on Beatport Track (13): Akkord - Navigate"} , {time: 2621, text: "not identified - yet", overlayText: " Track (14): not identified - yet"} , {time: 2807, text: "Cassy - Keep Trying (Radio Slave Raw Remix)", overlayText: " Track (15): Cassy - Keep Trying (Radio Slave Raw Remix)"} , {time: 3194, text: "Mr. James Barth - Bodyfluids", overlayText: " Track (16): Mr. James Barth - Bodyfluids"} ] }); 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): Giash - Wind Up Bird
' ) ); positionTrackButtons ('.vjs-break-overlay','.tracks-nav'); } , 5000 ); $(window).on("resize", function () { positionTrackButtons ('.vjs-break-overlay','.tracks-nav')}); setTimeout( function(){setDuration(player.duration(),7742)}, 4000 );