New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

mediaplayer-plugins

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mediaplayer-plugins

Plugins que dan funcionalidades al reproductor de vídeo.

latest
npmnpm
Version
1.0.1
Version published
Weekly downloads
3
-50%
Maintainers
1
Weekly downloads
 
Created
Source

mediaplayer-plugins

Plugins que dan funcionalidades al reproductor de vídeo.

Plugins incluidos:

  • AutoPause: Pausar el reproductor automáticamente al cambiar de pestaña o cuando el reproductor está fuera del viewport.
  • AutoPlay: Reproducir el vídeo automáticamente pero silenciado.
  • Ads: Mostar pequeño banner de publicidad en la parte inferior del vídeo.

Instalacion

npm i mediaplayer-plugins

Uso con TypeScript

import MediaPlayer from "mediaplayer-plugins";
import AutoPlay from "mediaplayer-plugins/lib/plugins/AutoPlay";
import AutoPause from "mediaplayer-plugins/lib/plugins/AutoPause";
import Ads from "mediaplayer-plugins/lib/plugins/Ads";

const video = document.querySelector("video");

const player = new MediaPlayer({
  el: video,
  plugins: [new AutoPlay(), new AutoPause(), new Ads()]
});

const playButton: HTMLElement = document.querySelector("#play");
playButton.onclick = () => player.togglePlay();

const muteButton: HTMLElement = document.querySelector("#mute");
muteButton.onclick = () => player.toggleMute();

Licencia

MIT

FAQs

Package last updated on 05 Jan 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts