#if 0 #elif defined(__arm64__) && __arm64__ // Generated by Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4) #ifndef OUICALLINGPLUGIN_SWIFT_H #define OUICALLINGPLUGIN_SWIFT_H #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wgcc-compat" #if !defined(__has_include) # define __has_include(x) 0 #endif #if !defined(__has_attribute) # define __has_attribute(x) 0 #endif #if !defined(__has_feature) # define __has_feature(x) 0 #endif #if !defined(__has_warning) # define __has_warning(x) 0 #endif #if __has_include() # include #endif #pragma clang diagnostic ignored "-Wauto-import" #if defined(__OBJC__) #include #endif #if defined(__cplusplus) #include #include #include #include #include #include #include #else #include #include #include #include #endif #if defined(__cplusplus) #if defined(__arm64e__) && __has_include() # include #else #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wreserved-macro-identifier" # ifndef __ptrauth_swift_value_witness_function_pointer # define __ptrauth_swift_value_witness_function_pointer(x) # endif # ifndef __ptrauth_swift_class_method_pointer # define __ptrauth_swift_class_method_pointer(x) # endif #pragma clang diagnostic pop #endif #endif #if !defined(SWIFT_TYPEDEFS) # define SWIFT_TYPEDEFS 1 # if __has_include() # include # elif !defined(__cplusplus) typedef uint_least16_t char16_t; typedef uint_least32_t char32_t; # endif typedef float swift_float2 __attribute__((__ext_vector_type__(2))); typedef float swift_float3 __attribute__((__ext_vector_type__(3))); typedef float swift_float4 __attribute__((__ext_vector_type__(4))); typedef double swift_double2 __attribute__((__ext_vector_type__(2))); typedef double swift_double3 __attribute__((__ext_vector_type__(3))); typedef double swift_double4 __attribute__((__ext_vector_type__(4))); typedef int swift_int2 __attribute__((__ext_vector_type__(2))); typedef int swift_int3 __attribute__((__ext_vector_type__(3))); typedef int swift_int4 __attribute__((__ext_vector_type__(4))); typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); #endif #if !defined(SWIFT_PASTE) # define SWIFT_PASTE_HELPER(x, y) x##y # define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) #endif #if !defined(SWIFT_METATYPE) # define SWIFT_METATYPE(X) Class #endif #if !defined(SWIFT_CLASS_PROPERTY) # if __has_feature(objc_class_property) # define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ # else # define SWIFT_CLASS_PROPERTY(...) # endif #endif #if !defined(SWIFT_RUNTIME_NAME) # if __has_attribute(objc_runtime_name) # define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) # else # define SWIFT_RUNTIME_NAME(X) # endif #endif #if !defined(SWIFT_COMPILE_NAME) # if __has_attribute(swift_name) # define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) # else # define SWIFT_COMPILE_NAME(X) # endif #endif #if !defined(SWIFT_METHOD_FAMILY) # if __has_attribute(objc_method_family) # define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) # else # define SWIFT_METHOD_FAMILY(X) # endif #endif #if !defined(SWIFT_NOESCAPE) # if __has_attribute(noescape) # define SWIFT_NOESCAPE __attribute__((noescape)) # else # define SWIFT_NOESCAPE # endif #endif #if !defined(SWIFT_RELEASES_ARGUMENT) # if __has_attribute(ns_consumed) # define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) # else # define SWIFT_RELEASES_ARGUMENT # endif #endif #if !defined(SWIFT_WARN_UNUSED_RESULT) # if __has_attribute(warn_unused_result) # define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) # else # define SWIFT_WARN_UNUSED_RESULT # endif #endif #if !defined(SWIFT_NORETURN) # if __has_attribute(noreturn) # define SWIFT_NORETURN __attribute__((noreturn)) # else # define SWIFT_NORETURN # endif #endif #if !defined(SWIFT_CLASS_EXTRA) # define SWIFT_CLASS_EXTRA #endif #if !defined(SWIFT_PROTOCOL_EXTRA) # define SWIFT_PROTOCOL_EXTRA #endif #if !defined(SWIFT_ENUM_EXTRA) # define SWIFT_ENUM_EXTRA #endif #if !defined(SWIFT_CLASS) # if __has_attribute(objc_subclassing_restricted) # define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA # define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA # else # define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA # define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA # endif #endif #if !defined(SWIFT_RESILIENT_CLASS) # if __has_attribute(objc_class_stub) # define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) # define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) # else # define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) # define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) # endif #endif #if !defined(SWIFT_PROTOCOL) # define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA # define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA #endif #if !defined(SWIFT_EXTENSION) # define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) #endif #if !defined(OBJC_DESIGNATED_INITIALIZER) # if __has_attribute(objc_designated_initializer) # define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) # else # define OBJC_DESIGNATED_INITIALIZER # endif #endif #if !defined(SWIFT_ENUM_ATTR) # if __has_attribute(enum_extensibility) # define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) # else # define SWIFT_ENUM_ATTR(_extensibility) # endif #endif #if !defined(SWIFT_ENUM) # define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type # if __has_feature(generalized_swift_name) # define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type # else # define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) # endif #endif #if !defined(SWIFT_UNAVAILABLE) # define SWIFT_UNAVAILABLE __attribute__((unavailable)) #endif #if !defined(SWIFT_UNAVAILABLE_MSG) # define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) #endif #if !defined(SWIFT_AVAILABILITY) # define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) #endif #if !defined(SWIFT_WEAK_IMPORT) # define SWIFT_WEAK_IMPORT __attribute__((weak_import)) #endif #if !defined(SWIFT_DEPRECATED) # define SWIFT_DEPRECATED __attribute__((deprecated)) #endif #if !defined(SWIFT_DEPRECATED_MSG) # define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) #endif #if !defined(SWIFT_DEPRECATED_OBJC) # if __has_feature(attribute_diagnose_if_objc) # define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) # else # define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) # endif #endif #if defined(__OBJC__) #if !defined(IBSegueAction) # define IBSegueAction #endif #endif #if !defined(SWIFT_EXTERN) # if defined(__cplusplus) # define SWIFT_EXTERN extern "C" # else # define SWIFT_EXTERN extern # endif #endif #if !defined(SWIFT_CALL) # define SWIFT_CALL __attribute__((swiftcall)) #endif #if !defined(SWIFT_INDIRECT_RESULT) # define SWIFT_INDIRECT_RESULT __attribute__((swift_indirect_result)) #endif #if !defined(SWIFT_CONTEXT) # define SWIFT_CONTEXT __attribute__((swift_context)) #endif #if !defined(SWIFT_ERROR_RESULT) # define SWIFT_ERROR_RESULT __attribute__((swift_error_result)) #endif #if defined(__cplusplus) # define SWIFT_NOEXCEPT noexcept #else # define SWIFT_NOEXCEPT #endif #if !defined(SWIFT_C_INLINE_THUNK) # if __has_attribute(always_inline) # if __has_attribute(nodebug) # define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline)) __attribute__((nodebug)) # else # define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline)) # endif # else # define SWIFT_C_INLINE_THUNK inline # endif #endif #if defined(_WIN32) #if !defined(SWIFT_IMPORT_STDLIB_SYMBOL) # define SWIFT_IMPORT_STDLIB_SYMBOL __declspec(dllimport) #endif #else #if !defined(SWIFT_IMPORT_STDLIB_SYMBOL) # define SWIFT_IMPORT_STDLIB_SYMBOL #endif #endif #if defined(__OBJC__) #if __has_feature(objc_modules) #if __has_warning("-Watimport-in-framework-header") #pragma clang diagnostic ignored "-Watimport-in-framework-header" #endif @import AVFoundation; @import CoreFoundation; @import CoreMedia; @import FBLPromises; @import Foundation; @import ObjectiveC; @import OpenIMCore; @import ReplayKit; @import UIKit; @import WebRTC; #endif #endif #pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" #pragma clang diagnostic ignored "-Wduplicate-method-arg" #if __has_warning("-Wpragma-clang-attribute") # pragma clang diagnostic ignored "-Wpragma-clang-attribute" #endif #pragma clang diagnostic ignored "-Wunknown-pragmas" #pragma clang diagnostic ignored "-Wnullability" #pragma clang diagnostic ignored "-Wdollar-in-identifier-extension" #if __has_attribute(external_source_symbol) # pragma push_macro("any") # undef any # pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="OUICallingPlugin",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) # pragma pop_macro("any") #endif #if defined(__OBJC__) @class NSCoder; @class UITouch; @class UIEvent; /// Lottie comes prepacked with a two Animated Controls, AnimatedSwitch and /// AnimatedButton. Both of these controls are built on top of AnimatedControl /// AnimatedControl is a subclass of UIControl that provides an interactive /// mechanism for controlling the visual state of an animation in response to /// user actions. /// The AnimatedControl will show and hide layers depending on the current /// UIControl.State of the control. /// Users of AnimationControl can set a Layer Name for each UIControl.State. /// When the state is change the AnimationControl will change the visibility /// of its layers. /// NOTE: Do not initialize directly. This is intended to be subclassed. SWIFT_CLASS("_TtC16OUICallingPlugin15AnimatedControl") @interface AnimatedControl : UIControl - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER; @property (nonatomic, getter=isEnabled) BOOL enabled; @property (nonatomic, getter=isSelected) BOOL selected; @property (nonatomic, getter=isHighlighted) BOOL highlighted; @property (nonatomic, readonly) CGSize intrinsicContentSize; - (BOOL)beginTrackingWithTouch:(UITouch * _Nonnull)touch withEvent:(UIEvent * _Nullable)event SWIFT_WARN_UNUSED_RESULT; - (BOOL)continueTrackingWithTouch:(UITouch * _Nonnull)touch withEvent:(UIEvent * _Nullable)event SWIFT_WARN_UNUSED_RESULT; - (void)endTrackingWithTouch:(UITouch * _Nullable)touch withEvent:(UIEvent * _Nullable)event; - (void)cancelTrackingWithEvent:(UIEvent * _Nullable)event; - (nonnull instancetype)initWithFrame:(CGRect)frame SWIFT_UNAVAILABLE; @end /// An interactive button that plays an animation when pressed. SWIFT_CLASS("_TtC16OUICallingPlugin14AnimatedButton") @interface AnimatedButton : AnimatedControl - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER; - (BOOL)beginTrackingWithTouch:(UITouch * _Nonnull)touch withEvent:(UIEvent * _Nullable)event SWIFT_WARN_UNUSED_RESULT; - (void)endTrackingWithTouch:(UITouch * _Nullable)touch withEvent:(UIEvent * _Nullable)event; @property (nonatomic) UIAccessibilityTraits accessibilityTraits; @end @class UIImage; @class CALayer; /// Represents a subclass of UIImageView for displaying animated image. /// Different from showing animated image in a normal UIImageView (which load all frames at one time), /// AnimatedImageView only tries to load several frames (defined by framePreloadCount) to reduce memory usage. /// It provides a tradeoff between memory usage and CPU time. If you have a memory issue when using a normal image /// view to load GIF data, you could give this class a try. /// Kingfisher supports setting GIF animated data to either UIImageView and AnimatedImageView out of box. So /// it would be fairly easy to switch between them. SWIFT_CLASS("_TtC16OUICallingPlugin17AnimatedImageView") @interface AnimatedImageView : UIImageView @property (nonatomic, strong) UIImage * _Nullable image; @property (nonatomic, getter=isHighlighted) BOOL highlighted; @property (nonatomic, readonly, getter=isAnimating) BOOL animating; /// Starts the animation. - (void)startAnimating; /// Stops the animation. - (void)stopAnimating; - (void)displayLayer:(CALayer * _Nonnull)layer; - (void)didMoveToWindow; - (void)didMoveToSuperview; - (nonnull instancetype)initWithImage:(UIImage * _Nullable)image OBJC_DESIGNATED_INITIALIZER; - (nonnull instancetype)initWithImage:(UIImage * _Nullable)image highlightedImage:(UIImage * _Nullable)highlightedImage OBJC_DESIGNATED_INITIALIZER SWIFT_AVAILABILITY(ios,introduced=3.0); - (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER; - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER; @end /// An interactive switch with an ‘On’ and ‘Off’ state. When the user taps on the /// switch the state is toggled and the appropriate animation is played. /// Both the ‘On’ and ‘Off’ have an animation play range associated with their state. SWIFT_CLASS("_TtC16OUICallingPlugin14AnimatedSwitch") @interface AnimatedSwitch : AnimatedControl - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER; - (void)endTrackingWithTouch:(UITouch * _Nullable)touch withEvent:(UIEvent * _Nullable)event; @property (nonatomic) UIAccessibilityTraits accessibilityTraits; @end /// A view that can be added to a keypath of an AnimationView SWIFT_CLASS("_TtC16OUICallingPlugin16AnimationSubview") @interface AnimationSubview : UIView - (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER; - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER; @end SWIFT_PROTOCOL("_TtP16OUICallingPlugin14CaptureOptions_") @protocol CaptureOptions @end SWIFT_CLASS("_TtC16OUICallingPlugin19AudioCaptureOptions") @interface AudioCaptureOptions : NSObject @property (nonatomic, readonly) BOOL echoCancellation; @property (nonatomic, readonly) BOOL noiseSuppression; @property (nonatomic, readonly) BOOL autoGainControl; @property (nonatomic, readonly) BOOL typingNoiseDetection; @property (nonatomic, readonly) BOOL highpassFilter; @property (nonatomic, readonly) BOOL experimentalNoiseSuppression; @property (nonatomic, readonly) BOOL experimentalAutoGainControl; - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; @property (nonatomic, readonly) NSUInteger hash; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end SWIFT_PROTOCOL("_TtP16OUICallingPlugin13MediaEncoding_") @protocol MediaEncoding @property (nonatomic, readonly) NSInteger maxBitrate; @end SWIFT_CLASS("_TtC16OUICallingPlugin13AudioEncoding") @interface AudioEncoding : NSObject @property (nonatomic) NSInteger maxBitrate; - (nonnull instancetype)initWithMaxBitrate:(NSInteger)maxBitrate OBJC_DESIGNATED_INITIALIZER; - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; @property (nonatomic, readonly) NSUInteger hash; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end @interface AudioEncoding (SWIFT_EXTENSION(OUICallingPlugin)) SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AudioEncoding * _Nonnull presetTelephone;) + (AudioEncoding * _Nonnull)presetTelephone SWIFT_WARN_UNUSED_RESULT; SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AudioEncoding * _Nonnull presetSpeech;) + (AudioEncoding * _Nonnull)presetSpeech SWIFT_WARN_UNUSED_RESULT; SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AudioEncoding * _Nonnull presetMusic;) + (AudioEncoding * _Nonnull)presetMusic SWIFT_WARN_UNUSED_RESULT; SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AudioEncoding * _Nonnull presetMusicStereo;) + (AudioEncoding * _Nonnull)presetMusicStereo SWIFT_WARN_UNUSED_RESULT; SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AudioEncoding * _Nonnull presetMusicHighQuality;) + (AudioEncoding * _Nonnull)presetMusicHighQuality SWIFT_WARN_UNUSED_RESULT; SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AudioEncoding * _Nonnull presetMusicHighQualityStereo;) + (AudioEncoding * _Nonnull)presetMusicHighQualityStereo SWIFT_WARN_UNUSED_RESULT; @end SWIFT_CLASS("_TtC16OUICallingPlugin10Statistics") @interface Statistics : NSObject - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end SWIFT_CLASS("_TtC16OUICallingPlugin22AudioPlayoutStatistics") @interface AudioPlayoutStatistics : Statistics @end @class NSString; SWIFT_PROTOCOL("_TtP16OUICallingPlugin14PublishOptions_") @protocol PublishOptions @property (nonatomic, readonly, copy) NSString * _Nullable name; @end SWIFT_CLASS("_TtC16OUICallingPlugin19AudioPublishOptions") @interface AudioPublishOptions : NSObject @property (nonatomic, readonly, copy) NSString * _Nullable name; /// preferred encoding parameters @property (nonatomic, readonly, strong) AudioEncoding * _Nullable encoding; @property (nonatomic, readonly) BOOL dtx; - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; @property (nonatomic, readonly) NSUInteger hash; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end SWIFT_CLASS("_TtC16OUICallingPlugin21MediaSourceStatistics") @interface MediaSourceStatistics : Statistics @end SWIFT_CLASS("_TtC16OUICallingPlugin21AudioSourceStatistics") @interface AudioSourceStatistics : MediaSourceStatistics @end SWIFT_PROTOCOL("_TtP16OUICallingPlugin10AudioTrack_") @protocol AudioTrack @end SWIFT_CLASS("_TtC16OUICallingPlugin10AvatarView") @interface AvatarView : UIView - (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER; - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE; @end @class Dimensions; SWIFT_PROTOCOL("_TtP16OUICallingPlugin19VideoCaptureOptions_") @protocol VideoCaptureOptions @property (nonatomic, readonly, strong) Dimensions * _Nonnull dimensions; @property (nonatomic, readonly) NSInteger fps; @end SWIFT_CLASS("_TtC16OUICallingPlugin20BufferCaptureOptions") @interface BufferCaptureOptions : NSObject @property (nonatomic, readonly, strong) Dimensions * _Nonnull dimensions; @property (nonatomic, readonly) NSInteger fps; - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; @property (nonatomic, readonly) NSUInteger hash; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end SWIFT_CLASS("_TtC16OUICallingPlugin13VideoCapturer") @interface VideoCapturer : NSObject - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end typedef SWIFT_ENUM(NSInteger, CapturerState, open) { CapturerStateStopped = 0, CapturerStateStarted = 1, }; /// A VideoCapturer that can capture CMSampleBuffers. /// Repeatedly call capture(_:) to capture a stream of CMSampleBuffers. /// The pixel format must be one of VideoCapturer/supportedPixelFormats. If an unsupported pixel format is used, the SDK will skip the capture. /// BufferCapturer can be used to provide video buffers from ReplayKit. ///
/// Note: At least one frame must be captured before publishing the track or the publish will timeout, /// since dimensions must be resolved at the time of publishing (to compute video parameters). /// ///
SWIFT_CLASS("_TtC16OUICallingPlugin14BufferCapturer") @interface BufferCapturer : VideoCapturer @end SWIFT_CLASS("_TtC16OUICallingPlugin15CallbackHandler") @interface CallbackHandler : NSObject - (void)onSuccess:(NSString * _Nullable)data; - (void)onError:(int32_t)errCode errMsg:(NSString * _Nullable)errMsg; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end @class CallingUserInfo; @class NSBundle; SWIFT_CLASS("_TtC16OUICallingPlugin21CallingBaseController") @interface CallingBaseController : UIViewController /// 接收按钮 @property (nonatomic, copy) void (^ _Nullable onAccepted)(void); /// 拒绝按钮 @property (nonatomic, copy) void (^ _Nullable onRejected)(void); /// 取消按钮 @property (nonatomic, copy) void (^ _Nullable onCancel)(void); /// 挂断按钮 @property (nonatomic, copy) void (^ _Nullable onHungup)(NSInteger); /// 有成员离开 @property (nonatomic, copy) void (^ _Nullable onBeHungup)(NSInteger); /// 邀请按钮 @property (nonatomic, copy) void (^ _Nullable onInvitedOthers)(void); /// 链接失败 @property (nonatomic, copy) void (^ _Nullable onConnectFailure)(void); /// 断开链接 @property (nonatomic, copy) void (^ _Nullable onDisconnect)(void); /// @param isVideo 是否是音视频 /// @param inviter 邀请者 /// @param others 其它人 - (void)startLiveChatWithInviter:(NSArray * _Nonnull (^ _Nonnull)(void))inviter others:(NSArray * _Nonnull (^ _Nonnull)(void))others isVideo:(BOOL)isVideo groupID:(NSString * _Nullable)groupID; /// 链接房间 - (void)connectRoomWithLiveURL:(NSString * _Nonnull)liveURL token:(NSString * _Nonnull)token; /// 挂断、拒绝等关闭界面 - (void)dismiss; - (nonnull instancetype)initWithNibName:(NSString * _Nullable)nibNameOrNil bundle:(NSBundle * _Nullable)nibBundleOrNil OBJC_DESIGNATED_INITIALIZER; - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER; @end SWIFT_CLASS("_TtC16OUICallingPlugin25CallingBaseViewController") @interface CallingBaseViewController : CallingBaseController /// 链接房间 - (void)connectRoomWithLiveURL:(NSString * _Nonnull)liveURL token:(NSString * _Nonnull)token; /// 挂断、拒绝等关闭界面 - (void)dismiss; - (void)viewDidLoad; - (nonnull instancetype)initWithNibName:(NSString * _Nullable)nibNameOrNil bundle:(NSBundle * _Nullable)nibBundleOrNil OBJC_DESIGNATED_INITIALIZER; - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER; @end SWIFT_CLASS("_TtC16OUICallingPlugin14CallingManager") @interface CallingManager : NSObject SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) CallingManager * _Nonnull manager;) + (CallingManager * _Nonnull)manager SWIFT_WARN_UNUSED_RESULT; - (void)startWithOnEndCallingHandler:(void (^ _Nullable)(NSDictionary * _Nonnull))endCallingHandler; - (void)forceDismiss; - (void)startLiveChat:(NSDictionary * _Nonnull)signingInfo; - (void)startLiveChatWithInviterID:(NSString * _Nonnull)inviterID othersID:(NSArray * _Nonnull)othersID isVideo:(BOOL)isVideo groupID:(NSString * _Nullable)groupID incoming:(BOOL)incoming; - (void)startLiveChatWithInviter:(CallingUserInfo * _Nonnull)inviter others:(NSArray * _Nonnull)others isVideo:(BOOL)isVideo groupID:(NSString * _Nullable)groupID incoming:(BOOL)incoming; - (void)joinRoomWithSignalingInfo:(NSDictionary * _Nonnull)signalingInfo; - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; @end @interface CallingManager (SWIFT_EXTENSION(OUICallingPlugin)) - (void)onReceiveCustomSignal:(NSString * _Nullable)CustomSignalCallback; - (void)onStreamChange:(NSString * _Nullable)s; - (void)onReceiveNewInvitation:(NSString * _Nullable)s; - (void)onRoomParticipantConnected:(NSString * _Nullable)connectedInfo; - (void)onRoomParticipantDisconnected:(NSString * _Nullable)disconnectedInfo; - (void)onInviteeAcceptedByOtherDevice:(NSString * _Nullable)s; - (void)onInviteeRejectedByOtherDevice:(NSString * _Nullable)s; - (void)onInviteeAccepted:(NSString * _Nullable)s; - (void)onInviteeRejected:(NSString * _Nullable)s; - (void)onInvitationCancelled:(NSString * _Nullable)s; - (void)onInvitationTimeout:(NSString * _Nullable)s; - (void)onHangUp:(NSString * _Nullable)s; @end SWIFT_CLASS("_TtC16OUICallingPlugin25CallingReceiverController") @interface CallingReceiverController : CallingBaseController /// 链接房间 - (void)connectRoomWithLiveURL:(NSString * _Nonnull)liveURL token:(NSString * _Nonnull)token; /// 挂断、拒绝等关闭界面 - (void)dismiss; /// @param isVideo 是否是音视频 /// @param inviter 邀请者 /// @param others 其它人 - (void)startLiveChatWithInviter:(NSArray * _Nonnull (^ _Nonnull)(void))inviter others:(NSArray * _Nonnull (^ _Nonnull)(void))others isVideo:(BOOL)isVideo groupID:(NSString * _Nullable)groupID; - (void)joinRoomWithIsVideo:(BOOL)isVideo roomID:(NSString * _Nonnull)roomID liveURL:(NSString * _Nonnull)liveURL token:(NSString * _Nonnull)token; - (nonnull instancetype)initWithNibName:(NSString * _Nullable)nibNameOrNil bundle:(NSBundle * _Nullable)nibBundleOrNil OBJC_DESIGNATED_INITIALIZER; - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER; @end SWIFT_CLASS("_TtC16OUICallingPlugin23CallingSenderController") @interface CallingSenderController : CallingBaseController /// 链接房间 - (void)connectRoomWithLiveURL:(NSString * _Nonnull)liveURL token:(NSString * _Nonnull)token; /// 挂断、拒绝等关闭界面 - (void)dismiss; /// @param isVideo 是否是音视频 /// @param inviter 邀请者 /// @param others 其它人 - (void)startLiveChatWithInviter:(NSArray * _Nonnull (^ _Nonnull)(void))inviter others:(NSArray * _Nonnull (^ _Nonnull)(void))others isVideo:(BOOL)isVideo groupID:(NSString * _Nullable)groupID; - (nonnull instancetype)initWithNibName:(NSString * _Nullable)nibNameOrNil bundle:(NSBundle * _Nullable)nibBundleOrNil OBJC_DESIGNATED_INITIALIZER; - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER; @end SWIFT_CLASS("_TtC16OUICallingPlugin15CallingUserInfo") @interface CallingUserInfo : NSObject - (nonnull instancetype)initWithUserID:(NSString * _Nullable)userID nickname:(NSString * _Nullable)nickname faceURL:(NSString * _Nullable)faceURL ex:(NSString * _Nullable)ex OBJC_DESIGNATED_INITIALIZER; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end @class AVCaptureDeviceFormat; SWIFT_CLASS("_TtC16OUICallingPlugin20CameraCaptureOptions") @interface CameraCaptureOptions : NSObject @property (nonatomic, readonly) enum AVCaptureDevicePosition position; @property (nonatomic, readonly, strong) AVCaptureDeviceFormat * _Nullable preferredFormat; /// preferred dimensions for capturing, the SDK may override with a recommended value. @property (nonatomic, readonly, strong) Dimensions * _Nonnull dimensions; /// preferred fps to use for capturing, the SDK may override with a recommended value. @property (nonatomic, readonly) NSInteger fps; - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; - (nonnull instancetype)initWithPosition:(enum AVCaptureDevicePosition)position preferredFormat:(AVCaptureDeviceFormat * _Nullable)preferredFormat dimensions:(Dimensions * _Nonnull)dimensions fps:(NSInteger)fps OBJC_DESIGNATED_INITIALIZER; - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; @property (nonatomic, readonly) NSUInteger hash; @end @class AVCaptureDevice; SWIFT_CLASS("_TtC16OUICallingPlugin14CameraCapturer") @interface CameraCapturer : VideoCapturer + (NSArray * _Nonnull)captureDevices SWIFT_WARN_UNUSED_RESULT; /// Checks whether both front and back capturing devices exist, and can be switched. + (BOOL)canSwitchPosition SWIFT_WARN_UNUSED_RESULT; /// Current device used for capturing @property (nonatomic, readonly, strong) AVCaptureDevice * _Nullable device; @property (nonatomic, strong) CameraCaptureOptions * _Nonnull options; @end @class RTCVideoCapturer; @class RTCVideoFrame; @interface CameraCapturer (SWIFT_EXTENSION(OUICallingPlugin)) - (void)capturer:(RTCVideoCapturer * _Nonnull)capturer didCaptureVideoFrame:(RTCVideoFrame * _Nonnull)frame; @end @class NSNumber; @interface CameraCapturer (SWIFT_EXTENSION(OUICallingPlugin)) - (FBLPromise * _Nonnull)switchCameraPosition; - (FBLPromise * _Nonnull)setCameraPosition:(enum AVCaptureDevicePosition)position; @end SWIFT_CLASS("_TtC16OUICallingPlugin21CertificateStatistics") @interface CertificateStatistics : Statistics @end SWIFT_CLASS("_TtC16OUICallingPlugin15CodecStatistics") @interface CodecStatistics : Statistics @end /// An Objective-C compatible wrapper around Lottie’s Animation class. /// Use in tandem with CompatibleAnimationView when using Lottie in Objective-C SWIFT_CLASS("_TtC16OUICallingPlugin19CompatibleAnimation") @interface CompatibleAnimation : NSObject - (nonnull instancetype)initWithName:(NSString * _Nonnull)name bundle:(NSBundle * _Nonnull)bundle OBJC_DESIGNATED_INITIALIZER; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end /// An Objective-C compatible wrapper around Lottie’s AnimationKeypath SWIFT_CLASS("_TtC16OUICallingPlugin26CompatibleAnimationKeypath") @interface CompatibleAnimationKeypath : NSObject /// Creates a keypath from a dot separated string. The string is separated by “.” - (nonnull instancetype)initWithKeypath:(NSString * _Nonnull)keypath OBJC_DESIGNATED_INITIALIZER; /// Creates a keypath from a list of strings. - (nonnull instancetype)initWithKeys:(NSArray * _Nonnull)keys OBJC_DESIGNATED_INITIALIZER; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end @class UIColor; /// An Objective-C compatible wrapper around Lottie’s LottieAnimationView. SWIFT_CLASS("_TtC16OUICallingPlugin23CompatibleAnimationView") @interface CompatibleAnimationView : UIView - (nonnull instancetype)initWithCompatibleAnimation:(CompatibleAnimation * _Nonnull)compatibleAnimation OBJC_DESIGNATED_INITIALIZER; - (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER; - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)_ SWIFT_UNAVAILABLE; @property (nonatomic, strong) CompatibleAnimation * _Nullable compatibleAnimation; @property (nonatomic) CGFloat loopAnimationCount; @property (nonatomic) UIViewContentMode contentMode; @property (nonatomic) BOOL shouldRasterizeWhenIdle; @property (nonatomic) CGFloat currentProgress; @property (nonatomic) NSTimeInterval currentTime; @property (nonatomic) CGFloat currentFrame; @property (nonatomic, readonly) CGFloat realtimeAnimationFrame; @property (nonatomic, readonly) CGFloat realtimeAnimationProgress; @property (nonatomic) CGFloat animationSpeed; @property (nonatomic) BOOL respectAnimationFrameRate; @property (nonatomic, readonly) BOOL isAnimationPlaying; - (void)play; - (void)playWithCompletion:(void (^ _Nullable)(BOOL))completion; - (void)playFromProgress:(CGFloat)fromProgress toProgress:(CGFloat)toProgress completion:(void (^ _Nullable)(BOOL))completion; - (void)playFromFrame:(CGFloat)fromFrame toFrame:(CGFloat)toFrame completion:(void (^ _Nullable)(BOOL))completion; - (void)playFromMarker:(NSString * _Nonnull)fromMarker toMarker:(NSString * _Nonnull)toMarker completion:(void (^ _Nullable)(BOOL))completion; - (void)playWithMarker:(NSString * _Nonnull)marker completion:(void (^ _Nullable)(BOOL))completion; - (void)stop; - (void)pause; - (void)reloadImages; - (void)forceDisplayUpdate; - (id _Nullable)getValueFor:(CompatibleAnimationKeypath * _Nonnull)keypath atFrame:(CGFloat)atFrame SWIFT_WARN_UNUSED_RESULT; - (void)logHierarchyKeypaths; - (void)setColorValue:(UIColor * _Nonnull)color forKeypath:(CompatibleAnimationKeypath * _Nonnull)keypath; - (UIColor * _Nullable)getColorValueFor:(CompatibleAnimationKeypath * _Nonnull)keypath atFrame:(CGFloat)atFrame SWIFT_WARN_UNUSED_RESULT; - (void)addSubview:(AnimationSubview * _Nonnull)subview forLayerAt:(CompatibleAnimationKeypath * _Nonnull)keypath; - (CGRect)convertWithRect:(CGRect)rect toLayerAt:(CompatibleAnimationKeypath * _Nullable)keypath SWIFT_WARN_UNUSED_RESULT; - (CGPoint)convertWithPoint:(CGPoint)point toLayerAt:(CompatibleAnimationKeypath * _Nullable)keypath SWIFT_WARN_UNUSED_RESULT; - (CGFloat)progressTimeForMarker:(NSString * _Nonnull)named SWIFT_WARN_UNUSED_RESULT; - (CGFloat)frameTimeForMarker:(NSString * _Nonnull)named SWIFT_WARN_UNUSED_RESULT; - (CGFloat)durationFrameTimeForMarker:(NSString * _Nonnull)named SWIFT_WARN_UNUSED_RESULT; @end @class RTCConfiguration; enum ProtocolVersion : NSInteger; /// Options used when establishing a connection. SWIFT_CLASS("_TtC16OUICallingPlugin14ConnectOptions") @interface ConnectOptions : NSObject /// Automatically subscribe to RemoteParticipant’s tracks. /// Defaults to true. @property (nonatomic, readonly) BOOL autoSubscribe; @property (nonatomic, readonly, strong) RTCConfiguration * _Nonnull rtcConfiguration; /// Providing a string will make the connection publish-only, suitable for iOS Broadcast Upload Extensions. /// The string can be used to identify the publisher. @property (nonatomic, readonly, copy) NSString * _Nullable publishOnlyMode; /// LiveKit server protocol version to use. Generally, it’s not recommended to change this. @property (nonatomic, readonly) enum ProtocolVersion protocolVersion; /// The number of attempts to reconnect when the network disconnects. @property (nonatomic, readonly) NSInteger reconnectAttempts; /// The delay between reconnect attempts. @property (nonatomic, readonly) NSTimeInterval reconnectAttemptDelay; - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; - (nonnull instancetype)initWithAutoSubscribe:(BOOL)autoSubscribe rtcConfiguration:(RTCConfiguration * _Nullable)rtcConfiguration publishOnlyMode:(NSString * _Nullable)publishOnlyMode reconnectAttempts:(NSInteger)reconnectAttempts reconnectAttemptDelay:(NSTimeInterval)reconnectAttemptDelay protocolVersion:(enum ProtocolVersion)protocolVersion OBJC_DESIGNATED_INITIALIZER; - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; @property (nonatomic, readonly) NSUInteger hash; @end typedef SWIFT_ENUM(NSInteger, ConnectionQuality, open) { ConnectionQualityUnknown = 0, ConnectionQualityPoor = 1, ConnectionQualityGood = 2, ConnectionQualityExcellent = 3, }; typedef SWIFT_ENUM_NAMED(NSInteger, ConnectionState, "ConnectionStateObjC", open) { ConnectionStateDisconnected = 0, ConnectionStateConnecting = 1, ConnectionStateReconnecting = 2, ConnectionStateConnected = 3, }; SWIFT_CLASS("_TtC16OUICallingPlugin21DataChannelStatistics") @interface DataChannelStatistics : Statistics @end SWIFT_CLASS("_TtC16OUICallingPlugin18DataPublishOptions") @interface DataPublishOptions : NSObject @property (nonatomic, readonly, copy) NSString * _Nullable name; @property (nonatomic, readonly, copy) NSArray * _Nonnull destinations; @property (nonatomic, readonly, copy) NSString * _Nullable topic; - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; @property (nonatomic, readonly) NSUInteger hash; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end SWIFT_CLASS("_TtC16OUICallingPlugin10Dimensions") @interface Dimensions : NSObject @property (nonatomic, readonly) int32_t width; @property (nonatomic, readonly) int32_t height; - (nonnull instancetype)initWithWidth:(int32_t)width height:(int32_t)height OBJC_DESIGNATED_INITIALIZER; - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; @property (nonatomic, readonly) NSUInteger hash; @property (nonatomic, readonly, copy) NSString * _Nonnull description; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end @interface Dimensions (SWIFT_EXTENSION(OUICallingPlugin)) SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) Dimensions * _Nonnull h90_169;) + (Dimensions * _Nonnull)h90_169 SWIFT_WARN_UNUSED_RESULT; SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) Dimensions * _Nonnull h180_169;) + (Dimensions * _Nonnull)h180_169 SWIFT_WARN_UNUSED_RESULT; SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) Dimensions * _Nonnull h216_169;) + (Dimensions * _Nonnull)h216_169 SWIFT_WARN_UNUSED_RESULT; SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) Dimensions * _Nonnull h360_169;) + (Dimensions * _Nonnull)h360_169 SWIFT_WARN_UNUSED_RESULT; SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) Dimensions * _Nonnull h540_169;) + (Dimensions * _Nonnull)h540_169 SWIFT_WARN_UNUSED_RESULT; SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) Dimensions * _Nonnull h720_169;) + (Dimensions * _Nonnull)h720_169 SWIFT_WARN_UNUSED_RESULT; SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) Dimensions * _Nonnull h1080_169;) + (Dimensions * _Nonnull)h1080_169 SWIFT_WARN_UNUSED_RESULT; SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) Dimensions * _Nonnull h1440_169;) + (Dimensions * _Nonnull)h1440_169 SWIFT_WARN_UNUSED_RESULT; SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) Dimensions * _Nonnull h2160_169;) + (Dimensions * _Nonnull)h2160_169 SWIFT_WARN_UNUSED_RESULT; SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) Dimensions * _Nonnull h120_43;) + (Dimensions * _Nonnull)h120_43 SWIFT_WARN_UNUSED_RESULT; SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) Dimensions * _Nonnull h180_43;) + (Dimensions * _Nonnull)h180_43 SWIFT_WARN_UNUSED_RESULT; SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) Dimensions * _Nonnull h240_43;) + (Dimensions * _Nonnull)h240_43 SWIFT_WARN_UNUSED_RESULT; SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) Dimensions * _Nonnull h360_43;) + (Dimensions * _Nonnull)h360_43 SWIFT_WARN_UNUSED_RESULT; SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) Dimensions * _Nonnull h480_43;) + (Dimensions * _Nonnull)h480_43 SWIFT_WARN_UNUSED_RESULT; SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) Dimensions * _Nonnull h540_43;) + (Dimensions * _Nonnull)h540_43 SWIFT_WARN_UNUSED_RESULT; SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) Dimensions * _Nonnull h720_43;) + (Dimensions * _Nonnull)h720_43 SWIFT_WARN_UNUSED_RESULT; SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) Dimensions * _Nonnull h1080_43;) + (Dimensions * _Nonnull)h1080_43 SWIFT_WARN_UNUSED_RESULT; SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) Dimensions * _Nonnull h1440_43;) + (Dimensions * _Nonnull)h1440_43 SWIFT_WARN_UNUSED_RESULT; @end SWIFT_CLASS("_TtC16OUICallingPlugin11E2EEManager") @interface E2EEManager : NSObject - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end @class RTCFrameCryptor; @interface E2EEManager (SWIFT_EXTENSION(OUICallingPlugin)) - (void)frameCryptor:(RTCFrameCryptor * _Nonnull)frameCryptor didStateChangeWithParticipantId:(NSString * _Nonnull)participantId withState:(FrameCryptionState)e2eeState; @end @class Room; @class RemoteParticipant; @class Participant; @class TrackPublication; @class ParticipantPermissions; @class RemoteTrackPublication; enum StreamState : NSInteger; @class Track; @class NSData; @class LocalParticipant; @class LocalTrackPublication; enum E2EEState : NSInteger; /// RoomDelegate receives room events as well as Participant events. ///
/// Important: The thread which the delegate will be called on, is not guranteed to be the main thread. /// If you will perform any UI update from the delegate, ensure the execution is from the main thread. /// ///
///

