πŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more β†’
Socket
DemoInstallSign in
Socket

capacitor-youtube-player

Package Overview
Dependencies
Maintainers
2
Versions
175
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

capacitor-youtube-player - npm Package Compare versions

Comparing version

to
1.0.8

7

dist/esm/web.js

@@ -65,6 +65,11 @@ import { WebPlugin } from '@capacitor/core';

// The API will call this function when the video player is ready.
'onReady': () => {
'onReady': (event) => {
var _a;
this.playerLogger.log(`player "${options.playerId}" -> onPlayerReady`);
const state = { events: { onReady: { text: 'onReady', value: true } } };
this.playersEventsState.set(options.playerId, state);
if (((_a = options === null || options === void 0 ? void 0 : options.playerVars) === null || _a === void 0 ? void 0 : _a.autoplay) === 1) {
event.target.mute();
event.target.playVideo();
}
return resolve({ playerReady: true, player: this.players[options.playerId] });

@@ -71,0 +76,0 @@ },

@@ -101,6 +101,11 @@ 'use strict';

// The API will call this function when the video player is ready.
'onReady': () => {
'onReady': (event) => {
var _a;
this.playerLogger.log(`player "${options.playerId}" -> onPlayerReady`);
const state = { events: { onReady: { text: 'onReady', value: true } } };
this.playersEventsState.set(options.playerId, state);
if (((_a = options === null || options === void 0 ? void 0 : options.playerVars) === null || _a === void 0 ? void 0 : _a.autoplay) === 1) {
event.target.mute();
event.target.playVideo();
}
return resolve({ playerReady: true, player: this.players[options.playerId] });

@@ -107,0 +112,0 @@ },

@@ -98,6 +98,11 @@ var capacitorPlugin = (function (exports, core) {

// The API will call this function when the video player is ready.
'onReady': () => {
'onReady': (event) => {
var _a;
this.playerLogger.log(`player "${options.playerId}" -> onPlayerReady`);
const state = { events: { onReady: { text: 'onReady', value: true } } };
this.playersEventsState.set(options.playerId, state);
if (((_a = options === null || options === void 0 ? void 0 : options.playerVars) === null || _a === void 0 ? void 0 : _a.autoplay) === 1) {
event.target.mute();
event.target.playVideo();
}
return resolve({ playerReady: true, player: this.players[options.playerId] });

@@ -104,0 +109,0 @@ },

2

package.json
{
"name": "capacitor-youtube-player",
"version": "1.0.7",
"version": "1.0.8",
"description": "Capacitor Youtube Player",

@@ -5,0 +5,0 @@ "main": "dist/plugin.cjs.js",

@@ -44,2 +44,42 @@ ![Built With Capacitor](https://img.shields.io/badge/-Built%20With%20Capacitor-16161d.svg?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE5LjIuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MTIgNTEyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI%2BCjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI%2BCgkuc3Qwe2ZpbGw6I0ZGRkZGRjt9Cjwvc3R5bGU%2BCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik00MjQuNywzNzMuOWMwLDM3LjYtNTUuMSw2OC42LTkyLjcsNjguNkgxODAuNGMtMzcuOSwwLTkyLjctMzAuNy05Mi43LTY4LjZ2LTMuNmgzMzYuOVYzNzMuOXoiLz4KPHBhdGggY2xhc3M9InN0MCIgZD0iTTQyNC43LDI5Mi4xSDE4MC40Yy0zNy42LDAtOTIuNy0zMS05Mi43LTY4LjZ2LTMuNkgzMzJjMzcuNiwwLDkyLjcsMzEsOTIuNyw2OC42VjI5Mi4xeiIvPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNNDI0LjcsMTQxLjdIODcuN3YtMy42YzAtMzcuNiw1NC44LTY4LjYsOTIuNy02OC42SDMzMmMzNy45LDAsOTIuNywzMC43LDkyLjcsNjguNlYxNDEuN3oiLz4KPC9zdmc%2BCg%3D%3D&colorA=16161d&style=flat-square)

**IMPORTANT NOTE**
-----
### Autoplay
Currently most browsers **do not support autoplay unless the video is loaded without sound.**
This is the behaviour of the web plugin if you pass a value of 1 in the autoplay parameter of playerVars.
The video will start playing but without sound.
``` bash
...
playerVars: {
autoplay: 1,
rel: 0,
color: 'white',
showinfo: 1,
},
...
```
You can read more about the autoplay policy in different browsers by clicking on the following links:
[Google Chrome](https://developer.chrome.com/blog/autoplay/)
[Firefox](https://blog.mozilla.org/en/products/firefox/block-autoplay/)
### Fullscreen
To display a video in full screen, **user interaction is required**... either by clicking on the play button, another button,...
You can read more about the fullscreen policy in different browsers by clicking on the following links:
[Google Chrome](https://developers.google.com/web/fundamentals/native-hardware/fullscreen)
-----
Functionality | Methods | Description | Expects | Returns

@@ -46,0 +86,0 @@ ----------------|----------------|-------------|--------|--------

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet