@@ -142,15 +142,32 @@ describe('resolveMediaPlayers', () => {
142
142
[ 1 , 2 ] ,
143
143
4500
144
144
)
145
- expect ( assignments . failedRequired ) . toEqual ( [ { id : 'inst_2_clip_ghi' , pieceNames : [ 'name-2' ] } ] )
145
+ expect ( assignments . failedRequired ) . toEqual ( [ { id : 'inst_2_clip_ghi' , name : 'ghi' , pieceNames : [ 'name-2' ] } ] )
146
146
expect ( assignments . failedOptional ) . toHaveLength ( 0 )
147
147
expect ( assignments . requests ) . toHaveLength ( 3 )
148
148
expect ( assignments . requests ) . toEqual ( [
149
- { end : 5400 , id : 'inst_0_clip_abc' , playerId : 1 , start : 400 , optional : false , pieceNames : [ 'name-0' ] } ,
150
- { end : 5400 , id : 'inst_1_clip_def' , playerId : 2 , start : 400 , optional : false , pieceNames : [ 'name-1' ] } ,
149
+ {
150
+ end : 5400 ,
151
+ id : 'inst_0_clip_abc' ,
152
+ name : 'abc' ,
153
+ playerId : 1 ,
154
+ start : 400 ,
155
+ optional : false ,
156
+ pieceNames : [ 'name-0' ] ,
157
+ } ,
158
+ {
159
+ end : 5400 ,
160
+ id : 'inst_1_clip_def' ,
161
+ name : 'def' ,
162
+ playerId : 2 ,
163
+ start : 400 ,
164
+ optional : false ,
165
+ pieceNames : [ 'name-1' ] ,
166
+ } ,
151
167
{
152
168
end : 4800 ,
153
169
id : 'inst_2_clip_ghi' ,
170
+ name : 'ghi' ,
154
171
playerId : undefined ,
155
172
start : 800 ,
156
173
optional : false ,
@@ -196,13 +213,14 @@ describe('resolveMediaPlayers', () => {
196
213
[ 'player1' , 'player2' ] ,
197
214
4500
198
215
)
199
- expect ( assignments . failedRequired ) . toEqual ( [ { id : 'inst_2_clip_ghi' , pieceNames : [ 'name-2' ] } ] )
216
+ expect ( assignments . failedRequired ) . toEqual ( [ { id : 'inst_2_clip_ghi' , name : 'ghi' , pieceNames : [ 'name-2' ] } ] )
200
217
expect ( assignments . failedOptional ) . toHaveLength ( 0 )
201
218
expect ( assignments . requests ) . toHaveLength ( 3 )
202
219
expect ( assignments . requests ) . toEqual ( [
203
220
{
204
221
end : 5400 ,
205
222
id : 'inst_0_clip_abc' ,
223
+ name : 'abc' ,
206
224
playerId : 'player1' ,
207
225
start : 400 ,
208
226
optional : false ,
@@ -211,6 +229,7 @@ describe('resolveMediaPlayers', () => {
211
229
{
212
230
end : 5400 ,
213
231
id : 'inst_1_clip_def' ,
232
+ name : 'def' ,
214
233
playerId : 'player2' ,
215
234
start : 400 ,
216
235
optional : false ,
@@ -219,6 +238,7 @@ describe('resolveMediaPlayers', () => {
219
238
{
220
239
end : 4800 ,
221
240
id : 'inst_2_clip_ghi' ,
241
+ name : 'ghi' ,
222
242
playerId : undefined ,
223
243
start : 800 ,
224
244
optional : false ,
@@ -264,14 +284,23 @@ describe('resolveMediaPlayers', () => {
264
284
[ 1 , 'player2' ] ,
265
285
4500
266
286
)
267
- expect ( assignments . failedRequired ) . toEqual ( [ { id : 'inst_2_clip_ghi' , pieceNames : [ 'name-2' ] } ] )
287
+ expect ( assignments . failedRequired ) . toEqual ( [ { id : 'inst_2_clip_ghi' , name : 'ghi' , pieceNames : [ 'name-2' ] } ] )
268
288
expect ( assignments . failedOptional ) . toHaveLength ( 0 )
269
289
expect ( assignments . requests ) . toHaveLength ( 3 )
270
290
expect ( assignments . requests ) . toEqual ( [
271
- { end : 5400 , id : 'inst_0_clip_abc' , playerId : 1 , start : 400 , optional : false , pieceNames : [ 'name-0' ] } ,
291
+ {
292
+ end : 5400 ,
293
+ id : 'inst_0_clip_abc' ,
294
+ name : 'abc' ,
295
+ playerId : 1 ,
296
+ start : 400 ,
297
+ optional : false ,
298
+ pieceNames : [ 'name-0' ] ,
299
+ } ,
272
300
{
273
301
end : 5400 ,
274
302
id : 'inst_1_clip_def' ,
303
+ name : 'def' ,
275
304
playerId : 'player2' ,
276
305
start : 400 ,
277
306
optional : false ,
@@ -280,6 +309,7 @@ describe('resolveMediaPlayers', () => {
280
309
{
281
310
end : 4800 ,
282
311
id : 'inst_2_clip_ghi' ,
312
+ name : 'ghi' ,
283
313
playerId : undefined ,
284
314
start : 800 ,
285
315
optional : false ,
@@ -331,6 +361,7 @@ describe('resolveMediaPlayers', () => {
331
361
{
332
362
end : 7400 ,
333
363
id : 'tmp_clip_abc' ,
364
+ name : 'abc' ,
334
365
playerId : 1 ,
335
366
start : 400 ,
336
367
optional : false ,
@@ -384,9 +415,33 @@ describe('resolveMediaPlayers', () => {
384
415
expect ( assignments . failedOptional ) . toHaveLength ( 0 )
385
416
expect ( assignments . requests ) . toHaveLength ( 3 )
386
417
expect ( assignments . requests ) . toEqual ( [
387
- { end : 5400 , id : 'inst_0_clip_abc' , playerId : 1 , start : 400 , optional : false , pieceNames : [ 'name-0' ] } ,
388
- { end : 4800 , id : 'inst_1_clip_def' , playerId : 2 , start : 800 , optional : false , pieceNames : [ 'name-1' ] } ,
389
- { end : 7400 , id : 'inst_3_clip_ghi' , playerId : 2 , start : 6400 , optional : false , pieceNames : [ 'name-3' ] } ,
418
+ {
419
+ end : 5400 ,
420
+ id : 'inst_0_clip_abc' ,
421
+ name : 'abc' ,
422
+ playerId : 1 ,
423
+ start : 400 ,
424
+ optional : false ,
425
+ pieceNames : [ 'name-0' ] ,
426
+ } ,
427
+ {
428
+ end : 4800 ,
429
+ id : 'inst_1_clip_def' ,
430
+ name : 'def' ,
431
+ playerId : 2 ,
432
+ start : 800 ,
433
+ optional : false ,
434
+ pieceNames : [ 'name-1' ] ,
435
+ } ,
436
+ {
437
+ end : 7400 ,
438
+ id : 'inst_3_clip_ghi' ,
439
+ name : 'ghi' ,
440
+ playerId : 2 ,
441
+ start : 6400 ,
442
+ optional : false ,
443
+ pieceNames : [ 'name-3' ] ,
444
+ } ,
390
445
] )
391
446
392
447
expect ( mockGetPieceSessionId ) . toHaveBeenCalledTimes ( 3 )
@@ -431,9 +486,33 @@ describe('resolveMediaPlayers', () => {
431
486
expect ( assignments . failedOptional ) . toHaveLength ( 0 )
432
487
expect ( assignments . requests ) . toHaveLength ( 3 )
433
488
expect ( assignments . requests ) . toEqual ( [
434
- { end : 5400 , id : 'inst_0_clip_abc' , playerId : 1 , start : 400 , optional : false , pieceNames : [ 'name-0' ] } ,
435
- { end : 6800 , id : 'inst_1_clip_def' , playerId : 2 , start : 800 , optional : false , pieceNames : [ 'name-1' ] } ,
436
- { end : 6400 , id : 'inst_3_clip_ghi' , playerId : 1 , start : 5400 , optional : false , pieceNames : [ 'name-3' ] } ,
489
+ {
490
+ end : 5400 ,
491
+ id : 'inst_0_clip_abc' ,
492
+ name : 'abc' ,
493
+ playerId : 1 ,
494
+ start : 400 ,
495
+ optional : false ,
496
+ pieceNames : [ 'name-0' ] ,
497
+ } ,
498
+ {
499
+ end : 6800 ,
500
+ id : 'inst_1_clip_def' ,
501
+ name : 'def' ,
502
+ playerId : 2 ,
503
+ start : 800 ,
504
+ optional : false ,
505
+ pieceNames : [ 'name-1' ] ,
506
+ } ,
507
+ {
508
+ end : 6400 ,
509
+ id : 'inst_3_clip_ghi' ,
510
+ name : 'ghi' ,
511
+ playerId : 1 ,
512
+ start : 5400 ,
513
+ optional : false ,
514
+ pieceNames : [ 'name-3' ] ,
515
+ } ,
437
516
] )
438
517
439
518
expect ( mockGetPieceSessionId ) . toHaveBeenCalledTimes ( 3 )
@@ -478,9 +557,33 @@ describe('resolveMediaPlayers', () => {
478
557
expect ( assignments . failedOptional ) . toHaveLength ( 0 )
479
558
expect ( assignments . requests ) . toHaveLength ( 3 )
480
559
expect ( assignments . requests ) . toEqual ( [
481
- { end : 5400 , id : 'inst_0_clip_abc' , playerId : 1 , start : 400 , optional : false , pieceNames : [ 'name-0' ] } ,
482
- { end : 6800 , id : 'inst_1_clip_def' , playerId : 2 , start : 800 , optional : false , pieceNames : [ 'name-1' ] } ,
483
- { end : 6400 , id : 'inst_3_clip_ghi' , playerId : 1 , start : 5400 , optional : false , pieceNames : [ 'name-3' ] } ,
560
+ {
561
+ end : 5400 ,
562
+ id : 'inst_0_clip_abc' ,
563
+ name : 'abc' ,
564
+ playerId : 1 ,
565
+ start : 400 ,
566
+ optional : false ,
567
+ pieceNames : [ 'name-0' ] ,
568
+ } ,
569
+ {
570
+ end : 6800 ,
571
+ id : 'inst_1_clip_def' ,
572
+ name : 'def' ,
573
+ playerId : 2 ,
574
+ start : 800 ,
575
+ optional : false ,
576
+ pieceNames : [ 'name-1' ] ,
577
+ } ,
578
+ {
579
+ end : 6400 ,
580
+ id : 'inst_3_clip_ghi' ,
581
+ name : 'ghi' ,
582
+ playerId : 1 ,
583
+ start : 5400 ,
584
+ optional : false ,
585
+ pieceNames : [ 'name-3' ] ,
586
+ } ,
484
587
] )
485
588
486
589
expect ( mockGetPieceSessionId ) . toHaveBeenCalledTimes ( 3 )
@@ -503,11 +606,13 @@ describe('resolveMediaPlayers', () => {
503
606
const previousAssignments : ABSessionAssignments = {
504
607
inst_0_clip_abc : {
505
608
sessionId : 'inst_0_clip_abc' ,
609
+ sessionName : 'abc' ,
506
610
playerId : 5 ,
507
611
lookahead : false ,
508
612
} ,
509
613
inst_1_clip_def : {
510
614
sessionId : 'inst_1_clip_def' ,
615
+ sessionName : 'def' ,
511
616
playerId : 1 ,
512
617
lookahead : true ,
513
618
} ,
@@ -532,15 +637,32 @@ describe('resolveMediaPlayers', () => {
532
637
[ 1 , 2 ] ,
533
638
0
534
639
)
535
- expect ( assignments . failedRequired ) . toEqual ( [ { id : 'inst_2_clip_ghi' , pieceNames : [ 'name-2' ] } ] )
640
+ expect ( assignments . failedRequired ) . toEqual ( [ { id : 'inst_2_clip_ghi' , name : 'ghi' , pieceNames : [ 'name-2' ] } ] )
536
641
expect ( assignments . failedOptional ) . toHaveLength ( 0 )
537
642
expect ( assignments . requests ) . toHaveLength ( 3 )
538
643
expect ( assignments . requests ) . toEqual ( [
539
- { end : 7400 , id : 'inst_0_clip_abc' , playerId : 2 , start : 2400 , optional : false , pieceNames : [ 'name-0' ] } ,
540
- { end : 7400 , id : 'inst_1_clip_def' , playerId : 1 , start : 2400 , optional : false , pieceNames : [ 'name-1' ] } ,
644
+ {
645
+ end : 7400 ,
646
+ id : 'inst_0_clip_abc' ,
647
+ name : 'abc' ,
648
+ playerId : 2 ,
649
+ start : 2400 ,
650
+ optional : false ,
651
+ pieceNames : [ 'name-0' ] ,
652
+ } ,
653
+ {
654
+ end : 7400 ,
655
+ id : 'inst_1_clip_def' ,
656
+ name : 'def' ,
657
+ playerId : 1 ,
658
+ start : 2400 ,
659
+ optional : false ,
660
+ pieceNames : [ 'name-1' ] ,
661
+ } ,
541
662
{
542
663
end : 6800 ,
543
664
id : 'inst_2_clip_ghi' ,
665
+ name : 'ghi' ,
544
666
playerId : undefined ,
545
667
start : 2800 ,
546
668
optional : false ,
@@ -568,11 +690,13 @@ describe('resolveMediaPlayers', () => {
568
690
const previousAssignments : ABSessionAssignments = {
569
691
inst_0_clip_abc : {
570
692
sessionId : 'inst_0_clip_abc' ,
693
+ sessionName : 'abc' ,
571
694
playerId : 2 ,
572
695
lookahead : false ,
573
696
} ,
574
697
inst_1_clip_def : {
575
698
sessionId : 'inst_1_clip_def' ,
699
+ sessionName : 'def' ,
576
700
playerId : 1 ,
577
701
lookahead : false ,
578
702
} ,
@@ -598,19 +722,36 @@ describe('resolveMediaPlayers', () => {
598
722
0
599
723
)
600
724
expect ( assignments . failedRequired ) . toHaveLength ( 0 )
601
- expect ( assignments . failedOptional ) . toEqual ( [ { id : 'inst_1_clip_def' , pieceNames : [ 'name-1' ] } ] )
725
+ expect ( assignments . failedOptional ) . toEqual ( [ { id : 'inst_1_clip_def' , name : 'def' , pieceNames : [ 'name-1' ] } ] )
602
726
expect ( assignments . requests ) . toHaveLength ( 3 )
603
727
expect ( assignments . requests ) . toEqual ( [
604
- { end : 7400 , id : 'inst_0_clip_abc' , playerId : 2 , start : 2400 , optional : false , pieceNames : [ 'name-0' ] } ,
728
+ {
729
+ end : 7400 ,
730
+ id : 'inst_0_clip_abc' ,
731
+ name : 'abc' ,
732
+ playerId : 2 ,
733
+ start : 2400 ,
734
+ optional : false ,
735
+ pieceNames : [ 'name-0' ] ,
736
+ } ,
605
737
{
606
738
end : 7400 ,
607
739
id : 'inst_1_clip_def' ,
740
+ name : 'def' ,
608
741
playerId : undefined ,
609
742
start : 2400 ,
610
743
optional : true ,
611
744
pieceNames : [ 'name-1' ] ,
612
745
} ,
613
- { end : 6800 , id : 'inst_2_clip_ghi' , playerId : 1 , start : 2800 , optional : false , pieceNames : [ 'name-2' ] } ,
746
+ {
747
+ end : 6800 ,
748
+ id : 'inst_2_clip_ghi' ,
749
+ name : 'ghi' ,
750
+ playerId : 1 ,
751
+ start : 2800 ,
752
+ optional : false ,
753
+ pieceNames : [ 'name-2' ] ,
754
+ } ,
614
755
] )
615
756
616
757
expect ( mockGetPieceSessionId ) . toHaveBeenCalledTimes ( 3 )
0 commit comments