Socket
Socket
Sign inDemoInstall

ozone-video-player

Package Overview
Dependencies
Maintainers
0
Versions
174
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ozone-video-player

[![NPM version][npm-image]][npm-url]


Version published
Weekly downloads
1.7K
decreased by-14.62%
Maintainers
0
Weekly downloads
 
Created
Source

NPM version

ozone-video-player

Customisable Ozone video player. Package in a webComponents and written in typeScript. Features:

  • Play video from an url
  • Play ozone Video item
  • Control video (OSD) play/pause, sound, full screen
  • Display control for ozone subtitles
  • Add and controls markers on the video (used for video montage)

usage

Install

npm install  ozone-video-player --save

Add conf.ozone.json at root of your project. You can adapt conf.ozone.json from this repo.

use pre bundle version

To include bundle ozone-video-player element in your javaScript:

<script type="text/javascript" src="node_modules/ozone-video-player/build/index.js"></script>

<ozone-video-player></ozone-video-player>

See example in demo/Example_Bundle

Build with webpack

import {OzoneVideoPlayer} from "ozone-video-player";

// Your code here

See example in demo/Example_Import

For usage in typeScript use option "moduleResolution": "node"

API

Most important parameters.

Attribute

Attribute are javaScript properties accessible from the dom.

  • hidden

hidden: Default is false. True when set. hide element and pause the player.

  • video-url (alias videoUrl)

videoUrl: string Url to play a video directly

  • video

video: Video OzoneVideo to play.

  • markers

markers: Array Array of markers on video

  • subtitlesAvailable

subtitlesAvailable: Array List of subtitles languages available

  • subtitleSelected

subtitleSelected: string selected subtitle language

Properties

Only accesible for JavaScript

  • player

player: ClapprPlayer Interface to Clappr player element

Methode

  • loadOzoneVideo

loadOzoneVideo(data?: Video): Promise Load video from Ozone. Parameters is an Ozone Video Object

  • loadVideoUrl

loadVideoUrl(url: string): Promise Load a video from an url.

Styling

The following custom css mixin properties are available for styling:

Custom propertyDescriptionDefault
--marker-bar-backgroundBackground color of the marker's barrgba(29,38,43,0.52)
--resizer-colorBackground color of the resizerrgba(29,38,43,0.9)
--resizer-handle-colorBackground color of the resizer's handlergba(255,255,255,0.2)
--marker-barMixin applied to the marker's bar{}
--resizerMixin applied to the marker's bar{}
--moving-tooltip-background-colorBackground color of the moving tooltiprgba(29,38,43,0.9)
--moving-tooltip-text-colorText color of the moving tooltipwhite
--moving-tooltip-mixinMixin applied to the marker's bar{}
--subtiltes-colorColor of the subtitles#fffb00
--subtitles-font-sizeFont size of the subtiltes16px
--subtitles-weightFont weight of the subtitlesbold
--subtitles-font-familyFont family of the subtitles'Roboto'
--subtitlesMixin applied to the subtitles and the subtitles' container{}

Contribution guide

Build your package

$ npm run start

Or watch demo on change

$ npm run demo

FAQs

Package last updated on 22 Aug 2024

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