It takes subscribeToAudio 1-2 seconds to work

Report any bugs here, no matter how trivial

It takes subscribeToAudio 1-2 seconds to work

Postby giladani » Thu May 03, 2012 5:27 am

Hi,

I subscribe to my own published stream. To avoid the noise feedback, I use the "subscribeToAudio : false" via JS APIs.
When I see the video I hear the noise feedback for 1-2 seconds before the audio is muted.

I do want to publish audio for other users to hear. I do want to subscribe to myself and see how everyone else see the video in addition to watching myself.

IS there a way to avoid this noise?

Thanks,
Gil.
Was this post helpful? (0)
giladani
 
Posts: 187
Joined: Wed Apr 11, 2012 8:05 am
Thumbs Up: 2

Re: It takes subscribeToAudio 1-2 seconds to work

Postby jtsai » Mon May 07, 2012 12:58 pm

Are you calling subscribeToAudio like this?

Code: Select all
session.subscribe(stream, div_id, {subscribeToAudio: false});


John
Was this post helpful? (0)
Very helpful resource: Devs Checklist
Examples with OpenTok: Examples
User avatar
jtsai
 
Posts: 2035
Joined: Wed Sep 14, 2011 3:00 pm
Thumbs Up: 159

Re: It takes subscribeToAudio 1-2 seconds to work

Postby giladani » Mon May 07, 2012 2:20 pm

Yes
Was this post helpful? (0)
giladani
 
Posts: 187
Joined: Wed Apr 11, 2012 8:05 am
Thumbs Up: 2

Re: It takes subscribeToAudio 1-2 seconds to work

Postby jtsai » Mon May 07, 2012 2:42 pm

Are you subscribing to audio after you call subscribe by any chance? You're not even supposed to hear yourself because in our code path, we disable the audio for the stream before we play the stream.

John
Was this post helpful? (0)
Very helpful resource: Devs Checklist
Examples with OpenTok: Examples
User avatar
jtsai
 
Posts: 2035
Joined: Wed Sep 14, 2011 3:00 pm
Thumbs Up: 159

Re: It takes subscribeToAudio 1-2 seconds to work

Postby giladani » Mon May 07, 2012 2:52 pm

I'm currently on a fast connection and I don't see the problem.
Is it possible that the problem occurs only on slow networks?

BTW - I subscribe without audio, as you showed above. I didn't subscribe w/ audio and then mute.

I did just uninstall many cam a few days ago. Can this be the cause? It did cause some problems w/ the video...

Cheers,
Gil
Was this post helpful? (0)
giladani
 
Posts: 187
Joined: Wed Apr 11, 2012 8:05 am
Thumbs Up: 2

Re: It takes subscribeToAudio 1-2 seconds to work

Postby jtsai » Mon May 07, 2012 3:19 pm

A slow/fast internet connection shouldn't matter. Manycam has been known to cause some irregularities with the streams (sometimes even causing crashes), but I am not too sure if it would affect the audio like that. Perhaps your computer was just slower in processing the muting of the audio for some reason on that particular day (lots of programs running, high cpu usage)?

John
Was this post helpful? (0)
Very helpful resource: Devs Checklist
Examples with OpenTok: Examples
User avatar
jtsai
 
Posts: 2035
Joined: Wed Sep 14, 2011 3:00 pm
Thumbs Up: 159

Re: It takes subscribeToAudio 1-2 seconds to work

Postby giladani » Wed May 30, 2012 8:23 am

Hi,

This issue still occurs. As mentioned above, it happens in few computers.
Why do you think that the issue is related to my slow processing? This parameter should probably be checked before it's allowing the sound...

It sounds only reasonable if I was disabling the sound after the video is connected...

Thanks,
Gil.
Was this post helpful? (0)
giladani
 
Posts: 187
Joined: Wed Apr 11, 2012 8:05 am
Thumbs Up: 2

Re: It takes subscribeToAudio 1-2 seconds to work

Postby giladani » Mon Jun 04, 2012 2:50 pm

HI,

this was not followed up for some time. Any news here?

I use "subscribeToAudio : false" when I subscribe, but I still hear for ~1sec. Since I'm subscribing to my own session, it sounds bad...

Thanks,
Gil.
Was this post helpful? (0)
giladani
 
Posts: 187
Joined: Wed Apr 11, 2012 8:05 am
Thumbs Up: 2

Re: It takes subscribeToAudio 1-2 seconds to work

Postby jtsai » Mon Jun 04, 2012 3:26 pm

Hi Gil

I am still unable to reproduce this problem. Could you whip out a sample-page that will reproduce this issue? I've tried to make a sample app that does this, but I can never seem to hear myself from the subscriber side when I'm giving out a constant sound.

John
Was this post helpful? (0)
Very helpful resource: Devs Checklist
Examples with OpenTok: Examples
User avatar
jtsai
 
Posts: 2035
Joined: Wed Sep 14, 2011 3:00 pm
Thumbs Up: 159

Re: It takes subscribeToAudio 1-2 seconds to work

Postby giladani » Tue Jun 19, 2012 4:38 am

Hi John,


The problem still reproduce with the new standalone publisher.
Now it happens if I only create the publisher, without connecting to any subscriber or even no session.

It happens on both firefox and chrome (at least). The trick: you have to create some noise, and you'll hear the feedback...
Since I don't subscribe now, why do I hear this sound?!

This is my publisher creation code:

Code: Select all

   var my = {
           publisher: null
   }     

    var newDiv = document.createElement("div");
    newDiv.id = "publisher";
    document.getElementById("myCam").appendChild(newDiv);
         
    var publish_properties = {
         publishAudio : true,
         microphoneEnabled : true,
         microphoneGain : 100,
         publishVideo : true,
         mirror : true,
         
         // How my video looks.
         width:  Drupal.settings.open_tok.my.width,
         height: Drupal.settings.open_tok.my.height,
         
         // The resolution of the remote video.
         encodedWidth :  320,  // 1..640
         encodedHeight : 240,  // 1..640
         
         wmode : "opaque", // Needed for Faceboook integration
         style: {
            backgroundImageURI: Drupal.settings.open_tok.my.background_img
         }
   };
   if (true == is_reg) // FIXME - this is a patch due to opentok's bug. When calling session.disconnect, it also kills the publisher.
   setState(3);
   my.publisher = TB.initPublisher(Drupal.settings.open_tok.api_key, newDiv.id, publish_properties);
   if (true == is_reg) {// FIXME - this is a patch due to opentok's bug. When calling session.disconnect, it also kills the publisher.
   my.publisher.addEventListener("accessDialogOpened", accessDialogOpenedHandler);
   my.publisher.addEventListener("accessDialogClosed", accessDialogClosedHandler);
   my.publisher.addEventListener("accessDenied", accessDeniedHandler);
   
   my.publisher.addEventListener("accessAllowed", accessAllowedHandler);
 

      function accessAllowedHandler(event) {         
                    setTimeout('detectDevices()', 2*1000);
    }

function detectDevices() {
   my.publisher.addEventListener("deviceInactive", deviceDeviceTestInactiveHandler);
   my.publisher.addEventListener("devicesDetected", devicesDetectedHandler);
   my.publisher.detectDevices();
}


Was this post helpful? (0)
giladani
 
Posts: 187
Joined: Wed Apr 11, 2012 8:05 am
Thumbs Up: 2

Next

Return to Bugs



Who is online

Users browsing this forum: No registered users and 1 guest

cron