New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@pluginjs/video

Package Overview
Dependencies
Maintainers
2
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pluginjs/video

A flexible modern video js plugin.

  • 0.7.24
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

Video

npm package

A flexible modern video js plugin.

Samples

Introduction

Installation

Yarn
yarn add @pluginjs/video
NPM
npm i @pluginjs/video

Getting Started

CDN:

Development:

<script src="https://unpkg.com/@pluginjs/video/dist/video.js"></script>
<link rel="stylesheet" href="https://unpkg.com/@pluginjs/video/dist/video.css">

Production:

<script src="https://unpkg.com/@pluginjs/video/dist/video.min.js"></script>
<link rel="stylesheet" href="https://unpkg.com/@pluginjs/video/dist/video.min.css">

Initialize

HTML:

<div class="element"></div>

ECMAScript Module:

import Video from "@pluginjs/video"
import "@pluginjs/video/dist/video.css"

Video.of(document.querySelector('.element'), options)

CommonJS:

require("@pluginjs/video/dist/video.css")
const Video = require("@pluginjs/video")

Video.of(document.querySelector('.element'), options)

Browser:

<link rel="stylesheet" href="https://unpkg.com/@pluginjs/video/dist/video.css">
<script src="https://unpkg.com/@pluginjs/video/dist/video.js"></script>
<script>
  Pj.video('.element', options)
</script>

API

Options

Options are called on video instances through the video options itself. You can also save the instances to variable for further use.

NameDescriptionDefault
"template"Main structure templatefunction() {...}
"templates"Template blocks{}
"url"Video url``
"id"Video id``
"type"Different video sources, such as HTML5 Youtube Vimeo``
"autoplay"Whether to play automatically when loading videotrue
"loop"Whether to loop the videotrue
"controls"Whether to show the video controllerfalse
"poster"Whether to display the poster``

Events

Events are called on video instances through the video events itself. You can also save the instances to variable for further use.

NameDescription
"ready"Gets fired when plugin is ready
"destroy"Gets fired when plugin is destroy
"load"Gets fired when video is loading
"loaded"Gets fired when video is loaded
"play"Gets fired when video is play
"pause"Gets fired when video is pause
"stop"Gets fired when video is stop
"playend"Gets fired when video is playend
"playerr"Gets fired when video is playerr

Methods

Methods are called on video instances through the video method itself. You can also save the instances to variable for further use.

NameDescription
"enable"Enabled plugin if plugin is disabled
"disable"Disable plugin
"destroy"Destroy plugin
"pause"Pause video
"load"Load video
"play"Play video
"stop"Stop video
"volume"Set the video volume

Classes

Name | Description | Default --|| "NAMESPACE" | Declare plugin namespace | pj-video "THEME" | Declare plugin theme | {namespace}--{theme} "POSTER" | Declare plugin poster | {namespace}-poster

Browser support

Tested on all major browsers.

IE / Edge
IE / Edge
Firefox
Firefox
Chrome
Chrome
Safari
Safari
Opera
Opera
IE11, Edgelast 2 versionslast 2 versionslast 2 versionslast 2 versions

License

@pluginjs/video is Licensed under the GPL-v3 license.

If you want to use @pluginjs/video project to develop commercial sites, themes, projects, and applications, the Commercial license is the appropriate license. With this option, your source code is kept proprietary.

For purchase an Commercial License, contact us purchase@thecreation.co.

Copyright (C) 2018 Creation Studio Limited.

FAQs

Package last updated on 17 Dec 2019

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc