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: "Roog & Dennis Quin - 2A (Original Mix)", overlayText: "Buy on Discogs Track (01): Roog & Dennis Quin - 2A (Original Mix)"} , {time: 187, text: "Kaiserdisco - Nine Tea's", overlayText: "Buy on iTunesBuy on Beatport Track (02): Kaiserdisco - Nine Tea's"} , {time: 505, text: "Leroy Burgess, Reelow - This Is How We Do It (Tiger Stripes Remix)", overlayText: "Buy on iTunesBuy on Beatport Track (03): Leroy Burgess, Reelow - This Is How We Do It (Tiger Stripes Remix)"} , {time: 672, text: "Cuartero - Liquido", overlayText: "Buy on iTunesBuy on BeatportBuy on DiscogsBuy on TraxSource Track (04): Cuartero - Liquido"} , {time: 838, text: "Marshall Jefferson - Move Your Body (Tchami Tribute)", overlayText: "Buy on iTunesBuy on BeatportBuy on Discogs Track (05): Marshall Jefferson - Move Your Body (Tchami Tribute)"} , {time: 996, text: "not identified - yet", overlayText: " Track (06): not identified - yet"} , {time: 1203, text: "Jude & Frank - La Luna", overlayText: " Track (07): Jude & Frank - La Luna"} , {time: 1339, text: "Roog & Phonic Funk - KTDNG", overlayText: "Buy on iTunesBuy on BeatportBuy on Discogs Track (08): Roog & Phonic Funk - KTDNG"} , {time: 1562, text: "Roog & Erick E Pres. Housequake Feat. Anita Kelsey - Shed My Skin", overlayText: "Buy on iTunes Track (09): Roog & Erick E Pres. Housequake Feat. Anita Kelsey - Shed My Skin"} , {time: 1808, text: "Cajmere - Baby Talk", overlayText: "Buy on iTunesBuy on Beatport Track (10): Cajmere - Baby Talk"} , {time: 1976, text: "not identified - yet", overlayText: " Track (11): not identified - yet"} , {time: 2145, text: "not identified - yet", overlayText: " Track (12): not identified - yet"} , {time: 2345, text: "not identified - yet", overlayText: " Track (13): not identified - yet"} , {time: 2467, text: "Cajmere - Percolator", overlayText: "Buy on iTunesBuy on Beatport Track (14): Cajmere - Percolator"} , {time: 2528, text: "not identified - yet", overlayText: " Track (15): not identified - yet"} , {time: 2671, text: "Ian Pooley - Celtic Cross (Bangin' Bass Mix)", overlayText: "Buy on iTunes Track (16): Ian Pooley - Celtic Cross (Bangin' Bass Mix)"} , {time: 2918, text: "Roman Flugel - More & More & More", overlayText: "Buy on iTunes Track (17): Roman Flugel - More & More & More"} , {time: 3291, text: "Chambray - Anew", overlayText: "Buy on iTunesBuy on Beatport Track (18): Chambray - Anew"} ] }); 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): Roog & Dennis Quin - 2A (Original Mix)
' ) ); positionTrackButtons ('.vjs-break-overlay','.tracks-nav'); } , 5000 ); $(window).on("resize", function () { positionTrackButtons ('.vjs-break-overlay','.tracks-nav')}); setTimeout( function(){setDuration(player.duration(),4140)}, 4000 );