@kaleyra/video-react-native-module 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +165 -0
- package/README.md +292 -0
- package/android/build.gradle +100 -0
- package/android/gradle.properties +9 -0
- package/android/settings.gradle +6 -0
- package/android/src/main/AndroidManifest.xml +1 -0
- package/android/src/main/assets/kaleyra_video_wrapper_info.txt +1 -0
- package/android/src/main/java/com/kaleyra/video_react_native_module/ReactNativeAccessTokenProvider.kt +22 -0
- package/android/src/main/java/com/kaleyra/video_react_native_module/ReactNativeContextContainer.kt +9 -0
- package/android/src/main/java/com/kaleyra/video_react_native_module/ReactNativeVideoHybridBridge.kt +30 -0
- package/android/src/main/java/com/kaleyra/video_react_native_module/VideoNativeEmitter.kt +45 -0
- package/android/src/main/java/com/kaleyra/video_react_native_module/VideoNativeModule.kt +109 -0
- package/android/src/main/java/com/kaleyra/video_react_native_module/VideoReactPackage.kt +20 -0
- package/index.ts +47 -0
- package/ios/PluginInfo/_KaleyraVideoHybridVersionInfo.swift +31 -0
- package/ios/ReactEvents/ReactNativeEventEmitter.swift +31 -0
- package/ios/ReactEvents/VideoNativeEmitter.m +17 -0
- package/ios/ReactEvents/VideoNativeEmitter.swift +42 -0
- package/ios/ReactNativePlugin-Bridging-Header.h +5 -0
- package/ios/ReactNativePlugin.xcodeproj/project.pbxproj +301 -0
- package/ios/VideoNativeModule.m +45 -0
- package/ios/VideoNativeModule.swift +154 -0
- package/lib/commonjs/index.js +12 -0
- package/lib/commonjs/native-bridge/TypeScript/Environments.js +41 -0
- package/lib/commonjs/native-bridge/TypeScript/Events.js +46 -0
- package/lib/commonjs/native-bridge/TypeScript/Regions.js +47 -0
- package/lib/commonjs/native-bridge/TypeScript/UserDetailsFormatValidator.js +32 -0
- package/lib/commonjs/native-bridge/TypeScript/errors/IllegalArgumentError.js +12 -0
- package/lib/commonjs/native-bridge/TypeScript/types/AccessTokenRequest.js +4 -0
- package/lib/commonjs/native-bridge/TypeScript/types/AccessTokenResponse.js +36 -0
- package/lib/commonjs/native-bridge/TypeScript/types/AudioCallOptions.js +4 -0
- package/lib/commonjs/native-bridge/TypeScript/types/AudioCallType.js +19 -0
- package/lib/commonjs/native-bridge/TypeScript/types/CallDisplayMode.js +23 -0
- package/lib/commonjs/native-bridge/TypeScript/types/CallKitConfiguration.js +4 -0
- package/lib/commonjs/native-bridge/TypeScript/types/CallOptions.js +4 -0
- package/lib/commonjs/native-bridge/TypeScript/types/CallType.js +23 -0
- package/lib/commonjs/native-bridge/TypeScript/types/ChatToolConfiguration.js +4 -0
- package/lib/commonjs/native-bridge/TypeScript/types/CreateCallOptions.js +4 -0
- package/lib/commonjs/native-bridge/TypeScript/types/Environment.js +4 -0
- package/lib/commonjs/native-bridge/TypeScript/types/IosConfiguration.js +4 -0
- package/lib/commonjs/native-bridge/TypeScript/types/KaleyraVideoConfiguration.js +4 -0
- package/lib/commonjs/native-bridge/TypeScript/types/RecordingType.js +23 -0
- package/lib/commonjs/native-bridge/TypeScript/types/Region.js +4 -0
- package/lib/commonjs/native-bridge/TypeScript/types/ScreenShareToolConfiguration.js +4 -0
- package/lib/commonjs/native-bridge/TypeScript/types/Session.js +4 -0
- package/lib/commonjs/native-bridge/TypeScript/types/Tools.js +4 -0
- package/lib/commonjs/native-bridge/TypeScript/types/UserDetails.js +4 -0
- package/lib/commonjs/native-bridge/TypeScript/types/UserDetailsFormat.js +4 -0
- package/lib/commonjs/native-bridge/TypeScript/types/VoipHandlingStrategy.js +19 -0
- package/lib/commonjs/src/KaleyraVideo.js +259 -0
- package/lib/commonjs/src/ReactNativeEventEmitter.js +40 -0
- package/lib/commonjs/src/events/Events.js +4 -0
- package/lib/module/index.js +2 -0
- package/lib/module/native-bridge/TypeScript/Environments.js +37 -0
- package/lib/module/native-bridge/TypeScript/Events.js +43 -0
- package/lib/module/native-bridge/TypeScript/Regions.js +43 -0
- package/lib/module/native-bridge/TypeScript/UserDetailsFormatValidator.js +28 -0
- package/lib/module/native-bridge/TypeScript/errors/IllegalArgumentError.js +8 -0
- package/lib/module/native-bridge/TypeScript/types/AccessTokenRequest.js +3 -0
- package/lib/module/native-bridge/TypeScript/types/AccessTokenResponse.js +32 -0
- package/lib/module/native-bridge/TypeScript/types/AudioCallOptions.js +3 -0
- package/lib/module/native-bridge/TypeScript/types/AudioCallType.js +16 -0
- package/lib/module/native-bridge/TypeScript/types/CallDisplayMode.js +20 -0
- package/lib/module/native-bridge/TypeScript/types/CallKitConfiguration.js +3 -0
- package/lib/module/native-bridge/TypeScript/types/CallOptions.js +3 -0
- package/lib/module/native-bridge/TypeScript/types/CallType.js +20 -0
- package/lib/module/native-bridge/TypeScript/types/ChatToolConfiguration.js +3 -0
- package/lib/module/native-bridge/TypeScript/types/CreateCallOptions.js +3 -0
- package/lib/module/native-bridge/TypeScript/types/Environment.js +3 -0
- package/lib/module/native-bridge/TypeScript/types/IosConfiguration.js +3 -0
- package/lib/module/native-bridge/TypeScript/types/KaleyraVideoConfiguration.js +3 -0
- package/lib/module/native-bridge/TypeScript/types/RecordingType.js +20 -0
- package/lib/module/native-bridge/TypeScript/types/Region.js +3 -0
- package/lib/module/native-bridge/TypeScript/types/ScreenShareToolConfiguration.js +3 -0
- package/lib/module/native-bridge/TypeScript/types/Session.js +3 -0
- package/lib/module/native-bridge/TypeScript/types/Tools.js +3 -0
- package/lib/module/native-bridge/TypeScript/types/UserDetails.js +3 -0
- package/lib/module/native-bridge/TypeScript/types/UserDetailsFormat.js +3 -0
- package/lib/module/native-bridge/TypeScript/types/VoipHandlingStrategy.js +16 -0
- package/lib/module/src/KaleyraVideo.js +249 -0
- package/lib/module/src/ReactNativeEventEmitter.js +36 -0
- package/lib/module/src/events/Events.js +3 -0
- package/lib/typescript/index.d.ts +2 -0
- package/lib/typescript/native-bridge/TypeScript/Environments.d.ts +28 -0
- package/lib/typescript/native-bridge/TypeScript/Events.d.ts +40 -0
- package/lib/typescript/native-bridge/TypeScript/Regions.d.ts +32 -0
- package/lib/typescript/native-bridge/TypeScript/UserDetailsFormatValidator.d.ts +4 -0
- package/lib/typescript/native-bridge/TypeScript/errors/IllegalArgumentError.d.ts +6 -0
- package/lib/typescript/native-bridge/TypeScript/types/AccessTokenRequest.d.ts +4 -0
- package/lib/typescript/native-bridge/TypeScript/types/AccessTokenResponse.d.ts +12 -0
- package/lib/typescript/native-bridge/TypeScript/types/AudioCallOptions.d.ts +11 -0
- package/lib/typescript/native-bridge/TypeScript/types/AudioCallType.d.ts +13 -0
- package/lib/typescript/native-bridge/TypeScript/types/CallDisplayMode.d.ts +17 -0
- package/lib/typescript/native-bridge/TypeScript/types/CallKitConfiguration.d.ts +26 -0
- package/lib/typescript/native-bridge/TypeScript/types/CallOptions.d.ts +13 -0
- package/lib/typescript/native-bridge/TypeScript/types/CallType.d.ts +17 -0
- package/lib/typescript/native-bridge/TypeScript/types/ChatToolConfiguration.d.ts +15 -0
- package/lib/typescript/native-bridge/TypeScript/types/CreateCallOptions.d.ts +15 -0
- package/lib/typescript/native-bridge/TypeScript/types/Environment.d.ts +9 -0
- package/lib/typescript/native-bridge/TypeScript/types/IosConfiguration.d.ts +23 -0
- package/lib/typescript/native-bridge/TypeScript/types/KaleyraVideoConfiguration.d.ts +33 -0
- package/lib/typescript/native-bridge/TypeScript/types/RecordingType.d.ts +17 -0
- package/lib/typescript/native-bridge/TypeScript/types/Region.d.ts +9 -0
- package/lib/typescript/native-bridge/TypeScript/types/ScreenShareToolConfiguration.d.ts +19 -0
- package/lib/typescript/native-bridge/TypeScript/types/Session.d.ts +16 -0
- package/lib/typescript/native-bridge/TypeScript/types/Tools.d.ts +42 -0
- package/lib/typescript/native-bridge/TypeScript/types/UserDetails.d.ts +29 -0
- package/lib/typescript/native-bridge/TypeScript/types/UserDetailsFormat.d.ts +19 -0
- package/lib/typescript/native-bridge/TypeScript/types/VoipHandlingStrategy.d.ts +13 -0
- package/lib/typescript/src/KaleyraVideo.d.ts +125 -0
- package/lib/typescript/src/ReactNativeEventEmitter.d.ts +15 -0
- package/lib/typescript/src/events/Events.d.ts +37 -0
- package/native-bridge/LICENSE +165 -0
- package/native-bridge/TypeScript/Environments.ts +44 -0
- package/native-bridge/TypeScript/Events.ts +43 -0
- package/native-bridge/TypeScript/Regions.ts +51 -0
- package/native-bridge/TypeScript/UserDetailsFormatValidator.ts +35 -0
- package/native-bridge/TypeScript/errors/IllegalArgumentError.ts +9 -0
- package/native-bridge/TypeScript/types/AccessTokenRequest.ts +7 -0
- package/native-bridge/TypeScript/types/AccessTokenResponse.ts +41 -0
- package/native-bridge/TypeScript/types/AudioCallOptions.ts +15 -0
- package/native-bridge/TypeScript/types/AudioCallType.ts +17 -0
- package/native-bridge/TypeScript/types/CallDisplayMode.ts +22 -0
- package/native-bridge/TypeScript/types/CallKitConfiguration.ts +32 -0
- package/native-bridge/TypeScript/types/CallOptions.ts +18 -0
- package/native-bridge/TypeScript/types/CallType.ts +22 -0
- package/native-bridge/TypeScript/types/ChatToolConfiguration.ts +21 -0
- package/native-bridge/TypeScript/types/CreateCallOptions.ts +20 -0
- package/native-bridge/TypeScript/types/Environment.ts +12 -0
- package/native-bridge/TypeScript/types/IosConfiguration.ts +29 -0
- package/native-bridge/TypeScript/types/KaleyraVideoConfiguration.ts +42 -0
- package/native-bridge/TypeScript/types/RecordingType.ts +22 -0
- package/native-bridge/TypeScript/types/Region.ts +12 -0
- package/native-bridge/TypeScript/types/ScreenShareToolConfiguration.ts +24 -0
- package/native-bridge/TypeScript/types/Session.ts +20 -0
- package/native-bridge/TypeScript/types/Tools.ts +50 -0
- package/native-bridge/TypeScript/types/UserDetails.ts +37 -0
- package/native-bridge/TypeScript/types/UserDetailsFormat.ts +23 -0
- package/native-bridge/TypeScript/types/VoipHandlingStrategy.ts +17 -0
- package/native-bridge/android/build.gradle +72 -0
- package/native-bridge/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/native-bridge/android/gradle/wrapper/gradle-wrapper.properties +5 -0
- package/native-bridge/android/gradle.properties +22 -0
- package/native-bridge/android/gradlew +234 -0
- package/native-bridge/android/gradlew.bat +89 -0
- package/native-bridge/android/settings.gradle +1 -0
- package/native-bridge/android/src/main/AndroidManifest.xml +1 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/AccessTokenProvider.kt +8 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/CallOptionsProxy.kt +9 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/ContextContainer.kt +10 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/DTOs.kt +407 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/SDKAccessTokenProviderProxy.kt +16 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/VideoHybridBridge.kt +21 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/VideoSDKHybridBridge.kt +64 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/configurator/CachedSDKConfigurator.kt +15 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/configurator/VideoSDKConfigurator.kt +46 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/connector/CachedUserConnector.kt +15 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/connector/VideoSDKCachedUserConnector.kt +60 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/events/Events.kt +29 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/events/EventsEmitter.kt +8 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/events/EventsReporter.kt +9 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/events/reporter/CallEventsReporter.kt +54 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/events/reporter/ChatEventsReporter.kt +43 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/events/reporter/CrossPlatformModuleStatus.kt +29 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/events/reporter/ModuleEventsReporter.kt +34 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/events/reporter/SDKEventsReporter.kt +63 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/extensions/CallDisplayExtension.kt +15 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/extensions/ConfigurationExtension.kt +39 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/extensions/EnvironmentExtension.kt +12 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/extensions/RecordingTypeExtension.kt +15 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/extensions/RegionExtension.kt +13 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/extensions/ScreenShareToolConfigurationExtension.kt +15 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/extensions/ToolsExtension.kt +95 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/extensions/UserExtensions.kt +35 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/notifications/KaleyraVideoNotificationReceiver.kt +139 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/notifications/KaleyraVideoNotificationService.kt +85 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/repository/ConfigurationEntity.kt +27 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/repository/ConnectedUserEntity.kt +30 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/repository/Converters.kt +25 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/repository/UserDetailsDao.kt +21 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/repository/UserDetailsEntity.kt +22 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/repository/VideoHybridBridgeRepository.kt +39 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/ui/SDKUserInterfacePresenter.kt +49 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/ui/UserInterfacePresenter.kt +14 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/user_details/CachedUserDetails.kt +18 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/user_details/CachedUserDetailsFormatter.kt +59 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/user_details/SDKCachedUserDetails.kt +74 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/utils/CaseInsensitiveEnumTypeAdapterFactory.kt +48 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/utils/TLSSocketFactoryCompat.kt +76 -0
- package/native-bridge/iOS/KaleyraVideoHybridNativeBridge.xcodeproj/project.pbxproj +1399 -0
- package/native-bridge/iOS/KaleyraVideoHybridNativeBridge.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/native-bridge/iOS/KaleyraVideoHybridNativeBridge.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/native-bridge/iOS/KaleyraVideoHybridNativeBridge.xcodeproj/xcshareddata/IDETemplateMacros.plist +9 -0
- package/native-bridge/iOS/KaleyraVideoHybridNativeBridge.xcodeproj/xcshareddata/xcschemes/KaleyraVideoHybridNativeBridge.xcscheme +79 -0
- package/native-bridge/iOS/KaleyraVideoHybridNativeBridge.xcworkspace/contents.xcworkspacedata +10 -0
- package/native-bridge/iOS/KaleyraVideoHybridNativeBridge.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/native-bridge/iOS/Podfile +28 -0
- package/native-bridge/iOS/Podfile.lock +20 -0
- package/native-bridge/iOS/Source/Abstractions/BandyerSDKProtocol.swift +24 -0
- package/native-bridge/iOS/Source/Abstractions/CallWindowProtocol.swift +18 -0
- package/native-bridge/iOS/Source/AccessToken/AccessTokenRequester.swift +9 -0
- package/native-bridge/iOS/Source/AccessToken/TokenProvider.swift +78 -0
- package/native-bridge/iOS/Source/Broadcast/BroadcastConfigurationPlistReader.swift +49 -0
- package/native-bridge/iOS/Source/Concurrency/DispatchQueue+isMain.swift +19 -0
- package/native-bridge/iOS/Source/Concurrency/Lock.swift +21 -0
- package/native-bridge/iOS/Source/Concurrency/MainQueueDispatcher.swift +23 -0
- package/native-bridge/iOS/Source/Concurrency/MainQueueRelay.swift +18 -0
- package/native-bridge/iOS/Source/DTOs/AccessTokenRequest+Encodable.swift +27 -0
- package/native-bridge/iOS/Source/DTOs/AccessTokenResponse+Decodable.swift +24 -0
- package/native-bridge/iOS/Source/DTOs/Array+JSON.swift +6 -0
- package/native-bridge/iOS/Source/DTOs/AudioCallOptions+Bandyer.swift +14 -0
- package/native-bridge/iOS/Source/DTOs/AudioCallOptions+Decodable.swift +18 -0
- package/native-bridge/iOS/Source/DTOs/AudioCallOptions+Equatable.swift +12 -0
- package/native-bridge/iOS/Source/DTOs/AudioCallType+Bandyer.swift +18 -0
- package/native-bridge/iOS/Source/DTOs/AudioCallType+Decodable.swift +25 -0
- package/native-bridge/iOS/Source/DTOs/CallKitConfiguration+Decodable.swift +20 -0
- package/native-bridge/iOS/Source/DTOs/CallOptions+Bandyer.swift +14 -0
- package/native-bridge/iOS/Source/DTOs/CallOptions+Decodable.swift +16 -0
- package/native-bridge/iOS/Source/DTOs/CallOptions+Equatable.swift +12 -0
- package/native-bridge/iOS/Source/DTOs/CallType+Bandyer.swift +20 -0
- package/native-bridge/iOS/Source/DTOs/CallType+Decodable.swift +27 -0
- package/native-bridge/iOS/Source/DTOs/ChatToolConfiguration+Decodable.swift +18 -0
- package/native-bridge/iOS/Source/DTOs/CreateCallOptions+Decodable.swift +22 -0
- package/native-bridge/iOS/Source/DTOs/CreateCallOptions+Equatable.swift +13 -0
- package/native-bridge/iOS/Source/DTOs/CreateCallOptions+Intent.swift +17 -0
- package/native-bridge/iOS/Source/DTOs/DTOs.swift +314 -0
- package/native-bridge/iOS/Source/DTOs/Environment+Bandyer.swift +20 -0
- package/native-bridge/iOS/Source/DTOs/Environment+Decodable.swift +16 -0
- package/native-bridge/iOS/Source/DTOs/IosConfiguration+Decodable.swift +18 -0
- package/native-bridge/iOS/Source/DTOs/JSONDecodable.swift +27 -0
- package/native-bridge/iOS/Source/DTOs/KaleyraVideoConfiguration+Bandyer.swift +158 -0
- package/native-bridge/iOS/Source/DTOs/KaleyraVideoConfiguration+Decodable.swift +28 -0
- package/native-bridge/iOS/Source/DTOs/KaleyraVideoConfiguration+UserInterfacePresenterConfiguration.swift +29 -0
- package/native-bridge/iOS/Source/DTOs/RecordingType+Bandyer.swift +33 -0
- package/native-bridge/iOS/Source/DTOs/RecordingType+Decodable.swift +27 -0
- package/native-bridge/iOS/Source/DTOs/Region+Bandyer.swift +22 -0
- package/native-bridge/iOS/Source/DTOs/Region+Decodable.swift +16 -0
- package/native-bridge/iOS/Source/DTOs/ScreenShareToolConfiguration+Decodable.swift +18 -0
- package/native-bridge/iOS/Source/DTOs/Tools+Decodable.swift +24 -0
- package/native-bridge/iOS/Source/DTOs/UserDetails+Bandyer.swift +18 -0
- package/native-bridge/iOS/Source/DTOs/UserDetails+Decodable.swift +28 -0
- package/native-bridge/iOS/Source/DTOs/UserDetailsFormat+Decodable.swift +19 -0
- package/native-bridge/iOS/Source/DTOs/VoipHandlingStrategy+Decodable.swift +25 -0
- package/native-bridge/iOS/Source/Events/Emitter/EventEmitter.swift +8 -0
- package/native-bridge/iOS/Source/Events/Events+CaseIterable.swift +18 -0
- package/native-bridge/iOS/Source/Events/Events+Description.swift +28 -0
- package/native-bridge/iOS/Source/Events/Events.swift +21 -0
- package/native-bridge/iOS/Source/Events/Reporters/CallClientEventsReporter.swift +46 -0
- package/native-bridge/iOS/Source/Events/Reporters/ChatClientEventsReporter.swift +46 -0
- package/native-bridge/iOS/Source/Events/Reporters/ClientState.swift +61 -0
- package/native-bridge/iOS/Source/Events/Reporters/EventsReporter.swift +69 -0
- package/native-bridge/iOS/Source/Events/Reporters/PushTokenEventsReporter.swift +34 -0
- package/native-bridge/iOS/Source/Extensions/URL+FromString.swift +26 -0
- package/native-bridge/iOS/Source/KaleyraVideoHybridNativeBridge.h +14 -0
- package/native-bridge/iOS/Source/NativeHybridBridge/VideoHybridNativeBridge.swift +173 -0
- package/native-bridge/iOS/Source/NativeHybridBridge/VideoHybridNativeBridgeError.swift +33 -0
- package/native-bridge/iOS/Source/UI/KaleyraVideoSDKUserInterfacePresenter.swift +249 -0
- package/native-bridge/iOS/Source/UI/Presenters/PresentingViewControllerViewControllerPresenter.swift +44 -0
- package/native-bridge/iOS/Source/UI/Presenters/ViewControllerPresenter.swift +17 -0
- package/native-bridge/iOS/Source/UI/Presenters/WindowViewControllerPresenter.swift +111 -0
- package/native-bridge/iOS/Source/UI/UserInterfacePresenter+MainQueueRelay.swift +30 -0
- package/native-bridge/iOS/Source/UI/UserInterfacePresenter.swift +14 -0
- package/native-bridge/iOS/Source/User Details/Cache/UsersDetailsCache.swift +36 -0
- package/native-bridge/iOS/Source/User Details/Formatter/FormatterProxy.swift +47 -0
- package/native-bridge/iOS/Source/User Details/Formatter/UserDetailsFormatter.swift +83 -0
- package/native-bridge/iOS/Source/User Details/Providers/UsersDetailsProvider.swift +39 -0
- package/package.json +147 -0
- package/src/KaleyraVideo.ts +343 -0
- package/src/ReactNativeEventEmitter.ts +51 -0
- package/src/events/Events.ts +46 -0
- package/video-react-native-module.podspec +36 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// Copyright © 2018-2023 Kaleyra S.p.a. All Rights Reserved.
|
|
2
|
+
// See LICENSE for licensing information
|
|
3
|
+
|
|
4
|
+
#import <React/RCTBridgeModule.h>
|
|
5
|
+
|
|
6
|
+
@interface RCT_EXTERN_MODULE(VideoNativeModule, NSObject)
|
|
7
|
+
|
|
8
|
+
RCT_EXTERN_METHOD(configure:(NSString *)json)
|
|
9
|
+
|
|
10
|
+
RCT_EXTERN_METHOD(setUserDetailsFormat:(NSString *)json)
|
|
11
|
+
|
|
12
|
+
RCT_EXTERN_METHOD(setAccessTokenResponse:(NSString *)json)
|
|
13
|
+
|
|
14
|
+
RCT_EXTERN_METHOD(connect:(NSString *)userID)
|
|
15
|
+
|
|
16
|
+
RCT_EXTERN_METHOD(disconnect)
|
|
17
|
+
|
|
18
|
+
RCT_EXTERN_METHOD(reset)
|
|
19
|
+
|
|
20
|
+
RCT_EXTERN_METHOD(startCall:(NSString *)json)
|
|
21
|
+
|
|
22
|
+
RCT_EXTERN_METHOD(verifyCurrentCall:(BOOL *)verify)
|
|
23
|
+
|
|
24
|
+
RCT_EXTERN_METHOD(setDisplayModeForCurrentCall:(NSString *)mode)
|
|
25
|
+
|
|
26
|
+
RCT_EXTERN_METHOD(startCallUrl:(NSString *)url)
|
|
27
|
+
|
|
28
|
+
RCT_EXTERN_METHOD(addUsersDetails:(NSString *)json)
|
|
29
|
+
|
|
30
|
+
RCT_EXTERN_METHOD(removeUsersDetails)
|
|
31
|
+
|
|
32
|
+
RCT_EXTERN_METHOD(handlePushNotificationPayload:(NSString *)json)
|
|
33
|
+
|
|
34
|
+
RCT_EXTERN_METHOD(startChat:(NSString *)userID)
|
|
35
|
+
|
|
36
|
+
RCT_EXTERN_METHOD(clearUserCache)
|
|
37
|
+
|
|
38
|
+
RCT_EXTERN_METHOD(getCurrentVoIPPushToken:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
|
|
39
|
+
|
|
40
|
+
+ (BOOL)requiresMainQueueSetup
|
|
41
|
+
{
|
|
42
|
+
return YES;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@end
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
// Copyright © 2018-2023 Kaleyra S.p.a. All Rights Reserved.
|
|
2
|
+
// See LICENSE for licensing information
|
|
3
|
+
|
|
4
|
+
import Foundation
|
|
5
|
+
import Bandyer
|
|
6
|
+
import React
|
|
7
|
+
|
|
8
|
+
@available(iOS 12.0, *)
|
|
9
|
+
@objc(VideoNativeModule)
|
|
10
|
+
class VideoNativeModule: NSObject {
|
|
11
|
+
|
|
12
|
+
// MARK: - Properties
|
|
13
|
+
|
|
14
|
+
private let eventEmitter = ReactNativeEventEmitter()
|
|
15
|
+
private let tokenProvider: TokenProvider
|
|
16
|
+
|
|
17
|
+
private let bridge: VideoHybridNativeBridge
|
|
18
|
+
|
|
19
|
+
// MARK: - Init
|
|
20
|
+
|
|
21
|
+
override init() {
|
|
22
|
+
let tokenProvider = TokenProvider(requester: eventEmitter)
|
|
23
|
+
self.tokenProvider = tokenProvider
|
|
24
|
+
self.bridge = VideoHybridNativeBridge(emitter: eventEmitter, rootViewController: nil, accessTokenProviderFactory: {
|
|
25
|
+
tokenProvider
|
|
26
|
+
})
|
|
27
|
+
super.init()
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// MARK: - Bandyer SDK Binding
|
|
31
|
+
|
|
32
|
+
@objc(configure:)
|
|
33
|
+
func configure(json: String) {
|
|
34
|
+
perform {
|
|
35
|
+
let config = try KaleyraVideoConfiguration.decodeJSON(json)
|
|
36
|
+
printModuleDebugDescriptionIfNeeded(config)
|
|
37
|
+
try bridge.configureSDK(config)
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@objc(setUserDetailsFormat:)
|
|
42
|
+
func setUserDetailsFormat(json: String) {
|
|
43
|
+
perform {
|
|
44
|
+
bridge.setUserDetailsFormat(try UserDetailsFormat.decodeJSON(json))
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@objc(setAccessTokenResponse:)
|
|
49
|
+
func setAccessTokenResponse(json: String) {
|
|
50
|
+
perform {
|
|
51
|
+
let response = try AccessTokenResponse.decodeJSON(json)
|
|
52
|
+
tokenProvider.onResponse(response)
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@objc(connect:)
|
|
57
|
+
func connect(userID: String) {
|
|
58
|
+
perform {
|
|
59
|
+
try bridge.connect(userID: userID)
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
@objc(getCurrentVoIPPushToken:rejecter:)
|
|
64
|
+
func getCurrentVoIPPushToken(_ resolve: @escaping RCTPromiseResolveBlock,
|
|
65
|
+
rejecter reject: @escaping RCTPromiseRejectBlock ) -> Void {
|
|
66
|
+
perform {
|
|
67
|
+
let voIPPushToken = try bridge.getCurrentVoIPPushToken()
|
|
68
|
+
resolve(voIPPushToken)
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@objc(disconnect)
|
|
73
|
+
func disconnect() {
|
|
74
|
+
perform {
|
|
75
|
+
try bridge.disconnect()
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
@objc(reset)
|
|
80
|
+
func reset() {
|
|
81
|
+
bridge.reset()
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@objc(startCall:)
|
|
85
|
+
func startCall(json: String) {
|
|
86
|
+
perform {
|
|
87
|
+
try bridge.startCall(try CreateCallOptions.decodeJSON(json))
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
@objc(startCallUrl:)
|
|
92
|
+
func startCallUrl(url: String) {
|
|
93
|
+
perform {
|
|
94
|
+
try bridge.startCallUrl(try URL.fromString(url))
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
@objc(verifyCurrentCall:)
|
|
99
|
+
func verifyCurrentCall(verify: Bool) {
|
|
100
|
+
perform {
|
|
101
|
+
try bridge.verifyCurrentCall(verify)
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
@objc(setDisplayModeForCurrentCall:)
|
|
106
|
+
func setDisplayModeForCurrentCall(mode: String) {
|
|
107
|
+
bridge.setDisplayModeForCurrentCall(mode)
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
@objc(addUsersDetails:)
|
|
111
|
+
func addUsersDetails(json: String) {
|
|
112
|
+
perform {
|
|
113
|
+
bridge.addUsersDetails(try Array<UserDetails>.decodeJSON(json))
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
@objc(removeUsersDetails)
|
|
118
|
+
func removeUsersDetails() {
|
|
119
|
+
bridge.removeUsersDetails()
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
@objc(handlePushNotificationPayload:)
|
|
123
|
+
func handlePushNotificationPayload(json: String) {
|
|
124
|
+
bridge.handlePushNotificationPayload(json)
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
@objc(startChat:)
|
|
128
|
+
func startChat(userID: String) {
|
|
129
|
+
perform {
|
|
130
|
+
try bridge.startChat(userID)
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
@objc(clearUserCache)
|
|
135
|
+
func clearUserCache() {
|
|
136
|
+
bridge.clearUserCache()
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// MARK: - Helpers
|
|
140
|
+
|
|
141
|
+
private func perform(_ work: () throws -> Void) {
|
|
142
|
+
do {
|
|
143
|
+
try work()
|
|
144
|
+
} catch {
|
|
145
|
+
debugPrint(error)
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
private func printModuleDebugDescriptionIfNeeded(_ config: KaleyraVideoConfiguration) {
|
|
150
|
+
guard config.logEnabled ?? false else { return }
|
|
151
|
+
|
|
152
|
+
_KaleyraVideoHybridVersionInfo().printDebugDescription()
|
|
153
|
+
}
|
|
154
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Environments = exports.CallDisplayMode = exports.Regions = exports.CallType = exports.VoipHandlingStrategy = exports.RecordingType = exports.AudioCallType = exports.KaleyraVideo = void 0;
|
|
4
|
+
const KaleyraVideo_1 = require("./src/KaleyraVideo");
|
|
5
|
+
Object.defineProperty(exports, "KaleyraVideo", { enumerable: true, get: function () { return KaleyraVideo_1.KaleyraVideo; } });
|
|
6
|
+
Object.defineProperty(exports, "AudioCallType", { enumerable: true, get: function () { return KaleyraVideo_1.AudioCallType; } });
|
|
7
|
+
Object.defineProperty(exports, "RecordingType", { enumerable: true, get: function () { return KaleyraVideo_1.RecordingType; } });
|
|
8
|
+
Object.defineProperty(exports, "VoipHandlingStrategy", { enumerable: true, get: function () { return KaleyraVideo_1.VoipHandlingStrategy; } });
|
|
9
|
+
Object.defineProperty(exports, "CallType", { enumerable: true, get: function () { return KaleyraVideo_1.CallType; } });
|
|
10
|
+
Object.defineProperty(exports, "Regions", { enumerable: true, get: function () { return KaleyraVideo_1.Regions; } });
|
|
11
|
+
Object.defineProperty(exports, "CallDisplayMode", { enumerable: true, get: function () { return KaleyraVideo_1.CallDisplayMode; } });
|
|
12
|
+
Object.defineProperty(exports, "Environments", { enumerable: true, get: function () { return KaleyraVideo_1.Environments; } });
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright © 2018-2023 Kaleyra S.p.a. All Rights Reserved.
|
|
3
|
+
// See LICENSE for licensing information
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.Environments = void 0;
|
|
6
|
+
/**
|
|
7
|
+
* Available environments
|
|
8
|
+
*/
|
|
9
|
+
class Environments {
|
|
10
|
+
/**
|
|
11
|
+
* Sandbox environment
|
|
12
|
+
*/
|
|
13
|
+
static sandbox() {
|
|
14
|
+
return new Environments('sandbox');
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Production environment
|
|
18
|
+
*/
|
|
19
|
+
static production() {
|
|
20
|
+
return new Environments('production');
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Create environment by name
|
|
24
|
+
* @param name name of the environment
|
|
25
|
+
*/
|
|
26
|
+
static new(name) {
|
|
27
|
+
return new Environments(name);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* name of the environment
|
|
31
|
+
* @ignore
|
|
32
|
+
*/
|
|
33
|
+
name;
|
|
34
|
+
/**
|
|
35
|
+
* @ignore
|
|
36
|
+
*/
|
|
37
|
+
constructor(name) {
|
|
38
|
+
this.name = name;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.Environments = Environments;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright © 2018-2023 Kaleyra S.p.a. All Rights Reserved.
|
|
3
|
+
// See LICENSE for licensing information
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.Events = void 0;
|
|
6
|
+
/**
|
|
7
|
+
* This enum defines all the events that may be handled
|
|
8
|
+
* <br/>
|
|
9
|
+
* <br/>
|
|
10
|
+
* You can listen to these events via [[BandyerPlugin.on]]
|
|
11
|
+
*/
|
|
12
|
+
var Events;
|
|
13
|
+
(function (Events) {
|
|
14
|
+
/**
|
|
15
|
+
* Used for access token retrieval
|
|
16
|
+
*/
|
|
17
|
+
Events["accessTokenRequest"] = "accessTokenRequest";
|
|
18
|
+
/**
|
|
19
|
+
* Used to notify setup errors
|
|
20
|
+
*/
|
|
21
|
+
Events["setupError"] = "setupError";
|
|
22
|
+
/**
|
|
23
|
+
* Used to notify call module status changed
|
|
24
|
+
*/
|
|
25
|
+
Events["callModuleStatusChanged"] = "callModuleStatusChanged";
|
|
26
|
+
/**
|
|
27
|
+
* Used to notify call errors
|
|
28
|
+
*/
|
|
29
|
+
Events["callError"] = "callError";
|
|
30
|
+
/**
|
|
31
|
+
* Used to notify chat errors
|
|
32
|
+
*/
|
|
33
|
+
Events["chatError"] = "chatError";
|
|
34
|
+
/**
|
|
35
|
+
* Used to notify chat module status changed
|
|
36
|
+
*/
|
|
37
|
+
Events["chatModuleStatusChanged"] = "chatModuleStatusChanged";
|
|
38
|
+
/**
|
|
39
|
+
* Used to notify voip push token updates
|
|
40
|
+
*/
|
|
41
|
+
Events["iOSVoipPushTokenUpdated"] = "iOSVoipPushTokenUpdated";
|
|
42
|
+
/**
|
|
43
|
+
* Used to notify voip push token invalidation
|
|
44
|
+
*/
|
|
45
|
+
Events["iOSVoipPushTokenInvalidated"] = "iOSVoipPushTokenInvalidated";
|
|
46
|
+
})(Events = exports.Events || (exports.Events = {}));
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright © 2018-2023 Kaleyra S.p.a. All Rights Reserved.
|
|
3
|
+
// See LICENSE for licensing information
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.Regions = void 0;
|
|
6
|
+
/**
|
|
7
|
+
* Available regions
|
|
8
|
+
*/
|
|
9
|
+
class Regions {
|
|
10
|
+
/**
|
|
11
|
+
* India region
|
|
12
|
+
*/
|
|
13
|
+
static india() {
|
|
14
|
+
return new Regions('india');
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Europe region
|
|
18
|
+
*/
|
|
19
|
+
static europe() {
|
|
20
|
+
return new Regions('europe');
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Us region
|
|
24
|
+
*/
|
|
25
|
+
static us() {
|
|
26
|
+
return new Regions('us');
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Create region by name
|
|
30
|
+
* @param name name of the region
|
|
31
|
+
*/
|
|
32
|
+
static new(name) {
|
|
33
|
+
return new Regions(name);
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* name of the region
|
|
37
|
+
* @ignore
|
|
38
|
+
*/
|
|
39
|
+
name;
|
|
40
|
+
/**
|
|
41
|
+
* @ignore
|
|
42
|
+
*/
|
|
43
|
+
constructor(name) {
|
|
44
|
+
this.name = name;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
exports.Regions = Regions;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright © 2018-2023 Kaleyra S.p.a. All Rights Reserved.
|
|
3
|
+
// See LICENSE for licensing information
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.UserDetailsFormatValidator = void 0;
|
|
6
|
+
const IllegalArgumentError_1 = require("./errors/IllegalArgumentError");
|
|
7
|
+
class UserDetailsFormatValidator {
|
|
8
|
+
validate(format) {
|
|
9
|
+
const keywords = this.findKeywords(format);
|
|
10
|
+
if (keywords.length === 0) {
|
|
11
|
+
throw new IllegalArgumentError_1.IllegalArgumentError("Could not find any keyword, at least one keyword in the format ${keyword} must be provided");
|
|
12
|
+
}
|
|
13
|
+
const allowedKeywords = ["userID", "nickName", "firstName", "lastName", "email", "profileImageUrl"];
|
|
14
|
+
keywords.forEach((keyword) => {
|
|
15
|
+
if (allowedKeywords.indexOf(keyword) === -1) {
|
|
16
|
+
throw new IllegalArgumentError_1.IllegalArgumentError("Declared keyword=${" + keyword + "} is not allowed. The allowedKeywords allowed are: " + allowedKeywords);
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
findKeywords(format) {
|
|
21
|
+
const regex = /\${([\w]+)}/g;
|
|
22
|
+
let match;
|
|
23
|
+
const matches = [];
|
|
24
|
+
while ((match = regex.exec(format)) !== null) {
|
|
25
|
+
if (match[1] && match[1] !== null) {
|
|
26
|
+
matches.push(match[1]);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return matches;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.UserDetailsFormatValidator = UserDetailsFormatValidator;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright © 2018-2023 Kaleyra S.p.a. All Rights Reserved.
|
|
3
|
+
// See LICENSE for licensing information
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.IllegalArgumentError = void 0;
|
|
6
|
+
/**
|
|
7
|
+
* This error will be thrown when arguments given to a function are not of the expected type
|
|
8
|
+
*/
|
|
9
|
+
class IllegalArgumentError extends Error {
|
|
10
|
+
name = 'IllegalArgumentError';
|
|
11
|
+
}
|
|
12
|
+
exports.IllegalArgumentError = IllegalArgumentError;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright © 2018-2023 Kaleyra S.p.a. All Rights Reserved.
|
|
3
|
+
// See LICENSE for licensing information
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.AccessTokenResponse = void 0;
|
|
6
|
+
/**
|
|
7
|
+
* @ignore
|
|
8
|
+
*/
|
|
9
|
+
class AccessTokenResponse {
|
|
10
|
+
constructor(requestID, success, data, error) {
|
|
11
|
+
this.requestID = requestID;
|
|
12
|
+
this.success = success;
|
|
13
|
+
this.data = data;
|
|
14
|
+
this.error = error;
|
|
15
|
+
}
|
|
16
|
+
static failed(requestID, reason) {
|
|
17
|
+
return {
|
|
18
|
+
requestID,
|
|
19
|
+
success: false,
|
|
20
|
+
data: '',
|
|
21
|
+
error: reason,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
static success(requestID, token) {
|
|
25
|
+
return {
|
|
26
|
+
requestID,
|
|
27
|
+
success: true,
|
|
28
|
+
data: token,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
requestID;
|
|
32
|
+
success;
|
|
33
|
+
data;
|
|
34
|
+
error;
|
|
35
|
+
}
|
|
36
|
+
exports.AccessTokenResponse = AccessTokenResponse;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright © 2018-2023 Kaleyra S.p.a. All Rights Reserved.
|
|
3
|
+
// See LICENSE for licensing information
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.AudioCallType = void 0;
|
|
6
|
+
/**
|
|
7
|
+
* This class defines the types of audio calls supported.
|
|
8
|
+
*/
|
|
9
|
+
var AudioCallType;
|
|
10
|
+
(function (AudioCallType) {
|
|
11
|
+
/**
|
|
12
|
+
* Audio only is a call that will only use the microphone
|
|
13
|
+
*/
|
|
14
|
+
AudioCallType["AUDIO"] = "audio";
|
|
15
|
+
/**
|
|
16
|
+
* Audio Upgradable is a call a type of call that starts in audio only and may be upgraded to audio&video type
|
|
17
|
+
*/
|
|
18
|
+
AudioCallType["AUDIO_UPGRADABLE"] = "audioUpgradable";
|
|
19
|
+
})(AudioCallType = exports.AudioCallType || (exports.AudioCallType = {}));
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright © 2018-2023 Kaleyra S.p.a. All Rights Reserved.
|
|
3
|
+
// See LICENSE for licensing information
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.CallDisplayMode = void 0;
|
|
6
|
+
/**
|
|
7
|
+
* This class defines the display modes supported per call.
|
|
8
|
+
*/
|
|
9
|
+
var CallDisplayMode;
|
|
10
|
+
(function (CallDisplayMode) {
|
|
11
|
+
/**
|
|
12
|
+
* The call UI fits completely the available window.
|
|
13
|
+
*/
|
|
14
|
+
CallDisplayMode["FOREGROUND"] = "FOREGROUND";
|
|
15
|
+
/**
|
|
16
|
+
* If the device has picture in picture feature the call UI is floating on the screen's device.
|
|
17
|
+
*/
|
|
18
|
+
CallDisplayMode["FOREGROUND_PICTURE_IN_PICTURE"] = "FOREGROUND_PICTURE_IN_PICTURE";
|
|
19
|
+
/**
|
|
20
|
+
* The call UI is not visible to the user.
|
|
21
|
+
*/
|
|
22
|
+
CallDisplayMode["BACKGROUND"] = "BACKGROUND";
|
|
23
|
+
})(CallDisplayMode = exports.CallDisplayMode || (exports.CallDisplayMode = {}));
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright © 2018-2023 Kaleyra S.p.a. All Rights Reserved.
|
|
3
|
+
// See LICENSE for licensing information
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.CallType = void 0;
|
|
6
|
+
/**
|
|
7
|
+
* This class defines the types of calls supported.
|
|
8
|
+
*/
|
|
9
|
+
var CallType;
|
|
10
|
+
(function (CallType) {
|
|
11
|
+
/**
|
|
12
|
+
* Audio only is a call that will only use the microphone
|
|
13
|
+
*/
|
|
14
|
+
CallType["AUDIO"] = "audio";
|
|
15
|
+
/**
|
|
16
|
+
* Audio Upgradable is a call a type of call that starts in audio only and may be upgraded to audio&video type
|
|
17
|
+
*/
|
|
18
|
+
CallType["AUDIO_UPGRADABLE"] = "audioUpgradable";
|
|
19
|
+
/**
|
|
20
|
+
* Audio Video is a call that will use both the camera and the microphone
|
|
21
|
+
*/
|
|
22
|
+
CallType["AUDIO_VIDEO"] = "audioVideo";
|
|
23
|
+
})(CallType = exports.CallType || (exports.CallType = {}));
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright © 2018-2023 Kaleyra S.p.a. All Rights Reserved.
|
|
3
|
+
// See LICENSE for licensing information
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.RecordingType = void 0;
|
|
6
|
+
/**
|
|
7
|
+
* Recording type of the call
|
|
8
|
+
*/
|
|
9
|
+
var RecordingType;
|
|
10
|
+
(function (RecordingType) {
|
|
11
|
+
/**
|
|
12
|
+
* The call will be recorded on demand
|
|
13
|
+
*/
|
|
14
|
+
RecordingType["MANUAL"] = "manual";
|
|
15
|
+
/**
|
|
16
|
+
* The call will be recorded as soon it starts
|
|
17
|
+
*/
|
|
18
|
+
RecordingType["AUTOMATIC"] = "automatic";
|
|
19
|
+
/**
|
|
20
|
+
* The call will not be recorded
|
|
21
|
+
*/
|
|
22
|
+
RecordingType["NONE"] = "none";
|
|
23
|
+
})(RecordingType = exports.RecordingType || (exports.RecordingType = {}));
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright © 2018-2023 Kaleyra S.p.a. All Rights Reserved.
|
|
3
|
+
// See LICENSE for licensing information
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.VoipHandlingStrategy = void 0;
|
|
6
|
+
/**
|
|
7
|
+
* This class defines the voip notification strategy per call.
|
|
8
|
+
*/
|
|
9
|
+
var VoipHandlingStrategy;
|
|
10
|
+
(function (VoipHandlingStrategy) {
|
|
11
|
+
/**
|
|
12
|
+
* The voip notifications will not be handled
|
|
13
|
+
*/
|
|
14
|
+
VoipHandlingStrategy["DISABLED"] = "disabled";
|
|
15
|
+
/**
|
|
16
|
+
* The voip notifications will be handled automatically from the plugin
|
|
17
|
+
*/
|
|
18
|
+
VoipHandlingStrategy["AUTOMATIC"] = "automatic";
|
|
19
|
+
})(VoipHandlingStrategy = exports.VoipHandlingStrategy || (exports.VoipHandlingStrategy = {}));
|