'); // 480x380 to 640x360 jQuery("#segment_embed").val(' '); // val = the_item.id; val = the_item.mediaid; jQuery("div[id=segment-" + val + "]").children('.extra').toggle(true); jQuery("div[id=segment-" + val + "]").children('.collapsed').children('.segment-title').css("font-weight", "normal") jQuery("div[id=segment-" + val + "]").children('.collapsed').css('hover', '#c9d6f1'); jQuery("div[id=segment-" + val + "]").children('.collapsed').css('background', '#ebeefa'); jQuery(".segment").css('border', 'none'); jQuery(".segment").css('border-bottom', '1px solid #cccccc'); jQuery("div[id=segment-" + val + "]").css('border', '2px solid #c9d6f1'); // seems to work in jwp // document.getElementById('tabs-1').scrollTop = document.getElementById(val).offsetTop - document.getElementById('tabs-1').offsetTop; }); var show_cc1 = false; var first_cc_load = true; /* player.on('play', function() { console.log('onplay'); if (seekFlag) { console.log('seeking'); seekFlag = false; player.currentTime(seekTo); } }); */ player.on('loadedmetadata', function() { console.log('onloadedmetadata'); if (seekFlag) { console.log('seeking'); seekFlag = false; player.currentTime(seekTo); } }); /* player.on('playing', function() { console.log('onplaying'); if (seekFlag) { console.log('seeking'); seekFlag = false; setTimeout(function(){ player.currentTime(seekTo); }, 1000) } }); */ /* // Add the event handler player.on('timeupdate', timeupdateHandler); //Handle the event then remove JUST this event listener on timeupdate function timeupdateHandler(evt) { if (seekFlag) { console.log('ontimeupdate & seek'); console.log('seeking'); seekFlag = false; } } */	player.on('playlistitem', function() { console.log('pli, setting first_cc_load'); first_cc_load = true; }); player.textTracks().on('change', function(one,two) { var tracks = player.textTracks(); for (var i = 0; i < tracks.length; i++) { var track = tracks[i]; if (track.kind === 'captions' && track.label === 'cc1' && track.mode === 'showing') { show_cc1 = true; } else if (track.kind === 'captions' && track.label === 'cc1' && track.mode === 'disabled') { show_cc1 = false; } } }); player.on('texttrackchange', function(one,two) { var tracks = player.textTracks(); console.log("ttc: " + first_cc_load); for (var i = 0; i < tracks.length; i++) { var track = tracks[i]; if (track.kind === 'captions' && track.label === 'cc1' && track.mode === 'disabled' && show_cc1 && first_cc_load) { this.ready(function(){ setTimeout(function(){ track.mode = 'showing'; }, 0); }); } } first_cc_load = false; }); // playlist-change-block player.on('playlistchange', function() { console.log('plc'); if (location.hash) { hash = location.hash.replace(/^#/, '') hash = hash.replace(/^&start=/, '') jQuery.each(playlist, function(item, value) { if (value['mediaid'] == hash) { player.playlist.currentItem(item); } }); } jQuery(window).hashchange( function(){ hash = location.hash.replace(/^#/, '') hash = hash.replace(/^&start=/, '') if (hash.match(/^i/)) { hash = hash.replace(/^i/, '') jQuery.each(playlist, function(item, value) { if (value['imported_mediaid'] == hash) { player.playlist.currentItem(item); } }); } else if (hash.match(/^t/)) { hash = hash.replace(/^t/, '') jwplayer("player").seek(hash); } else { jQuery.each(playlist, function(item, value) { if (value['mediaid'] == hash) { player.playlist.currentItem(item); } }); } }); // /playlist-change-block }); var playlist = [{"poster":"https://stills.swagit.com/stills/2020/07/13/07132020-676.480x360.jpg?r=2","smimage":"https://stills.swagit.com/stills/2020/07/13/07132020-676.480x360.jpg?r=2","dfile":"https://storage.googleapis.com/vault-001/2020/07/13/07132020-676.360.mp4","image":"https://stills.swagit.com/stills/2020/07/13/07132020-676.480x360.jpg?r=2","title":"Call to Order ","sources":[{"src":"https://stream.us-central1-b.swagit.com/on-demand/_definst_/vault-001/2020/07/13/07132020-676.360.mp4/playlist.m3u8","type":"application/x-mpegURL"}],"mediaid":2,"description":"MEETING CALLED TO ORDER ( Chair Julia Olson - Boseman)\n\nINVOCATION ( Pastor Reddgo Long, Jr., Greater Morning Star Apostolic Church)\n\nPLEDGE OF ALLEGIANCE ( Commissioner Woody White)"},{"poster":"https://stills.swagit.com/stills/2020/07/13/07132020-677.480x360.jpg?r=2","smimage":"https://stills.swagit.com/stills/2020/07/13/07132020-677.480x360.jpg?r=2","dfile":"https://storage.googleapis.com/vault-001/2020/07/13/07132020-677.360.mp4","image":"https://stills.swagit.com/stills/2020/07/13/07132020-677.480x360.jpg?r=2","title":"Consent Agenda ","sources":[{"src":"https://stream.us-central1-b.swagit.com/on-demand/_definst_/vault-001/2020/07/13/07132020-677.360.mp4/playlist.m3u8","type":"application/x-mpegURL"}],"mediaid":3,"description":"APPROVAL OF CONSENT AGENDA\nCONSENT AGENDA ITEMS OF BUSINESS\n\n1. Approval of Minutes\n\n3. Award of New Hanover County Fire Station 12 Hurricane Florence Repairs and\nRenovations Contract\n\n4. Charge of 2020 Levy\n\n5. Approval of May 2020 Tax Collection Reports"},{"poster":"https://stills.swagit.com/stills/2020/07/13/07132020-1373.480x360.jpg?r=2","smimage":"https://stills.swagit.com/stills/2020/07/13/07132020-1373.480x360.jpg?r=2","dfile":"https://storage.googleapis.com/vault-001/2020/07/13/07132020-1373.360.mp4","image":"https://stills.swagit.com/stills/2020/07/13/07132020-1373.480x360.jpg?r=2","title":"Item 2 ","sources":[{"src":"https://stream.us-central1-b.swagit.com/on-demand/_definst_/vault-001/2020/07/13/07132020-1373.360.mp4/playlist.m3u8","type":"application/x-mpegURL"}],"mediaid":22,"description":"Adoption of Resolution, Racism: A Public Health Crisis\n"},{"poster":"https://stills.swagit.com/stills/2020/07/13/07132020-686.480x360.jpg?r=2","smimage":"https://stills.swagit.com/stills/2020/07/13/07132020-686.480x360.jpg?r=2","dfile":"https://storage.googleapis.com/vault-001/2020/07/13/07132020-686.360.mp4","image":"https://stills.swagit.com/stills/2020/07/13/07132020-686.480x360.jpg?r=2","title":"Additional Item ","sources":[{"src":"https://stream.us-central1-b.swagit.com/on-demand/_definst_/vault-001/2020/07/13/07132020-686.360.mp4/playlist.m3u8","type":"application/x-mpegURL"}],"mediaid":12,"description":"Additional Item"},{"poster":"https://stills.swagit.com/stills/2020/07/13/07132020-678.480x360.jpg?r=2","smimage":"https://stills.swagit.com/stills/2020/07/13/07132020-678.480x360.jpg?r=2","dfile":"https://storage.googleapis.com/vault-001/2020/07/13/07132020-678.360.mp4","image":"https://stills.swagit.com/stills/2020/07/13/07132020-678.480x360.jpg?r=2","title":"Item 6 ","sources":[{"src":"https://stream.us-central1-b.swagit.com/on-demand/_definst_/vault-001/2020/07/13/07132020-678.360.mp4/playlist.m3u8","type":"application/x-mpegURL"}],"mediaid":4,"description":"Consideration of PAG Recommendation"},{"poster":"https://stills.swagit.com/stills/2020/07/15/07152020-749.480x360.jpg?r=2","smimage":"https://stills.swagit.com/stills/2020/07/15/07152020-749.480x360.jpg?r=2","dfile":"https://storage.googleapis.com/vault-001/2020/07/15/07152020-749.360.mp4","image":"https://stills.swagit.com/stills/2020/07/15/07152020-749.480x360.jpg?r=2","title":"Item 7 ","sources":[{"src":"https://stream.us-central1-b.swagit.com/on-demand/_definst_/vault-001/2020/07/15/07152020-749.360.mp4/playlist.m3u8","type":"application/x-mpegURL"}],"mediaid":5,"description":"Public Hearing\n\nRezoning Request ( Z20 -09) \u2014 Request by Middlesound LLC, to Rezone\nApproximately 3. 35 Acres of Land Located in the 500 Block of Middle Sound\nLoop Road, Adjacent to the Middle Sound Loop Roundabout, from R - 20,\nResidential District, to ( CZD) R - 5, Conditional Moderate -High Residential\nDistrict, in Order to Construct a 24 -Unit Townhome Development"},{"poster":"https://stills.swagit.com/stills/2020/07/15/07152020-757.480x360.jpg?r=2","smimage":"https://stills.swagit.com/stills/2020/07/15/07152020-757.480x360.jpg?r=2","dfile":"https://storage.googleapis.com/vault-001/2020/07/15/07152020-757.360.mp4","image":"https://stills.swagit.com/stills/2020/07/15/07152020-757.480x360.jpg?r=2","title":"Item 9 ","sources":[{"src":"https://stream.us-central1-b.swagit.com/on-demand/_definst_/vault-001/2020/07/15/07152020-757.360.mp4/playlist.m3u8","type":"application/x-mpegURL"}],"mediaid":7,"description":"Public Hearing\n\nRezoning Request ( Z20 -04) - Request by Design Solutions on Behalf of the\nProperty Owner, Trinity Reformed Orthodox Church, to Rezone Approximately\n3. 00 Acres of Land Located at 4725 South College Road from R - 15, Residential District, to (CZD) R - 5, Moderate -High Residential District, in Order to Develop\n22 Townhomes"},{"poster":"https://stills.swagit.com/stills/2020/07/13/07132020-682.480x360.jpg?r=2","smimage":"https://stills.swagit.com/stills/2020/07/13/07132020-682.480x360.jpg?r=2","dfile":"https://storage.googleapis.com/vault-001/2020/07/13/07132020-682.360.mp4","image":"https://stills.swagit.com/stills/2020/07/13/07132020-682.480x360.jpg?r=2","title":"Item 10 ","sources":[{"src":"https://stream.us-central1-b.swagit.com/on-demand/_definst_/vault-001/2020/07/13/07132020-682.360.mp4/playlist.m3u8","type":"application/x-mpegURL"}],"mediaid":8,"description":"Public Hearing\n\nRezoning Request (Z20 -11) - Request by Lee Kaess, PLLC on Behalf of the\nProperty Owner, Lester R. and Suzanne B. Edwards, to Rezone Approximately\n2. 18 Acres of Land Located in the 100 Block of Forest Lane, Adjacent to the\nIntersection of Castle Hayne Road and N. 23rd Street, from R - 15, Residential\nDistrict, to (CZD) 0 &I, Conditional Office and Institutional District, to Operate\na Personal Services and Office Establishment"},{"poster":"https://stills.swagit.com/stills/2020/07/13/07132020-683.480x360.jpg?r=2","smimage":"https://stills.swagit.com/stills/2020/07/13/07132020-683.480x360.jpg?r=2","dfile":"https://storage.googleapis.com/vault-001/2020/07/13/07132020-683.360.mp4","image":"https://stills.swagit.com/stills/2020/07/13/07132020-683.480x360.jpg?r=2","title":"Item 11 ","sources":[{"src":"https://stream.us-central1-b.swagit.com/on-demand/_definst_/vault-001/2020/07/13/07132020-683.360.mp4/playlist.m3u8","type":"application/x-mpegURL"}],"mediaid":9,"description":"Appointment of Voting Delegate to the 2020 North Carolina Association of\nCounty Commissioners ( NCACC) Annual Conference"},{"poster":"https://stills.swagit.com/stills/2020/07/13/07132020-684.480x360.jpg?r=2","smimage":"https://stills.swagit.com/stills/2020/07/13/07132020-684.480x360.jpg?r=2","dfile":"https://storage.googleapis.com/vault-001/2020/07/13/07132020-684.360.mp4","image":"https://stills.swagit.com/stills/2020/07/13/07132020-684.480x360.jpg?r=2","title":"Item 12 ","sources":[{"src":"https://stream.us-central1-b.swagit.com/on-demand/_definst_/vault-001/2020/07/13/07132020-684.360.mp4/playlist.m3u8","type":"application/x-mpegURL"}],"mediaid":10,"description":"Appointment of Voting Delegate to the NACo 2020 Annual Conference"},{"poster":"https://stills.swagit.com/stills/2020/07/13/07132020-685.480x360.jpg?r=2","smimage":"https://stills.swagit.com/stills/2020/07/13/07132020-685.480x360.jpg?r=2","dfile":"https://storage.googleapis.com/vault-001/2020/07/13/07132020-685.360.mp4","image":"https://stills.swagit.com/stills/2020/07/13/07132020-685.480x360.jpg?r=2","title":"Items 13 & 15 ","sources":[{"src":"https://stream.us-central1-b.swagit.com/on-demand/_definst_/vault-001/2020/07/13/07132020-685.360.mp4/playlist.m3u8","type":"application/x-mpegURL"}],"mediaid":11,"description":"Committee Appointments"}]; player.playlist([]); player.playlist(playlist); // Play through the playlist automatically. player.playlist.autoadvance(0);