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: 2, text: "Soichi Terada - Snow Tires (Brawther Garlic Dub)", overlayText: " Track (01): Soichi Terada - Snow Tires (Brawther Garlic Dub)"} , {time: 75, text: "Studio 45 Pres. Le Pamp Playhouse - I Like The Sounds", overlayText: "Buy on Beatport Track (02): Studio 45 Pres. Le Pamp Playhouse - I Like The Sounds"} , {time: 358, text: "YYY - ?398A", overlayText: " Track (03): YYY - ?398A"} , {time: 604, text: "Sebo K - Magie Noire", overlayText: " Track (04): Sebo K - Magie Noire"} , {time: 837, text: "Andrade - Control", overlayText: "Buy on Discogs Track (05): Andrade - Control"} , {time: 1094, text: "Reboot - Enjoy Music", overlayText: "Buy on iTunesBuy on Beatport Track (06): Reboot - Enjoy Music"} , {time: 1439, text: "Point G - Druker (Brawther Garlic Dub)", overlayText: " Track (07): Point G - Druker (Brawther Garlic Dub)"} , {time: 1726, text: "Floorplan - The Heavens & The Earth", overlayText: "Buy on iTunesBuy on Beatport Track (08): Floorplan - The Heavens & The Earth"} , {time: 2027, text: "Steve Rachmad - Sabre Song", overlayText: " Track (09): Steve Rachmad - Sabre Song"} , {time: 2316, text: "Gunnar Haslam - Overcomplete", overlayText: " Track (10): Gunnar Haslam - Overcomplete"} , {time: 2638, text: "DJ Skull - Fly", overlayText: " Track (11): DJ Skull - Fly"} , {time: 2903, text: "not identified - yet", overlayText: " Track (12): not identified - yet"} , {time: 3102, text: "DJ Jus Ed - Strange Bad Connection", overlayText: " Track (13): DJ Jus Ed - Strange Bad Connection"} , {time: 3363, text: "Diego Krause - Realms", overlayText: " Track (14): Diego Krause - Realms"} , {time: 3661, text: "Mr. G - Transient", overlayText: "Buy on iTunesBuy on Beatport Track (15): Mr. G - Transient"} ] }); 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): Soichi Terada - Snow Tires (Brawther Garlic Dub)
' ) ); positionTrackButtons ('.vjs-break-overlay','.tracks-nav'); } , 5000 ); $(window).on("resize", function () { positionTrackButtons ('.vjs-break-overlay','.tracks-nav')}); setTimeout( function(){setDuration(player.duration(),3559)}, 4000 );