Socket
Socket
Sign inDemoInstall

@wbx/view-plyr

Package Overview
Dependencies
0
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.5.6 to 3.5.10

2

package.json
{
"name": "@wbx/view-plyr",
"version": "3.5.6",
"version": "3.5.10",
"description": "Plyr player as Webix view",

@@ -5,0 +5,0 @@ "main": "plyr.js",

webix.protoUI({
name:"plyr-player",
defaults:{
config:{},
name:"plyr-player",
defaults:{
config:{},
source:{}
},
$init:function(){
this.$view.innerHTML = '<div class="webix_video_parent"><video playsinline controls></video></div>';
},
$init:function(){
this.$view.innerHTML = '<div class="webix_player_parent"><audio></audio></div>';
this._container = this.$view.firstChild.firstChild;
// visibility of tooltips and popup menu
this.$view.style.overflow = "visible";
this._waitView = webix.promise.defer();

@@ -23,3 +25,3 @@ this.$ready.push(this.render);

var cdn = this.config.cdn ? this.config.cdn : "https://cdn.plyr.io/3.5.6";
var cdn = this.config.cdn ? this.config.cdn : "https://cdn.plyr.io/3.5.10";

@@ -36,7 +38,8 @@ webix.require([

},
_initPlyr:function(){
_initPlyr:function(){
var options = webix.extend({}, this.config.config);
this._player = new Plyr(this._container, options);
this.$view.firstChild.firstChild.setAttribute("tabindex", "-1");
this._waitView.resolve(this._player);
this._player.on("canplay", webix.bind(function(){

@@ -46,8 +49,10 @@ this._normalizeRatio();

this._player.on("ready", webix.bind(function(){
// allow width less than 200px
this.$view.querySelector(".plyr--full-ui").style["min-width"] = "0px";
this._normalizeRatio();
}, this));
},
},
$setSize:function(x,y){
this.$view.firstChild.style.width = x+"px";
this.$view.firstChild.style.height = y+"px";
this.$view.firstChild.style.height = (y-2)+"px";
if (this._player)

@@ -76,7 +81,7 @@ this._normalizeRatio(x, y);

_normalizeRatio:function(x, y){
var x = x || this.$view.clientWidth,
y = y || this.$view.clientHeight;
x = x || this.$view.clientWidth;
y = y || this.$view.clientHeight;
var div = this._gcdRatio(x, y),
ratioX = (x/div).toString(),
ratioY = (y/div).toString();
ratioY = (y/div).toString(),
ratio = ratioX+":"+ratioY;

@@ -83,0 +88,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc