@mediakind/mkplayer 1.0.22 → 1.0.23
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/dist/LabelConfig.d.ts +6 -1
- package/dist/lib/LabelConfig.d.ts +6 -1
- package/dist/lib/MKPlayer.js +16 -4
- package/dist/lib/MKPlayer.js.map +1 -1
- package/dist/lib-esm/LabelConfig.d.ts +6 -1
- package/dist/lib-esm/MKPlayer.js +16 -4
- package/dist/lib-esm/MKPlayer.js.map +1 -1
- package/dist/mkplayer.js +1 -1
- package/doc/classes/mkplayer.html +12 -12
- package/doc/interfaces/labelconfig.html +1 -1
- package/index.html +52 -16
- package/multi-camera.html +1 -1
- package/package.json +1 -1
- package/src/LabelConfig.ts +7 -1
- package/src/MKPlayer.ts +17 -5
|
@@ -191,7 +191,7 @@
|
|
|
191
191
|
<li class="tsd-description">
|
|
192
192
|
<aside class="tsd-sources">
|
|
193
193
|
<ul>
|
|
194
|
-
<li>Defined in MKPlayer.ts:
|
|
194
|
+
<li>Defined in MKPlayer.ts:250</li>
|
|
195
195
|
</ul>
|
|
196
196
|
</aside>
|
|
197
197
|
<div class="tsd-comment tsd-typography">
|
|
@@ -213,7 +213,7 @@
|
|
|
213
213
|
<li class="tsd-description">
|
|
214
214
|
<aside class="tsd-sources">
|
|
215
215
|
<ul>
|
|
216
|
-
<li>Defined in MKPlayer.ts:
|
|
216
|
+
<li>Defined in MKPlayer.ts:241</li>
|
|
217
217
|
</ul>
|
|
218
218
|
</aside>
|
|
219
219
|
<div class="tsd-comment tsd-typography">
|
|
@@ -235,7 +235,7 @@
|
|
|
235
235
|
<li class="tsd-description">
|
|
236
236
|
<aside class="tsd-sources">
|
|
237
237
|
<ul>
|
|
238
|
-
<li>Defined in MKPlayer.ts:
|
|
238
|
+
<li>Defined in MKPlayer.ts:269</li>
|
|
239
239
|
</ul>
|
|
240
240
|
</aside>
|
|
241
241
|
<div class="tsd-comment tsd-typography">
|
|
@@ -288,7 +288,7 @@
|
|
|
288
288
|
<li class="tsd-description">
|
|
289
289
|
<aside class="tsd-sources">
|
|
290
290
|
<ul>
|
|
291
|
-
<li>Defined in MKPlayer.ts:
|
|
291
|
+
<li>Defined in MKPlayer.ts:276</li>
|
|
292
292
|
</ul>
|
|
293
293
|
</aside>
|
|
294
294
|
<div class="tsd-comment tsd-typography">
|
|
@@ -310,7 +310,7 @@
|
|
|
310
310
|
<li class="tsd-description">
|
|
311
311
|
<aside class="tsd-sources">
|
|
312
312
|
<ul>
|
|
313
|
-
<li>Defined in MKPlayer.ts:
|
|
313
|
+
<li>Defined in MKPlayer.ts:215</li>
|
|
314
314
|
</ul>
|
|
315
315
|
</aside>
|
|
316
316
|
<div class="tsd-comment tsd-typography">
|
|
@@ -343,7 +343,7 @@
|
|
|
343
343
|
<li class="tsd-description">
|
|
344
344
|
<aside class="tsd-sources">
|
|
345
345
|
<ul>
|
|
346
|
-
<li>Defined in MKPlayer.ts:
|
|
346
|
+
<li>Defined in MKPlayer.ts:226</li>
|
|
347
347
|
</ul>
|
|
348
348
|
</aside>
|
|
349
349
|
<div class="tsd-comment tsd-typography">
|
|
@@ -420,7 +420,7 @@
|
|
|
420
420
|
<li class="tsd-description">
|
|
421
421
|
<aside class="tsd-sources">
|
|
422
422
|
<ul>
|
|
423
|
-
<li>Defined in MKPlayer.ts:
|
|
423
|
+
<li>Defined in MKPlayer.ts:283</li>
|
|
424
424
|
</ul>
|
|
425
425
|
</aside>
|
|
426
426
|
<div class="tsd-comment tsd-typography">
|
|
@@ -442,7 +442,7 @@
|
|
|
442
442
|
<li class="tsd-description">
|
|
443
443
|
<aside class="tsd-sources">
|
|
444
444
|
<ul>
|
|
445
|
-
<li>Defined in MKPlayer.ts:
|
|
445
|
+
<li>Defined in MKPlayer.ts:261</li>
|
|
446
446
|
</ul>
|
|
447
447
|
</aside>
|
|
448
448
|
<div class="tsd-comment tsd-typography">
|
|
@@ -472,7 +472,7 @@
|
|
|
472
472
|
<li class="tsd-description">
|
|
473
473
|
<aside class="tsd-sources">
|
|
474
474
|
<ul>
|
|
475
|
-
<li>Defined in MKPlayer.ts:
|
|
475
|
+
<li>Defined in MKPlayer.ts:299</li>
|
|
476
476
|
</ul>
|
|
477
477
|
</aside>
|
|
478
478
|
<div class="tsd-comment tsd-typography">
|
|
@@ -503,7 +503,7 @@
|
|
|
503
503
|
<li class="tsd-description">
|
|
504
504
|
<aside class="tsd-sources">
|
|
505
505
|
<ul>
|
|
506
|
-
<li>Defined in MKPlayer.ts:
|
|
506
|
+
<li>Defined in MKPlayer.ts:234</li>
|
|
507
507
|
</ul>
|
|
508
508
|
</aside>
|
|
509
509
|
<div class="tsd-comment tsd-typography">
|
|
@@ -525,7 +525,7 @@
|
|
|
525
525
|
<li class="tsd-description">
|
|
526
526
|
<aside class="tsd-sources">
|
|
527
527
|
<ul>
|
|
528
|
-
<li>Defined in MKPlayer.ts:
|
|
528
|
+
<li>Defined in MKPlayer.ts:290</li>
|
|
529
529
|
</ul>
|
|
530
530
|
</aside>
|
|
531
531
|
<div class="tsd-comment tsd-typography">
|
|
@@ -547,7 +547,7 @@
|
|
|
547
547
|
<li class="tsd-description">
|
|
548
548
|
<aside class="tsd-sources">
|
|
549
549
|
<ul>
|
|
550
|
-
<li>Defined in MKPlayer.ts:
|
|
550
|
+
<li>Defined in MKPlayer.ts:306</li>
|
|
551
551
|
</ul>
|
|
552
552
|
</aside>
|
|
553
553
|
<div class="tsd-comment tsd-typography">
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
|
114
114
|
<a name="captions" class="tsd-anchor"></a>
|
|
115
115
|
<h3><span class="tsd-flag ts-flagOptional">Optional</span> captions</h3>
|
|
116
|
-
<div class="tsd-signature tsd-kind-icon">captions<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">
|
|
116
|
+
<div class="tsd-signature tsd-kind-icon">captions<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">LabelConfigMap</span><span class="tsd-signature-symbol">[]</span></div>
|
|
117
117
|
<aside class="tsd-sources">
|
|
118
118
|
<ul>
|
|
119
119
|
<li>Defined in LabelConfig.ts:13</li>
|
package/index.html
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html lang='en'>
|
|
3
3
|
<head>
|
|
4
|
-
<title>MKPlayer 1.0.
|
|
4
|
+
<title>MKPlayer 1.0.23</title>
|
|
5
5
|
<meta charset='UTF-8'/>
|
|
6
6
|
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
|
|
7
7
|
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
|
|
@@ -320,19 +320,39 @@
|
|
|
320
320
|
let liveSource = {
|
|
321
321
|
// primaryUrl: "https://ceslive-mediakind.akamaized.net/cmaftkn/CES-Hero/index.m3u8",
|
|
322
322
|
// secondaryUrl:"https://ceslive-mediakind.akamaized.net/cmaftkn/CES-Hero/index.m3u8",
|
|
323
|
-
primaryUrl: 'https://
|
|
324
|
-
secondaryUrl: 'https://
|
|
325
|
-
cdnFailoverPercent:
|
|
323
|
+
primaryUrl: 'https://dtcvod.mediakindengage.com/ctatkn/hls/CES_MEDIA17/index.m3u8',
|
|
324
|
+
secondaryUrl: 'https://dtcvod.mediakindengage.com/ctatkn/hls/CES_MEDIA17/index.m3u8',
|
|
325
|
+
cdnFailoverPercent: 1,
|
|
326
326
|
subtitleTracks: [],
|
|
327
327
|
assetIdentifier: 'HLS Live',
|
|
328
328
|
labelConfig: {
|
|
329
|
-
audio:
|
|
330
|
-
|
|
329
|
+
audio: [
|
|
330
|
+
{'en': 'English', 'mis': 'Audio Descriptions'}
|
|
331
|
+
],
|
|
332
|
+
captions: [
|
|
333
|
+
{id: 'application/mp4-2', language: 'en', name: 'English'},
|
|
334
|
+
{id: 'application/mp4-3', language: 'zh', name: 'Chinese Simplified'},
|
|
335
|
+
{id: 'application/mp4-4', language: 'cs', name: 'CS'},
|
|
336
|
+
{id: 'application/mp4-5', language: 'ar', name: 'AR'},
|
|
337
|
+
{id: 'application/mp4-6', language: 'ko', name: 'Korean'},
|
|
338
|
+
{id: 'application/mp4-7', language: 'sv', name: 'SV'},
|
|
339
|
+
{id: 'application/mp4-8', language: 'ja', name: 'Japanese'},
|
|
340
|
+
{id: 'application/mp4-9', language: 'tr', name: 'Turkish'},
|
|
341
|
+
{id: 'application/mp4-10', language: 'de', name: 'German'},
|
|
342
|
+
{id: 'application/mp4-11', language: 'ru', name: 'Russian'},
|
|
343
|
+
{id: 'application/mp4-12', language: 'zh', name: 'Chinese Traditional'},
|
|
344
|
+
{id: 'application/mp4-13', language: 'es', name: 'Spanish'},
|
|
345
|
+
{id: 'application/mp4-14', language: 'pt', name: 'Portugese'},
|
|
346
|
+
{id: 'application/mp4-15', language: 'fr', name: 'French'},
|
|
347
|
+
{id: 'application/mp4-16', language: 'it', name: 'Italian'},
|
|
348
|
+
{id: 'application/mp4-17', language: 'pl', name: 'PL'},
|
|
349
|
+
{id: 'application/mp4-18', language: 'nl', name: 'Dutch'},
|
|
350
|
+
]
|
|
331
351
|
}
|
|
332
352
|
};
|
|
333
353
|
|
|
334
354
|
let liveSubtitle = {
|
|
335
|
-
primaryUrl: "https://
|
|
355
|
+
primaryUrl: "https://cdn-0573.aas.mediakind.com/cmaftkn/CES-Hero/index.m3u8",
|
|
336
356
|
cdnFailoverPercent: 10,
|
|
337
357
|
assetIdentifier: 'DASH Live',
|
|
338
358
|
subtitleTracks: [
|
|
@@ -349,6 +369,22 @@
|
|
|
349
369
|
language: 'TA',
|
|
350
370
|
},
|
|
351
371
|
],
|
|
372
|
+
labelConfig: {
|
|
373
|
+
audio: {'en': 'English', 'mis': 'Audio Descriptions'},
|
|
374
|
+
captions: [
|
|
375
|
+
{id: 'application/mp4-2', language: 'ENG', name: 'English'},
|
|
376
|
+
{id: 'application/mp4-3', language: 'zh', name: 'Chinese Simplified'},
|
|
377
|
+
{id: 'application/mp4-4', language: 'cs', name: 'CS'},
|
|
378
|
+
{id: 'application/mp4-5', language: 'ar', name: 'AR'},
|
|
379
|
+
{id: 'application/mp4-6', language: 'ko', name: 'Korean'},
|
|
380
|
+
{id: 'application/mp4-7', language: 'sv', name: 'SV'},
|
|
381
|
+
{id: 'application/mp4-8', language: 'ja', name: 'Japanese'},
|
|
382
|
+
{id: 'application/mp4-9', language: 'TA', name: 'Turkish'},
|
|
383
|
+
{id: 'application/mp4-10', language: 'GER', name: 'German'},
|
|
384
|
+
{id: 'application/mp4-11', language: 'ru', name: 'Russian'},
|
|
385
|
+
{id: 'application/mp4-12', language: 'zh', name: 'Chinese Traditional'},
|
|
386
|
+
]
|
|
387
|
+
}
|
|
352
388
|
};
|
|
353
389
|
|
|
354
390
|
let liveId3Source = {
|
|
@@ -445,15 +481,15 @@
|
|
|
445
481
|
smallScreen: false,
|
|
446
482
|
key: '84dc4716-55f9-43fa-ae8e-6fa334c5189b',
|
|
447
483
|
|
|
448
|
-
refreshToken: (type) => {
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
},
|
|
484
|
+
// refreshToken: (type) => {
|
|
485
|
+
// // if (type === 'primary') {
|
|
486
|
+
// // return {name: 'hdnts', value: 'exp=1610140360~acl=*~hmac=3662c21bdc6cfa7f2d0a0462c23a71982bfa0c176c7e164b0630195ee4003104'}
|
|
487
|
+
// // }else if (type === 'secondary') {
|
|
488
|
+
// // return {name: 'hdnts', value: 'exp=1610140360~acl=*~hmac=3662c21bdc6cfa7f2d0a0462c23a71982bfa0c176c7e164b0630195ee4003104'}
|
|
489
|
+
// // }
|
|
490
|
+
//
|
|
491
|
+
// return {name: 'hdnts', value: '5pIs6i6k5KbY0n5ezMaN-GGDUvq4zYUXMFUJzlHs-j_BuZKkd5zzbFCfudf52qL2'}
|
|
492
|
+
// },
|
|
457
493
|
};
|
|
458
494
|
|
|
459
495
|
let playerContainer = document.getElementById('testPlayer');
|
package/multi-camera.html
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html lang='en'>
|
|
3
3
|
<head>
|
|
4
|
-
<title>MKPlayer 1.0.
|
|
4
|
+
<title>MKPlayer 1.0.23</title>
|
|
5
5
|
<meta charset='UTF-8'/>
|
|
6
6
|
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
|
|
7
7
|
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
|
package/package.json
CHANGED
package/src/LabelConfig.ts
CHANGED
|
@@ -10,5 +10,11 @@ export interface LabelConfig {
|
|
|
10
10
|
/**
|
|
11
11
|
* list of labels to use in the captions dropdown
|
|
12
12
|
*/
|
|
13
|
-
captions?:
|
|
13
|
+
captions?: LabelConfigMap[];
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface LabelConfigMap {
|
|
17
|
+
id?: string;
|
|
18
|
+
language: string;
|
|
19
|
+
name: string;
|
|
14
20
|
}
|
package/src/MKPlayer.ts
CHANGED
|
@@ -159,13 +159,25 @@ export class MKPlayer {
|
|
|
159
159
|
},
|
|
160
160
|
subtitles: (track) => {
|
|
161
161
|
console.log(track);
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
162
|
+
try {
|
|
163
|
+
if (this.stream.labelConfig && this.stream.labelConfig.captions) {
|
|
164
|
+
let filtered = this.stream.labelConfig.captions.filter((value) => value.language === track.lang);
|
|
165
|
+
if (filtered && filtered.length === 1) {
|
|
166
|
+
return filtered[0].name;
|
|
167
|
+
} else if (filtered && filtered.length > 1) {
|
|
168
|
+
filtered = filtered.filter((value) => value.id === track.id);
|
|
169
|
+
if (filtered && filtered[0]) {
|
|
170
|
+
return filtered[0].name;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
} catch (e) {
|
|
165
175
|
return track.lang;
|
|
176
|
+
|
|
166
177
|
}
|
|
178
|
+
return track.lang;
|
|
179
|
+
},
|
|
167
180
|
},
|
|
168
|
-
},
|
|
169
181
|
};
|
|
170
182
|
|
|
171
183
|
if (stream.assetIdentifier) {
|
|
@@ -292,7 +304,7 @@ export class MKPlayer {
|
|
|
292
304
|
* returns the current player version
|
|
293
305
|
*/
|
|
294
306
|
version(): string {
|
|
295
|
-
return '1.0.
|
|
307
|
+
return '1.0.23';
|
|
296
308
|
}
|
|
297
309
|
|
|
298
310
|
private selectUrl(): string {
|