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: "Dexon - Yucatan", overlayText: "Buy on iTunesBuy on BeatportBuy on TraxSource Track (01): Dexon - Yucatan"} , {time: 327, text: "not identified - yet", overlayText: " Track (02): not identified - yet"} , {time: 603, text: "Kaiser Souzai - Thin Ice Skater", overlayText: "Buy on iTunesBuy on BeatportBuy on TraxSource Track (03): Kaiser Souzai - Thin Ice Skater"} , {time: 902, text: "not identified - yet", overlayText: " Track (04): not identified - yet"} , {time: 1053, text: "Giovanni Carozza and IDR3N - Spear Parts (Tony Dee Remix)", overlayText: "Buy on iTunesBuy on BeatportBuy on DiscogsBuy on TraxSource Track (05): Giovanni Carozza and IDR3N - Spear Parts (Tony Dee Remix)"} , {time: 1325, text: "not identified - yet", overlayText: " Track (06): not identified - yet"} , {time: 1657, text: "Rustek and Jeremy Stott - Zima (Dave Sinner Remix)", overlayText: "Buy on iTunesBuy on BeatportBuy on DiscogsBuy on TraxSource Track (07): Rustek and Jeremy Stott - Zima (Dave Sinner Remix)"} , {time: 1975, text: "Drumcomplex and Roel Salemink - Rubicon", overlayText: "Buy on BeatportBuy on TraxSource Track (08): Drumcomplex and Roel Salemink - Rubicon"} , {time: 2308, text: "Darmec - Hiding (Alen Milivojevic and Drzneday Remix)", overlayText: "Buy on iTunesBuy on BeatportBuy on TraxSource Track (09): Darmec - Hiding (Alen Milivojevic and Drzneday Remix)"} , {time: 2550, text: "Cari Lekebusch and Nima Khak - Crazy Mazy", overlayText: "Buy on iTunesBuy on BeatportBuy on TraxSource Track (10): Cari Lekebusch and Nima Khak - Crazy Mazy"} , {time: 2716, text: "not identified - yet", overlayText: " Track (11): not identified - yet"} , {time: 2927, text: "Chicago Loop - D Is For Drums", overlayText: "Buy on iTunesBuy on BeatportBuy on TraxSource Track (12): Chicago Loop - D Is For Drums"} , {time: 3116, text: "U-Nick and Maureen - Floated Away (Mark Grandel and Peter Mayzer Remix)", overlayText: " Track (13): U-Nick and Maureen - Floated Away (Mark Grandel and Peter Mayzer 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): Dexon - Yucatan
' ) ); positionTrackButtons ('.vjs-break-overlay','.tracks-nav'); } , 5000 ); $(window).on("resize", function () { positionTrackButtons ('.vjs-break-overlay','.tracks-nav')}); setTimeout( function(){setDuration(player.duration(),8759)}, 4000 );