Skip to content

Commit

Permalink
Add audio track duration property at initialization level.
Browse files Browse the repository at this point in the history
  • Loading branch information
nochev committed Apr 25, 2017
1 parent 7f9207e commit 11fe3fd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/demux/tsdemuxer.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
this.pmtParsed = false;
this._pmtId = -1;
this._avcTrack = {container : 'video/mp2t', type: 'video', id :-1, inputTimeScale : 90000, sequenceNumber: 0, samples : [], len : 0, dropped : 0};
this._audioTrack = {container : 'video/mp2t', type: 'audio', id :-1, inputTimeScale : 90000, sequenceNumber: 0, samples : [], len : 0, isAAC: true};
this._audioTrack = {container : 'video/mp2t', type: 'audio', id :-1, inputTimeScale : 90000, duration: duration, sequenceNumber: 0, samples : [], len : 0, isAAC: true};
this._id3Track = {type: 'id3', id :-1, inputTimeScale : 90000, sequenceNumber: 0, samples : [], len : 0};
this._txtTrack = {type: 'text', id: -1, inputTimeScale : 90000, sequenceNumber: 0, samples : [], len : 0};
// flush any partial content
Expand Down Expand Up @@ -880,7 +880,6 @@
track.channelCount = config.channelCount;
track.codec = config.codec;
track.manifestCodec = config.manifestCodec;
track.duration = this._duration;
logger.log(`parsed codec:${track.codec},rate:${config.samplerate},nb channel:${config.channelCount}`);
}
frameIndex = 0;
Expand Down

0 comments on commit 11fe3fd

Please sign in to comment.