Skip to content

Commit

Permalink
- allow users with no mic to listen to audio stream
Browse files Browse the repository at this point in the history
  • Loading branch information
ritzalam committed Jan 24, 2012
1 parent 6e4eaab commit 427f827
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ public void start() {

userListenStream = new SipToFlashAudioStream(scope, sipToFlashTranscoder, connInfo.getSocket());
userListenStream.addListenStreamObserver(this);
log.debug("Starting userListenStream so that users with no mic can listen.");
userListenStream.start();
userTalkStream = new FlashToSipAudioStream(flashToSipTranscoder, connInfo.getSocket(), connInfo);
}

Expand All @@ -81,8 +83,6 @@ public String getListenStreamName() {
}

public void startTalkStream(IBroadcastStream broadcastStream, IScope scope) throws StreamException {
log.debug("Starting userListenSteam");
userListenStream.start();
log.debug("userTalkStream setup");
userTalkStream.start(broadcastStream, scope);
log.debug("userTalkStream Started");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ package org.bigbluebutton.modules.phone.managers {

if (phoneOptions.autoJoin) {
if (phoneOptions.skipCheck || noMicrophone()) {
joinVoice(true);
if (noMicrophone()) {
joinVoice(false);
} else {
joinVoice(true);
}
} else {
var dispatcher:Dispatcher = new Dispatcher();
dispatcher.dispatchEvent(new BBBEvent("SHOW_MIC_SETTINGS"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ package org.bigbluebutton.modules.phone.managers {
publish(publishStreamName);
}

private function play(playStreamName:String):void {
private function play(playStreamName:String):void {
incomingStream.play(playStreamName);
}

Expand All @@ -158,7 +158,9 @@ package org.bigbluebutton.modules.phone.managers {
* http://stackoverflow.com/questions/1079935/actionscript-netstream-stutters-after-buffering
* ralam (Dec 13, 2010)
*/
incomingStream.bufferTime = 0;
incomingStream.bufferTime = 0;
incomingStream.receiveAudio(true);
incomingStream.receiveVideo(false);
}

private function setupOutgoingStream():void {
Expand Down Expand Up @@ -201,7 +203,7 @@ package org.bigbluebutton.modules.phone.managers {

private function netStatus (evt:NetStatusEvent ):void {
var event:PlayStreamStatusEvent = new PlayStreamStatusEvent();

LogUtil.debug("******* evt.info.code " + evt.info.code);
switch(evt.info.code) {
case "NetStream.Play.StreamNotFound":
event.status = PlayStreamStatusEvent.PLAY_STREAM_STATUS_EVENT;
Expand Down

0 comments on commit 427f827

Please sign in to comment.