StreamDestroyed not called for already available streams

Ask questions about the JavaScript API here

StreamDestroyed not called for already available streams

Postby wang » Thu Jan 24, 2013 10:33 am

When a join a session that already has a bunch of streams connected and disconnect those specific streams, the "streamDestroyed" event does not get triggered.
However, for streams that connect to the session after I have been connected, those do trigger the "streamDestroyed" when I destroy them.

Is this the correct behavior of the "streamDestroyed" event?
I am trying to detect streams that are destroyed regardless if they were connected to the session before I was.
I do not see any other event I can listen for that would detect when a stream has ended.
Can someone point me in the right direction?
Was this post helpful? (0)
wang
 
Posts: 3
Joined: Fri Jan 18, 2013 12:04 pm
Thumbs Up: 0

Re: StreamDestroyed not called for already available streams

Postby wang » Thu Jan 24, 2013 11:36 am

Just tested on Chrome 24 and it works.
However, the listener does not get triggered in Firefox 12.0
Was this post helpful? (0)
wang
 
Posts: 3
Joined: Fri Jan 18, 2013 12:04 pm
Thumbs Up: 0

Re: StreamDestroyed not called for already available streams

Postby jtsai » Fri Jan 25, 2013 2:08 pm

Hi

streamDestroyed SHOULD be called whenever a stream is destroyed from the session (doesn't matter if they published before or after you joined). The fact that it works in chrome and not in firefox might mean you have code that doesn't work with firefox, but works with chrome. You should put an alert at the top of your streamDestroyedHandler to see if something shows up. Perhaps in firefox the handler does get called, but something in the code breaks it.

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


Return to JavaScript



Who is online

Users browsing this forum: No registered users and 1 guest

cron