@@ -56,6 +56,7 @@ import DefaultVideoTileController from '../../src/videotilecontroller/DefaultVid
56
56
import DefaultVideoTileFactory from '../../src/videotilefactory/DefaultVideoTileFactory' ;
57
57
import DefaultSimulcastUplinkPolicy from '../../src/videouplinkbandwidthpolicy/DefaultSimulcastUplinkPolicy' ;
58
58
import NoVideoUplinkBandwidthPolicy from '../../src/videouplinkbandwidthpolicy/NoVideoUplinkBandwidthPolicy' ;
59
+ import NScaleVideoUplinkBandwidthPolicy from '../../src/videouplinkbandwidthpolicy/NScaleVideoUplinkBandwidthPolicy' ;
59
60
import DefaultWebSocketAdapter from '../../src/websocketadapter/DefaultWebSocketAdapter' ;
60
61
import DOMMockBehavior from '../dommock/DOMMockBehavior' ;
61
62
import DOMMockBuilder from '../dommock/DOMMockBuilder' ;
@@ -1460,7 +1461,7 @@ describe('MonitorTask', () => {
1460
1461
) . to . be . true ;
1461
1462
} ) ;
1462
1463
1463
- it ( 'should degrade when there is more than one codec preferences' , async ( ) => {
1464
+ it ( 'should degrade when there is more than one codec preferences with NScaleVideoUplinkBandwidthPolicy ' , async ( ) => {
1464
1465
context . meetingSupportedVideoSendCodecPreferences = [
1465
1466
VideoCodecCapability . vp9Profile0 ( ) ,
1466
1467
VideoCodecCapability . vp8 ( ) ,
@@ -1469,6 +1470,28 @@ describe('MonitorTask', () => {
1469
1470
VideoCodecCapability . vp9Profile0 ( ) ,
1470
1471
VideoCodecCapability . vp8 ( ) ,
1471
1472
] ;
1473
+ context . videoUplinkBandwidthPolicy = new NScaleVideoUplinkBandwidthPolicy (
1474
+ 'self' ,
1475
+ true ,
1476
+ logger
1477
+ ) ;
1478
+ // @ts -ignore
1479
+ task . degradeVideoCodec ( ) ;
1480
+ expect (
1481
+ context . meetingSupportedVideoSendCodecPreferences [ 0 ] . equals ( VideoCodecCapability . vp8 ( ) )
1482
+ ) . to . be . true ;
1483
+ } ) ;
1484
+
1485
+ it ( 'should degrade when there is more than one codec preferences with DefaultSimulcastUplinkPolicy' , async ( ) => {
1486
+ context . meetingSupportedVideoSendCodecPreferences = [
1487
+ VideoCodecCapability . vp9Profile0 ( ) ,
1488
+ VideoCodecCapability . vp8 ( ) ,
1489
+ ] ;
1490
+ context . videoSendCodecPreferences = [
1491
+ VideoCodecCapability . vp9Profile0 ( ) ,
1492
+ VideoCodecCapability . vp8 ( ) ,
1493
+ ] ;
1494
+ context . videoUplinkBandwidthPolicy = new DefaultSimulcastUplinkPolicy ( 'self' , logger ) ;
1472
1495
// @ts -ignore
1473
1496
task . degradeVideoCodec ( ) ;
1474
1497
expect (
0 commit comments