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: "Sound Stream - Sweep Magic", overlayText: "Buy on Discogs Track (01): Sound Stream - Sweep Magic"} , {time: 180, text: "not identified - yet", overlayText: " Track (02): not identified - yet"} , {time: 510, text: "Tony Allen & Africa 70 - Hustler (Monsieur Scott Super Disco Re-Edit)", overlayText: "Buy on Discogs Track (03): Tony Allen & Africa 70 - Hustler (Monsieur Scott Super Disco Re-Edit)"} , {time: 828, text: "Session Victim - Bring It Back", overlayText: "Buy on BeatportBuy on Discogs Track (04): Session Victim - Bring It Back"} , {time: 1143, text: "Azymuth - FĂȘnix (Ron Trent Remix)", overlayText: "Buy on BeatportBuy on Discogs Track (05): Azymuth - FĂȘnix (Ron Trent Remix)"} , {time: 1689, text: "Doc Link - The Signature", overlayText: "Buy on BeatportBuy on DiscogsBuy on TraxSource Track (06): Doc Link - The Signature"} , {time: 2008, text: "Morgan Geist - 24k", overlayText: "Buy on Discogs Track (07): Morgan Geist - 24k"} , {time: 2438, text: "Los Amigos Invisibles & Dimitri From Paris - Glad To Know You (Ray Mang's Flying Dub)", overlayText: "Buy on BeatportBuy on DiscogsBuy on TraxSource Track (08): Los Amigos Invisibles & Dimitri From Paris - Glad To Know You (Ray Mang's Flying Dub)"} , {time: 2864, text: "not identified - yet", overlayText: " Track (09): not identified - yet"} , {time: 2971, text: "Aroop Roy - Talkin Bout Life", overlayText: "Buy on BeatportBuy on Discogs Track (10): Aroop Roy - Talkin Bout Life"} , {time: 3331, text: "King Britt presents Sylk 130 - When The Funk Hits The Fan (Mood II Swing Vocal Mix)", overlayText: "Buy on BeatportBuy on Discogs Track (11): King Britt presents Sylk 130 - When The Funk Hits The Fan (Mood II Swing Vocal Mix)"} , {time: 3548, text: "Eros - EROS03 - A2", overlayText: "Buy on Discogs Track (12): Eros - EROS03 - A2"} , {time: 3713, text: "Robert Owens - I'll Be Your Friend (Soul Clap & Gadi Mizrahi Mix)", overlayText: "Buy on BeatportBuy on Discogs Track (13): Robert Owens - I'll Be Your Friend (Soul Clap & Gadi Mizrahi Mix)"} , {time: 3911, text: "French Touch 2 - Breakin Necks (Papastomp Remix)", overlayText: "Buy on iTunesBuy on BeatportBuy on TraxSource Track (14): French Touch 2 - Breakin Necks (Papastomp Remix)"} , {time: 4109, text: "Nickodemus ft. The Illustrious Blacks - Funk That", overlayText: "Buy on Discogs Track (15): Nickodemus ft. The Illustrious Blacks - Funk That"} , {time: 4356, text: "DJ Slym Fas - Luv Music", overlayText: "Buy on BeatportBuy on Discogs Track (16): DJ Slym Fas - Luv Music"} , {time: 4647, text: "Grimy Edits Vol. 06 - Rebound (Rahaan Edit)", overlayText: "Buy on Discogs Track (17): Grimy Edits Vol. 06 - Rebound (Rahaan Edit)"} ] }); 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): Sound Stream - Sweep Magic
' ) ); positionTrackButtons ('.vjs-break-overlay','.tracks-nav'); } , 5000 ); $(window).on("resize", function () { positionTrackButtons ('.vjs-break-overlay','.tracks-nav')}); setTimeout( function(){setDuration(player.duration(),8525)}, 4000 );