Skip to content

Commit

Permalink
Merge pull request #8 from CommercialTribe/ct_1345
Browse files Browse the repository at this point in the history
CT-1345: OpenTok Network Test
  • Loading branch information
k7k0 authored Oct 12, 2016
2 parents e4e5652 + 1927488 commit 16c2584
Show file tree
Hide file tree
Showing 9 changed files with 1,777 additions and 1 deletion.
4 changes: 4 additions & 0 deletions NetworkTest.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { NativeModules, NativeAppEventEmitter, Platform } from 'react-native';
const NetworkTest = NativeModules.OpenTokNetworkTest;

export const testConnection = NetworkTest.testConnection;
39 changes: 39 additions & 0 deletions OTDefaultAudioDevice.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
//
// OTAudioDeviceIOSDefault.h
//
// Copyright (c) 2014 TokBox, Inc. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <OpenTok/OpenTok.h>

#define kMixerInputBusCount 2
#define kOutputBus 0
#define kInputBus 1

#define AUDIO_DEVICE_HEADSET @"AudioSessionManagerDevice_Headset"
#define AUDIO_DEVICE_BLUETOOTH @"AudioSessionManagerDevice_Bluetooth"
#define AUDIO_DEVICE_SPEAKER @"AudioSessionManagerDevice_Speaker"

@interface OTDefaultAudioDevice : NSObject <OTAudioDevice>
{
AudioStreamBasicDescription stream_format;
}

/**
* Audio device lifecycle should live for the duration of the process, and
* needs to be set before OTSession is initialized.
*
* It is not recommended to initialize unique audio device instances.
*/
+ (instancetype)sharedInstance;

/**
* Override the audio unit preferred component subtype. This can be used to
* force RemoteIO to be used instead of VPIO (the default). It is recommended
* to set this prior to instantiating any publisher/subscriber; changes will
* not take effect until after the next audio unit setup call.
*/
@property (nonatomic) uint32_t preferredAudioComponentSubtype;

@end
Loading

0 comments on commit 16c2584

Please sign in to comment.