Skip to content

Commit 17ce710

Browse files
committed
Refactor AbrController.js
1 parent 20e57e7 commit 17ce710

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/streaming/controllers/AbrController.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -745,18 +745,18 @@ function AbrController() {
745745
const streamInfo = streamProcessorDict[streamId][type].getStreamInfo();
746746
const bufferLevel = dashMetrics.getCurrentBufferLevel(type);
747747
const isAdaptationSetSwitch = oldRepresentation !== null && !adapter.areMediaInfosEqual(oldRepresentation.mediaInfo, newRepresentation.mediaInfo);
748-
749748
const oldBitrate = oldRepresentation ? oldRepresentation.bitrateInKbit : 0;
749+
750750
logger.info(`[AbrController]: Switching quality in period ${streamId} for media type ${type}. Switch from bitrate ${oldBitrate} to bitrate ${newRepresentation.bitrateInKbit}. Current buffer level: ${bufferLevel}. Reason:` + (reason ? JSON.stringify(reason) : '/'));
751751

752752
eventBus.trigger(Events.QUALITY_CHANGE_REQUESTED,
753753
{
754-
oldRepresentation: oldRepresentation,
754+
isAdaptationSetSwitch,
755+
mediaType: type,
755756
newRepresentation: newRepresentation,
757+
oldRepresentation: oldRepresentation,
756758
reason,
757759
streamInfo,
758-
mediaType: type,
759-
isAdaptationSetSwitch
760760
},
761761
{ streamId: streamInfo.id, mediaType: type }
762762
);

0 commit comments

Comments
 (0)