403Webshell
Server IP : 103.82.32.14  /  Your IP : 216.73.217.121
Web Server : Apache/2.2.32 (Unix) mod_ssl/2.2.32 OpenSSL/1.0.1e-fips mod_fcgid/2.3.9
System : Linux cloud.lonmanhoabinh.com 2.6.32-754.35.1.el6.x86_64 #1 SMP Sat Nov 7 12:42:14 UTC 2020 x86_64
User : lonmakmf ( 524)
PHP Version : 5.6.30
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /home/phimluka/public_html/players/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/phimluka/public_html/players/player.watermark.js
console.log('watermark: Start');

(function() {
  console.log('watermark: Init defaults');
  var defaults = {
        file: 'Owned_Stamp.png',
        xpos: 0,
        ypos: 0,
        xrepeat: 0,
        opacity: 100,
    },
    extend = function() {
      var args, target, i, object, property;
      args = Array.prototype.slice.call(arguments);
      target = args.shift() || {};
      for (i in args) {
        object = args[i];
        for (property in object) {
          if (object.hasOwnProperty(property)) {
            if (typeof object[property] === 'object') {
              target[property] = extend(target[property], object[property]);
            } else {
              target[property] = object[property];
            }
          }
        }
      }
      return target;
    };

  /**
   * register the thubmnails plugin
   */
  videojs.plugin('watermark', function(options) {
    console.log('watermark: Register init');

    var settings, video, div, img;
    settings = extend(defaults, options);

    /* Grab the necessary DOM elements */
    video = this.el();

    // create the watermark element
    div = document.createElement('div');
    img = document.createElement('img');
    div.appendChild(img);
    img.className = 'vjs-watermark';
    img.src = options.file;
    //img.style.bottom = "0";
    //img.style.right = "0";
    if ((options.ypos == 0) && (options.xpos == 0)) // Top left
    {
      img.style.top = "0";
      img.style.left = "0";
    }
    else if ((options.ypos == 0) && (options.xpos == 100)) // Top right
    {
      img.style.top = "0";
      img.style.right = "0";
    }
    else if ((options.ypos == 100) && (options.xpos == 100)) // Bottom right
    {
      img.style.bottom = "0";
      img.style.right = "0";
    }
    else if ((options.ypos == 100) && (options.xpos == 0)) // Bottom left
    {
      img.style.bottom = "0";
      img.style.left = "0";
    }
    else if ((options.ypos == 50) && (options.xpos == 50)) // Center
    {
      img.style.top = (this.height()/2)+"px";
      img.style.left = (this.width()/2)+"px";
    }
    div.style.opacity = options.opacity;

    //div.style.backgroundImage = "url("+options.file+")";
    //div.style.backgroundPosition.x = options.xpos+"%";
    //div.style.backgroundPosition.y = options.ypos+"%";
    //div.style.backgroundRepeat = options.xrepeat;
    //div.style.opacity = (options.opacity/100);

    // add the watermark to the player
    video.appendChild(div);

    //video.oncontextmenu = function(){alert("Hello!");}
    console.log('watermark: Register end');
  });
})();

Youez - 2016 - github.com/yon3zu
LinuXploit