Skip to content

Commit

Permalink
adts: fix playback of dailymotion.com/video/x3wx4hz with Chrome
Browse files Browse the repository at this point in the history
  • Loading branch information
mangui committed Mar 16, 2016
1 parent 3e2e928 commit f92e929
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/demux/adts.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ import {ErrorTypes, ErrorDetails} from '../errors';
// multiply frequency by 2 (see table below, equivalent to substract 3)
adtsExtensionSampleingIndex = adtsSampleingIndex - 3;
} else {
// if (manifest codec is AAC) AND (frequency less than 24kHz OR nb channel is 1) OR (manifest codec not specified and mono audio)
// Chrome fails to play back with AAC LC mono when initialized with HE-AAC. This is not a problem with stereo.
if (audioCodec && audioCodec.indexOf('mp4a.40.2') !== -1 && (adtsSampleingIndex >= 6 || adtsChanelConfig === 1) ||
// if (manifest codec is AAC) AND (frequency less than 24kHz AND nb channel is 1) OR (manifest codec not specified and mono audio)
// Chrome fails to play back with low frequency AAC LC mono when initialized with HE-AAC. This is not a problem with stereo.
if (audioCodec && audioCodec.indexOf('mp4a.40.2') !== -1 && (adtsSampleingIndex >= 6 && adtsChanelConfig === 1) ||
(!audioCodec && adtsChanelConfig === 1)) {
adtsObjectType = 2;
config = new Array(2);
Expand Down

0 comments on commit f92e929

Please sign in to comment.