Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

alternate audio track support on live stream cowork along with @sergiojm and @fredvb #860

Merged
merged 20 commits into from
Dec 19, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
647b4f1
simpleton live alt-audio support inspired by the stream-controller.
fredvb Oct 6, 2016
ffac032
Initial working live alt audio
sergiojm Nov 20, 2016
f7d4429
Adding WAITING_INIT_PTS for audio to wait for video INIT_PTS
Nov 29, 2016
52ce731
Changing to include demuxer id dispatched object (for consistency) on…
Dec 2, 2016
6d8f058
aacdemuxer: provide initPTS to remuxer
mangui Dec 2, 2016
c4f73f0
report continuity counter along with INIT_PTS_FOUND event
mangui Dec 2, 2016
7d0c792
audio-stream-controller: on audio track switch, flush audio buffer wh…
mangui Dec 3, 2016
324d7c8
buffer-controller: don't try to append if sourcebuffer is updating
mangui Dec 6, 2016
3f62934
introduce AUDIO_TRACK_SWITCHING/AUDIO_TRACK_SWITCHED to replace AUDIO…
mangui Dec 6, 2016
88d9c2a
stream-controller: split handling of AUDIO_TRACK_SWITCHING/AUDIO_TRAC…
mangui Dec 6, 2016
90741dd
audio-stream-controller: split handling of AUDIO_TRACK_SWITCHING/AUDI…
mangui Dec 6, 2016
2f794e1
playlist-loader: improve log message
mangui Dec 6, 2016
e4726c3
buffer-controller: report nb of pending segments waiting for appendin…
mangui Dec 7, 2016
92eff27
stream-controller: rely on BUFFER_APPENDED, data.pending to determine…
mangui Dec 7, 2016
992450b
audio-stream-controller: rely on BUFFER_APPENDED, data.pending
mangui Dec 7, 2016
64f2872
audio-stream-controller: only push pending data and move to PARSED st…
mangui Dec 19, 2016
33406b9
stream-controller: don't flush audio on level switch, in alt audio mode
mangui Dec 19, 2016
a25fcfb
demuxer-inline: allow container change (TS to AAC) on continuity coun…
mangui Dec 19, 2016
bcfd0fb
audio-stream-controller: discard any video data dispatched by audio d…
mangui Dec 19, 2016
59e63bc
audio-stream-controller: immediately append audio segments if media r…
mangui Dec 19, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,20 @@ <h4> Stats Display </h4>
$("#HlsStatus").text(data.audioTracks.length + " audio tracks found");
updateAudioTrackInfo();
});
hls.on(Hls.Events.AUDIO_TRACK_SWITCH,function(event,data) {
hls.on(Hls.Events.AUDIO_TRACK_SWITCHING,function(event,data) {
updateAudioTrackInfo();
var event = {time : performance.now() - events.t0, type : 'audio switching', name : '@' + data.id };
events.video.push(event);
lastAudioTrackSwitchingIdx = events.video.length-1;
});
hls.on(Hls.Events.AUDIO_TRACK_SWITCHED,function(event,data) {
updateAudioTrackInfo();
var event = {time : performance.now() - events.t0, type : 'audio switched', name : '@' + data.id };
if (lastAudioTrackSwitchingIdx !== undefined) {
events.video[lastAudioTrackSwitchingIdx].duration = event.time - events.video[lastAudioTrackSwitchingIdx].time;
lastAudioTrackSwitchingIdx = undefined;
}
events.video.push(event);
});
hls.on(Hls.Events.LEVEL_LOADED,function(event,data) {
events.isLive = data.details.live;
Expand Down Expand Up @@ -631,7 +643,7 @@ <h4> Stats Display </h4>
}


var lastSeekingIdx, lastStartPosition,lastDuration;
var lastSeekingIdx, lastStartPosition,lastDuration, lastAudioTrackSwitchingIdx;
function handleVideoEvent(evt) {
var data = '';
switch(evt.type) {
Expand Down
Loading