Вход Регистрация
Файл: adultscript-2.0.3-pro/files/misc/flowplayer/flowplayer.ads.js
Строк: 59
<?php
function advertising_show() {
    var 
el    document.getElementById('player-advertising');
    
    
el.style.visibility 'visible';
    
el.style.display    'block';
}

function 
advertising_hide() {
    var 
el    document.getElementById('player-advertising');
    
    
el.style.visibility 'hidden';
    
el.style.display    'none';
}

function 
advertising_close() {
    try {
          if (
$f().getState() == ) {
              
advertising_hide();
              
$f().play();
          }
          
          if (
$f().getState() == 4) {
              
advertising_hide();
              
$f().resume();
          }
    } catch(
err) {
          
advertising_hide();
    }
}

$(
document).ready(function() {
    $(
".btn-adv").click(function() {
        $(
"#player-advertising").hide();
        
$f().play();
    });    
});

$f.addPlugin("advertising", function(options) {
    var 
opts = {
          
id'player',
        
prerolltrue,
        
pauserolltrue,
        
postrolltrue
    
};
    
    
$f.extend(optsoptions);
    
    
this.onPause(function() {
          if (
opts.pauseroll) {
              
advertising_show();
          }
    });
    
    
this.onResume(function() {
          
advertising_hide();
    });
    
    
this.onFinish(function() {
          if (
opts.postroll) {
              
advertising_show();
          }
    });
    
    
this.onStart(function() {
          if (
opts.preroll) {
              
// only pause if video is playing
              
var state $f().getState();
              if (
state == || state == 3) {
                  
$f().stop();
                  
$f().pause();
              }
              
opts.preroll false;
          } else {
              
advertising_hide();
          }
    });
    
    
this.onLoad(function() {
          if (
opts.preroll) {
              
advertising_show();
          }
    });
});
?>
Онлайн: 1
Реклама