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

shaka-player

Package Overview
Dependencies
Maintainers
3
Versions
347
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shaka-player - npm Package Compare versions

Comparing version 4.9.22 to 4.9.23

68

dist/locales.js

@@ -764,47 +764,47 @@

shaka.ui.Locales.Ids = {
PAUSE: 'PAUSE',
VOLUME: 'VOLUME',
STATISTICS: 'STATISTICS',
LIVE: 'LIVE',
AUTO_QUALITY: 'AUTO_QUALITY',
MULTIPLE_LANGUAGES: 'MULTIPLE_LANGUAGES',
MORE_SETTINGS: 'MORE_SETTINGS',
AD_DURATION: 'AD_DURATION',
RESOLUTION: 'RESOLUTION',
BACK: 'BACK',
SUBTITLE_FORCED: 'SUBTITLE_FORCED',
EXIT_PICTURE_IN_PICTURE: 'EXIT_PICTURE_IN_PICTURE',
PLAYBACK_RATE: 'PLAYBACK_RATE',
UNRECOGNIZED_LANGUAGE: 'UNRECOGNIZED_LANGUAGE',
TOGGLE_STEREOSCOPIC: 'TOGGLE_STEREOSCOPIC',
RESOLUTION: 'RESOLUTION',
REWIND: 'REWIND',
MULTIPLE_LANGUAGES: 'MULTIPLE_LANGUAGES',
AD_STATISTICS: 'AD_STATISTICS',
NOT_APPLICABLE: 'NOT_APPLICABLE',
PICTURE_IN_PICTURE: 'PICTURE_IN_PICTURE',
VOLUME: 'VOLUME',
RECENTER_VR: 'RECENTER_VR',
AD_TIME: 'AD_TIME',
MUTE: 'MUTE',
OFF: 'OFF',
CAST: 'CAST',
LANGUAGE: 'LANGUAGE',
MUTE: 'MUTE',
PAUSE: 'PAUSE',
UNDETERMINED_LANGUAGE: 'UNDETERMINED_LANGUAGE',
SKIP_AD: 'SKIP_AD',
AUTO_QUALITY: 'AUTO_QUALITY',
ON: 'ON',
SEEK: 'SEEK',
AIRPLAY: 'AIRPLAY',
ENTER_PICTURE_IN_PICTURE: 'ENTER_PICTURE_IN_PICTURE',
EXIT_PICTURE_IN_PICTURE: 'EXIT_PICTURE_IN_PICTURE',
MORE_SETTINGS: 'MORE_SETTINGS',
SURROUND: 'SURROUND',
SKIP_AD: 'SKIP_AD',
REPLAY: 'REPLAY',
ENTER_LOOP_MODE: 'ENTER_LOOP_MODE',
REPLAY: 'REPLAY',
PLAY: 'PLAY',
CAPTIONS: 'CAPTIONS',
UNMUTE: 'UNMUTE',
BACK: 'BACK',
PLAYBACK_RATE: 'PLAYBACK_RATE',
AD_PROGRESS: 'AD_PROGRESS',
SKIP_TO_LIVE: 'SKIP_TO_LIVE',
CAST: 'CAST',
SEEK: 'SEEK',
STATISTICS: 'STATISTICS',
AD_DURATION: 'AD_DURATION',
SURROUND: 'SURROUND',
TOGGLE_STEREOSCOPIC: 'TOGGLE_STEREOSCOPIC',
QUALITY: 'QUALITY',
NOT_APPLICABLE: 'NOT_APPLICABLE',
EXIT_FULL_SCREEN: 'EXIT_FULL_SCREEN',
PICTURE_IN_PICTURE: 'PICTURE_IN_PICTURE',
LOOP: 'LOOP',
FULL_SCREEN: 'FULL_SCREEN',
RECENTER_VR: 'RECENTER_VR',
LOOP: 'LOOP',
OFF: 'OFF',
PLAY: 'PLAY',
SUBTITLE_FORCED: 'SUBTITLE_FORCED',
QUALITY: 'QUALITY',
AD_STATISTICS: 'AD_STATISTICS',
EXIT_LOOP_MODE: 'EXIT_LOOP_MODE',
UNMUTE: 'UNMUTE',
REWIND: 'REWIND',
FAST_FORWARD: 'FAST_FORWARD',
ON: 'ON',
UNDETERMINED_LANGUAGE: 'UNDETERMINED_LANGUAGE',
AD_PROGRESS: 'AD_PROGRESS',
AD_TIME: 'AD_TIME',
EXIT_LOOP_MODE: 'EXIT_LOOP_MODE',
};

