Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

openplayerjs

Package Overview
Dependencies
Maintainers
0
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openplayerjs

HTML5 video and audio player

  • 2.14.5
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

OpenPlayer.js

openplayerjs

Coverage Status JSDelivr CircleCI

This is a media player that uses all the goods of HTML5 video/audio elements to play the most popular media in MP4/MP3, HLS and M(PEG)-DASH, and also has the ability to play VMAP, VAST and VPAID ads.

🚨 IMPORTANT 🚨

🔧 This repository is in maintenance at this point. 🔧

No new features or additions will be added, only bug fixes.

Advantages

  • Supports all modern browsers.
  • No dependencies, since it is written in Typescript.
  • Runs a simple but yet powerful algorithm to check the browser's autoplay capabilities across browsers.
  • Enhance your player adding your own buttons. Check here for more details.
  • Provides the ability to use a single VAST/VPAID source or a VAST/VPAID playlist from several different sources (including URLs and valid XML strings).
  • Can play ads in infinite loop, desired for ads that are in a heavy text page.
  • Always responsive by default, for both video/audio tags; for video, fill and fit modes are available to either scale and crop media relative to its parent container, or to attempt to make the media fit its parent container (including black bars), respectively.

Projects using OpenPlayerJS

MedSimsArrow Classic RockChichester District Council
LectureTubeClippaHitRadio Center
Rock Radio

Migrating from older version to new ones

To learn more details about how to migrate from 1.x.x version to 2.x.x, or any breaking changes in newer versions, visit the Migration document.

Getting Started

The standard template to start using OpenPlayerJS is show in the following snippet.

<html>
    <head>
        <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/openplayerjs@latest/dist/openplayer.min.css" />
    </head>
    <body>
        <video class="op-player__media" id="player" controls playsinline>
            <source src="/path/to/video.mp4" type="video/mp4" />
            <track kind="subtitles" src="/path/to/video.vtt" srclang="en" label="English" />
        </video>
        <script src="https://cdn.jsdelivr.net/npm/openplayerjs@latest/dist/openplayer.min.js"></script>
        <script>
            // Check the `API and events` link below for more options
            const player = new OpenPlayerJS('player');
            player.init();
        </script>
    </body>
</html>

Usage and API Guides

If you want to unleash the power of OpenPlayerJS, learn more about OpenPlayerJS by checking the following links.

Code Samples

If you need a reference on how to use OpenPlayerJS in some of the most common scenarios, check the following links:

Beginners

Intermediate

Advanced

Built With

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Keywords

FAQs

Package last updated on 25 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