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.2.5
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

Video

A flexible modern video js plugin.

Introduction

Demo

Installation

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

Dependencies

  • jQuery
  • @pluginjs/pluginjs

Getting Started

Include

Webpack && Rollup:

ECMAScript Modules

import video from "@pluginjs/video"

CommonJS

require("@pluginjs/video")

CDN: Development:

<script src="/path/to/video.js"></script>
<link rel="stylesheet" href="/path/to/video.css">

Production:

<script src="/path/to/video.min.js"></script>
<link rel="stylesheet" href="/path/to/video.min.css">

Initialize

HTML:

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

JS:

Pj.Video('.element', options);
// or jquery way
$('.element').plugin('Video', options);

API

Options:

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

Example

$('.element').plugin('Video', {
  template: "foo"
})

or use dataset

<div class="element" data-template="foo"></div>
<script>
  $('.element').plugin('Video')
</script>
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

example:

$video.plugin('Video', {
  onReady: function() {
    // code...
  }
})

$video.on(
  'video:ready',
  function(){
  // code...
  }
)

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

example:

$video.plugin('Video', value)
$video.plugin('Video', value, "foo")
$video.plugin('Video', value, "foo", "bar")

Classes:

NameDescriptionDefault
"NAMESPACE"Declare plugin namespacepj-video
"THEME"Declare plugin theme{namespace}--{theme}
"POSTER"Declare plugin poster{namespace}-poster

Browser support

Tested on all major browsers.

SafariChromeFirefoxEdgeIEOpera
Latest ✓Latest ✓Latest ✓Latest ✓>=10 ✓Latest ✓

As a jQuery plugin, you also need to see the jQuery Browser Support.

Contributing

See Contribution.md.

Changelog

To see the list of recent changes, see Releases section.

Version

Version: 0.2.1

Copyright (C) 2017 Creation Studio Limited.

Licensed under the GPL-v3 license.

FAQs

Package last updated on 16 Jan 2018

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