@@ -123,5 +123,9 @@ /*! @license

*
* @param {boolean} keepAllAtributtes
* @return {string}
*/
getTagKey() {
getTagKey(keepAllAtributtes) {
if (keepAllAtributtes) {
return this.toString();
}
const attributesToSkip = new Set()

@@ -128,0 +132,0 @@ .add('AUDIO')

@@ -61,10 +61,7 @@ /*! @license

* @summary A polyfill for AbortSignal, part of the AbortController API.
* @implements {AbortSignal}
* @extends AbortSignal
*/
shaka.polyfill.AbortController.AbortSignal =
class extends shaka.util.FakeEventTarget {
shaka.polyfill.AbortController.AbortSignal = class {
/** */
constructor() {
super();
/** @private {boolean} */

@@ -78,5 +75,23 @@ this.aborted_ = false;

this.onabort = null;
/** @private {!shaka.util.FakeEventTarget} */
this.eventTarget_ = new shaka.util.FakeEventTarget();
}
/** @override */
addEventListener(type, listener, options) {
return this.eventTarget_.addEventListener(type, listener, options);
}
/** @override */
removeEventListener(type, listener, options) {
return this.eventTarget_.removeEventListener(type, listener, options);
}
/** @override */
dispatchEvent(event) {
return this.eventTarget_.dispatchEvent(event);
}
/** @override */
get aborted() {

@@ -86,3 +101,3 @@ return this.aborted_;

/** @return {*} */
/** @override */
get reason() {

@@ -92,3 +107,3 @@ return this.reason_;

/** @return {void} */
/** @override */
throwIfAborted() {

@@ -126,7 +141,3 @@ if (this.aborted_) {

/**
* @param {*=} reason
* @return {!AbortSignal}
*/
/** @override */
static abort(reason) {

@@ -138,6 +149,3 @@ const signal = new shaka.polyfill.AbortController.AbortSignal();

/**
* @param {number} timeMs
* @return {!AbortSignal}
*/
/** @override */
static timeout(timeMs) {

@@ -144,0 +152,0 @@ const signal = new shaka.polyfill.AbortController.AbortSignal();

@@ -845,3 +845,3 @@ /*! @license

if (cue.writingMode == Cue.writingMode.HORIZONTAL_TOP_TO_BOTTOM) {
style.right = cue.position + '%';
style.right = (100 - cue.position) + '%';
style.width = 'auto';

@@ -848,0 +848,0 @@ } else {

@@ -1385,2 +1385,9 @@ /*! @license

track.videoLayout = video.videoLayout || null;
if (videoCodec.includes(',')) {
track.channelsCount = video.channelsCount;
track.audioSamplingRate = video.audioSamplingRate;
track.spatialAudio = video.spatialAudio;
track.originalLanguage = video.originalLanguage;
}
}

@@ -1387,0 +1394,0 @@

@@ -756,2 +756,4 @@ /*! @license

const idAttr = path.match(/(@id='(.*?)')/);
const tAttr = path.match(/(@t='(\d+)')/);
const numberIndex = path.match(/(@n='(\d+)')/);
const position = path.match(/\[(\d+)\]/);

@@ -762,2 +764,7 @@ returnPaths.push({

idAttr[0].match(/'(.*?)'/)[0].replace(/'/gm, '') : null,
t: tAttr ?
Number(tAttr[0].match(/'(.*?)'/)[0].replace(/'/gm, '')) : null,
n: numberIndex ?
Number(numberIndex[0].match(/'(.*?)'/)[0].replace(/'/gm, '')):
null,
// position is counted from 1, so make it readable for devs

@@ -792,2 +799,10 @@ position: position ? Number(position[1]) - 1 : null,

let index = lastNode.position;
if (index == null) {
if (lastNode.t !== null) {
index = TXml.nodePositionByAttribute_(nodes, 't', lastNode.t);
}
if (lastNode.n !== null) {
index = TXml.nodePositionByAttribute_(nodes, 'n', lastNode.n);
}
}
if (index === null) {

@@ -804,3 +819,3 @@ index = position === 'prepend' ? 0 : nodes.length;

// Modify attribute
if (attribute) {
if (attribute && nodes[index]) {
TXml.modifyNodeAttribute(nodes[index], action, attribute,

@@ -822,2 +837,24 @@ TXml.getContents(patchNode) || '');

/**
* Search the node index by the t attribute
* and return the index. if not found return null
* @param {!Array<shaka.extern.xml.Node>} nodes
* @param {!string} attribute
* @param {!number} value
* @private
*/
static nodePositionByAttribute_(nodes, attribute, value) {
let index = 0;
for (const node of nodes) {
const attrs = node.attributes;
const val = Number(attrs[attribute]);
if (val === value) {
return index;
}
index++;
}
return null;
}
/**
* @param {!shaka.extern.xml.Node} node

@@ -883,2 +920,4 @@ * @param {string} action

* id: ?string,
* t: ?number,
* n: ?number,
* position: ?number,

@@ -885,0 +924,0 @@ * attribute: ?string

{
"name": "shaka-player",
"description": "DASH/EME video player library",
"version": "4.9.22",
"version": "4.9.23",
"homepage": "https://github.com/shaka-project/shaka-player",

@@ -34,4 +34,4 @@ "author": "Google",

"fontfaceonload": "^1.0.2",
"google-closure-compiler-java": "^20221102.0.0",
"google-closure-deps": "^20221102.0.0",
"google-closure-compiler-java": "^20240317.0.0",
"google-closure-deps": "^20230802.0.0",
"google-closure-library": "^20221102.0.0",

@@ -38,0 +38,0 @@ "htmlhint": "^1.1.3",

@@ -86,3 +86,6 @@ /*! @license

if (this.player.isLive()) {
if (!isFinite(seekRangeSize)) {
this.setValue_(this.localization.resolve(shaka.ui.Locales.Ids.LIVE));
this.currentTime_.disabled = true;
} else if (this.player.isLive()) {
// The amount of time we are behind the live edge.

@@ -89,0 +92,0 @@ const behindLive = Math.floor(seekRange.end - displayTime);

@@ -262,6 +262,14 @@ /*! @license

}
const frameRate = track.frameRate;
if (frameRate && (frameRate >= 50 || frameRate <= 20)) {
text += Math.round(track.frameRate);
const frameRates = new Set();
for (const item of tracks) {
if (item.frameRate) {
frameRates.add(Math.round(item.frameRate));
}
}
if (frameRates.size > 1) {
const frameRate = track.frameRate;
if (frameRate && (frameRate >= 50 || frameRate <= 20)) {
text += Math.round(track.frameRate);
}
}
if (track.hdr == 'PQ' || track.hdr == 'HLG') {

@@ -268,0 +276,0 @@ text += ' (HDR)';

@@ -473,3 +473,4 @@ /*! @license

if (this.player.isLive() &&
seekRangeSize < shaka.ui.Constants.MIN_SEEK_WINDOW_TO_SHOW_SEEKBAR) {
(seekRangeSize < shaka.ui.Constants.MIN_SEEK_WINDOW_TO_SHOW_SEEKBAR ||
!isFinite(seekRangeSize))) {
return false;

@@ -476,0 +477,0 @@ }

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 not supported yet

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

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

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