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

bitmovin-player-ui

Package Overview
Dependencies
Maintainers
1
Versions
141
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bitmovin-player-ui - npm Package Compare versions

Comparing version 3.32.0 to 3.33.0

11

CHANGELOG.md

@@ -7,5 +7,13 @@ # Change Log

## [3.32.0] - 2021-12-21 - 2021-12-21
## [3.33.0] - 2022-02-01
### Added
- Support for providing custom `aria-label` when `ListBox` is used.
### Fixed
- Updating the markers on live streams causing unhandled exception after player is destroyed.
## [3.32.0] - 2021-12-21
### Fixed
- The scrubber could jump to an old position during a seek operation when it was dragged.

@@ -764,2 +772,3 @@ - The Seekbar scrubber could jump to an old position on touch devices when the buffer updates during a seek operation.

[3.33.0]: https://github.com/bitmovin/bitmovin-player-ui/compare/v3.32.0...v3.33.0
[3.32.0]: https://github.com/bitmovin/bitmovin-player-ui/compare/v3.31.0...v3.32.0

@@ -766,0 +775,0 @@ [3.31.0]: https://github.com/bitmovin/bitmovin-player-ui/compare/v3.30.0...v3.31.0

@@ -117,2 +117,3 @@ "use strict";

text: listItem.label,
ariaLabel: listItem.ariaLabel,
});

@@ -119,0 +120,0 @@ };

5

dist/js/framework/components/listselector.d.ts

@@ -10,2 +10,4 @@ import { Component, ComponentConfig } from './component';

label: LocalizableText;
sortedInsert?: boolean;
ariaLabel?: string;
}

