You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
} else {
// All the stream stuff is a mess here. We just have one stream
// but a pile of tracks.
// Step 1. Verify that we have a stream.
nsRefPtrsipcc::RemoteSourceStreamInfo info;
if (mMedia->RemoteStreamsLength() < 1) {
nsresult rv = CreateRemoteSourceStreamInfo(&info);
if (NS_FAILED(rv)) {
MOZ_CRASH(); // TODO([email protected]): How do we recover here? We don't
// want mismatches.
}
rv = mMedia->AddRemoteStream(info);
if (NS_FAILED(rv)) {
MOZ_CRASH(); // TODO([email protected]): How do we recover here? We don't
// want mismatches.
}
} else {
info = mMedia->GetRemoteStream(0);
}
DOMMediaStream* stream = info->GetMediaStream();
// Step 2. Add the tracks. Unfortunately, we only can really support
// two tracks, one audio and one video.
nsresult rv;
size_t num_tracks = mJsepSession->num_remote_tracks();
MOZ_ASSERT(num_tracks <= 2);
for (size_t i = 0; i < num_tracks; ++i) {
RefPtr<JsepMediaStreamTrack> track;
rv = mJsepSession->remote_track(i, &track);
if (NS_FAILED(rv)) {
MOZ_CRASH(); // TODO([email protected]): How do we recover here? We don't
// want mismatches.
}
if (track->media_type() == mozilla::SdpMediaSection::kAudio) {
info->mTrackTypeHints |= DOMMediaStream::HINT_CONTENTS_AUDIO;
} else if (track->media_type() == mozilla::SdpMediaSection::kAudio) {
info->mTrackTypeHints |= DOMMediaStream::HINT_CONTENTS_AUDIO;
} else {
// Data channel?
}
}
The text was updated successfully, but these errors were encountered:
if (NS_FAILED(nrv)) {
Error error;
switch (nrv) {
case NS_ERROR_INVALID_ARG: error = kInvalidSessionDescription; break;
case NS_ERROR_UNEXPECTED: error = kInvalidState; break;
default: error = kInternalError;
}
} else {
// All the stream stuff is a mess here. We just have one stream
// but a pile of tracks.
// Step 1. Verify that we have a stream.
nsRefPtrsipcc::RemoteSourceStreamInfo info;
if (mMedia->RemoteStreamsLength() < 1) {
nsresult rv = CreateRemoteSourceStreamInfo(&info);
if (NS_FAILED(rv)) {
MOZ_CRASH(); // TODO([email protected]): How do we recover here? We don't
// want mismatches.
}
The text was updated successfully, but these errors were encountered: