feat: Add comprehensive documentation suite and reorganize project structure
- Created complete documentation in docs/ directory - Added PROJECT_OVERVIEW.md with feature highlights and getting started guide - Added ARCHITECTURE.md with system design and technical details - Added SECURITY.md with comprehensive security implementation guide - Added DEVELOPMENT.md with development workflows and best practices - Added DEPLOYMENT.md with production deployment instructions - Added API.md with complete REST API documentation - Added CONTRIBUTING.md with contribution guidelines - Added CHANGELOG.md with version history and migration notes - Reorganized all documentation files into docs/ directory for better organization - Updated README.md with proper documentation links and quick navigation - Enhanced project structure with professional documentation standards
This commit is contained in:
46
f_scripts/shared/videojs/ads.vast.js
Normal file
46
f_scripts/shared/videojs/ads.vast.js
Normal file
@@ -0,0 +1,46 @@
|
||||
/**
|
||||
* Copyright 2014 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
$(document).ready(function() {
|
||||
|
||||
if (adTagUrl == '' || ad_client != 'vast') {
|
||||
return;
|
||||
}
|
||||
|
||||
pb = "view-player-";
|
||||
var player = videojs(pb+fk);
|
||||
var options = {
|
||||
adTagUrl: adTagUrl,
|
||||
adCancelTimeout: 5000,
|
||||
playAdAlways: true,
|
||||
adsEnabled: true,
|
||||
vpaidFlashLoaderPath: current_url + 'f_scripts/shared/videojs/VPAIDFlash.swf'
|
||||
};
|
||||
player.vastClient(options);
|
||||
player.on('vast.adStart', function () {
|
||||
count=(typeof ad_skip != "undefined" ? parseInt(ad_skip) : 0);
|
||||
if (count > 0) {
|
||||
counter=setInterval(timer, 1000);
|
||||
html = '<div class="vast-skip-button">Skip <span id="skipspan">in <span id="skiptime">'+count+'</span>...</span></div>';
|
||||
$(".video-js").append(html);
|
||||
}
|
||||
$('.vjs-ad-playing .vjs-resolution-button').css({'display':'none'});
|
||||
});
|
||||
player.on('vast.adEnd', function () {
|
||||
$('.vjs-resolution-button').css({'display':'block'});
|
||||
$('.vast-skip-button').detach();
|
||||
});
|
||||
});
|
||||
function timer() { count=count-1; if (count <= 0) { clearInterval(counter); $('#skipspan').detach(); $('.vast-skip-button').addClass('enabled'); $('.vjs-ad-playing .vjs-progress-control').css({'pointer-events':'auto'}); $(".vast-skip-button.enabled").click(function() { player.trigger('vast.adEnd'); $(this).detach(); $('.vjs-resolution-button').css({'display':'block'}); }); return; } document.getElementById("skiptime").innerHTML= count; }
|
||||
Reference in New Issue
Block a user