@@ -71,4 +73,5 @@ /**

* @param sortedInsert whether the item should be added respecting the order of keys
* @param ariaLabel custom aria label for the listItem
*/
addItem(key: string, label: LocalizableText, sortedInsert?: boolean): void;
addItem(key: string, label: LocalizableText, sortedInsert?: boolean, ariaLabel?: string): void;
/**

@@ -75,0 +78,0 @@ * Removes an item from this selector.

@@ -15,2 +15,13 @@ "use strict";

})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -68,6 +79,8 @@ exports.ListSelector = void 0;

* @param sortedInsert whether the item should be added respecting the order of keys
* @param ariaLabel custom aria label for the listItem
*/
ListSelector.prototype.addItem = function (key, label, sortedInsert) {
ListSelector.prototype.addItem = function (key, label, sortedInsert, ariaLabel) {
if (sortedInsert === void 0) { sortedInsert = false; }
var listItem = { key: key, label: i18n_1.i18n.performLocalization(label) };
if (ariaLabel === void 0) { ariaLabel = ''; }
var listItem = __assign({ key: key, label: i18n_1.i18n.performLocalization(label) }, (ariaLabel && { ariaLabel: ariaLabel }));
// Apply filter function

@@ -155,3 +168,3 @@ if (this.config.filter && !this.config.filter(listItem)) {

.filter(function (item) { return !_this.hasItem(item.key); })
.forEach(function (item) { return _this.addItem(item.key, item.label); });
.forEach(function (item) { return _this.addItem(item.key, item.label, item.sortedInsert, item.ariaLabel); });
this.items

@@ -158,0 +171,0 @@ .filter(function (item) { return newItems.filter(function (i) { return i.key === item.key; }).length === 0; })

@@ -163,2 +163,3 @@ "use strict";

this.player.on(this.player.exports.PlayerEvent.Play, function () { return _this.pausedTimeshiftUpdater.clear(); });
this.player.on(this.player.exports.PlayerEvent.Destroy, function () { return _this.pausedTimeshiftUpdater.clear(); });
};

@@ -165,0 +166,0 @@ TimelineMarkersHandler.prototype.prefixCss = function (cssClassOrId) {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = void 0;
exports.version = '3.32.0';
exports.version = '3.33.0';
// Management

@@ -6,0 +6,0 @@ var uimanager_1 = require("./uimanager");

{
"name": "bitmovin-player-ui",
"version": "3.32.0",
"version": "3.33.0",
"description": "Bitmovin Player UI Framework",

@@ -5,0 +5,0 @@ "main": "./dist/js/framework/main.js",

@@ -64,2 +64,42 @@ import { ListItem, ListSelector, ListSelectorConfig } from '../../src/ts/components/listselector';

describe('addItem with custom aria label', () => {
it('adds a new item with custom aria label', () => {
listSelector.addItem('itemKey', 'itemLabel', false, 'itemAriaLabel');
expect(listSelector.getItems()).toEqual([{ key: 'itemKey', label: 'itemLabel', ariaLabel: 'itemAriaLabel'}]);
});
it('adds new items to the end of the list with custom aria label', () => {
listSelector.addItem('A', 'itemA', false, 'itemAriaLabelA');
listSelector.addItem('C', 'itemC', false, 'itemAriaLabelB');
listSelector.addItem('B', 'itemB', false, 'itemAriaLabelC');
expect(listSelector.getItems()).toEqual([
{ key: 'A', label: 'itemA', ariaLabel: 'itemAriaLabelA'},
{ key: 'C', label: 'itemC', ariaLabel: 'itemAriaLabelB'},
{ key: 'B', label: 'itemB', ariaLabel: 'itemAriaLabelC'},
]);
});
it('adds items respecting the key order if sortedInsert is true and with custom aria label', () => {
const sortedInsert = true;
listSelector.addItem('A', 'itemA', sortedInsert, 'itemAriaLabelA');
listSelector.addItem('C', 'itemC', sortedInsert, 'itemAriaLabelC');
listSelector.addItem('B', 'itemB', sortedInsert, 'itemAriaLabelB');
expect(listSelector.getItems()).toEqual([
{ key: 'A', label: 'itemA', ariaLabel: 'itemAriaLabelA'},
{ key: 'B', label: 'itemB', ariaLabel: 'itemAriaLabelB' },
{ key: 'C', label: 'itemC', ariaLabel: 'itemAriaLabelC' },
]);
});
it('overrides existing value with custom aria label', () => {
listSelector.addItem('itemKey', 'itemLabelOld', false, 'itemAriaLabelOld');
listSelector.addItem('itemKey', 'itemLabelNew', false, 'itemAriaLabelNew');
expect(listSelector.getItems()).toEqual([{ key: 'itemKey', label: 'itemLabelNew', ariaLabel: 'itemAriaLabelNew' }]);
});
});
describe('removeItem', () => {

@@ -66,0 +106,0 @@ beforeEach(() => {

@@ -112,2 +112,3 @@ import { ToggleButton, ToggleButtonConfig } from './togglebutton';

text: listItem.label,
ariaLabel: listItem.ariaLabel,
});

@@ -114,0 +115,0 @@ }

@@ -12,2 +12,4 @@ import {Component, ComponentConfig} from './component';

label: LocalizableText;
sortedInsert?: boolean;
ariaLabel?: string;
}

@@ -108,5 +110,6 @@

* @param sortedInsert whether the item should be added respecting the order of keys
* @param ariaLabel custom aria label for the listItem
*/
addItem(key: string, label: LocalizableText, sortedInsert = false) {
const listItem = { key: key, label: i18n.performLocalization(label) };
addItem(key: string, label: LocalizableText, sortedInsert = false, ariaLabel = '') {
const listItem = { key: key, label: i18n.performLocalization(label), ...(ariaLabel && { ariaLabel })};

@@ -204,3 +207,3 @@ // Apply filter function

.filter((item) => !this.hasItem(item.key))
.forEach((item) => this.addItem(item.key, item.label));
.forEach((item) => this.addItem(item.key, item.label, item.sortedInsert, item.ariaLabel));

@@ -207,0 +210,0 @@ this.items

@@ -211,2 +211,3 @@ import { PlayerAPI } from 'bitmovin-player';

this.player.on(this.player.exports.PlayerEvent.Play, () => this.pausedTimeshiftUpdater.clear());
this.player.on(this.player.exports.PlayerEvent.Destroy, () => this.pausedTimeshiftUpdater.clear());
}

@@ -213,0 +214,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

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