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

videojs-quality-selector-hls-custom

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

videojs-quality-selector-hls-custom

This is a Plugin For VideoJS 8+ To select Quality on the Video if available

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

videojs-quality-selector-hls

ci

codecov

This is a Plugin For VideoJS 8+ To select Quality on the Video if available

This is a complete FORK by https://github.com/chrisboustead from https://github.com/chrisboustead/videojs-hls-quality-selector

Changelog

Table of Contents

Dependencies

videojs-contrib-quality-levels ^4

npm i videojs-contrib-quality-levels

Installation

npm install --save videojs-quality-selector-hls

Usage

To include videojs-quality-selector-hls on your website or web application, use any of the following methods.

<script> Tag

This is the simplest case. Get the script in whatever way you prefer and include the plugin after you include video.js, so that the videojs global is available.

<script src="//path/to/video.min.js"></script>
<script src="//path/to/videojs-quality-selector-hls.min.js"></script>
<script>
  var player = videojs('my-video');

  player.qualitySelectorHls();
</script>

Browserify/CommonJS

When using with Browserify, install videojs-quality-selector-hls via npm and require the plugin as you would any other module.

var videojs = require('video.js');

// The actual plugin function is exported by this module, but it is also
// attached to the `Player.prototype`; so, there is no need to assign it
// to a variable.
require('videojs-quality-selector-hls');

var player = videojs('my-video');

player.qualitySelectorHls();

RequireJS/AMD

When using with RequireJS (or another AMD library), get the script in whatever way you prefer and require the plugin as you normally would:

require(['video.js', 'videojs-quality-selector-hls'], function(videojs) {
  var player = videojs('my-video');

  player.qualitySelectorHls();
});

VueJS3

<script setup>
import 'video.js/dist/video-js.css'
import { ref,onMounted } from 'vue';
import videojs from 'video.js';
import 'videojs-contrib-quality-levels';
import qalitySelectorHls from 'videojs-quality-selector-hls'

const videoPlayer = ref(null)

onMounted(()=>{
  // In case an error where qualitySelectorHls not found
  videojs.registerPlugin('qalitySelectorHls',qalitySelectorHls);
  const player = videojs(videoPlayer.value)
  player.qalitySelectorHls()
})
</script>

Options

displayCurrentQuality - boolean - false

Set to true to display the currently selected resolution in the menu button. When not enabled, displayed an included VJS "HD" icon.

placementIndex - integer

Set this to override the default positioning of the menu button in the control bar relative to the other components in the control bar.

vjsIconClass string - "vjs-icon-hd"

Set this to one of the custom VJS icons (https://videojs.github.io/font/) to override the icon for the menu button.

  var player = videojs('my-video');

  player.qualitySelectorHls({
    displayCurrentQuality: true,
    placementIndex: 2,
    vjsIconClass: 'vjs-icon-hd'
  });

License

MIT. Copyright (c) Tomexsans Evaristo <t2t.exe@gmail.com>

Keywords

FAQs

Package last updated on 08 Aug 2023

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