Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions src/nimio-transport.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ export const NimioTransport = {

_onAudioSetupReceived(data) {
if (!data || !data.config) {
this._startNoAudioMode();
return;
// TODO: show UI error notification if noVideo
return this._noVideo ? this.stop(true) : this._startNoAudioMode();
}

if (this._isNextRenditionTrack(data.trackId)) {
Expand Down
4 changes: 2 additions & 2 deletions src/nimio.js
Original file line number Diff line number Diff line change
Expand Up @@ -458,11 +458,11 @@ export default class Nimio {
}

_onDecodingError(kind) {
// TODO: show error message in UI
if (kind === "video") this._setNoVideo();
if (kind === "audio") this._setNoAudio();

if (this._noVideo && this._noAudio) {
// TODO: show error message in UI
this.stop(true);
}
}
Expand Down Expand Up @@ -583,7 +583,7 @@ export default class Nimio {
if (!this._state.isShared()) {
this._state.attachPort(this._audioNode.port);
}
if (!procOptions.audioSab) {
if (!procOptions.audioSab && this._audioBuffer) {
this._audioBuffer.setPort(this._audioNode.port);
}

Expand Down
4 changes: 3 additions & 1 deletion src/playback/context.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ class PlaybackContext {

if (streamInfo.acodec) {
streamInfo.acodecSupported = this._cSupport.audio[streamInfo.acodec];
this._ordVideoRenditions[vIdx].hasAudio = streamInfo.acodecSupported;
if (vIdx !== null && this._ordVideoRenditions[vIdx]) {
this._ordVideoRenditions[vIdx].hasAudio = streamInfo.acodecSupported;
}
}
}

Expand Down
1 change: 1 addition & 0 deletions src/sldp/manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ export class SLDPManager {
// If no audio in the video renditions, take the first audio rendition
if (this._context.audioRenditions.length > 0) {
aIdx = this._context.audioRenditions[0].idx;
gotAudio = true;
}
}

Expand Down