Security News
Introducing the Socket Python SDK
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
ozone-video-player
Advanced tools
Customisable Ozone video player. Package in a webComponents and written in typeScript. Features:
npm install ozone-video-player --save
Add conf.ozone.json at root of your project. You can adapt conf.ozone.json from this repo.
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
import {OzoneVideoPlayer} from "ozone-video-player";
// Your code here
See example in demo/Example_Import
For usage in typeScript use option "moduleResolution": "node"
Most important parameters.
Attribute are javaScript properties accessible from the dom.
hidden: Default is false. True when set. hide element and pause the player.
videoUrl: string Url to play a video directly
video: Video OzoneVideo to play.
markers: Array Array of markers on video
subtitlesAvailable: Array List of subtitles languages available
subtitleSelected: string selected subtitle language
Only accesible for JavaScript
player: ClapprPlayer Interface to Clappr player element
loadOzoneVideo(data?: Video): Promise Load video from Ozone. Parameters is an Ozone Video Object
loadVideoUrl(url: string): Promise Load a video from an url.
The following custom css mixin properties are available for styling:
Custom property | Description | Default |
---|---|---|
--marker-bar-background | Background color of the marker's bar | rgba(29,38,43,0.52) |
--resizer-color | Background color of the resizer | rgba(29,38,43,0.9) |
--resizer-handle-color | Background color of the resizer's handle | rgba(255,255,255,0.2) |
--marker-bar | Mixin applied to the marker's bar | {} |
--resizer | Mixin applied to the marker's bar | {} |
--moving-tooltip-background-color | Background color of the moving tooltip | rgba(29,38,43,0.9) |
--moving-tooltip-text-color | Text color of the moving tooltip | white |
--moving-tooltip-mixin | Mixin applied to the marker's bar | {} |
--subtiltes-color | Color of the subtitles | #fffb00 |
--subtitles-font-size | Font size of the subtiltes | 16px |
--subtitles-weight | Font weight of the subtitles | bold |
--subtitles-font-family | Font family of the subtitles | 'Roboto' |
--subtitles | Mixin applied to the subtitles and the subtitles' container | {} |
$ npm run start
Or watch demo on change
$ npm run demo
FAQs
[![NPM version][npm-image]][npm-url]
The npm package ozone-video-player receives a total of 1,379 weekly downloads. As such, ozone-video-player popularity was classified as popular.
We found that ozone-video-player demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.
Security News
A new Rust RFC proposes "Trusted Publishing" for Crates.io, introducing short-lived access tokens via OIDC to improve security and reduce risks associated with long-lived API tokens.