tokbox

How to connect to user's stream in TokBox

旧街凉风 提交于 2020-01-06 02:56:09
问题 I'm making a 1 on 1 video call app using TokBox. I'm opening a session using this code: [_session connectWithApiKey:kApiKey token:kToken]; after getting the didConnect message i'm publishing a stream on one user device using this code: _publisher = [[OTPublisher alloc] initWithDelegate:self]; [_publisher setName:@"PublishName"]; [_session publish:_publisher]; [self.view addSubview:_publisher.view]; [_publisher.view setFrame:CGRectMake(0, 0, widgetWidth, widgetHeight)]; What do I need to

How to change audio output in opentok javascript SDK?

一笑奈何 提交于 2019-12-23 20:08:42
问题 When connected to a mobile browser, the audio always defaults to the audio-only speakers (i.e. phone speakers that are close to the ear; i don't know what this is called) instead of the loud speakers. How do I make it use the loud speakers by default and give the user a choice of which speaks to use? The documentation for mobile SDKs have this but in the JavaScript SDK, only the audio source has an equivalent. Isn't this possible in opentok? If not, what workaround can I do? 回答1: Currently

OpenTok PHP SDK createSession not working

别来无恙 提交于 2019-12-23 05:08:06
问题 I've just installed the latest php sdk of opentok. I cannot get a session to be created and it's extremely frustrating. I know the SDK is correctly imported because my first call works. Here is my code. <?PHP require("./../classes/opentok.phar"); use OpenTok\OpenTok; use OpenTok\Session; use OpenTok\Role; use OpenTok\MediaMode; $API_KEY = '45972332'; $API_SECRET = 'HIDDEN_FOR_MY_PROTECTION'; $apiObj = new OpenTok($API_KEY, $API_SECRET); var_dump($apiObj); // this returned successful data.

Integrate opentok video conferencing into parse.com + iOS app

别来无恙 提交于 2019-12-20 16:21:27
问题 This question is not only aimed at code but my app design as well. I have an iphone app that requires opentok to handle the video/audio sessions. I have gone through basic samples but what I am confused about is session management. For example, if my iphone app wants to call a user from a mapview, how do I do that if all I have is this user's location (coordinates)? How do I ensure that the session I am publishing gets to that particular user somehow and that user subscribes to it? Currently

navigator.mediaDevices.enumerateDevices() not display device label on firefox

╄→尐↘猪︶ㄣ 提交于 2019-12-14 03:49:00
问题 I am working on media control functionality. I am displaying device name to select from a dropdown and it's working fine on chrome but on firefox it will not fetching label or device name. 回答1: navigator.mediaDevices.enumerateDevices() will return an empty label attribute value in the media device info if the respective permissions are not granted. To make it work, I placed this function after all of the media permissions have been granted so it returns a label attribute value as well. 回答2:

Publishing fails after unpublishing

安稳与你 提交于 2019-12-12 18:19:11
问题 In my application I do the following steps: Publish audio only Unpublish Publish audio+video Unpublish Publish audio only At stage 5 it fails with the following error: index.js:460 OT.Publisher.onPublishingTimeoutonPublishingTimeout @ index.js:460(anonymous function) @ index.js:1472 index.js:332 OT.Publisher State Change Failed: 'Failed' cannot transition to 'MediaBound'stateChangeFailed @ index.js:332signalChangeFailed @ generate_simple_state_machine.js:38handleInvalidStateChanges @ generate

Opentok Screen Sharing with Audio

江枫思渺然 提交于 2019-12-12 15:19:16
问题 I try to create a Screen Sharing application with the opentok JS client that shares the publishers audio as well. Screen Sharing works fine. But the audio is never shared. Now, I noticed a warning in the console (Firefox) saying Invalid audioSource passed to Publisher - when using screen sharing no audioSource may be used . Does that mean it is not possible at all, or that the audio source is invalid? 回答1: With v2.13.0 it is now possible to pass a MediaStreamTrack as a custom audioSource and

Unable to create Videoconferences sessions with Tokbox

最后都变了- 提交于 2019-12-12 03:27:51
问题 The app create sessions for videoconferences and one of the values is a session id that takes from from tokbox. This was working for a lot of time, so in this days started to get the following error many attempts, and many other attempts runs ok, here the message from console: REXML::ParseException (Missing end tag for 'hr' (got "body") Line: 6 Position: 169 Last 80 unconsumed characters: ): All seems that missing content from the tokbox id, no code change while this time lapse since this

OpentTok (iOS) How to subscribe to hasAudio stream changes

ぐ巨炮叔叔 提交于 2019-12-11 18:07:18
问题 I need a possibility in the TokBox iOS SDK to find out if a subscribed stream has audio dynamically / via an event. (OTStream.hasAudio) OTSubscriberDelegate provides callbacks for the subscribed video state subscriberVideoEnabled/Disabled but I can't find anything for audio. The JS SDK provides the StreamPropertyChangedEvent for this. The Android SDK provides the StreamPropertiesListener for this. iOS seems to be the only platform that doesn't have a proper solution. 回答1: TokBox Developer

Tokbox streamCreated being called same number of times client is called

空扰寡人 提交于 2019-12-11 16:58:08
问题 I'm calling on a client, one-to-one, multiple times during a session and the streamCreated event gets called on the host. When I hang up, I unsubscribe and the client unpublishes. However, when I call on the client again, the streamCreated event gets called twice on the host's side. I call on the client 3, 4, 5, etc. more times and the streamCreated event fires the same number of times as I have called on the client. For example on the 7th time I call the client, streamCreated gets called 7