Файл: adultscript-2.0.3-pro/files/templates/defboot/video_view_nuevoplayer.tpl.php
Строк: 40
<?php defined('_VALID') or die('Restricted Access!'); ?>
<?php $adv = p('adv_overlay', 'player-overlay'); ?>
<div id="player-container">
<?php if ($adv): echo $adv; endif; ?>
<div id="player"></div>
</div>
<script type="text/javascript" id="nuevo" src="<?php echo REL_URL; ?>/misc/nuevo/player.js"></script>
<script type="text/javascript">
$(document).ready(function() {
var cnf='<?php echo BASE_URL.'/misc/nuevo/config.php?id='.$this->video['video_id']; ?>';
var w='100%';
var h='100%';
nvplayer.start( {id:'player',config:'<?php echo BASE_URL.'/misc/nuevo/config.php?id='.$this->video['video_id']; ?>',width:w,height:h});
});
var player;
function playerReady(a) {
player=document.getElementById(a.id);
player.addModelListener('STATE','player_state');
}
function player_state(a) {
switch(a.newstate) {
case 'PAUSED':
$("#player-advertising").show();
break;
case 'IDDLE':
$("#player-advertising").show();
break;
case 'PLAYING':
$("#player-advertising").hide();
break;
case 'BUFFERING':
break;
case 'COMPLETED':
<?php if (isset($this->url_next)): echo 'window.location = base_url + "',$this->url_next,'";'; endif; ?>
$("#player-advertising").show();
break;
}
}
$(".btn-adv").click(function() {
$("#player-advertising").hide();
try {
player.sendEvent('PLAY');
} catch(err) {}
});
</script>