Example usage

/// \code /// func room(_ room: Room, localParticipant: LocalParticipant, didPublish publication: LocalTrackPublication) { /// DispatchQueue.main.async { /// // update UI here /// self.localVideoView.isHidden = false /// } /// } /// /// \endcodeSee the source code of Swift Example App for more examples. SWIFT_PROTOCOL("_TtP16OUICallingPlugin16RoomDelegateObjC_") @protocol RoomDelegateObjC @optional - (void)room:(Room * _Nonnull)room didUpdateConnectionState:(enum ConnectionState)connectionState oldConnectionState:(enum ConnectionState)oldConnectionState; /// Successfully connected to the room. - (void)room:(Room * _Nonnull)room didConnectIsReconnect:(BOOL)isReconnect; /// Could not connect to the room. - (void)room:(Room * _Nonnull)room didFailToConnectWithError:(NSError * _Nonnull)error; /// Client disconnected from the room unexpectedly. /// Using room(_:didUpdate:oldValue:) is preferred since .disconnected state of ConnectionState provides DisconnectReason (Swift only). - (void)room:(Room * _Nonnull)room didDisconnectWithError:(NSError * _Nullable)error; /// When a RemoteParticipant joins after the LocalParticipant. /// It will not emit events for participants that are already in the room. - (void)room:(Room * _Nonnull)room participantDidJoin:(RemoteParticipant * _Nonnull)participant; /// When a RemoteParticipant leaves after the LocalParticipant has joined. - (void)room:(Room * _Nonnull)room participantDidLeave:(RemoteParticipant * _Nonnull)participant; /// Active speakers changed. /// List of speakers are ordered by their Participant/audioLevel, loudest speakers first. /// This will include the LocalParticipant too. - (void)room:(Room * _Nonnull)room didUpdateSpeakers:(NSArray * _Nonnull)speakers; /// Room’s metadata has been updated. - (void)room:(Room * _Nonnull)room didUpdateMetadata:(NSString * _Nullable)metadata; /// Room’s recording state has been updated. - (void)room:(Room * _Nonnull)room didUpdateIsRecording:(BOOL)isRecording; /// Same with ParticipantDelegate/participant(_:didUpdate:)-46iut. - (void)room:(Room * _Nonnull)room participant:(Participant * _Nonnull)participant didUpdateMetadata:(NSString * _Nullable)metadata; /// Same with ParticipantDelegate/participant(_:didUpdateName:). - (void)room:(Room * _Nonnull)room participant:(Participant * _Nonnull)participant didUpdateName:(NSString * _Nonnull)didUpdateName; /// Same with ParticipantDelegate/participant(_:didUpdate:)-7zxk1. - (void)room:(Room * _Nonnull)room participant:(Participant * _Nonnull)participant didUpdateConnectionQuality:(enum ConnectionQuality)connectionQuality; /// Same with ParticipantDelegate/participant(_:didUpdate:)-84m89. - (void)room:(Room * _Nonnull)room participant:(Participant * _Nonnull)participant publication:(TrackPublication * _Nonnull)publication didUpdateMuted:(BOOL)muted; - (void)room:(Room * _Nonnull)room participant:(Participant * _Nonnull)participant didUpdatePermissions:(ParticipantPermissions * _Nonnull)permissions; /// Same with ParticipantDelegate/participant(_:didUpdate:streamState:)-1lu8t. - (void)room:(Room * _Nonnull)room participant:(RemoteParticipant * _Nonnull)participant publication:(RemoteTrackPublication * _Nonnull)publication didUpdateStreamState:(enum StreamState)streamState; /// Same with ParticipantDelegate/participant(_:didPublish:)-60en3. - (void)room:(Room * _Nonnull)room participant:(RemoteParticipant * _Nonnull)participant didPublishPublication:(RemoteTrackPublication * _Nonnull)publication; /// Same with ParticipantDelegate/participant(_:didUnpublish:)-3bkga. - (void)room:(Room * _Nonnull)room participant:(RemoteParticipant * _Nonnull)participant didUnpublishPublication:(RemoteTrackPublication * _Nonnull)publication; /// Same with ParticipantDelegate/participant(_:didSubscribe:track:)-7mngl. - (void)room:(Room * _Nonnull)room participant:(RemoteParticipant * _Nonnull)participant didSubscribePublication:(RemoteTrackPublication * _Nonnull)publication track:(Track * _Nonnull)track; /// Same with ParticipantDelegate/participant(_:didFailToSubscribe:error:)-10pn4. - (void)room:(Room * _Nonnull)room participant:(RemoteParticipant * _Nonnull)participant didFailToSubscribe:(NSString * _Nonnull)trackSid error:(NSError * _Nonnull)error; /// Same with ParticipantDelegate/participant(_:didUnsubscribe:track:)-3ksvp. - (void)room:(Room * _Nonnull)room publication:(RemoteParticipant * _Nonnull)participant didUnsubscribePublication:(RemoteTrackPublication * _Nonnull)publication track:(Track * _Nonnull)track; /// Same with ParticipantDelegate/participant(_:didReceive:)-2t55a /// participant could be nil if data was sent by server api. /// Deprecated, use room(_:participant:didReceiveData:topic:) instead. - (void)room:(Room * _Nonnull)room participant:(RemoteParticipant * _Nullable)participant didReceiveData:(NSData * _Nonnull)data SWIFT_DEPRECATED_MSG("", "room:participant:didReceiveData:topic:"); - (void)room:(Room * _Nonnull)room participant:(RemoteParticipant * _Nullable)participant didReceiveData:(NSData * _Nonnull)data topic:(NSString * _Nonnull)topic; /// Same with ParticipantDelegate/localParticipant(_:didPublish:)-90j2m. - (void)room:(Room * _Nonnull)room localParticipant:(LocalParticipant * _Nonnull)localParticipant didPublishPublication:(LocalTrackPublication * _Nonnull)publication; /// Same with ParticipantDelegate/participant(_:didUnpublish:)-3bkga. - (void)room:(Room * _Nonnull)room localParticipant:(LocalParticipant * _Nonnull)localParticipant didUnpublishPublication:(LocalTrackPublication * _Nonnull)publication; /// Same with ParticipantDelegate/participant(_:didUpdate:permission:). - (void)room:(Room * _Nonnull)room participant:(RemoteParticipant * _Nonnull)participant didUpdate:(RemoteTrackPublication * _Nonnull)publication permission:(BOOL)allowed; /// Room’e2ee state has been updated. - (void)room:(Room * _Nonnull)room publication:(TrackPublication * _Nonnull)publication didUpdateE2EEState:(enum E2EEState)didUpdateE2EEState; @end @interface E2EEManager (SWIFT_EXTENSION(OUICallingPlugin)) - (void)room:(Room * _Nonnull)room localParticipant:(LocalParticipant * _Nonnull)localParticipant didPublishPublication:(LocalTrackPublication * _Nonnull)publication; - (void)room:(Room * _Nonnull)room localParticipant:(LocalParticipant * _Nonnull)localParticipant didUnpublishPublication:(LocalTrackPublication * _Nonnull)publication; - (void)room:(Room * _Nonnull)room participant:(RemoteParticipant * _Nonnull)participant didSubscribePublication:(RemoteTrackPublication * _Nonnull)publication track:(Track * _Nonnull)track; - (void)room:(Room * _Nonnull)room publication:(RemoteParticipant * _Nonnull)participant didUnsubscribePublication:(RemoteTrackPublication * _Nonnull)publication track:(Track * _Nonnull)track; @end typedef SWIFT_ENUM(NSInteger, E2EEState, open) { E2EEStateNew = 0, E2EEStateOk = 1, E2EEStateKey_ratcheted = 2, E2EEStateMissing_key = 3, E2EEStateEncryption_failed = 4, E2EEStateDecryption_failed = 5, E2EEStateInternal_error = 6, }; typedef SWIFT_ENUM(NSInteger, EncryptionType, open) { EncryptionTypeNone = 0, EncryptionTypeGcm = 1, EncryptionTypeCustom = 2, }; SWIFT_CLASS("_TtC16OUICallingPlugin26IceCandidatePairStatistics") @interface IceCandidatePairStatistics : Statistics @end SWIFT_CLASS("_TtC16OUICallingPlugin22IceCandidateStatistics") @interface IceCandidateStatistics : Statistics @end SWIFT_CLASS("_TtC16OUICallingPlugin19InAppScreenCapturer") SWIFT_AVAILABILITY(ios,introduced=11.0) SWIFT_AVAILABILITY(macos,introduced=11.0) @interface InAppScreenCapturer : VideoCapturer @end SWIFT_CLASS("_TtC16OUICallingPlugin19RtpStreamStatistics") @interface RtpStreamStatistics : Statistics @end SWIFT_CLASS("_TtC16OUICallingPlugin27ReceivedRtpStreamStatistics") @interface ReceivedRtpStreamStatistics : RtpStreamStatistics @end SWIFT_CLASS("_TtC16OUICallingPlugin26InboundRtpStreamStatistics") @interface InboundRtpStreamStatistics : ReceivedRtpStreamStatistics @end SWIFT_CLASS("_TtC16OUICallingPlugin15LKSampleHandler") @interface LKSampleHandler : RPBroadcastSampleHandler - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; - (void)broadcastStartedWithSetupInfo:(NSDictionary * _Nullable)setupInfo; - (void)broadcastPaused; - (void)broadcastResumed; - (void)broadcastFinished; - (void)processSampleBuffer:(CMSampleBufferRef _Nonnull)sampleBuffer withType:(RPSampleBufferType)sampleBufferType; @end SWIFT_CLASS("_TtC16OUICallingPlugin16LayoutConstraint") @interface LayoutConstraint : NSLayoutConstraint - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; @end @interface LayoutConstraint (SWIFT_EXTENSION(OUICallingPlugin)) @property (nonatomic, readonly, copy) NSString * _Nonnull description; @end /// The open source platform for real-time communication. /// See LiveKit’s Online Docs for more information. /// Comments are written in DocC compatible format. /// With Xcode 13 and above you can build documentation right into your Xcode documentation viewer by chosing /// Product > Build Documentation from Xcode’s menu. /// Download the Multiplatform SwiftUI Example /// to try out the features. SWIFT_CLASS("_TtC16OUICallingPlugin7LiveKit") @interface LiveKit : NSObject SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull sdkVersion;) + (NSString * _Nonnull)sdkVersion SWIFT_WARN_UNUSED_RESULT; + (void)setLoggerStandardOutput; - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; @end enum PublishState : NSInteger; @class NSNull; SWIFT_PROTOCOL("_TtP16OUICallingPlugin10LocalTrack_") @protocol LocalTrack @property (nonatomic, readonly, strong) id _Nullable publishOptions; @property (nonatomic, readonly) enum PublishState publishState; - (FBLPromise * _Nonnull)mute; - (FBLPromise * _Nonnull)unmute; @end enum TrackKind : NSInteger; enum TrackSource : NSInteger; @class TrackStats; @class TrackStatistics; enum TrackState : NSInteger; SWIFT_CLASS("_TtC16OUICallingPlugin5Track") @interface Track : NSObject SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull cameraName;) + (NSString * _Nonnull)cameraName SWIFT_WARN_UNUSED_RESULT; SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull microphoneName;) + (NSString * _Nonnull)microphoneName SWIFT_WARN_UNUSED_RESULT; SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull screenShareVideoName;) + (NSString * _Nonnull)screenShareVideoName SWIFT_WARN_UNUSED_RESULT; SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull screenShareAudioName;) + (NSString * _Nonnull)screenShareAudioName SWIFT_WARN_UNUSED_RESULT; @property (nonatomic, readonly) enum TrackKind kind; @property (nonatomic, readonly) enum TrackSource source; @property (nonatomic, readonly, copy) NSString * _Nonnull name; @property (nonatomic, readonly, copy) NSString * _Nullable sid; @property (nonatomic, readonly) BOOL muted; @property (nonatomic, readonly, strong) TrackStats * _Nullable stats; @property (nonatomic, readonly, strong) TrackStatistics * _Nullable statistics; /// Dimensions of the video (only if video track) @property (nonatomic, readonly, strong) Dimensions * _Nullable dimensions; @property (nonatomic, readonly) enum TrackState trackState; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end typedef SWIFT_ENUM_NAMED(NSInteger, TrackKind, "Kind", open) { TrackKindAudio = 0, TrackKindVideo = 1, TrackKindNone = 2, }; typedef SWIFT_ENUM_NAMED(NSInteger, TrackState, "TrackState", open) { TrackStateStopped = 0, TrackStateStarted = 1, }; typedef SWIFT_ENUM_NAMED(NSInteger, TrackSource, "Source", open) { TrackSourceUnknown = 0, TrackSourceCamera = 1, TrackSourceMicrophone = 2, TrackSourceScreenShareVideo = 3, TrackSourceScreenShareAudio = 4, }; typedef SWIFT_ENUM_NAMED(NSInteger, PublishState, "PublishState", open) { PublishStateUnpublished = 0, PublishStatePublished = 1, }; SWIFT_CLASS("_TtC16OUICallingPlugin15LocalAudioTrack") @interface LocalAudioTrack : Track @end @interface LocalAudioTrack (SWIFT_EXTENSION(OUICallingPlugin)) - (FBLPromise * _Nonnull)mute SWIFT_WARN_UNUSED_RESULT; - (FBLPromise * _Nonnull)unmute SWIFT_WARN_UNUSED_RESULT; @end @interface LocalAudioTrack (SWIFT_EXTENSION(OUICallingPlugin)) @property (nonatomic, readonly, strong) id _Nullable publishOptions; @property (nonatomic, readonly) enum PublishState publishState; @end SWIFT_CLASS("_TtC16OUICallingPlugin27LocalIceCandidateStatistics") @interface LocalIceCandidateStatistics : IceCandidateStatistics @end @class NSDate; SWIFT_CLASS("_TtC16OUICallingPlugin11Participant") @interface Participant : NSObject @property (nonatomic, readonly, copy) NSString * _Nonnull sid; @property (nonatomic, readonly, copy) NSString * _Nonnull identity; @property (nonatomic, readonly, copy) NSString * _Nonnull name; @property (nonatomic, readonly) float audioLevel; @property (nonatomic, readonly) BOOL isSpeaking; @property (nonatomic, readonly, copy) NSString * _Nullable metadata; @property (nonatomic, readonly) enum ConnectionQuality connectionQuality; @property (nonatomic, readonly, strong) ParticipantPermissions * _Nonnull permissions; @property (nonatomic, readonly, copy) NSDate * _Nullable joinedAt; @property (nonatomic, readonly, copy) NSDictionary * _Nonnull tracks; @property (nonatomic, readonly, copy) NSArray * _Nonnull audioTracks; @property (nonatomic, readonly, copy) NSArray * _Nonnull videoTracks; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end SWIFT_CLASS("_TtC16OUICallingPlugin16LocalParticipant") @interface LocalParticipant : Participant @property (nonatomic, readonly, copy) NSArray * _Nonnull localAudioTracks; @property (nonatomic, readonly, copy) NSArray * _Nonnull localVideoTracks; @end @class LocalVideoTrack; @class VideoPublishOptions; enum Reliability : NSInteger; @class ParticipantTrackPermission; @interface LocalParticipant (SWIFT_EXTENSION(OUICallingPlugin)) - (FBLPromise * _Nonnull)setCameraEnabled:(BOOL)enabled; - (FBLPromise * _Nonnull)setMicrophoneEnabled:(BOOL)enabled; - (FBLPromise * _Nonnull)setScreenShareEnabled:(BOOL)enabled; - (FBLPromise * _Nonnull)publishVideoTrack:(LocalVideoTrack * _Nonnull)track options:(VideoPublishOptions * _Nullable)publishOptions; - (FBLPromise * _Nonnull)publishAudioTrack:(LocalAudioTrack * _Nonnull)track options:(AudioPublishOptions * _Nullable)publishOptions; - (FBLPromise * _Nonnull)unpublishPublication:(LocalTrackPublication * _Nonnull)publication; - (FBLPromise * _Nonnull)publishData:(NSData * _Nonnull)data reliability:(enum Reliability)reliability destination:(NSArray * _Nonnull)destination; - (FBLPromise * _Nonnull)setTrackSubscriptionPermissionsWithAllParticipantsAllowed:(BOOL)allParticipantsAllowed trackPermissions:(NSArray * _Nonnull)trackPermissions; @end SWIFT_CLASS("_TtC16OUICallingPlugin16TrackPublication") @interface TrackPublication : NSObject @property (nonatomic, readonly, copy) NSString * _Nonnull sid; @property (nonatomic, readonly) enum TrackKind kind; @property (nonatomic, readonly) enum TrackSource source; @property (nonatomic, readonly, copy) NSString * _Nonnull name; @property (nonatomic, readonly, strong) Track * _Nullable track; @property (nonatomic, readonly) BOOL muted; @property (nonatomic, readonly) enum StreamState streamState; /// video-only @property (nonatomic, readonly, strong) Dimensions * _Nullable dimensions; @property (nonatomic, readonly) BOOL simulcasted; /// MIME type of the Track. @property (nonatomic, readonly, copy) NSString * _Nonnull mimeType; @property (nonatomic, readonly) BOOL subscribed; @property (nonatomic, readonly) enum EncryptionType encryptionType; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end SWIFT_CLASS("_TtC16OUICallingPlugin21LocalTrackPublication") @interface LocalTrackPublication : TrackPublication @property (nonatomic, readonly) enum StreamState streamState; @end SWIFT_PROTOCOL("_TtP16OUICallingPlugin21VideoCapturerDelegate_") @protocol VideoCapturerDelegate @optional - (void)capturer:(VideoCapturer * _Nonnull)capturer didUpdateDimensions:(Dimensions * _Nullable)dimensions; - (void)capturer:(VideoCapturer * _Nonnull)capturer didUpdateState:(enum CapturerState)state; @end @interface LocalTrackPublication (SWIFT_EXTENSION(OUICallingPlugin)) - (void)capturer:(VideoCapturer * _Nonnull)capturer didUpdateDimensions:(Dimensions * _Nullable)dimensions; @end @protocol VideoRenderer; SWIFT_PROTOCOL("_TtP16OUICallingPlugin10VideoTrack_") @protocol VideoTrack - (void)addVideoRenderer:(id _Nonnull)videoRenderer; - (void)removeVideoRenderer:(id _Nonnull)videoRenderer; @end @class RTCVideoSource; SWIFT_CLASS("_TtC16OUICallingPlugin15LocalVideoTrack") @interface LocalVideoTrack : Track @property (nonatomic, readonly, strong) VideoCapturer * _Nonnull capturer; @property (nonatomic, readonly, strong) RTCVideoSource * _Nonnull videoSource; @end @interface LocalVideoTrack (SWIFT_EXTENSION(OUICallingPlugin)) - (void)addVideoRenderer:(id _Nonnull)videoRenderer; - (void)removeVideoRenderer:(id _Nonnull)videoRenderer; @end @interface LocalVideoTrack (SWIFT_EXTENSION(OUICallingPlugin)) + (LocalVideoTrack * _Nonnull)createCameraTrack SWIFT_WARN_UNUSED_RESULT; + (LocalVideoTrack * _Nonnull)createCameraTrackWithName:(NSString * _Nullable)name options:(CameraCaptureOptions * _Nullable)options SWIFT_WARN_UNUSED_RESULT; @end @interface LocalVideoTrack (SWIFT_EXTENSION(OUICallingPlugin)) - (FBLPromise * _Nonnull)mute SWIFT_WARN_UNUSED_RESULT; - (FBLPromise * _Nonnull)unmute SWIFT_WARN_UNUSED_RESULT; @end @interface LocalVideoTrack (SWIFT_EXTENSION(OUICallingPlugin)) @property (nonatomic, readonly, strong) id _Nullable publishOptions; @property (nonatomic, readonly) enum PublishState publishState; @end /// The base view for LottieAnimationView on iOS, tvOS, watchOS, and macCatalyst. /// Enables the LottieAnimationView implementation to be shared across platforms. SWIFT_CLASS("_TtC16OUICallingPlugin23LottieAnimationViewBase") @interface LottieAnimationViewBase : UIView @property (nonatomic) UIViewContentMode contentMode; - (void)didMoveToWindow; - (void)layoutSubviews; - (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER; - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER; @end IB_DESIGNABLE SWIFT_CLASS("_TtC16OUICallingPlugin19LottieAnimationView") @interface LottieAnimationView : LottieAnimationViewBase - (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER; - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER; @property (nonatomic, readonly) CGSize intrinsicContentSize; @end /// A simple abstraction of a View that is native to the platform. /// When built for iOS this will be a UIView. /// When built for macOS this will be a NSView. SWIFT_CLASS("_TtC16OUICallingPlugin10NativeView") @interface NativeView : UIView - (nonnull instancetype)initWithFrame:(CGRect)frame SWIFT_UNAVAILABLE; - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE; - (void)layoutSubviews; @end SWIFT_CLASS("_TtC16OUICallingPlugin23SentRtpStreamStatistics") @interface SentRtpStreamStatistics : RtpStreamStatistics @end SWIFT_CLASS("_TtC16OUICallingPlugin27OutboundRtpStreamStatistics") @interface OutboundRtpStreamStatistics : SentRtpStreamStatistics @end @interface Participant (SWIFT_EXTENSION(OUICallingPlugin)) @property (nonatomic, readonly, copy) NSString * _Nonnull description; @end @interface Participant (SWIFT_EXTENSION(OUICallingPlugin)) @property (nonatomic, readonly) NSUInteger hash; - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; @end @protocol ParticipantDelegate; @interface Participant (SWIFT_EXTENSION(OUICallingPlugin)) - (void)addDelegate:(id _Nonnull)delegate; - (void)removeDelegate:(id _Nonnull)delegate; - (void)removeAllDelegates; @end SWIFT_CLASS("_TtC16OUICallingPlugin15ParticipantCell") @interface ParticipantCell : UICollectionViewCell - (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER; - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER SWIFT_UNAVAILABLE; - (void)prepareForReuse; - (void)layoutSubviews; @end @class UIScrollView; @interface ParticipantCell (SWIFT_EXTENSION(OUICallingPlugin)) - (UIView * _Nullable)viewForZoomingInScrollView:(UIScrollView * _Nonnull)scrollView SWIFT_WARN_UNUSED_RESULT; - (void)scrollViewDidZoom:(UIScrollView * _Nonnull)scrollView; @end /// Delegate methods for a participant. /// Since Participant inherits from MulticastDelegate, /// you can call add(delegate:) on Participant to add as many delegates as you need. /// All delegate methods are optional. /// To ensure each participant’s delegate is registered, you can look through Room/localParticipant and Room/remoteParticipants on connect /// and register it on new participants inside RoomDelegate/room(_:participantDidJoin:)-9bkm4 SWIFT_PROTOCOL("_TtP16OUICallingPlugin19ParticipantDelegate_") @protocol ParticipantDelegate @optional /// A Participant’s metadata has updated. /// participant Can be a LocalParticipant or a RemoteParticipant. - (void)participant:(Participant * _Nonnull)participant didUpdateMetadata:(NSString * _Nullable)metadata; /// A Participant’s name has updated. /// participant Can be a LocalParticipant or a RemoteParticipant. - (void)participant:(Participant * _Nonnull)participant didUpdateName:(NSString * _Nonnull)didUpdateName; /// The isSpeaking status of a Participant has changed. /// participant Can be a LocalParticipant or a RemoteParticipant. - (void)participant:(Participant * _Nonnull)participant didUpdateSpeaking:(BOOL)speaking; /// The connection quality of a Participant has updated. /// participant Can be a LocalParticipant or a RemoteParticipant. - (void)participant:(Participant * _Nonnull)participant didUpdateConnectionQuality:(enum ConnectionQuality)connectionQuality; /// muted state has updated for the Participant’s TrackPublication. /// For the LocalParticipant, the delegate method will be called if setMute was called on LocalTrackPublication, /// or if the server has requested the participant to be muted. /// participant Can be a LocalParticipant or a RemoteParticipant. - (void)participant:(Participant * _Nonnull)participant publication:(TrackPublication * _Nonnull)publication didUpdateMuted:(BOOL)muted; - (void)participant:(Participant * _Nonnull)participant didUpdatePermissions:(ParticipantPermissions * _Nonnull)permissions; /// RemoteTrackPublication/streamState has updated for the RemoteParticipant. - (void)participant:(RemoteParticipant * _Nonnull)participant publication:(RemoteTrackPublication * _Nonnull)publication didUpdateStreamState:(enum StreamState)streamState; /// RemoteTrackPublication/subscriptionAllowed has updated for the RemoteParticipant. - (void)participant:(RemoteParticipant * _Nonnull)participant publication:(RemoteTrackPublication * _Nonnull)publication didUpdateCanSubscribe:(BOOL)allowed; /// When a new RemoteTrackPublication is published to Room after the LocalParticipant has joined. /// This delegate method will not be called for tracks that are already published. - (void)remoteParticipant:(RemoteParticipant * _Nonnull)participant didPublish:(RemoteTrackPublication * _Nonnull)publication; /// The RemoteParticipant has unpublished a RemoteTrackPublication. - (void)remoteParticipant:(RemoteParticipant * _Nonnull)participant didUnpublish:(RemoteTrackPublication * _Nonnull)publication; /// The LocalParticipant has published a LocalTrackPublication. - (void)localParticipant:(LocalParticipant * _Nonnull)participant didPublish:(LocalTrackPublication * _Nonnull)publication; /// The LocalParticipant has unpublished a LocalTrackPublication. - (void)localParticipant:(LocalParticipant * _Nonnull)participant didUnpublish:(LocalTrackPublication * _Nonnull)publication; /// The LocalParticipant has subscribed to a new RemoteTrackPublication. /// This event will always fire as long as new tracks are ready for use. - (void)participant:(RemoteParticipant * _Nonnull)participant didSubscribe:(RemoteTrackPublication * _Nonnull)publication track:(Track * _Nonnull)track; /// Could not subscribe to a track. /// This is an error state, the subscription can be retried. - (void)participant:(RemoteParticipant * _Nonnull)participant didFailToSubscribeTrackWithSid:(NSString * _Nonnull)trackSid error:(NSError * _Nonnull)error; /// Unsubscribed from a RemoteTrackPublication and is no longer available. /// Clients should listen to this event and handle cleanup. - (void)participant:(RemoteParticipant * _Nonnull)participant didUnsubscribePublication:(RemoteTrackPublication * _Nonnull)publication track:(Track * _Nonnull)track; /// Data was received from a RemoteParticipant. ///
/// Notice: Deprecated, use participant(_:didReceiveData:topic:) instead. /// ///
- (void)participant:(RemoteParticipant * _Nonnull)participant didReceiveData:(NSData * _Nonnull)data SWIFT_DEPRECATED_MSG("", "participant:didReceiveData:topic:"); - (void)participant:(RemoteParticipant * _Nonnull)participant didReceiveData:(NSData * _Nonnull)data topic:(NSString * _Nonnull)topic; @end @interface ParticipantCell (SWIFT_EXTENSION(OUICallingPlugin)) - (void)participant:(RemoteParticipant * _Nonnull)participant didSubscribe:(RemoteTrackPublication * _Nonnull)publication track:(Track * _Nonnull)track; - (void)participant:(RemoteParticipant * _Nonnull)participant didUnsubscribePublication:(RemoteTrackPublication * _Nonnull)publication track:(Track * _Nonnull)track; - (void)participant:(Participant * _Nonnull)participant didUpdateSpeaking:(BOOL)speaking; - (void)participant:(Participant * _Nonnull)participant publication:(TrackPublication * _Nonnull)publication didUpdateMuted:(BOOL)muted; - (void)participant:(RemoteParticipant * _Nonnull)participant publication:(RemoteTrackPublication * _Nonnull)publication didUpdateStreamState:(enum StreamState)streamState; - (void)participant:(Participant * _Nonnull)participant didUpdateConnectionQuality:(enum ConnectionQuality)connectionQuality; @end SWIFT_CLASS("_TtC16OUICallingPlugin26ParticipantCellDefaultView") @interface ParticipantCellDefaultView : UIView - (nonnull instancetype)initWithFrame:(CGRect)frame SWIFT_UNAVAILABLE; - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER; @end SWIFT_CLASS("_TtC16OUICallingPlugin23ParticipantCellUserView") @interface ParticipantCellUserView : UIView - (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER; - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE; @end SWIFT_CLASS("_TtC16OUICallingPlugin22ParticipantPermissions") @interface ParticipantPermissions : NSObject /// Participant can subscribe to tracks in the room @property (nonatomic, readonly) BOOL canSubscribe; /// Participant can publish new tracks to room @property (nonatomic, readonly) BOOL canPublish; /// Participant can publish data @property (nonatomic, readonly) BOOL canPublishData; /// Participant is hidden to others @property (nonatomic, readonly) BOOL hidden; /// Indicates it’s a recorder instance @property (nonatomic, readonly) BOOL recorder; - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; @property (nonatomic, readonly) NSUInteger hash; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end SWIFT_CLASS("_TtC16OUICallingPlugin26ParticipantTrackPermission") @interface ParticipantTrackPermission : NSObject /// The participant id this permission applies to. @property (nonatomic, readonly, copy) NSString * _Nonnull participantSid; - (nonnull instancetype)initWithParticipantSid:(NSString * _Nonnull)participantSid allTracksAllowed:(BOOL)allTracksAllowed allowedTrackSids:(NSArray * _Nonnull)allowedTrackSids OBJC_DESIGNATED_INITIALIZER; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end SWIFT_CLASS("_TtC16OUICallingPlugin24PeerConnectionStatistics") @interface PeerConnectionStatistics : Statistics @end SWIFT_CLASS("_TtC16OUICallingPlugin11ProgressHUD") @interface ProgressHUD : UIView - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE; - (nonnull instancetype)initWithFrame:(CGRect)frame SWIFT_UNAVAILABLE; @end typedef SWIFT_ENUM(NSInteger, ProtocolVersion, open) { ProtocolVersionV2 = 2, ProtocolVersionV3 = 3, ProtocolVersionV4 = 4, ProtocolVersionV5 = 5, ProtocolVersionV6 = 6, ProtocolVersionV7 = 7, ProtocolVersionV8 = 8, ProtocolVersionV9 = 9, }; @interface RTCConfiguration (SWIFT_EXTENSION(OUICallingPlugin)) @property (nonatomic, readonly, copy) NSString * _Nonnull description; @end @interface RTCIceServer (SWIFT_EXTENSION(OUICallingPlugin)) @property (nonatomic, readonly, copy) NSString * _Nonnull description; @end @interface RTCRtpEncodingParameters (SWIFT_EXTENSION(OUICallingPlugin)) @property (nonatomic, readonly, copy) NSString * _Nonnull description; @end typedef SWIFT_ENUM(NSInteger, ReconnectMode, open) { ReconnectModeQuick = 0, ReconnectModeFull = 1, }; typedef SWIFT_ENUM(NSInteger, Reliability, open) { ReliabilityReliable = 0, ReliabilityLossy = 1, }; SWIFT_PROTOCOL("_TtP16OUICallingPlugin11RemoteTrack_") @protocol RemoteTrack @end SWIFT_CLASS("_TtC16OUICallingPlugin16RemoteAudioTrack") @interface RemoteAudioTrack : Track @end SWIFT_CLASS("_TtC16OUICallingPlugin28RemoteIceCandidateStatistics") @interface RemoteIceCandidateStatistics : IceCandidateStatistics @end SWIFT_CLASS("_TtC16OUICallingPlugin32RemoteInboundRtpStreamStatistics") @interface RemoteInboundRtpStreamStatistics : ReceivedRtpStreamStatistics @end SWIFT_CLASS("_TtC16OUICallingPlugin33RemoteOutboundRtpStreamStatistics") @interface RemoteOutboundRtpStreamStatistics : SentRtpStreamStatistics @end SWIFT_CLASS("_TtC16OUICallingPlugin17RemoteParticipant") @interface RemoteParticipant : Participant @end SWIFT_CLASS("_TtC16OUICallingPlugin22RemoteTrackPublication") @interface RemoteTrackPublication : TrackPublication @property (nonatomic, readonly) BOOL muted; @property (nonatomic, readonly) BOOL subscribed; @end @interface RemoteTrackPublication (SWIFT_EXTENSION(OUICallingPlugin)) - (FBLPromise * _Nonnull)setEnabled:(BOOL)value; - (FBLPromise * _Nonnull)setSubscribed:(BOOL)value; @end SWIFT_CLASS("_TtC16OUICallingPlugin16RemoteVideoTrack") @interface RemoteVideoTrack : Track @end @interface RemoteVideoTrack (SWIFT_EXTENSION(OUICallingPlugin)) - (void)addVideoRenderer:(id _Nonnull)videoRenderer; - (void)removeVideoRenderer:(id _Nonnull)videoRenderer; @end @class RoomOptions; SWIFT_CLASS("_TtC16OUICallingPlugin4Room") @interface Room : NSObject @property (nonatomic, readonly, copy) NSString * _Nullable sid; @property (nonatomic, readonly, copy) NSString * _Nullable name; /// Room’s metadata. @property (nonatomic, readonly, copy) NSString * _Nullable metadata; @property (nonatomic, readonly, copy) NSString * _Nullable serverVersion; /// Region code the client is currently connected to. @property (nonatomic, readonly, copy) NSString * _Nullable serverRegion; @property (nonatomic, readonly, strong) LocalParticipant * _Nullable localParticipant; @property (nonatomic, readonly, copy) NSDictionary * _Nonnull remoteParticipants; @property (nonatomic, readonly, copy) NSArray * _Nonnull activeSpeakers; /// If the current room has a participant with recorder:true in its JWT grant. @property (nonatomic, readonly) BOOL isRecording; @property (nonatomic, readonly) NSInteger maxParticipants; @property (nonatomic, readonly) NSInteger participantCount; @property (nonatomic, readonly) NSInteger publishersCount; @property (nonatomic, readonly, copy) NSString * _Nullable url; @property (nonatomic, readonly, copy) NSString * _Nullable token; /// Only for Objective-C. @property (nonatomic, readonly) enum ConnectionState connectionState; - (nonnull instancetype)init; - (nonnull instancetype)initWithDelegate:(id _Nullable)delegate connectOptions:(ConnectOptions * _Nullable)connectOptions roomOptions:(RoomOptions * _Nullable)roomOptions OBJC_DESIGNATED_INITIALIZER; @end @interface Room (SWIFT_EXTENSION(OUICallingPlugin)) @property (nonatomic, readonly, copy) NSString * _Nonnull description; @end @interface Room (SWIFT_EXTENSION(OUICallingPlugin)) - (FBLPromise * _Nonnull)connectWithURL:(NSString * _Nonnull)url token:(NSString * _Nonnull)token connectOptions:(ConnectOptions * _Nullable)connectOptions roomOptions:(RoomOptions * _Nullable)roomOptions; - (FBLPromise * _Nonnull)disconnect; @end @class RTCDefaultAudioProcessingModule; @interface Room (SWIFT_EXTENSION(OUICallingPlugin)) SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) RTCDefaultAudioProcessingModule * _Nonnull audioProcessingModule;) + (RTCDefaultAudioProcessingModule * _Nonnull)audioProcessingModule SWIFT_WARN_UNUSED_RESULT; @end @class RTCAudioDeviceModule; @interface Room (SWIFT_EXTENSION(OUICallingPlugin)) SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) RTCAudioDeviceModule * _Nonnull audioDeviceModule;) + (RTCAudioDeviceModule * _Nonnull)audioDeviceModule SWIFT_WARN_UNUSED_RESULT; /// Set this to true to bypass initialization of voice processing. /// Must be set before RTCPeerConnectionFactory gets initialized. SWIFT_CLASS_PROPERTY(@property (nonatomic, class) BOOL bypassVoiceProcessing;) + (BOOL)bypassVoiceProcessing SWIFT_WARN_UNUSED_RESULT; + (void)setBypassVoiceProcessing:(BOOL)newValue; @end @interface Room (SWIFT_EXTENSION(OUICallingPlugin)) - (void)removeAllDelegates; /// Only for Objective-C. - (void)addDelegate:(id _Nonnull)delegate; /// Only for Objective-C. - (void)removeDelegate:(id _Nonnull)delegate; @end @class ScreenShareCaptureOptions; SWIFT_CLASS("_TtC16OUICallingPlugin11RoomOptions") @interface RoomOptions : NSObject @property (nonatomic, readonly, strong) CameraCaptureOptions * _Nonnull defaultCameraCaptureOptions; @property (nonatomic, readonly, strong) ScreenShareCaptureOptions * _Nonnull defaultScreenShareCaptureOptions; @property (nonatomic, readonly, strong) AudioCaptureOptions * _Nonnull defaultAudioCaptureOptions; @property (nonatomic, readonly, strong) VideoPublishOptions * _Nonnull defaultVideoPublishOptions; @property (nonatomic, readonly, strong) AudioPublishOptions * _Nonnull defaultAudioPublishOptions; @property (nonatomic, readonly, strong) DataPublishOptions * _Nonnull defaultDataPublishOptions; /// AdaptiveStream lets LiveKit automatically manage quality of subscribed /// video tracks to optimize for bandwidth and CPU. /// When attached video elements are visible, it’ll choose an appropriate /// resolution based on the size of largest video element it’s attached to. /// When none of the video elements are visible, it’ll temporarily pause /// the data flow until they are visible again. @property (nonatomic, readonly) BOOL adaptiveStream; /// Dynamically pauses video layers that are not being consumed by any subscribers, /// significantly reducing publishing CPU and bandwidth usage. @property (nonatomic, readonly) BOOL dynacast; @property (nonatomic, readonly) BOOL stopLocalTrackOnUnpublish; /// Automatically suspend(mute) local camera video tracks when the app enters background and /// resume(unmute) when the app enters foreground again. @property (nonatomic, readonly) BOOL suspendLocalVideoTracksInBackground; /// Experimental /// Report TrackStats every second to TrackDelegate for each local and remote tracks. /// This may consume slightly more CPU resources. @property (nonatomic, readonly) BOOL reportStats; - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; @property (nonatomic, readonly) NSUInteger hash; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end SWIFT_CLASS("_TtC16OUICallingPlugin25ScreenShareCaptureOptions") @interface ScreenShareCaptureOptions : NSObject @property (nonatomic, readonly, strong) Dimensions * _Nonnull dimensions; @property (nonatomic, readonly) NSInteger fps; /// Only used for macOS @property (nonatomic, readonly) BOOL showCursor; @property (nonatomic, readonly) BOOL useBroadcastExtension; - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; @property (nonatomic, readonly) NSUInteger hash; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end SWIFT_CLASS_NAMED("SessionDelegate") @interface KFSessionDelegate : NSObject - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; @end @class NSURLSession; @class NSURLSessionDataTask; @class NSURLResponse; @class NSURLSessionTask; @class NSURLAuthenticationChallenge; @class NSURLCredential; @class NSHTTPURLResponse; @class NSURLRequest; @interface KFSessionDelegate (SWIFT_EXTENSION(OUICallingPlugin)) - (void)URLSession:(NSURLSession * _Nonnull)session dataTask:(NSURLSessionDataTask * _Nonnull)dataTask didReceiveResponse:(NSURLResponse * _Nonnull)response completionHandler:(void (^ _Nonnull)(NSURLSessionResponseDisposition))completionHandler; - (void)URLSession:(NSURLSession * _Nonnull)session dataTask:(NSURLSessionDataTask * _Nonnull)dataTask didReceiveData:(NSData * _Nonnull)data; - (void)URLSession:(NSURLSession * _Nonnull)session task:(NSURLSessionTask * _Nonnull)task didCompleteWithError:(NSError * _Nullable)error; - (void)URLSession:(NSURLSession * _Nonnull)session didReceiveChallenge:(NSURLAuthenticationChallenge * _Nonnull)challenge completionHandler:(void (^ _Nonnull)(NSURLSessionAuthChallengeDisposition, NSURLCredential * _Nullable))completionHandler; - (void)URLSession:(NSURLSession * _Nonnull)session task:(NSURLSessionTask * _Nonnull)task didReceiveChallenge:(NSURLAuthenticationChallenge * _Nonnull)challenge completionHandler:(void (^ _Nonnull)(NSURLSessionAuthChallengeDisposition, NSURLCredential * _Nullable))completionHandler; - (void)URLSession:(NSURLSession * _Nonnull)session task:(NSURLSessionTask * _Nonnull)task willPerformHTTPRedirection:(NSHTTPURLResponse * _Nonnull)response newRequest:(NSURLRequest * _Nonnull)request completionHandler:(void (^ _Nonnull)(NSURLRequest * _Nullable))completionHandler; @end typedef SWIFT_ENUM(NSInteger, StreamState, open) { StreamStatePaused = 0, StreamStateActive = 1, }; typedef SWIFT_ENUM(NSInteger, SubscriptionState, open) { SubscriptionStateSubscribed = 0, SubscriptionStateNotAllowed = 1, SubscriptionStateUnsubscribed = 2, }; @interface Track (SWIFT_EXTENSION(OUICallingPlugin)) @property (nonatomic, readonly, copy) NSString * _Nonnull description; @end @interface Track (SWIFT_EXTENSION(OUICallingPlugin)) - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; @property (nonatomic, readonly) NSUInteger hash; @end @interface Track (SWIFT_EXTENSION(OUICallingPlugin)) - (FBLPromise * _Nonnull)start; - (FBLPromise * _Nonnull)stop; @end @protocol TrackDelegate; @interface Track (SWIFT_EXTENSION(OUICallingPlugin)) - (void)addDelegate:(id _Nonnull)delegate; - (void)removeDelegate:(id _Nonnull)delegate; - (void)removeAllDelegates; @end @class VideoView; SWIFT_PROTOCOL("_TtP16OUICallingPlugin13TrackDelegate_") @protocol TrackDelegate @optional /// Dimensions of the video track has updated - (void)track:(id _Nonnull)track didUpdateDimensions:(Dimensions * _Nullable)dimensions; /// A VideoView was attached to the VideoTrack - (void)track:(id _Nonnull)track didAttach:(VideoView * _Nonnull)videoView; /// A VideoView was detached from the VideoTrack - (void)track:(id _Nonnull)track didDetach:(VideoView * _Nonnull)videoView; /// Track/muted has updated. - (void)track:(Track * _Nonnull)track didUpdateMuted:(BOOL)muted shouldSendSignal:(BOOL)shouldSendSignal; /// Statistics for the track has been generated. - (void)track:(Track * _Nonnull)track didUpdateStats:(TrackStats * _Nonnull)stats SWIFT_DEPRECATED_MSG("Use track:didUpdateStatistics: instead"); /// Statistics for the track has been generated (v2). - (void)track:(Track * _Nonnull)track didUpdateStatistics:(TrackStatistics * _Nonnull)didUpdateStatistics; @end @interface TrackPublication (SWIFT_EXTENSION(OUICallingPlugin)) @property (nonatomic, readonly, copy) NSString * _Nonnull description; @end @interface TrackPublication (SWIFT_EXTENSION(OUICallingPlugin)) - (void)track:(Track * _Nonnull)track didUpdateMuted:(BOOL)muted shouldSendSignal:(BOOL)shouldSendSignal; @end @interface TrackPublication (SWIFT_EXTENSION(OUICallingPlugin)) @property (nonatomic, readonly) NSUInteger hash; - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; @end SWIFT_CLASS("_TtC16OUICallingPlugin15TrackStatistics") @interface TrackStatistics : NSObject - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end @interface TrackStatistics (SWIFT_EXTENSION(OUICallingPlugin)) @property (nonatomic, readonly, copy) NSString * _Nonnull description; @end SWIFT_CLASS("_TtC16OUICallingPlugin10TrackStats") SWIFT_DEPRECATED_MSG("Use Stats v2 and TrackStatistics instead") @interface TrackStats : NSObject - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; @property (nonatomic, readonly) NSUInteger hash; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end SWIFT_CLASS("_TtC16OUICallingPlugin19TransportStatistics") @interface TransportStatistics : Statistics @end SWIFT_CLASS("_TtC16OUICallingPlugin23VideoCaptureInterceptor") @interface VideoCaptureInterceptor : NSObject - (void)capturer:(RTCVideoCapturer * _Nonnull)capturer didCaptureVideoFrame:(RTCVideoFrame * _Nonnull)frame; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end @interface VideoCapturer (SWIFT_EXTENSION(OUICallingPlugin)) - (void)addDelegate:(id _Nonnull)delegate; - (void)removeDelegate:(id _Nonnull)delegate; - (void)removeAllDelegates; @end SWIFT_CLASS("_TtC16OUICallingPlugin13VideoEncoding") @interface VideoEncoding : NSObject @property (nonatomic) NSInteger maxBitrate; @property (nonatomic) NSInteger maxFps; - (nonnull instancetype)initWithMaxBitrate:(NSInteger)maxBitrate maxFps:(NSInteger)maxFps OBJC_DESIGNATED_INITIALIZER; - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; @property (nonatomic, readonly) NSUInteger hash; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end SWIFT_CLASS("_TtC16OUICallingPlugin15VideoParameters") @interface VideoParameters : NSObject @property (nonatomic, readonly, strong) Dimensions * _Nonnull dimensions; @property (nonatomic, readonly, strong) VideoEncoding * _Nonnull encoding; - (nonnull instancetype)initWithDimensions:(Dimensions * _Nonnull)dimensions encoding:(VideoEncoding * _Nonnull)encoding OBJC_DESIGNATED_INITIALIZER; - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; @property (nonatomic, readonly) NSUInteger hash; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end @interface VideoParameters (SWIFT_EXTENSION(OUICallingPlugin)) SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) VideoParameters * _Nonnull presetH90_169;) + (VideoParameters * _Nonnull)presetH90_169 SWIFT_WARN_UNUSED_RESULT; SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) VideoParameters * _Nonnull presetH180_169;) + (VideoParameters * _Nonnull)presetH180_169 SWIFT_WARN_UNUSED_RESULT; SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) VideoParameters * _Nonnull presetH216_169;) + (VideoParameters * _Nonnull)presetH216_169 SWIFT_WARN_UNUSED_RESULT; SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) VideoParameters * _Nonnull presetH360_169;) + (VideoParameters * _Nonnull)presetH360_169 SWIFT_WARN_UNUSED_RESULT; SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) VideoParameters * _Nonnull presetH540_169;) + (VideoParameters * _Nonnull)presetH540_169 SWIFT_WARN_UNUSED_RESULT; SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) VideoParameters * _Nonnull presetH720_169;) + (VideoParameters * _Nonnull)presetH720_169 SWIFT_WARN_UNUSED_RESULT; SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) VideoParameters * _Nonnull presetH1080_169;) + (VideoParameters * _Nonnull)presetH1080_169 SWIFT_WARN_UNUSED_RESULT; SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) VideoParameters * _Nonnull presetH1440_169;) + (VideoParameters * _Nonnull)presetH1440_169 SWIFT_WARN_UNUSED_RESULT; SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) VideoParameters * _Nonnull presetH2160_169;) + (VideoParameters * _Nonnull)presetH2160_169 SWIFT_WARN_UNUSED_RESULT; SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) VideoParameters * _Nonnull presetH120_43;) + (VideoParameters * _Nonnull)presetH120_43 SWIFT_WARN_UNUSED_RESULT; SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) VideoParameters * _Nonnull presetH180_43;) + (VideoParameters * _Nonnull)presetH180_43 SWIFT_WARN_UNUSED_RESULT; SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) VideoParameters * _Nonnull presetH240_43;) + (VideoParameters * _Nonnull)presetH240_43 SWIFT_WARN_UNUSED_RESULT; SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) VideoParameters * _Nonnull presetH360_43;) + (VideoParameters * _Nonnull)presetH360_43 SWIFT_WARN_UNUSED_RESULT; SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) VideoParameters * _Nonnull presetH480_43;) + (VideoParameters * _Nonnull)presetH480_43 SWIFT_WARN_UNUSED_RESULT; SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) VideoParameters * _Nonnull presetH540_43;) + (VideoParameters * _Nonnull)presetH540_43 SWIFT_WARN_UNUSED_RESULT; SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) VideoParameters * _Nonnull presetH720_43;) + (VideoParameters * _Nonnull)presetH720_43 SWIFT_WARN_UNUSED_RESULT; SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) VideoParameters * _Nonnull presetH1080_43;) + (VideoParameters * _Nonnull)presetH1080_43 SWIFT_WARN_UNUSED_RESULT; SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) VideoParameters * _Nonnull presetH1440_43;) + (VideoParameters * _Nonnull)presetH1440_43 SWIFT_WARN_UNUSED_RESULT; SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) VideoParameters * _Nonnull presetScreenShareH360FPS3;) + (VideoParameters * _Nonnull)presetScreenShareH360FPS3 SWIFT_WARN_UNUSED_RESULT; SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) VideoParameters * _Nonnull presetScreenShareH720FPS5;) + (VideoParameters * _Nonnull)presetScreenShareH720FPS5 SWIFT_WARN_UNUSED_RESULT; SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) VideoParameters * _Nonnull presetScreenShareH720FPS15;) + (VideoParameters * _Nonnull)presetScreenShareH720FPS15 SWIFT_WARN_UNUSED_RESULT; SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) VideoParameters * _Nonnull presetScreenShareH1080FPS15;) + (VideoParameters * _Nonnull)presetScreenShareH1080FPS15 SWIFT_WARN_UNUSED_RESULT; SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) VideoParameters * _Nonnull presetScreenShareH1080FPS30;) + (VideoParameters * _Nonnull)presetScreenShareH1080FPS30 SWIFT_WARN_UNUSED_RESULT; @end SWIFT_CLASS("_TtC16OUICallingPlugin19VideoPublishOptions") @interface VideoPublishOptions : NSObject @property (nonatomic, readonly, copy) NSString * _Nullable name; /// preferred encoding parameters @property (nonatomic, readonly, strong) VideoEncoding * _Nullable encoding; /// encoding parameters for for screen share @property (nonatomic, readonly, strong) VideoEncoding * _Nullable screenShareEncoding; /// true to enable simulcasting, publishes three tracks at different sizes @property (nonatomic, readonly) BOOL simulcast; @property (nonatomic, readonly, copy) NSArray * _Nonnull simulcastLayers; @property (nonatomic, readonly, copy) NSArray * _Nonnull screenShareSimulcastLayers; - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; @property (nonatomic, readonly) NSUInteger hash; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end SWIFT_PROTOCOL("_TtP16OUICallingPlugin13VideoRenderer_") @protocol VideoRenderer /// Whether this VideoRenderer should be considered visible or not for AdaptiveStream. /// This will be invoked on the .main thread. @property (nonatomic, readonly) BOOL adaptiveStreamIsEnabled; /// The size used for AdaptiveStream computation. Return .zero if size is unknown yet. /// This will be invoked on the .main thread. @property (nonatomic, readonly) CGSize adaptiveStreamSize; @end SWIFT_CLASS("_TtC16OUICallingPlugin21VideoSourceStatistics") @interface VideoSourceStatistics : MediaSourceStatistics @end enum LayoutMode : NSInteger; enum MirrorMode : NSInteger; enum RenderMode : NSInteger; SWIFT_CLASS("_TtC16OUICallingPlugin9VideoView") @interface VideoView : NativeView /// LayoutMode-swift.enum of the VideoView. @property (nonatomic) enum LayoutMode layoutMode; /// Flips the video horizontally, useful for local VideoViews. @property (nonatomic) enum MirrorMode mirrorMode; @property (nonatomic) enum RenderMode renderMode; /// Calls addRenderer and/or removeRenderer internally for convenience. @property (nonatomic, weak) id _Nullable track; /// If set to false, rendering will be paused temporarily. Useful for performance optimizations with UICollectionViewCell etc. @property (nonatomic) BOOL isEnabled; @property (nonatomic, getter=isHidden) BOOL hidden; @property (nonatomic) BOOL debugMode; @property (nonatomic, readonly) BOOL isRendering; @property (nonatomic, readonly) BOOL didRenderFirstFrame; - (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER; @end /// Specifies how to render the video withing the VideoView’s bounds. typedef SWIFT_ENUM(NSInteger, LayoutMode, open) { /// Video will be fully visible within the VideoView. LayoutModeFit = 0, /// Video will fully cover up the VideoView. LayoutModeFill = 1, }; typedef SWIFT_ENUM(NSInteger, MirrorMode, open) { /// Will mirror if the track is a front facing camera track. MirrorModeAuto = 0, MirrorModeOff = 1, MirrorModeMirror = 2, }; typedef SWIFT_ENUM(NSInteger, RenderMode, open) { RenderModeAuto = 0, RenderModeMetal = 1, RenderModeSampleBuffer = 2, }; @interface VideoView (SWIFT_EXTENSION(OUICallingPlugin)) - (void)capturer:(VideoCapturer * _Nonnull)capturer didUpdateState:(enum CapturerState)state; @end @protocol VideoViewDelegate; @interface VideoView (SWIFT_EXTENSION(OUICallingPlugin)) - (void)addDelegate:(id _Nonnull)delegate; - (void)removeDelegate:(id _Nonnull)delegate; - (void)removeAllDelegates; @end @interface VideoView (SWIFT_EXTENSION(OUICallingPlugin)) @property (nonatomic, readonly) BOOL adaptiveStreamIsEnabled; @property (nonatomic, readonly) CGSize adaptiveStreamSize; - (void)setSize:(CGSize)size; - (void)renderFrame:(RTCVideoFrame * _Nullable)frame; @end SWIFT_PROTOCOL("_TtP16OUICallingPlugin17VideoViewDelegate_") @protocol VideoViewDelegate @optional /// Dimensions of the VideoView itself has updated - (void)videoView:(VideoView * _Nonnull)videoView didUpdateSize:(CGSize)size; /// VideoView updated the isRendering property - (void)videoView:(VideoView * _Nonnull)videoView didUpdateIsRendering:(BOOL)isRendering; @end #endif #if __has_attribute(external_source_symbol) # pragma clang attribute pop #endif #if defined(__cplusplus) #endif #pragma clang diagnostic pop #endif #else #error unsupported Swift architecture #endif