Файл: adultscript-2.0.3-pro/files/mobile/templates/default/video_view_player.tpl.php
Строк: 83
<?php defined('_VALID') or die('Restricted Access!'); ?>
<?php if ($this->video['embed_code'] == ''): ?>
<link href="<?php echo REL_URL; ?>/misc/video-js/video-js.min.css" rel="stylesheet">
<script type="text/javascript" src="<?php echo REL_URL; ?>/misc/video-js/video.js"></script>
<?php if ($this->inter): $inter_timeout = VCfg::get('mobile.inter_timeout'); ?>
<script type="text/javascript">
var counter = <?php echo $inter_timeout; ?>;
function countdown() {
if (counter == 0) {
clearInterval(timer);
$("#inter").hide();
videojs('player').ready(function() {
this.play();
});
}
$("#countdown").html(counter);
--counter;
}
var timer = setInterval(function(){countdown();}, 1000);
</script>
<?php endif; ?>
<center>
<div id="player-container">
<?php if ($this->inter): ?>
<div id="inter">
<?php echo p('adv', 'mobile-inter'); ?>
<button id="inter-play" data-role="button" data-theme="b" data-icon="video"><?php echo __('inter-counter'); if ($inter_timeout >0): echo ' (<span id="countdown">',$inter_timeout,'</span>)'; endif; ?></button>
</div>
<?php endif; ?>
<video id="player" class="video-js vjs-default-skin" controls preload="auto" width="100%" height="100%" poster="<?php echo THUMB_URL,'/',path($this->video['video_id']); ?>/player.jpg">
<source src="<?php echo urldecode($this->video['mobile_url']); ?>" type="video/mp4" />
</video>
</div>
</center>
<center><a href="#play" id="play" data-role="button" data-theme="b" rel="external nofollow" data-inline="true" data-icon="video"><?php echo __('play-video'); ?></a></center>
<?php echo p('adv', 'mobile-video-view'); ?>
<?php if (isset($this->videos)): $url = null; $found = false; foreach ($this->videos as $video): if ($found): $url = MOBILE_URL.'/'.$video['video_id'].'/'.$video['slug'].'/'; break; endif; if ($video['video_id'] == $this->video['video_id']): $found = true; endif; endforeach; ?>
<?php if (isset($url) && $url): ?>
<script type="text/javascript">
$(document).ready(function() {
videojs('player').ready(function() {this.on('ended', function() {window.location = '<?php echo $url; ?>';});});
});
</script>
<?php endif; endif; else: ?>
<center><?php echo mobile_embed($this->video['embed_code']); ?></center>
<?php echo p('adv', 'mobile-video-view'); ?>
<?php endif; ?>