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: "Will Monotone - Dem Mai Hoes", overlayText: "Buy on iTunesBuy on Beatport Track (01): Will Monotone - Dem Mai Hoes"} , {time: 29, text: "Phil Weeks - It's The Inside That Counts", overlayText: "Buy on iTunesBuy on Beatport Track (02): Phil Weeks - It's The Inside That Counts"} , {time: 230, text: "Joss Moog - Triple Loop", overlayText: "Buy on iTunesBuy on Beatport Track (03): Joss Moog - Triple Loop"} , {time: 436, text: "Induceve - Get Some Groove", overlayText: "Buy on iTunesBuy on Beatport Track (04): Induceve - Get Some Groove"} , {time: 673, text: "Paradise Soul - Loveshow ", overlayText: "Buy on Discogs Track (05): Paradise Soul - Loveshow "} , {time: 926, text: "Dan Ghenacia & Chris Carrier - Vaporized", overlayText: " Track (06): Dan Ghenacia & Chris Carrier - Vaporized"} , {time: 1163, text: "S.W.A.T. - Rights Of Passage", overlayText: "Buy on iTunesBuy on Beatport Track (07): S.W.A.T. - Rights Of Passage"} , {time: 1338, text: "TBF - Nasty Latina (DJ Sneak Dirty Mix)", overlayText: "Buy on iTunesBuy on Beatport Track (08): TBF - Nasty Latina (DJ Sneak Dirty Mix)"} , {time: 1805, text: "JT Donaldson - Do Dat", overlayText: " Track (09): JT Donaldson - Do Dat"} , {time: 2080, text: "Lawnchair Generals - Speechless", overlayText: "Buy on iTunesBuy on Beatport Track (10): Lawnchair Generals - Speechless"} , {time: 2309, text: "Moodymann - Shades Of Jae", overlayText: "Buy on iTunes Track (11): Moodymann - Shades Of Jae"} , {time: 2516, text: "Chateau Flight - Discobole (Pepe Bradock Beats)", overlayText: "Buy on iTunesBuy on Beatport Track (12): Chateau Flight - Discobole (Pepe Bradock Beats)"} , {time: 2685, text: "Gemini - Where Do I Go (1997 Mix)", overlayText: "Buy on iTunesBuy on Beatport Track (13): Gemini - Where Do I Go (1997 Mix)"} , {time: 2905, text: "Jason Hodges - Party People", overlayText: "Buy on Beatport Track (14): Jason Hodges - Party People"} , {time: 3072, text: "Tommy Vicari Jnr - Came To Say", overlayText: " Track (15): Tommy Vicari Jnr - Came To Say"} , {time: 3220, text: "not identified - yet", overlayText: " Track (16): not identified - yet"} , {time: 3405, text: "Submission - Women Beat Their Men (Cevin's Peak Hour Dub)", overlayText: "Buy on iTunesBuy on Beatport Track (17): Submission - Women Beat Their Men (Cevin's Peak Hour Dub)"} ] }); 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): Will Monotone - Dem Mai Hoes
' ) ); positionTrackButtons ('.vjs-break-overlay','.tracks-nav'); } , 5000 ); $(window).on("resize", function () { positionTrackButtons ('.vjs-break-overlay','.tracks-nav')}); setTimeout( function(){setDuration(player.duration(),7698)}, 4000 );