Skip to content

Commit

Permalink
fix(plugin-phone): Fix video/audio state issue on join
Browse files Browse the repository at this point in the history
  • Loading branch information
Bernie Zang committed Mar 28, 2017
1 parent 5f7e9e3 commit 906c999
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions packages/plugin-phone/src/call.js
Expand Up @@ -808,6 +808,7 @@ const Call = SparkPlugin.extend({
@oneFlight
// eslint-disable-next-line complexity
_join(locusMethodName, target, options = {}) {

if (options.localMediaStream) {
this.media.set(`localMediaStream`, options.localMediaStream);
}
Expand All @@ -832,13 +833,13 @@ const Call = SparkPlugin.extend({
offerToReceiveAudio: recvOnly || !!options.constraints.audio,
offerToReceiveVideo: recvOnly || !!options.constraints.video
});

this.media.set({
audio: options.constraints.audio,
video: options.constraints.video
});
}

this.media.set({
audio: options.constraints.audio,
video: options.constraints.video
});

if (options.offerOptions) {
if (options.offerOptions.offerToReceiveAudio) {
this.media.set({offerToReceiveAudio: options.offerOptions.offerToReceiveAudio});
Expand Down

0 comments on commit 906c999

Please sign in to comment.