1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 | import document from 'global/document';
|
8 | import window from 'global/window';
|
9 | import PlaylistLoader from './playlist-loader';
|
10 | import Playlist from './playlist';
|
11 | import xhrFactory from './xhr';
|
12 | import { simpleTypeFromSourceType } from '@videojs/vhs-utils/es/media-types.js';
|
13 | import * as utils from './bin-utils';
|
14 | import {
|
15 | getProgramTime,
|
16 | seekToProgramTime
|
17 | } from './util/time';
|
18 | import { timeRangesToArray } from './ranges';
|
19 | import videojs from 'video.js';
|
20 | import { MasterPlaylistController } from './master-playlist-controller';
|
21 | import Config from './config';
|
22 | import renditionSelectionMixin from './rendition-mixin';
|
23 | import PlaybackWatcher from './playback-watcher';
|
24 | import SourceUpdater from './source-updater';
|
25 | import reloadSourceOnError from './reload-source-on-error';
|
26 | import {
|
27 | lastBandwidthSelector,
|
28 | lowestBitrateCompatibleVariantSelector,
|
29 | movingAverageBandwidthSelector,
|
30 | comparePlaylistBandwidth,
|
31 | comparePlaylistResolution
|
32 | } from './playlist-selectors.js';
|
33 | import {
|
34 | browserSupportsCodec,
|
35 | getMimeForCodec,
|
36 | parseCodecs
|
37 | } from '@videojs/vhs-utils/es/codecs.js';
|
38 | import { unwrapCodecList } from './util/codecs.js';
|
39 | import logger from './util/logger';
|
40 | import {SAFE_TIME_DELTA} from './ranges';
|
41 |
|
42 |
|
43 |
|
44 |
|
45 |
|
46 | import {version as vhsVersion} from '../package.json';
|
47 | import {version as muxVersion} from 'mux.js/package.json';
|
48 | import {version as mpdVersion} from 'mpd-parser/package.json';
|
49 | import {version as m3u8Version} from 'm3u8-parser/package.json';
|
50 | import {version as aesVersion} from 'aes-decrypter/package.json';
|
51 |
|
52 | const Vhs = {
|
53 | PlaylistLoader,
|
54 | Playlist,
|
55 | utils,
|
56 |
|
57 | STANDARD_PLAYLIST_SELECTOR: lastBandwidthSelector,
|
58 | INITIAL_PLAYLIST_SELECTOR: lowestBitrateCompatibleVariantSelector,
|
59 | lastBandwidthSelector,
|
60 | movingAverageBandwidthSelector,
|
61 | comparePlaylistBandwidth,
|
62 | comparePlaylistResolution,
|
63 |
|
64 | xhr: xhrFactory()
|
65 | };
|
66 |
|
67 |
|
68 | Object.keys(Config).forEach((prop) => {
|
69 | Object.defineProperty(Vhs, prop, {
|
70 | get() {
|
71 | videojs.log.warn(`using Vhs.${prop} is UNSAFE be sure you know what you are doing`);
|
72 | return Config[prop];
|
73 | },
|
74 | set(value) {
|
75 | videojs.log.warn(`using Vhs.${prop} is UNSAFE be sure you know what you are doing`);
|
76 |
|
77 | if (typeof value !== 'number' || value < 0) {
|
78 | videojs.log.warn(`value of Vhs.${prop} must be greater than or equal to 0`);
|
79 | return;
|
80 | }
|
81 |
|
82 | Config[prop] = value;
|
83 | }
|
84 | });
|
85 | });
|
86 |
|
87 | export const LOCAL_STORAGE_KEY = 'videojs-vhs';
|
88 |
|
89 |
|
90 |
|
91 |
|
92 |
|
93 |
|
94 |
|
95 |
|
96 | const handleVhsMediaChange = function(qualityLevels, playlistLoader) {
|
97 | const newPlaylist = playlistLoader.media();
|
98 | let selectedIndex = -1;
|
99 |
|
100 | for (let i = 0; i < qualityLevels.length; i++) {
|
101 | if (qualityLevels[i].id === newPlaylist.id) {
|
102 | selectedIndex = i;
|
103 | break;
|
104 | }
|
105 | }
|
106 |
|
107 | qualityLevels.selectedIndex_ = selectedIndex;
|
108 | qualityLevels.trigger({
|
109 | selectedIndex,
|
110 | type: 'change'
|
111 | });
|
112 | };
|
113 |
|
114 |
|
115 |
|
116 |
|
117 |
|
118 |
|
119 |
|
120 |
|
121 | const handleVhsLoadedMetadata = function(qualityLevels, vhs) {
|
122 | vhs.representations().forEach((rep) => {
|
123 | qualityLevels.addQualityLevel(rep);
|
124 | });
|
125 | handleVhsMediaChange(qualityLevels, vhs.playlists);
|
126 | };
|
127 |
|
128 |
|
129 |
|
130 | Vhs.canPlaySource = function() {
|
131 | return videojs.log.warn('HLS is no longer a tech. Please remove it from ' +
|
132 | 'your player\'s techOrder.');
|
133 | };
|
134 |
|
135 | const emeKeySystems = (keySystemOptions, mainPlaylist, audioPlaylist) => {
|
136 | if (!keySystemOptions) {
|
137 | return keySystemOptions;
|
138 | }
|
139 |
|
140 | let codecs = {};
|
141 |
|
142 | if (mainPlaylist && mainPlaylist.attributes && mainPlaylist.attributes.CODECS) {
|
143 | codecs = unwrapCodecList(parseCodecs(mainPlaylist.attributes.CODECS));
|
144 | }
|
145 |
|
146 | if (audioPlaylist && audioPlaylist.attributes && audioPlaylist.attributes.CODECS) {
|
147 | codecs.audio = audioPlaylist.attributes.CODECS;
|
148 | }
|
149 |
|
150 | const videoContentType = getMimeForCodec(codecs.video);
|
151 | const audioContentType = getMimeForCodec(codecs.audio);
|
152 |
|
153 |
|
154 | const keySystemContentTypes = {};
|
155 |
|
156 | for (const keySystem in keySystemOptions) {
|
157 | keySystemContentTypes[keySystem] = {};
|
158 |
|
159 | if (audioContentType) {
|
160 | keySystemContentTypes[keySystem].audioContentType = audioContentType;
|
161 | }
|
162 | if (videoContentType) {
|
163 | keySystemContentTypes[keySystem].videoContentType = videoContentType;
|
164 | }
|
165 |
|
166 |
|
167 |
|
168 |
|
169 |
|
170 |
|
171 |
|
172 | if (mainPlaylist.contentProtection &&
|
173 | mainPlaylist.contentProtection[keySystem] &&
|
174 | mainPlaylist.contentProtection[keySystem].pssh) {
|
175 | keySystemContentTypes[keySystem].pssh =
|
176 | mainPlaylist.contentProtection[keySystem].pssh;
|
177 | }
|
178 |
|
179 |
|
180 |
|
181 | if (typeof keySystemOptions[keySystem] === 'string') {
|
182 | keySystemContentTypes[keySystem].url = keySystemOptions[keySystem];
|
183 | }
|
184 | }
|
185 |
|
186 | return videojs.mergeOptions(keySystemOptions, keySystemContentTypes);
|
187 | };
|
188 |
|
189 |
|
190 |
|
191 |
|
192 |
|
193 |
|
194 |
|
195 |
|
196 |
|
197 |
|
198 |
|
199 |
|
200 |
|
201 |
|
202 |
|
203 |
|
204 |
|
205 |
|
206 |
|
207 |
|
208 |
|
209 |
|
210 |
|
211 |
|
212 | const getAllPsshKeySystemsOptions = (playlists, keySystems) => {
|
213 | return playlists.reduce((keySystemsArr, playlist) => {
|
214 | if (!playlist.contentProtection) {
|
215 | return keySystemsArr;
|
216 | }
|
217 |
|
218 | const keySystemsOptions = keySystems.reduce((keySystemsObj, keySystem) => {
|
219 | const keySystemOptions = playlist.contentProtection[keySystem];
|
220 |
|
221 | if (keySystemOptions && keySystemOptions.pssh) {
|
222 | keySystemsObj[keySystem] = { pssh: keySystemOptions.pssh };
|
223 | }
|
224 |
|
225 | return keySystemsObj;
|
226 | }, {});
|
227 |
|
228 | if (Object.keys(keySystemsOptions).length) {
|
229 | keySystemsArr.push(keySystemsOptions);
|
230 | }
|
231 |
|
232 | return keySystemsArr;
|
233 | }, []);
|
234 | };
|
235 |
|
236 |
|
237 |
|
238 |
|
239 |
|
240 |
|
241 |
|
242 |
|
243 |
|
244 |
|
245 |
|
246 |
|
247 |
|
248 |
|
249 |
|
250 |
|
251 |
|
252 |
|
253 |
|
254 |
|
255 |
|
256 |
|
257 |
|
258 |
|
259 |
|
260 | export const waitForKeySessionCreation = ({
|
261 | player,
|
262 | sourceKeySystems,
|
263 | audioMedia,
|
264 | mainPlaylists
|
265 | }) => {
|
266 | if (!player.eme.initializeMediaKeys) {
|
267 | return Promise.resolve();
|
268 | }
|
269 |
|
270 |
|
271 |
|
272 |
|
273 |
|
274 |
|
275 |
|
276 |
|
277 |
|
278 | const playlists = audioMedia ? mainPlaylists.concat([audioMedia]) : mainPlaylists;
|
279 |
|
280 | const keySystemsOptionsArr = getAllPsshKeySystemsOptions(
|
281 | playlists,
|
282 | Object.keys(sourceKeySystems)
|
283 | );
|
284 |
|
285 | const initializationFinishedPromises = [];
|
286 | const keySessionCreatedPromises = [];
|
287 |
|
288 |
|
289 |
|
290 |
|
291 |
|
292 |
|
293 | keySystemsOptionsArr.forEach((keySystemsOptions) => {
|
294 | keySessionCreatedPromises.push(new Promise((resolve, reject) => {
|
295 | player.tech_.one('keysessioncreated', resolve);
|
296 | }));
|
297 |
|
298 | initializationFinishedPromises.push(new Promise((resolve, reject) => {
|
299 | player.eme.initializeMediaKeys({
|
300 | keySystems: keySystemsOptions
|
301 | }, (err) => {
|
302 | if (err) {
|
303 | reject(err);
|
304 | return;
|
305 | }
|
306 | resolve();
|
307 | });
|
308 | }));
|
309 | });
|
310 |
|
311 |
|
312 |
|
313 |
|
314 |
|
315 |
|
316 |
|
317 | return Promise.race([
|
318 |
|
319 |
|
320 |
|
321 | Promise.all(initializationFinishedPromises),
|
322 |
|
323 | Promise.race(keySessionCreatedPromises)
|
324 | ]);
|
325 | };
|
326 |
|
327 |
|
328 |
|
329 |
|
330 |
|
331 |
|
332 |
|
333 |
|
334 |
|
335 |
|
336 |
|
337 |
|
338 |
|
339 |
|
340 |
|
341 |
|
342 |
|
343 |
|
344 | const setupEmeOptions = ({
|
345 | player,
|
346 | sourceKeySystems,
|
347 | media,
|
348 | audioMedia
|
349 | }) => {
|
350 | const sourceOptions = emeKeySystems(sourceKeySystems, media, audioMedia);
|
351 |
|
352 | if (!sourceOptions) {
|
353 | return false;
|
354 | }
|
355 |
|
356 | player.currentSource().keySystems = sourceOptions;
|
357 |
|
358 |
|
359 |
|
360 | if (sourceOptions && !player.eme) {
|
361 | videojs.log.warn('DRM encrypted source cannot be decrypted without a DRM plugin');
|
362 | return false;
|
363 | }
|
364 |
|
365 | return true;
|
366 | };
|
367 |
|
368 | const getVhsLocalStorage = () => {
|
369 | if (!window.localStorage) {
|
370 | return null;
|
371 | }
|
372 |
|
373 | const storedObject = window.localStorage.getItem(LOCAL_STORAGE_KEY);
|
374 |
|
375 | if (!storedObject) {
|
376 | return null;
|
377 | }
|
378 |
|
379 | try {
|
380 | return JSON.parse(storedObject);
|
381 | } catch (e) {
|
382 |
|
383 | return null;
|
384 | }
|
385 | };
|
386 |
|
387 | const updateVhsLocalStorage = (options) => {
|
388 | if (!window.localStorage) {
|
389 | return false;
|
390 | }
|
391 |
|
392 | let objectToStore = getVhsLocalStorage();
|
393 |
|
394 | objectToStore = objectToStore ? videojs.mergeOptions(objectToStore, options) : options;
|
395 |
|
396 | try {
|
397 | window.localStorage.setItem(LOCAL_STORAGE_KEY, JSON.stringify(objectToStore));
|
398 | } catch (e) {
|
399 |
|
400 |
|
401 |
|
402 |
|
403 | return false;
|
404 | }
|
405 |
|
406 | return objectToStore;
|
407 | };
|
408 |
|
409 |
|
410 |
|
411 |
|
412 |
|
413 |
|
414 |
|
415 |
|
416 |
|
417 |
|
418 |
|
419 |
|
420 |
|
421 | const expandDataUri = (dataUri) => {
|
422 | if (dataUri.toLowerCase().indexOf('data:application/vnd.videojs.vhs+json,') === 0) {
|
423 | return JSON.parse(dataUri.substring(dataUri.indexOf(',') + 1));
|
424 | }
|
425 |
|
426 | return dataUri;
|
427 | };
|
428 |
|
429 |
|
430 |
|
431 |
|
432 | Vhs.supportsNativeHls = (function() {
|
433 | if (!document || !document.createElement) {
|
434 | return false;
|
435 | }
|
436 |
|
437 | const video = document.createElement('video');
|
438 |
|
439 |
|
440 | if (!videojs.getTech('Html5').isSupported()) {
|
441 | return false;
|
442 | }
|
443 |
|
444 |
|
445 | const canPlay = [
|
446 |
|
447 | 'application/vnd.apple.mpegurl',
|
448 |
|
449 | 'audio/mpegurl',
|
450 |
|
451 | 'audio/x-mpegurl',
|
452 |
|
453 | 'application/x-mpegurl',
|
454 |
|
455 | 'video/x-mpegurl',
|
456 | 'video/mpegurl',
|
457 | 'application/mpegurl'
|
458 | ];
|
459 |
|
460 | return canPlay.some(function(canItPlay) {
|
461 | return (/maybe|probably/i).test(video.canPlayType(canItPlay));
|
462 | });
|
463 | }());
|
464 |
|
465 | Vhs.supportsNativeDash = (function() {
|
466 | if (!document || !document.createElement || !videojs.getTech('Html5').isSupported()) {
|
467 | return false;
|
468 | }
|
469 |
|
470 | return (/maybe|probably/i).test(document.createElement('video').canPlayType('application/dash+xml'));
|
471 | }());
|
472 |
|
473 | Vhs.supportsTypeNatively = (type) => {
|
474 | if (type === 'hls') {
|
475 | return Vhs.supportsNativeHls;
|
476 | }
|
477 |
|
478 | if (type === 'dash') {
|
479 | return Vhs.supportsNativeDash;
|
480 | }
|
481 |
|
482 | return false;
|
483 | };
|
484 |
|
485 |
|
486 |
|
487 |
|
488 |
|
489 | Vhs.isSupported = function() {
|
490 | return videojs.log.warn('HLS is no longer a tech. Please remove it from ' +
|
491 | 'your player\'s techOrder.');
|
492 | };
|
493 |
|
494 | const Component = videojs.getComponent('Component');
|
495 |
|
496 |
|
497 |
|
498 |
|
499 |
|
500 |
|
501 |
|
502 |
|
503 |
|
504 |
|
505 |
|
506 | class VhsHandler extends Component {
|
507 | constructor(source, tech, options) {
|
508 | super(tech, videojs.mergeOptions(options.hls, options.vhs));
|
509 |
|
510 | if (options.hls && Object.keys(options.hls).length) {
|
511 | videojs.log.warn('Using hls options is deprecated. Please rename `hls` to `vhs` in your options object.');
|
512 | }
|
513 |
|
514 |
|
515 |
|
516 | if (typeof options.initialBandwidth === 'number') {
|
517 | this.options_.bandwidth = options.initialBandwidth;
|
518 | }
|
519 |
|
520 | this.logger_ = logger('VhsHandler');
|
521 |
|
522 |
|
523 |
|
524 | if (tech.options_ && tech.options_.playerId) {
|
525 | const _player = videojs(tech.options_.playerId);
|
526 |
|
527 | if (!_player.hasOwnProperty('hls')) {
|
528 | Object.defineProperty(_player, 'hls', {
|
529 | get: () => {
|
530 | videojs.log.warn('player.hls is deprecated. Use player.tech().vhs instead.');
|
531 | tech.trigger({ type: 'usage', name: 'hls-player-access' });
|
532 | return this;
|
533 | },
|
534 | configurable: true
|
535 | });
|
536 | }
|
537 |
|
538 | if (!_player.hasOwnProperty('vhs')) {
|
539 | Object.defineProperty(_player, 'vhs', {
|
540 | get: () => {
|
541 | videojs.log.warn('player.vhs is deprecated. Use player.tech().vhs instead.');
|
542 | tech.trigger({ type: 'usage', name: 'vhs-player-access' });
|
543 | return this;
|
544 | },
|
545 | configurable: true
|
546 | });
|
547 | }
|
548 |
|
549 | if (!_player.hasOwnProperty('dash')) {
|
550 | Object.defineProperty(_player, 'dash', {
|
551 | get: () => {
|
552 | videojs.log.warn('player.dash is deprecated. Use player.tech().vhs instead.');
|
553 | return this;
|
554 | },
|
555 | configurable: true
|
556 | });
|
557 | }
|
558 |
|
559 | this.player_ = _player;
|
560 | }
|
561 |
|
562 | this.tech_ = tech;
|
563 | this.source_ = source;
|
564 | this.stats = {};
|
565 | this.ignoreNextSeekingEvent_ = false;
|
566 | this.setOptions_();
|
567 |
|
568 | if (this.options_.overrideNative &&
|
569 | tech.overrideNativeAudioTracks &&
|
570 | tech.overrideNativeVideoTracks) {
|
571 | tech.overrideNativeAudioTracks(true);
|
572 | tech.overrideNativeVideoTracks(true);
|
573 | } else if (this.options_.overrideNative &&
|
574 | (tech.featuresNativeVideoTracks || tech.featuresNativeAudioTracks)) {
|
575 |
|
576 |
|
577 | throw new Error('Overriding native HLS requires emulated tracks. ' +
|
578 | 'See https://git.io/vMpjB');
|
579 | }
|
580 |
|
581 |
|
582 |
|
583 | this.on(document, [
|
584 | 'fullscreenchange', 'webkitfullscreenchange',
|
585 | 'mozfullscreenchange', 'MSFullscreenChange'
|
586 | ], (event) => {
|
587 | const fullscreenElement = document.fullscreenElement ||
|
588 | document.webkitFullscreenElement ||
|
589 | document.mozFullScreenElement ||
|
590 | document.msFullscreenElement;
|
591 |
|
592 | if (fullscreenElement && fullscreenElement.contains(this.tech_.el())) {
|
593 | this.masterPlaylistController_.fastQualityChange_();
|
594 | } else {
|
595 |
|
596 |
|
597 |
|
598 | this.masterPlaylistController_.checkABR_();
|
599 | }
|
600 | });
|
601 |
|
602 | this.on(this.tech_, 'seeking', function() {
|
603 | if (this.ignoreNextSeekingEvent_) {
|
604 | this.ignoreNextSeekingEvent_ = false;
|
605 | return;
|
606 | }
|
607 |
|
608 | this.setCurrentTime(this.tech_.currentTime());
|
609 | });
|
610 |
|
611 | this.on(this.tech_, 'error', function() {
|
612 |
|
613 |
|
614 | if (this.tech_.error() && this.masterPlaylistController_) {
|
615 | this.masterPlaylistController_.pauseLoading();
|
616 | }
|
617 | });
|
618 |
|
619 | this.on(this.tech_, 'play', this.play);
|
620 | }
|
621 |
|
622 | setOptions_() {
|
623 |
|
624 | this.options_.withCredentials = this.options_.withCredentials || false;
|
625 | this.options_.handleManifestRedirects = this.options_.handleManifestRedirects === false ? false : true;
|
626 | this.options_.limitRenditionByPlayerDimensions = this.options_.limitRenditionByPlayerDimensions === false ? false : true;
|
627 | this.options_.useDevicePixelRatio = this.options_.useDevicePixelRatio || false;
|
628 | this.options_.smoothQualityChange = this.options_.smoothQualityChange || false;
|
629 | this.options_.useBandwidthFromLocalStorage =
|
630 | typeof this.source_.useBandwidthFromLocalStorage !== 'undefined' ?
|
631 | this.source_.useBandwidthFromLocalStorage :
|
632 | this.options_.useBandwidthFromLocalStorage || false;
|
633 | this.options_.useNetworkInformationApi = this.options_.useNetworkInformationApi || false;
|
634 | this.options_.useDtsForTimestampOffset = this.options_.useDtsForTimestampOffset || false;
|
635 | this.options_.customTagParsers = this.options_.customTagParsers || [];
|
636 | this.options_.customTagMappers = this.options_.customTagMappers || [];
|
637 | this.options_.cacheEncryptionKeys = this.options_.cacheEncryptionKeys || false;
|
638 |
|
639 | if (typeof this.options_.blacklistDuration !== 'number') {
|
640 | this.options_.blacklistDuration = 5 * 60;
|
641 | }
|
642 |
|
643 | if (typeof this.options_.bandwidth !== 'number') {
|
644 | if (this.options_.useBandwidthFromLocalStorage) {
|
645 | const storedObject = getVhsLocalStorage();
|
646 |
|
647 | if (storedObject && storedObject.bandwidth) {
|
648 | this.options_.bandwidth = storedObject.bandwidth;
|
649 | this.tech_.trigger({type: 'usage', name: 'vhs-bandwidth-from-local-storage'});
|
650 | this.tech_.trigger({type: 'usage', name: 'hls-bandwidth-from-local-storage'});
|
651 | }
|
652 | if (storedObject && storedObject.throughput) {
|
653 | this.options_.throughput = storedObject.throughput;
|
654 | this.tech_.trigger({type: 'usage', name: 'vhs-throughput-from-local-storage'});
|
655 | this.tech_.trigger({type: 'usage', name: 'hls-throughput-from-local-storage'});
|
656 | }
|
657 | }
|
658 | }
|
659 |
|
660 |
|
661 | if (typeof this.options_.bandwidth !== 'number') {
|
662 | this.options_.bandwidth = Config.INITIAL_BANDWIDTH;
|
663 | }
|
664 |
|
665 |
|
666 |
|
667 | this.options_.enableLowInitialPlaylist =
|
668 | this.options_.enableLowInitialPlaylist &&
|
669 | this.options_.bandwidth === Config.INITIAL_BANDWIDTH;
|
670 |
|
671 |
|
672 | [
|
673 | 'withCredentials',
|
674 | 'useDevicePixelRatio',
|
675 | 'limitRenditionByPlayerDimensions',
|
676 | 'bandwidth',
|
677 | 'smoothQualityChange',
|
678 | 'customTagParsers',
|
679 | 'customTagMappers',
|
680 | 'handleManifestRedirects',
|
681 | 'cacheEncryptionKeys',
|
682 | 'playlistSelector',
|
683 | 'initialPlaylistSelector',
|
684 | 'experimentalBufferBasedABR',
|
685 | 'liveRangeSafeTimeDelta',
|
686 | 'experimentalLLHLS',
|
687 | 'useNetworkInformationApi',
|
688 | 'useDtsForTimestampOffset',
|
689 | 'experimentalExactManifestTimings',
|
690 | 'experimentalLeastPixelDiffSelector'
|
691 | ].forEach((option) => {
|
692 | if (typeof this.source_[option] !== 'undefined') {
|
693 | this.options_[option] = this.source_[option];
|
694 | }
|
695 | });
|
696 |
|
697 | this.limitRenditionByPlayerDimensions = this.options_.limitRenditionByPlayerDimensions;
|
698 | this.useDevicePixelRatio = this.options_.useDevicePixelRatio;
|
699 | }
|
700 | |
701 |
|
702 |
|
703 |
|
704 |
|
705 | src(src, type) {
|
706 |
|
707 | if (!src) {
|
708 | return;
|
709 | }
|
710 | this.setOptions_();
|
711 |
|
712 | this.options_.src = expandDataUri(this.source_.src);
|
713 | this.options_.tech = this.tech_;
|
714 | this.options_.externVhs = Vhs;
|
715 | this.options_.sourceType = simpleTypeFromSourceType(type);
|
716 |
|
717 |
|
718 | this.options_.seekTo = (time) => {
|
719 | this.tech_.setCurrentTime(time);
|
720 | };
|
721 |
|
722 | if (this.options_.smoothQualityChange) {
|
723 | videojs.log.warn('smoothQualityChange is deprecated and will be removed in the next major version');
|
724 | }
|
725 |
|
726 | this.masterPlaylistController_ = new MasterPlaylistController(this.options_);
|
727 |
|
728 | const playbackWatcherOptions = videojs.mergeOptions(
|
729 | {
|
730 | liveRangeSafeTimeDelta: SAFE_TIME_DELTA
|
731 | },
|
732 | this.options_,
|
733 | {
|
734 | seekable: () => this.seekable(),
|
735 | media: () => this.masterPlaylistController_.media(),
|
736 | masterPlaylistController: this.masterPlaylistController_
|
737 | }
|
738 | );
|
739 |
|
740 | this.playbackWatcher_ = new PlaybackWatcher(playbackWatcherOptions);
|
741 |
|
742 | this.masterPlaylistController_.on('error', () => {
|
743 | const player = videojs.players[this.tech_.options_.playerId];
|
744 | let error = this.masterPlaylistController_.error;
|
745 |
|
746 | if (typeof error === 'object' && !error.code) {
|
747 | error.code = 3;
|
748 | } else if (typeof error === 'string') {
|
749 | error = {message: error, code: 3};
|
750 | }
|
751 |
|
752 | player.error(error);
|
753 | });
|
754 |
|
755 | const defaultSelector = this.options_.experimentalBufferBasedABR ?
|
756 | Vhs.movingAverageBandwidthSelector(0.55) : Vhs.STANDARD_PLAYLIST_SELECTOR;
|
757 |
|
758 |
|
759 |
|
760 | this.masterPlaylistController_.selectPlaylist = this.selectPlaylist ?
|
761 | this.selectPlaylist.bind(this) :
|
762 | defaultSelector.bind(this);
|
763 |
|
764 | this.masterPlaylistController_.selectInitialPlaylist =
|
765 | Vhs.INITIAL_PLAYLIST_SELECTOR.bind(this);
|
766 |
|
767 |
|
768 | this.playlists = this.masterPlaylistController_.masterPlaylistLoader_;
|
769 | this.mediaSource = this.masterPlaylistController_.mediaSource;
|
770 |
|
771 |
|
772 |
|
773 |
|
774 | Object.defineProperties(this, {
|
775 | selectPlaylist: {
|
776 | get() {
|
777 | return this.masterPlaylistController_.selectPlaylist;
|
778 | },
|
779 | set(selectPlaylist) {
|
780 | this.masterPlaylistController_.selectPlaylist = selectPlaylist.bind(this);
|
781 | }
|
782 | },
|
783 | throughput: {
|
784 | get() {
|
785 | return this.masterPlaylistController_.mainSegmentLoader_.throughput.rate;
|
786 | },
|
787 | set(throughput) {
|
788 | this.masterPlaylistController_.mainSegmentLoader_.throughput.rate = throughput;
|
789 |
|
790 |
|
791 | this.masterPlaylistController_.mainSegmentLoader_.throughput.count = 1;
|
792 | }
|
793 | },
|
794 | bandwidth: {
|
795 | get() {
|
796 | let playerBandwidthEst = this.masterPlaylistController_.mainSegmentLoader_.bandwidth;
|
797 |
|
798 | const networkInformation = window.navigator.connection || window.navigator.mozConnection || window.navigator.webkitConnection;
|
799 | const tenMbpsAsBitsPerSecond = 10e6;
|
800 |
|
801 | if (this.options_.useNetworkInformationApi && networkInformation) {
|
802 |
|
803 |
|
804 | const networkInfoBandwidthEstBitsPerSec = networkInformation.downlink * 1000 * 1000;
|
805 |
|
806 |
|
807 |
|
808 |
|
809 | if (networkInfoBandwidthEstBitsPerSec >= tenMbpsAsBitsPerSecond && playerBandwidthEst >= tenMbpsAsBitsPerSecond) {
|
810 | playerBandwidthEst = Math.max(playerBandwidthEst, networkInfoBandwidthEstBitsPerSec);
|
811 | } else {
|
812 | playerBandwidthEst = networkInfoBandwidthEstBitsPerSec;
|
813 | }
|
814 | }
|
815 |
|
816 | return playerBandwidthEst;
|
817 | },
|
818 | set(bandwidth) {
|
819 | this.masterPlaylistController_.mainSegmentLoader_.bandwidth = bandwidth;
|
820 |
|
821 |
|
822 |
|
823 | this.masterPlaylistController_.mainSegmentLoader_.throughput = {
|
824 | rate: 0,
|
825 | count: 0
|
826 | };
|
827 | }
|
828 | },
|
829 | |
830 |
|
831 |
|
832 |
|
833 |
|
834 |
|
835 |
|
836 |
|
837 |
|
838 | systemBandwidth: {
|
839 | get() {
|
840 | const invBandwidth = 1 / (this.bandwidth || 1);
|
841 | let invThroughput;
|
842 |
|
843 | if (this.throughput > 0) {
|
844 | invThroughput = 1 / this.throughput;
|
845 | } else {
|
846 | invThroughput = 0;
|
847 | }
|
848 |
|
849 | const systemBitrate = Math.floor(1 / (invBandwidth + invThroughput));
|
850 |
|
851 | return systemBitrate;
|
852 | },
|
853 | set() {
|
854 | videojs.log.error('The "systemBandwidth" property is read-only');
|
855 | }
|
856 | }
|
857 | });
|
858 |
|
859 | if (this.options_.bandwidth) {
|
860 | this.bandwidth = this.options_.bandwidth;
|
861 | }
|
862 | if (this.options_.throughput) {
|
863 | this.throughput = this.options_.throughput;
|
864 | }
|
865 |
|
866 | Object.defineProperties(this.stats, {
|
867 | bandwidth: {
|
868 | get: () => this.bandwidth || 0,
|
869 | enumerable: true
|
870 | },
|
871 | mediaRequests: {
|
872 | get: () => this.masterPlaylistController_.mediaRequests_() || 0,
|
873 | enumerable: true
|
874 | },
|
875 | mediaRequestsAborted: {
|
876 | get: () => this.masterPlaylistController_.mediaRequestsAborted_() || 0,
|
877 | enumerable: true
|
878 | },
|
879 | mediaRequestsTimedout: {
|
880 | get: () => this.masterPlaylistController_.mediaRequestsTimedout_() || 0,
|
881 | enumerable: true
|
882 | },
|
883 | mediaRequestsErrored: {
|
884 | get: () => this.masterPlaylistController_.mediaRequestsErrored_() || 0,
|
885 | enumerable: true
|
886 | },
|
887 | mediaTransferDuration: {
|
888 | get: () => this.masterPlaylistController_.mediaTransferDuration_() || 0,
|
889 | enumerable: true
|
890 | },
|
891 | mediaBytesTransferred: {
|
892 | get: () => this.masterPlaylistController_.mediaBytesTransferred_() || 0,
|
893 | enumerable: true
|
894 | },
|
895 | mediaSecondsLoaded: {
|
896 | get: () => this.masterPlaylistController_.mediaSecondsLoaded_() || 0,
|
897 | enumerable: true
|
898 | },
|
899 | mediaAppends: {
|
900 | get: () => this.masterPlaylistController_.mediaAppends_() || 0,
|
901 | enumerable: true
|
902 | },
|
903 | mainAppendsToLoadedData: {
|
904 | get: () => this.masterPlaylistController_.mainAppendsToLoadedData_() || 0,
|
905 | enumerable: true
|
906 | },
|
907 | audioAppendsToLoadedData: {
|
908 | get: () => this.masterPlaylistController_.audioAppendsToLoadedData_() || 0,
|
909 | enumerable: true
|
910 | },
|
911 | appendsToLoadedData: {
|
912 | get: () => this.masterPlaylistController_.appendsToLoadedData_() || 0,
|
913 | enumerable: true
|
914 | },
|
915 | timeToLoadedData: {
|
916 | get: () => this.masterPlaylistController_.timeToLoadedData_() || 0,
|
917 | enumerable: true
|
918 | },
|
919 | buffered: {
|
920 | get: () => timeRangesToArray(this.tech_.buffered()),
|
921 | enumerable: true
|
922 | },
|
923 | currentTime: {
|
924 | get: () => this.tech_.currentTime(),
|
925 | enumerable: true
|
926 | },
|
927 | currentSource: {
|
928 | get: () => this.tech_.currentSource_,
|
929 | enumerable: true
|
930 | },
|
931 | currentTech: {
|
932 | get: () => this.tech_.name_,
|
933 | enumerable: true
|
934 | },
|
935 | duration: {
|
936 | get: () => this.tech_.duration(),
|
937 | enumerable: true
|
938 | },
|
939 | master: {
|
940 | get: () => this.playlists.master,
|
941 | enumerable: true
|
942 | },
|
943 | playerDimensions: {
|
944 | get: () => this.tech_.currentDimensions(),
|
945 | enumerable: true
|
946 | },
|
947 | seekable: {
|
948 | get: () => timeRangesToArray(this.tech_.seekable()),
|
949 | enumerable: true
|
950 | },
|
951 | timestamp: {
|
952 | get: () => Date.now(),
|
953 | enumerable: true
|
954 | },
|
955 | videoPlaybackQuality: {
|
956 | get: () => this.tech_.getVideoPlaybackQuality(),
|
957 | enumerable: true
|
958 | }
|
959 | });
|
960 |
|
961 | this.tech_.one(
|
962 | 'canplay',
|
963 | this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_)
|
964 | );
|
965 |
|
966 | this.tech_.on('bandwidthupdate', () => {
|
967 | if (this.options_.useBandwidthFromLocalStorage) {
|
968 | updateVhsLocalStorage({
|
969 | bandwidth: this.bandwidth,
|
970 | throughput: Math.round(this.throughput)
|
971 | });
|
972 | }
|
973 | });
|
974 |
|
975 | this.masterPlaylistController_.on('selectedinitialmedia', () => {
|
976 |
|
977 | renditionSelectionMixin(this);
|
978 | });
|
979 |
|
980 | this.masterPlaylistController_.sourceUpdater_.on('createdsourcebuffers', () => {
|
981 | this.setupEme_();
|
982 | });
|
983 |
|
984 |
|
985 |
|
986 | this.on(this.masterPlaylistController_, 'progress', function() {
|
987 | this.tech_.trigger('progress');
|
988 | });
|
989 |
|
990 |
|
991 |
|
992 | this.on(this.masterPlaylistController_, 'firstplay', function() {
|
993 | this.ignoreNextSeekingEvent_ = true;
|
994 | });
|
995 |
|
996 | this.setupQualityLevels_();
|
997 |
|
998 |
|
999 |
|
1000 | if (!this.tech_.el()) {
|
1001 | return;
|
1002 | }
|
1003 |
|
1004 | this.mediaSourceUrl_ = window.URL.createObjectURL(this.masterPlaylistController_.mediaSource);
|
1005 |
|
1006 | this.tech_.src(this.mediaSourceUrl_);
|
1007 | }
|
1008 |
|
1009 | createKeySessions_() {
|
1010 | const audioPlaylistLoader =
|
1011 | this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader;
|
1012 |
|
1013 | this.logger_('waiting for EME key session creation');
|
1014 | waitForKeySessionCreation({
|
1015 | player: this.player_,
|
1016 | sourceKeySystems: this.source_.keySystems,
|
1017 | audioMedia: audioPlaylistLoader && audioPlaylistLoader.media(),
|
1018 | mainPlaylists: this.playlists.master.playlists
|
1019 | }).then(() => {
|
1020 | this.logger_('created EME key session');
|
1021 | this.masterPlaylistController_.sourceUpdater_.initializedEme();
|
1022 | }).catch((err) => {
|
1023 | this.logger_('error while creating EME key session', err);
|
1024 | this.player_.error({
|
1025 | message: 'Failed to initialize media keys for EME',
|
1026 | code: 3
|
1027 | });
|
1028 | });
|
1029 | }
|
1030 |
|
1031 | handleWaitingForKey_() {
|
1032 |
|
1033 |
|
1034 |
|
1035 |
|
1036 |
|
1037 |
|
1038 |
|
1039 |
|
1040 | this.logger_('waitingforkey fired, attempting to create any new key sessions');
|
1041 | this.createKeySessions_();
|
1042 | }
|
1043 |
|
1044 | |
1045 |
|
1046 |
|
1047 |
|
1048 |
|
1049 |
|
1050 |
|
1051 |
|
1052 | setupEme_() {
|
1053 | const audioPlaylistLoader =
|
1054 | this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader;
|
1055 |
|
1056 | const didSetupEmeOptions = setupEmeOptions({
|
1057 | player: this.player_,
|
1058 | sourceKeySystems: this.source_.keySystems,
|
1059 | media: this.playlists.media(),
|
1060 | audioMedia: audioPlaylistLoader && audioPlaylistLoader.media()
|
1061 | });
|
1062 |
|
1063 | this.player_.tech_.on('keystatuschange', (e) => {
|
1064 | if (e.status !== 'output-restricted') {
|
1065 | return;
|
1066 | }
|
1067 |
|
1068 | const masterPlaylist = this.masterPlaylistController_.master();
|
1069 |
|
1070 | if (!masterPlaylist || !masterPlaylist.playlists) {
|
1071 | return;
|
1072 | }
|
1073 |
|
1074 | const excludedHDPlaylists = [];
|
1075 |
|
1076 |
|
1077 | masterPlaylist.playlists.forEach(playlist => {
|
1078 | if (playlist && playlist.attributes && playlist.attributes.RESOLUTION &&
|
1079 | playlist.attributes.RESOLUTION.height >= 720) {
|
1080 | if (!playlist.excludeUntil || playlist.excludeUntil < Infinity) {
|
1081 |
|
1082 | playlist.excludeUntil = Infinity;
|
1083 | excludedHDPlaylists.push(playlist);
|
1084 | }
|
1085 | }
|
1086 | });
|
1087 |
|
1088 | if (excludedHDPlaylists.length) {
|
1089 | videojs.log.warn(
|
1090 | 'DRM keystatus changed to "output-restricted." Removing the following HD playlists ' +
|
1091 | 'that will most likely fail to play and clearing the buffer. ' +
|
1092 | 'This may be due to HDCP restrictions on the stream and the capabilities of the current device.',
|
1093 | ...excludedHDPlaylists
|
1094 | );
|
1095 |
|
1096 |
|
1097 | this.masterPlaylistController_.fastQualityChange_();
|
1098 | }
|
1099 | });
|
1100 |
|
1101 | this.handleWaitingForKey_ = this.handleWaitingForKey_.bind(this);
|
1102 | this.player_.tech_.on('waitingforkey', this.handleWaitingForKey_);
|
1103 |
|
1104 |
|
1105 |
|
1106 | if (videojs.browser.IE_VERSION === 11 || !didSetupEmeOptions) {
|
1107 |
|
1108 | this.masterPlaylistController_.sourceUpdater_.initializedEme();
|
1109 | return;
|
1110 | }
|
1111 |
|
1112 | this.createKeySessions_();
|
1113 | }
|
1114 |
|
1115 | |
1116 |
|
1117 |
|
1118 |
|
1119 |
|
1120 |
|
1121 | setupQualityLevels_() {
|
1122 | const player = videojs.players[this.tech_.options_.playerId];
|
1123 |
|
1124 |
|
1125 |
|
1126 | if (!player || !player.qualityLevels || this.qualityLevels_) {
|
1127 | return;
|
1128 | }
|
1129 |
|
1130 | this.qualityLevels_ = player.qualityLevels();
|
1131 |
|
1132 | this.masterPlaylistController_.on('selectedinitialmedia', () => {
|
1133 | handleVhsLoadedMetadata(this.qualityLevels_, this);
|
1134 | });
|
1135 |
|
1136 | this.playlists.on('mediachange', () => {
|
1137 | handleVhsMediaChange(this.qualityLevels_, this.playlists);
|
1138 | });
|
1139 | }
|
1140 |
|
1141 | |
1142 |
|
1143 |
|
1144 | static version() {
|
1145 | return {
|
1146 | '@videojs/http-streaming': vhsVersion,
|
1147 | 'mux.js': muxVersion,
|
1148 | 'mpd-parser': mpdVersion,
|
1149 | 'm3u8-parser': m3u8Version,
|
1150 | 'aes-decrypter': aesVersion
|
1151 | };
|
1152 | }
|
1153 |
|
1154 | |
1155 |
|
1156 |
|
1157 | version() {
|
1158 | return this.constructor.version();
|
1159 | }
|
1160 |
|
1161 | canChangeType() {
|
1162 | return SourceUpdater.canChangeType();
|
1163 | }
|
1164 |
|
1165 | |
1166 |
|
1167 |
|
1168 | play() {
|
1169 | this.masterPlaylistController_.play();
|
1170 | }
|
1171 |
|
1172 | |
1173 |
|
1174 |
|
1175 | setCurrentTime(currentTime) {
|
1176 | this.masterPlaylistController_.setCurrentTime(currentTime);
|
1177 | }
|
1178 |
|
1179 | |
1180 |
|
1181 |
|
1182 | duration() {
|
1183 | return this.masterPlaylistController_.duration();
|
1184 | }
|
1185 |
|
1186 | |
1187 |
|
1188 |
|
1189 | seekable() {
|
1190 | return this.masterPlaylistController_.seekable();
|
1191 | }
|
1192 |
|
1193 | |
1194 |
|
1195 |
|
1196 | dispose() {
|
1197 | if (this.playbackWatcher_) {
|
1198 | this.playbackWatcher_.dispose();
|
1199 | }
|
1200 | if (this.masterPlaylistController_) {
|
1201 | this.masterPlaylistController_.dispose();
|
1202 | }
|
1203 | if (this.qualityLevels_) {
|
1204 | this.qualityLevels_.dispose();
|
1205 | }
|
1206 |
|
1207 | if (this.player_) {
|
1208 | delete this.player_.vhs;
|
1209 | delete this.player_.dash;
|
1210 | delete this.player_.hls;
|
1211 | }
|
1212 |
|
1213 | if (this.tech_ && this.tech_.vhs) {
|
1214 | delete this.tech_.vhs;
|
1215 | }
|
1216 |
|
1217 |
|
1218 | if (this.tech_) {
|
1219 | delete this.tech_.hls;
|
1220 | }
|
1221 |
|
1222 | if (this.mediaSourceUrl_ && window.URL.revokeObjectURL) {
|
1223 | window.URL.revokeObjectURL(this.mediaSourceUrl_);
|
1224 | this.mediaSourceUrl_ = null;
|
1225 | }
|
1226 |
|
1227 | if (this.tech_) {
|
1228 | this.tech_.off('waitingforkey', this.handleWaitingForKey_);
|
1229 | }
|
1230 |
|
1231 | super.dispose();
|
1232 | }
|
1233 |
|
1234 | convertToProgramTime(time, callback) {
|
1235 | return getProgramTime({
|
1236 | playlist: this.masterPlaylistController_.media(),
|
1237 | time,
|
1238 | callback
|
1239 | });
|
1240 | }
|
1241 |
|
1242 |
|
1243 | seekToProgramTime(programTime, callback, pauseAfterSeek = true, retryCount = 2) {
|
1244 | return seekToProgramTime({
|
1245 | programTime,
|
1246 | playlist: this.masterPlaylistController_.media(),
|
1247 | retryCount,
|
1248 | pauseAfterSeek,
|
1249 | seekTo: this.options_.seekTo,
|
1250 | tech: this.options_.tech,
|
1251 | callback
|
1252 | });
|
1253 | }
|
1254 | }
|
1255 |
|
1256 |
|
1257 |
|
1258 |
|
1259 |
|
1260 |
|
1261 |
|
1262 |
|
1263 | const VhsSourceHandler = {
|
1264 | name: 'videojs-http-streaming',
|
1265 | VERSION: vhsVersion,
|
1266 | canHandleSource(srcObj, options = {}) {
|
1267 | const localOptions = videojs.mergeOptions(videojs.options, options);
|
1268 |
|
1269 | return VhsSourceHandler.canPlayType(srcObj.type, localOptions);
|
1270 | },
|
1271 | handleSource(source, tech, options = {}) {
|
1272 | const localOptions = videojs.mergeOptions(videojs.options, options);
|
1273 |
|
1274 | tech.vhs = new VhsHandler(source, tech, localOptions);
|
1275 | if (!videojs.hasOwnProperty('hls')) {
|
1276 | Object.defineProperty(tech, 'hls', {
|
1277 | get: () => {
|
1278 | videojs.log.warn('player.tech().hls is deprecated. Use player.tech().vhs instead.');
|
1279 | return tech.vhs;
|
1280 | },
|
1281 | configurable: true
|
1282 | });
|
1283 | }
|
1284 | tech.vhs.xhr = xhrFactory();
|
1285 |
|
1286 | tech.vhs.src(source.src, source.type);
|
1287 | return tech.vhs;
|
1288 | },
|
1289 | canPlayType(type, options) {
|
1290 | const simpleType = simpleTypeFromSourceType(type);
|
1291 |
|
1292 | if (!simpleType) {
|
1293 | return '';
|
1294 | }
|
1295 |
|
1296 | const overrideNative = VhsSourceHandler.getOverrideNative(options);
|
1297 | const supportsTypeNatively = Vhs.supportsTypeNatively(simpleType);
|
1298 | const canUseMsePlayback = !supportsTypeNatively || overrideNative;
|
1299 |
|
1300 | return canUseMsePlayback ? 'maybe' : '';
|
1301 | },
|
1302 | getOverrideNative(options = {}) {
|
1303 | const { vhs = {}, hls = {} } = options;
|
1304 | const defaultOverrideNative = !(videojs.browser.IS_ANY_SAFARI || videojs.browser.IS_IOS);
|
1305 | const { overrideNative = defaultOverrideNative } = vhs;
|
1306 | const { overrideNative: legacyOverrideNative = false } = hls;
|
1307 |
|
1308 | return legacyOverrideNative || overrideNative;
|
1309 | }
|
1310 | };
|
1311 |
|
1312 |
|
1313 |
|
1314 |
|
1315 |
|
1316 |
|
1317 |
|
1318 | const supportsNativeMediaSources = () => {
|
1319 | return browserSupportsCodec('avc1.4d400d,mp4a.40.2');
|
1320 | };
|
1321 |
|
1322 |
|
1323 | if (supportsNativeMediaSources()) {
|
1324 | videojs.getTech('Html5').registerSourceHandler(VhsSourceHandler, 0);
|
1325 | }
|
1326 |
|
1327 | videojs.VhsHandler = VhsHandler;
|
1328 | Object.defineProperty(videojs, 'HlsHandler', {
|
1329 | get: () => {
|
1330 | videojs.log.warn('videojs.HlsHandler is deprecated. Use videojs.VhsHandler instead.');
|
1331 | return VhsHandler;
|
1332 | },
|
1333 | configurable: true
|
1334 | });
|
1335 | videojs.VhsSourceHandler = VhsSourceHandler;
|
1336 | Object.defineProperty(videojs, 'HlsSourceHandler', {
|
1337 | get: () => {
|
1338 | videojs.log.warn('videojs.HlsSourceHandler is deprecated. ' +
|
1339 | 'Use videojs.VhsSourceHandler instead.');
|
1340 | return VhsSourceHandler;
|
1341 | },
|
1342 | configurable: true
|
1343 | });
|
1344 | videojs.Vhs = Vhs;
|
1345 | Object.defineProperty(videojs, 'Hls', {
|
1346 | get: () => {
|
1347 | videojs.log.warn('videojs.Hls is deprecated. Use videojs.Vhs instead.');
|
1348 | return Vhs;
|
1349 | },
|
1350 | configurable: true
|
1351 | });
|
1352 | if (!videojs.use) {
|
1353 | videojs.registerComponent('Hls', Vhs);
|
1354 | videojs.registerComponent('Vhs', Vhs);
|
1355 | }
|
1356 | videojs.options.vhs = videojs.options.vhs || {};
|
1357 | videojs.options.hls = videojs.options.hls || {};
|
1358 |
|
1359 | if (!videojs.getPlugin || !videojs.getPlugin('reloadSourceOnError')) {
|
1360 | const registerPlugin = videojs.registerPlugin || videojs.plugin;
|
1361 |
|
1362 | registerPlugin('reloadSourceOnError', reloadSourceOnError);
|
1363 | }
|
1364 |
|
1365 | export {
|
1366 | Vhs,
|
1367 | VhsHandler,
|
1368 | VhsSourceHandler,
|
1369 | emeKeySystems,
|
1370 | simpleTypeFromSourceType,
|
1371 | expandDataUri,
|
1372 | setupEmeOptions,
|
1373 | getAllPsshKeySystemsOptions
|
1374 | };
|