@npo/player 1.10.1 → 1.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/js/ads/ster.js +107 -0
- package/lib/js/ads/ster.js.map +1 -0
- package/lib/js/ads/ster.test.js +91 -0
- package/lib/js/ads/ster.test.js.map +1 -0
- package/lib/js/api/getstreamobject.js +18 -0
- package/lib/js/api/getstreamobject.js.map +1 -0
- package/lib/js/cdnproviders.js +13 -0
- package/lib/js/cdnproviders.js.map +1 -0
- package/lib/js/checks/safari.js +10 -0
- package/lib/js/checks/safari.js.map +1 -0
- package/lib/js/checks/safari.test.js +21 -0
- package/lib/js/checks/safari.test.js.map +1 -0
- package/lib/js/drm/verifydrm.js +25 -0
- package/lib/js/drm/verifydrm.js.map +1 -0
- package/lib/js/drm/verifydrm.test.js +18 -0
- package/lib/js/drm/verifydrm.test.js.map +1 -0
- package/lib/js/fragments/setfragments.js +66 -0
- package/lib/js/fragments/setfragments.js.map +1 -0
- package/lib/js/playeractions/customerrors.test.js +52 -0
- package/lib/js/playeractions/customerrors.test.js.map +1 -0
- package/lib/js/playeractions/handlers/customerrors.js +57 -0
- package/lib/js/playeractions/handlers/customerrors.js.map +1 -0
- package/lib/js/playeractions/handlers/error.js +15 -0
- package/lib/js/playeractions/handlers/error.js.map +1 -0
- package/lib/js/playeractions/handlers/error.test.js +45 -0
- package/lib/js/playeractions/handlers/error.test.js.map +1 -0
- package/lib/js/playeractions/handlers/handleoffsets.js +45 -0
- package/lib/js/playeractions/handlers/handleoffsets.js.map +1 -0
- package/lib/js/playeractions/handlers/handleoffsets.test.js +50 -0
- package/lib/js/playeractions/handlers/handleoffsets.test.js.map +1 -0
- package/lib/js/playeractions/handlers/processplayerconfig.js +28 -0
- package/lib/js/playeractions/handlers/processplayerconfig.js.map +1 -0
- package/lib/js/playeractions/handlers/resolvekeypress.js +47 -0
- package/lib/js/playeractions/handlers/resolvekeypress.js.map +1 -0
- package/lib/js/playeractions/playeractions.js +5 -0
- package/lib/js/playeractions/playeractions.js.map +1 -0
- package/lib/js/tracking/handlers/eventbinding.js +72 -0
- package/lib/js/tracking/handlers/eventbinding.js.map +1 -0
- package/lib/js/tracking/handlers/eventlogging.js +32 -0
- package/lib/js/tracking/handlers/eventlogging.js.map +1 -0
- package/lib/js/tracking/handlers/playertrackerinit.js +20 -0
- package/lib/js/tracking/handlers/playertrackerinit.js.map +1 -0
- package/lib/js/tracking/handlers/playertrackerstart.js +22 -0
- package/lib/js/tracking/handlers/playertrackerstart.js.map +1 -0
- package/lib/js/tracking/playertracker.js +5 -0
- package/lib/js/tracking/playertracker.js.map +1 -0
- package/lib/js/ui/components/adbutton.js +12 -0
- package/lib/js/ui/components/adbutton.js.map +1 -0
- package/lib/js/ui/components/adlabel.js +8 -0
- package/lib/js/ui/components/adlabel.js.map +1 -0
- package/lib/js/ui/components/buttons.js +86 -0
- package/lib/js/ui/components/buttons.js.map +1 -0
- package/lib/js/ui/components/controlbar.js +58 -0
- package/lib/js/ui/components/controlbar.js.map +1 -0
- package/lib/js/ui/components/ctabar.d.ts +1 -1
- package/lib/js/ui/components/ctabar.js +24 -0
- package/lib/js/ui/components/ctabar.js.map +1 -0
- package/lib/js/ui/components/nativemobile/addFragments.js +8 -0
- package/lib/js/ui/components/nativemobile/addFragments.js.map +1 -0
- package/lib/js/ui/components/nativemobile/buttons.js +43 -0
- package/lib/js/ui/components/nativemobile/buttons.js.map +1 -0
- package/lib/js/ui/components/nativemobile/controlbar.js +52 -0
- package/lib/js/ui/components/nativemobile/controlbar.js.map +1 -0
- package/lib/js/ui/components/nativemobile/ctabar.js +12 -0
- package/lib/js/ui/components/nativemobile/ctabar.js.map +1 -0
- package/lib/js/ui/components/nativemobile/playnext.js +16 -0
- package/lib/js/ui/components/nativemobile/playnext.js.map +1 -0
- package/lib/js/ui/components/nativemobile/titlebar.js +8 -0
- package/lib/js/ui/components/nativemobile/titlebar.js.map +1 -0
- package/lib/js/ui/components/nativemobile/topbar.js +21 -0
- package/lib/js/ui/components/nativemobile/topbar.js.map +1 -0
- package/lib/js/ui/components/playnext.js +10 -0
- package/lib/js/ui/components/playnext.js.map +1 -0
- package/lib/js/ui/components/settingspanel.js +129 -0
- package/lib/js/ui/components/settingspanel.js.map +1 -0
- package/lib/js/ui/components/shared/playnextscreen.js +17 -0
- package/lib/js/ui/components/shared/playnextscreen.js.map +1 -0
- package/lib/js/ui/components/titlebar.js +9 -0
- package/lib/js/ui/components/titlebar.js.map +1 -0
- package/lib/js/ui/components/topbar.js +22 -0
- package/lib/js/ui/components/topbar.js.map +1 -0
- package/lib/js/ui/handlers/listboxhandlers.js +41 -0
- package/lib/js/ui/handlers/listboxhandlers.js.map +1 -0
- package/lib/js/ui/handlers/nicamhandler.js +15 -0
- package/lib/js/ui/handlers/nicamhandler.js.map +1 -0
- package/lib/js/ui/handlers/nicamhandler.test.js +34 -0
- package/lib/js/ui/handlers/nicamhandler.test.js.map +1 -0
- package/lib/js/ui/handlers/playnexthandlers.js +2 -0
- package/lib/js/ui/handlers/playnexthandlers.js.map +1 -0
- package/lib/js/ui/handlers/timecontrolhandlers.js +22 -0
- package/lib/js/ui/handlers/timecontrolhandlers.js.map +1 -0
- package/lib/js/ui/nativemobileuicontainer.js +48 -0
- package/lib/js/ui/nativemobileuicontainer.js.map +1 -0
- package/lib/js/ui/nativemobileuifactory.js +42 -0
- package/lib/js/ui/nativemobileuifactory.js.map +1 -0
- package/lib/js/ui/uicontainer.js +57 -0
- package/lib/js/ui/uicontainer.js.map +1 -0
- package/lib/js/utilities/localizationconfig.js +8 -0
- package/lib/js/utilities/localizationconfig.js.map +1 -0
- package/lib/js/utilities/printversion.js +27 -0
- package/lib/js/utilities/printversion.js.map +1 -0
- package/lib/js/utilities/utilities.js +52 -0
- package/lib/js/utilities/utilities.js.map +1 -0
- package/lib/lang/nl.json +72 -0
- package/lib/npoplayer.js +465 -2
- package/lib/npoplayer.js.map +1 -1
- package/lib/npoplayer.test.js +12 -0
- package/lib/npoplayer.test.js.map +1 -0
- package/lib/package.json +1 -1
- package/lib/types/classes.js +4 -0
- package/lib/types/classes.js.map +1 -0
- package/lib/types/interfaces.js +6 -0
- package/lib/types/interfaces.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { PlayerEvent } from 'bitmovin-player';
|
|
2
|
+
import { UIManager } from 'bitmovin-player-ui';
|
|
3
|
+
import { customSpecificErrorMessageOverlayConfig } from '../playeractions/handlers/customerrors';
|
|
4
|
+
import { localizationConfig } from '../utilities/localizationconfig';
|
|
5
|
+
import { nativeMobileUIContainer } from './nativemobileuicontainer';
|
|
6
|
+
import { addFragments } from '../ui/components/nativemobile/addFragments';
|
|
7
|
+
import { processNicam } from './handlers/nicamhandler';
|
|
8
|
+
export function nativeMobileUiFactory(player, config = {}) {
|
|
9
|
+
const uiConfig = {
|
|
10
|
+
...config,
|
|
11
|
+
errorMessages: customSpecificErrorMessageOverlayConfig,
|
|
12
|
+
disableAutoHideWhenHovered: true
|
|
13
|
+
};
|
|
14
|
+
const playerSource = player.getSource();
|
|
15
|
+
const _streamObject = JSON.parse(playerSource?.metadata?.['StreamLink JSON'] || '{}');
|
|
16
|
+
UIManager.setLocalizationConfig(localizationConfig);
|
|
17
|
+
const mobileUIManager = new UIManager(player, nativeMobileUIContainer(player), uiConfig);
|
|
18
|
+
if (_streamObject.metadata.ageRating) {
|
|
19
|
+
processNicam(_streamObject, 'ui-container');
|
|
20
|
+
}
|
|
21
|
+
if (_streamObject.segment) {
|
|
22
|
+
const seg = _streamObject.segment;
|
|
23
|
+
const section = {
|
|
24
|
+
start: seg.inpoint,
|
|
25
|
+
end: seg.outpoint,
|
|
26
|
+
title: playerSource?.title || '',
|
|
27
|
+
};
|
|
28
|
+
player.off(PlayerEvent.Ready, () => addFragments(player, mobileUIManager, section));
|
|
29
|
+
player.on(PlayerEvent.Ready, () => addFragments(player, mobileUIManager, section));
|
|
30
|
+
}
|
|
31
|
+
else if (playerSource?.thumbnailTrack) {
|
|
32
|
+
const element = document.querySelector('.bmpui-npo-player .bmpui-seekbar-label-title');
|
|
33
|
+
if (element !== null) {
|
|
34
|
+
element.textContent = playerSource.title || '';
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
player.on(PlayerEvent.Seeked, () => {
|
|
38
|
+
document.querySelector('.bmpui-npo-player.bmpui-player-state-finished')?.classList.remove('bmpui-player-state-finished');
|
|
39
|
+
});
|
|
40
|
+
return mobileUIManager;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=nativemobileuifactory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nativemobileuifactory.js","sourceRoot":"","sources":["../../../../src/js/ui/nativemobileuifactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,WAAW,EAAY,MAAM,iBAAiB,CAAA;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAC9C,OAAO,EAAE,uCAAuC,EAAE,MAAM,wCAAwC,CAAA;AAChG,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAA;AACpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAA;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAA;AAEzE,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAEtD,MAAM,UAAU,qBAAqB,CAAE,MAAiB,EAAE,SAAmB,EAAE;IAC3E,MAAM,QAAQ,GAAa;QACvB,GAAG,MAAM;QACT,aAAa,EAAE,uCAAuC;QACtD,0BAA0B,EAAE,IAAI;KACnC,CAAA;IAED,MAAM,YAAY,GAAG,MAAM,CAAC,SAAS,EAAE,CAAA;IACvC,MAAM,aAAa,GAAQ,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,QAAQ,EAAE,CAAC,iBAAiB,CAAC,IAAI,IAAI,CAAC,CAAA;IAE1F,SAAS,CAAC,qBAAqB,CAAC,kBAAk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PlaybackToggleOverlay, BufferingOverlay, CastStatusOverlay, SubtitleOverlay, ErrorMessageOverlay } from 'bitmovin-player-ui';
|
|
2
|
+
import { createMiddleButtons } from './components/buttons';
|
|
3
|
+
import { createPlayNextScreen } from './components/playnext';
|
|
4
|
+
import { createSettingsPanel } from './components/settingspanel';
|
|
5
|
+
import { createCTABar } from './components/ctabar';
|
|
6
|
+
import { createTopBar } from './components/topbar';
|
|
7
|
+
import { createControlBar } from './components/controlbar';
|
|
8
|
+
import { createTitleBar } from './components/titlebar';
|
|
9
|
+
export function createUIContainer(npoplayer, variant) {
|
|
10
|
+
let cssClassArray = ['npo-player'];
|
|
11
|
+
let uiDelay = 3000;
|
|
12
|
+
if (variant === 'default') {
|
|
13
|
+
uiDelay = 3000;
|
|
14
|
+
}
|
|
15
|
+
else if (variant === 'ad') {
|
|
16
|
+
uiDelay = -1;
|
|
17
|
+
cssClassArray.push('ster-ad');
|
|
18
|
+
}
|
|
19
|
+
const player = npoplayer.player;
|
|
20
|
+
const middleButtons = createMiddleButtons(player);
|
|
21
|
+
const playNextScreen = createPlayNextScreen(player, npoplayer);
|
|
22
|
+
const settingsPanel = createSettingsPanel(npoplayer);
|
|
23
|
+
const ctaBar = createCTABar(player, npoplayer, variant);
|
|
24
|
+
const topBar = createTopBar(settingsPanel);
|
|
25
|
+
const controlBar = createControlBar(npoplayer, settingsPanel);
|
|
26
|
+
const titleBar = createTitleBar(npoplayer);
|
|
27
|
+
const errorMessageOverlay = new ErrorMessageOverlay();
|
|
28
|
+
npoplayer.uiComponents.errorMessageOverlay = errorMessageOverlay;
|
|
29
|
+
const baseComponentsBefore = [
|
|
30
|
+
new SubtitleOverlay(),
|
|
31
|
+
new BufferingOverlay(),
|
|
32
|
+
new PlaybackToggleOverlay(),
|
|
33
|
+
new CastStatusOverlay(),
|
|
34
|
+
playNextScreen,
|
|
35
|
+
middleButtons,
|
|
36
|
+
];
|
|
37
|
+
const baseComponentsAfter = [
|
|
38
|
+
errorMessageOverlay
|
|
39
|
+
];
|
|
40
|
+
let conditionalComponents = [];
|
|
41
|
+
if (variant === 'default') {
|
|
42
|
+
conditionalComponents.push(controlBar);
|
|
43
|
+
conditionalComponents.push(ctaBar);
|
|
44
|
+
conditionalComponents.push(titleBar);
|
|
45
|
+
conditionalComponents.push(topBar);
|
|
46
|
+
}
|
|
47
|
+
if (variant === 'ad') {
|
|
48
|
+
conditionalComponents.push(controlBar);
|
|
49
|
+
conditionalComponents.push(ctaBar);
|
|
50
|
+
}
|
|
51
|
+
return new UIContainer({
|
|
52
|
+
components: [...baseComponentsBefore, ...conditionalComponents, ...baseComponentsAfter],
|
|
53
|
+
cssClasses: cssClassArray,
|
|
54
|
+
hideDelay: uiDelay
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=uicontainer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uicontainer.js","sourceRoot":"","sources":["../../../../src/js/ui/uicontainer.ts"],"names":[],"mappings":"AACA,OAAO,EACH,WAAW,EACX,qBAAqB,EACrB,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACtB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAEtD,MAAM,UAAU,iBAAiB,CAAE,SAAoB,EAAE,OAAe;IACpE,IAAI,aAAa,GAAG,CAAC,YAAY,CAAC,CAAA;IAClC,IAAI,OAAO,GAAU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I,CAAC,QAAQ,CAAC,CAAC;QACrC,qBAAqB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;KACtC;IAED,IAAI,OAAO,KAAK,IAAI,EAAE;QAClB,qBAAqB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACvC,qBAAqB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;KACtC;IAED,OAAO,IAAI,WAAW,CAAC;QACnB,UAAU,EAAE,CAAC,GAAG,oBAAoB,EAAE,GAAG,qBAAqB,EAAE,GAAG,mBAAmB,CAAC;QACvF,UAAU,EAAE,aAAa;QACzB,SAAS,EAAE,OAAO;KACrB,CAAC,CAAA;AACN,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"localizationconfig.js","sourceRoot":"","sources":["../../../../src/js/utilities/localizationconfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAA;AAE5C,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAC9B,QAAQ,EAAE,IAAI;IACd,YAAY,EAAE;QACV,EAAE,EAAE,MAAM,CAAC,OAA4C;KAC1D;CACJ,CAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export function printVersion(version) {
|
|
2
|
+
const asciiArt = `
|
|
3
|
+
╔▒▒╖
|
|
4
|
+
_╔╠╠╠╠╠╠╠φ_
|
|
5
|
+
_#╠╠╠╠╠╠╠╠╠╠╠#_
|
|
6
|
+
╓╔╠╠╠╠╝╝╠╠╠╠╠╠╠╠╠▒,
|
|
7
|
+
╔╬╠╠╠╠╠ '╚╠╠╠╠╠╠╠╠▒╖
|
|
8
|
+
╔╬╠╠╠╠╠╠╠ '╚╠╠╠╠╠╠╠╬╦
|
|
9
|
+
_╓╠╠╠╠╠╠╠╠╠╠ '╚╠╠╠╠╠╠╠╖╖
|
|
10
|
+
╠╠╠╠╠╠╠╠╠╠╠╠ ╠╠╠╠╠╠╠╠▒
|
|
11
|
+
╬╠╠╠╠╠╠╠╠╠╠╠ _╔╬╠╠╠╠╠╠╠╝
|
|
12
|
+
\`╝╠╠╠╠╠╠╠╠╠ _╔╠╠╠╠╠╠╠╠╠╩\`
|
|
13
|
+
\`╚╠╠╠╠╠╠╠ _╔╬╠╠╠╠╠╠╠╠╠╩
|
|
14
|
+
╙╠╠╠╠╠▒╗φ╬╠╠╠╠╠╠╠╠╠╠╜
|
|
15
|
+
╙╬╠╠╠╠╠╠╠╠╠╠╠╠╠╠╙
|
|
16
|
+
'╬╠╠╠╠╠╠╠╠╠╝^
|
|
17
|
+
\`╝╠╠╠╠╠╩\`
|
|
18
|
+
\`╙╙╙
|
|
19
|
+
`;
|
|
20
|
+
const title = 'NPO Player';
|
|
21
|
+
const versionString = 'v' + String(version);
|
|
22
|
+
const colorCode = '#ff6d00';
|
|
23
|
+
const titleStyle = `font-size: 24px; font-weight: bold; color: ${colorCode}; padding: 2px 4px;`;
|
|
24
|
+
const versionStyle = 'font-size: 24px; font-weight: bold; padding: 2px 4px;';
|
|
25
|
+
console.log(`%c${asciiArt}%c${title} %c${versionString}`, `color: ${colorCode}; background-color: rgb(11, 28, 54);`, titleStyle, versionStyle);
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=printversion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"printversion.js","sourceRoot":"","sources":["../../../../src/js/utilities/printversion.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,YAAY,CAAE,OAAe;IACzC,MAAM,QAAQ,GAAG;;;;;;;;;;;;;;;;;CAiBpB,CAAA;IAEG,MAAM,KAAK,GAAG,YAAY,CAAA;IAC1B,MAAM,aAAa,GAAG,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,CAAA;IAE3C,MAAM,SAAS,GAAG,SAAS,CAAA;IAC3B,MAAM,UAAU,GAAG,8CAA8C,SAAS,qBAAqB,CAAA;IAC/F,MAAM,YAAY,GAAG,uDAAuD,CAAA;IAE5E,OAAO,CAAC,GAAG,CAAC,KAAK,QAAQ,KAAK,KAAK,MAAM,aAAa,EAAE,EAAE,UAAU,SAAS,sCAAsC,EAAE,UAAU,EAAE,YAAY,CAAC,CAAA;AAClJ,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { i18n } from 'bitmovin-player-ui/dist/js/framework/localization/i18n';
|
|
2
|
+
export const jwtToBase64 = (jwt) => {
|
|
3
|
+
return jwt.toString().split('.')[1].replace('-', '+').replace('_', '/');
|
|
4
|
+
};
|
|
5
|
+
export const base64ToObject = (base64) => {
|
|
6
|
+
return JSON.parse(decodeURIComponent(window
|
|
7
|
+
.atob(base64)
|
|
8
|
+
.split('')
|
|
9
|
+
.map(function (c) {
|
|
10
|
+
return ('%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2));
|
|
11
|
+
})
|
|
12
|
+
.join('')));
|
|
13
|
+
};
|
|
14
|
+
export const noTrailingSlash = (url) => {
|
|
15
|
+
return url.slice(-1) === '/' ? (url = url.slice(0, -1)) : url;
|
|
16
|
+
};
|
|
17
|
+
export function localize(key) {
|
|
18
|
+
return i18n.getLocalizer(key);
|
|
19
|
+
}
|
|
20
|
+
export function validateStreamLength(duration) {
|
|
21
|
+
return duration !== null ? msToSeconds(Number(duration)) : -1;
|
|
22
|
+
}
|
|
23
|
+
export function msToSeconds(ms) {
|
|
24
|
+
return ms / 1000;
|
|
25
|
+
}
|
|
26
|
+
export function validatePrid(prid) {
|
|
27
|
+
return prid !== '' && prid !== null ? prid : 'unknown';
|
|
28
|
+
}
|
|
29
|
+
export function getModuleExport(module) {
|
|
30
|
+
if (typeof module === 'object' && module !== null && 'default' in module) {
|
|
31
|
+
return module.default;
|
|
32
|
+
}
|
|
33
|
+
return module;
|
|
34
|
+
}
|
|
35
|
+
export function airPlaySupported() {
|
|
36
|
+
let hasAirPlay = false;
|
|
37
|
+
if (window.WebKitPlaybackTargetAvailabilityEvent == null || undefined) {
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
window.addEventListener('webkitplaybacktargetavailabilitychanged', function (event) {
|
|
41
|
+
switch (event.availability) {
|
|
42
|
+
case "available":
|
|
43
|
+
hasAirPlay = true;
|
|
44
|
+
break;
|
|
45
|
+
case "not-available":
|
|
46
|
+
hasAirPlay = false;
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
return hasAirPlay;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=utilities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utilities.js","sourceRoot":"","sources":["../../../../src/js/utilities/utilities.ts"],"names":[],"mappings":"AAIA,OAAO,EACH,IAAI,EAEP,MAAM,wDAAwD,CAAA;AAQ/D,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,GAAW,EAAE,EAAE;IACvC,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;AAC3E,CAAC,CAAA;AAQD,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,MAAc,EAAE,EAAE;IAC7C,OAAO,IAAI,CAAC,KAAK,CACb,kBAAkB,CACd,MAAM;SACD,IAAI,CAAC,MAAM,CAAC;SACZ,KAAK,CAAC,EAAE,CAAC;SACT,GAAG,CAAC,UAAU,CAAC;QACZ,OAAO,CACH,GAAG,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CACxD,CAAA;IACL,CAAC,CAAC;SACD,IAAI,CAAC,EAAE,CAAC,CAChB,CACJ,CAAA;AACL,CAAC,CAAA;AAQD,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,GAAW,EAAE,EAAE;IAC3C,OAAO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gBAClB,MAAM;YACV,KAAK,eAAe;gBAChB,UAAU,GAAG,KAAK,CAAC;gBACnB,MAAM;SACb;IACL,CAAC,CAAC,CAAC;IACH,OAAO,UAAU,CAAC;AACtB,CAAC"}
|
package/lib/lang/nl.json
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"settings.video.quality": "Kwaliteit",
|
|
3
|
+
"settings.audio.quality": "Audio kwaliteit",
|
|
4
|
+
"settings.audio.track": "Audio Track",
|
|
5
|
+
"settings.audio.mute": "Mute",
|
|
6
|
+
"settings.audio.volume": "Volume",
|
|
7
|
+
"settings.subtitles.window.color": "Venster kleur",
|
|
8
|
+
"settings.subtitles.window.opacity": "Venster zichtbaarheid",
|
|
9
|
+
"settings.subtitles": "Ondertiteling",
|
|
10
|
+
"settings.subtitles.font.color": "Tekst kleur",
|
|
11
|
+
"settings.subtitles.font.opacity": "Tekst opacity",
|
|
12
|
+
"settings.subtitles.background.color": "Background color",
|
|
13
|
+
"settings.subtitles.background.opacity": "Background opacity",
|
|
14
|
+
"colors.white": "wit",
|
|
15
|
+
"colors.black": "zwart",
|
|
16
|
+
"colors.red": "rood",
|
|
17
|
+
"colors.green": "groen",
|
|
18
|
+
"colors.blue": "blauw",
|
|
19
|
+
"colors.cyan": "cyaan",
|
|
20
|
+
"colors.yellow": "geel",
|
|
21
|
+
"colors.magenta": "magenta",
|
|
22
|
+
"percent": "{value}%",
|
|
23
|
+
"settings.subtitles.font.size": "Tekst grootte",
|
|
24
|
+
"settings.subtitles.characterEdge": "Character edge",
|
|
25
|
+
"settings.subtitles.characterEdge.raised": "raised",
|
|
26
|
+
"settings.subtitles.characterEdge.depressed": "depressed",
|
|
27
|
+
"settings.subtitles.characterEdge.uniform": "uniform",
|
|
28
|
+
"settings.subtitles.characterEdge.dropshadowed": "drop shadowed",
|
|
29
|
+
"settings.subtitles.font.family": "Lettertype",
|
|
30
|
+
"settings.subtitles.font.family.monospacedserif": "monospaced serif",
|
|
31
|
+
"settings.subtitles.font.family.proportionalserif": "proportional serif",
|
|
32
|
+
"settings.subtitles.font.family.monospacedsansserif": "monospaced sans serif",
|
|
33
|
+
"settings.subtitles.font.family.proportionalsansserif": "proportional sans serif",
|
|
34
|
+
"settings.subtitles.font.family.casual": "casual",
|
|
35
|
+
"settings.subtitles.font.family.cursive": "cursive",
|
|
36
|
+
"settings.subtitles.font.family.smallcapital": "small capital",
|
|
37
|
+
"settings.time.hours": "Uren",
|
|
38
|
+
"settings.time.minutes": "Minuten",
|
|
39
|
+
"settings.time.seconds": "Secondes",
|
|
40
|
+
"ads.remainingTime": "De advertentie duurt nog {remainingTime} seconden.",
|
|
41
|
+
"settings": "Instellingen",
|
|
42
|
+
"fullscreen": "Volledig scherm",
|
|
43
|
+
"speed": "Snelheid",
|
|
44
|
+
"playPause": "Play/Pauzeer",
|
|
45
|
+
"play": "Play",
|
|
46
|
+
"pause": "Pauzeer",
|
|
47
|
+
"open": "open",
|
|
48
|
+
"close": "sluit",
|
|
49
|
+
"pictureInPicture": "Picture-in-Picture",
|
|
50
|
+
"appleAirplay": "Apple AirPlay",
|
|
51
|
+
"googleCast": "Google Cast",
|
|
52
|
+
"vr": "VR",
|
|
53
|
+
"off": "Geen",
|
|
54
|
+
"auto": "automatisch",
|
|
55
|
+
"back": "Terug",
|
|
56
|
+
"reset": "Reset",
|
|
57
|
+
"replay": "Replay",
|
|
58
|
+
"normal": "normaal",
|
|
59
|
+
"default": "standaard",
|
|
60
|
+
"live": "Live",
|
|
61
|
+
"subtitle.example": "voorbeeld ondertiteling",
|
|
62
|
+
"subtitle.select": "Selecteer ondertiteling",
|
|
63
|
+
"playingOn": "Speelt af op <strong>{castDeviceName}</strong>",
|
|
64
|
+
"connectingTo": "Maakt verbinding met <strong>{castDeviceName}</strong>...",
|
|
65
|
+
"watermarkLink": "Link to Homepage",
|
|
66
|
+
"controlBar": "Video speler controls",
|
|
67
|
+
"player": "Video speler",
|
|
68
|
+
"seekBar": "Video tijdlijn",
|
|
69
|
+
"seekBar.value": "Waarde",
|
|
70
|
+
"seekBar.timeshift": "Timeshift",
|
|
71
|
+
"seekBar.durationText": "out of"
|
|
72
|
+
}
|