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

@videojs/http-streaming

Package Overview
Dependencies
Maintainers
192
Versions
156
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@videojs/http-streaming - npm Package Compare versions

Comparing version 3.11.3 to 3.12.0

4

package.json
{
"name": "@videojs/http-streaming",
"version": "3.11.3",
"version": "3.12.0",
"description": "Play back HLS and DASH with Video.js, even where it's not natively supported",

@@ -66,3 +66,3 @@ "main": "dist/videojs-http-streaming.cjs.js",

"mpd-parser": "^1.3.0",
"mux.js": "7.0.2",
"mux.js": "7.0.3",
"video.js": "^7 || ^8"

@@ -69,0 +69,0 @@ },

@@ -51,2 +51,3 @@ <img width=300 src="./logo.svg" alt="VHS Logo consisting of a VHS tape, the Video.js logo and the words VHS" />

- [useDevicePixelRatio](#usedevicepixelratio)
- [customPixelRatio](#custompixelratio)
- [allowSeeksWithinUnsafeLiveWindow](#allowseekswithinunsafelivewindow)

@@ -408,2 +409,14 @@ - [customTagParsers](#customtagparsers)

##### customPixelRatio
* Type: `number`
* can be used as an initialization option.
If set, this will take the initial player dimensions and multiply it by a custom ratio when the player automatically selects renditions. This means that if you have a player where the dimension is `540p`, with a custom pixel ratio of `2`, a rendition of `1080p` or a lower rendition closest to this value will be chosen. Additionally, if you have a player where the dimension is `540p`, with a custom pixel ratio of `0.5`, a rendition of `270p` or a lower rendition closest to this value will be chosen. When the custom pixel ratio is 0, the lowest available rendition will be selected.
It is worth noting that if the player dimension multiplied by the custom pixel ratio is greater than any available rendition resolution, a rendition will be selected based on bandwidth, and the player dimension will be disregarded.
`limitRenditionByPlayerDimensions` must be `true` in order for this feature to be enabled. This is the default value.
If `useDevicePixelRatio` is set to `true`, the custom pixel ratio will be prioritized and overwrite any previous pixel ratio.
##### allowSeeksWithinUnsafeLiveWindow

@@ -410,0 +423,0 @@ * Type: `boolean`

@@ -441,3 +441,3 @@ /* global window document */

player.one('loadedmetadata', function() {
var steeringController = player.tech_.vhs.playlistController_.contentSteeringController_;
var steeringController = player.tech_.vhs && player.tech_.vhs.playlistController_.contentSteeringController_;

@@ -444,0 +444,0 @@ if (!steeringController) {

@@ -367,4 +367,8 @@ import window from 'global/window';

export const lastBandwidthSelector = function() {
const pixelRatio = this.useDevicePixelRatio ? window.devicePixelRatio || 1 : 1;
let pixelRatio = this.useDevicePixelRatio ? window.devicePixelRatio || 1 : 1;
if (!isNaN(this.customPixelRatio)) {
pixelRatio = this.customPixelRatio;
}
return simpleSelector(

@@ -403,4 +407,8 @@ this.playlists.main,

return function() {
const pixelRatio = this.useDevicePixelRatio ? window.devicePixelRatio || 1 : 1;
let pixelRatio = this.useDevicePixelRatio ? window.devicePixelRatio || 1 : 1;
if (!isNaN(this.customPixelRatio)) {
pixelRatio = this.customPixelRatio;
}
if (average < 0) {

@@ -407,0 +415,0 @@ average = this.systemBandwidth;

@@ -741,2 +741,3 @@ /**

'useDevicePixelRatio',
'customPixelRatio',
'limitRenditionByPlayerDimensions',

@@ -765,2 +766,9 @@ 'bandwidth',

this.useDevicePixelRatio = this.options_.useDevicePixelRatio;
const customPixelRatio = this.options_.customPixelRatio;
// Ensure the custom pixel ratio is a number greater than or equal to 0
if (typeof customPixelRatio === 'number' && customPixelRatio >= 0) {
this.customPixelRatio = customPixelRatio;
}
}

@@ -767,0 +775,0 @@ // alias for public method to set options

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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