OpenTok Shuffling Help

Ask any questions or talk about OpenTok here!

OpenTok Shuffling Help

Postby Surfbrain » Mon Feb 21, 2011 10:02 am

Code: Select all
Archived Post


Hi I need to know how I can integrate OpenTok API if I want to build

an application having mentioned below abilities.

1. At a time I just want to display one subscriber and there will be a

shuffling button pressing on the button will switch to another user

available in session replacing with the current subscribers but I

don't want to view many subscriber to viewer.

2. Is there possibility to have a time option I mean after 5 minutes I

want to quit current subscriber that will replace a new subscriber.

Please help me how can I use server side API with javascript to build

such application. I will be very thankful to one who will give me some

input of example.

Any help will be highly appreciated.
Was this post helpful? (0)
Surfbrain
 

OpenTok Shuffling Help

Postby Thomas Osowski » Tue Feb 22, 2011 5:59 pm

Code: Select all
Archived Post


You can get this behavior by modifying our tutorials to only subscribe
to one stream.  The only extra code this would require is managing
streams and the suggestions below:
1. At a time I just want to display one subscriber and there will be a
shuffling button pressing on the button will switch to another user
available in session replacing with the current subscribers but I
don't want to view many subscriber to viewer.
Here is the pseudo code in JS for this:
function shuffle(){
    //  If watching a stream use session unsubscribe() to remove the
current stream
    //  pick a new stream to view
    //  If found a new stream use session subscribe to watch it
}
Was this post helpful? (0)
Thomas Osowski
 


Return to Discussion and Questions



Who is online

Users browsing this forum: No registered users and 1 guest

cron