OUICallingPlugin-Swift.h 95 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245
  1. #if 0
  2. #elif defined(__arm64__) && __arm64__
  3. // Generated by Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4)
  4. #ifndef OUICALLINGPLUGIN_SWIFT_H
  5. #define OUICALLINGPLUGIN_SWIFT_H
  6. #pragma clang diagnostic push
  7. #pragma clang diagnostic ignored "-Wgcc-compat"
  8. #if !defined(__has_include)
  9. # define __has_include(x) 0
  10. #endif
  11. #if !defined(__has_attribute)
  12. # define __has_attribute(x) 0
  13. #endif
  14. #if !defined(__has_feature)
  15. # define __has_feature(x) 0
  16. #endif
  17. #if !defined(__has_warning)
  18. # define __has_warning(x) 0
  19. #endif
  20. #if __has_include(<swift/objc-prologue.h>)
  21. # include <swift/objc-prologue.h>
  22. #endif
  23. #pragma clang diagnostic ignored "-Wauto-import"
  24. #if defined(__OBJC__)
  25. #include <Foundation/Foundation.h>
  26. #endif
  27. #if defined(__cplusplus)
  28. #include <cstdint>
  29. #include <cstddef>
  30. #include <cstdbool>
  31. #include <cstring>
  32. #include <stdlib.h>
  33. #include <new>
  34. #include <type_traits>
  35. #else
  36. #include <stdint.h>
  37. #include <stddef.h>
  38. #include <stdbool.h>
  39. #include <string.h>
  40. #endif
  41. #if defined(__cplusplus)
  42. #if defined(__arm64e__) && __has_include(<ptrauth.h>)
  43. # include <ptrauth.h>
  44. #else
  45. #pragma clang diagnostic push
  46. #pragma clang diagnostic ignored "-Wreserved-macro-identifier"
  47. # ifndef __ptrauth_swift_value_witness_function_pointer
  48. # define __ptrauth_swift_value_witness_function_pointer(x)
  49. # endif
  50. # ifndef __ptrauth_swift_class_method_pointer
  51. # define __ptrauth_swift_class_method_pointer(x)
  52. # endif
  53. #pragma clang diagnostic pop
  54. #endif
  55. #endif
  56. #if !defined(SWIFT_TYPEDEFS)
  57. # define SWIFT_TYPEDEFS 1
  58. # if __has_include(<uchar.h>)
  59. # include <uchar.h>
  60. # elif !defined(__cplusplus)
  61. typedef uint_least16_t char16_t;
  62. typedef uint_least32_t char32_t;
  63. # endif
  64. typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
  65. typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
  66. typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
  67. typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
  68. typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
  69. typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
  70. typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
  71. typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
  72. typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
  73. typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2)));
  74. typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3)));
  75. typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
  76. #endif
  77. #if !defined(SWIFT_PASTE)
  78. # define SWIFT_PASTE_HELPER(x, y) x##y
  79. # define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
  80. #endif
  81. #if !defined(SWIFT_METATYPE)
  82. # define SWIFT_METATYPE(X) Class
  83. #endif
  84. #if !defined(SWIFT_CLASS_PROPERTY)
  85. # if __has_feature(objc_class_property)
  86. # define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
  87. # else
  88. # define SWIFT_CLASS_PROPERTY(...)
  89. # endif
  90. #endif
  91. #if !defined(SWIFT_RUNTIME_NAME)
  92. # if __has_attribute(objc_runtime_name)
  93. # define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
  94. # else
  95. # define SWIFT_RUNTIME_NAME(X)
  96. # endif
  97. #endif
  98. #if !defined(SWIFT_COMPILE_NAME)
  99. # if __has_attribute(swift_name)
  100. # define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
  101. # else
  102. # define SWIFT_COMPILE_NAME(X)
  103. # endif
  104. #endif
  105. #if !defined(SWIFT_METHOD_FAMILY)
  106. # if __has_attribute(objc_method_family)
  107. # define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
  108. # else
  109. # define SWIFT_METHOD_FAMILY(X)
  110. # endif
  111. #endif
  112. #if !defined(SWIFT_NOESCAPE)
  113. # if __has_attribute(noescape)
  114. # define SWIFT_NOESCAPE __attribute__((noescape))
  115. # else
  116. # define SWIFT_NOESCAPE
  117. # endif
  118. #endif
  119. #if !defined(SWIFT_RELEASES_ARGUMENT)
  120. # if __has_attribute(ns_consumed)
  121. # define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed))
  122. # else
  123. # define SWIFT_RELEASES_ARGUMENT
  124. # endif
  125. #endif
  126. #if !defined(SWIFT_WARN_UNUSED_RESULT)
  127. # if __has_attribute(warn_unused_result)
  128. # define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
  129. # else
  130. # define SWIFT_WARN_UNUSED_RESULT
  131. # endif
  132. #endif
  133. #if !defined(SWIFT_NORETURN)
  134. # if __has_attribute(noreturn)
  135. # define SWIFT_NORETURN __attribute__((noreturn))
  136. # else
  137. # define SWIFT_NORETURN
  138. # endif
  139. #endif
  140. #if !defined(SWIFT_CLASS_EXTRA)
  141. # define SWIFT_CLASS_EXTRA
  142. #endif
  143. #if !defined(SWIFT_PROTOCOL_EXTRA)
  144. # define SWIFT_PROTOCOL_EXTRA
  145. #endif
  146. #if !defined(SWIFT_ENUM_EXTRA)
  147. # define SWIFT_ENUM_EXTRA
  148. #endif
  149. #if !defined(SWIFT_CLASS)
  150. # if __has_attribute(objc_subclassing_restricted)
  151. # define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
  152. # define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
  153. # else
  154. # define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
  155. # define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
  156. # endif
  157. #endif
  158. #if !defined(SWIFT_RESILIENT_CLASS)
  159. # if __has_attribute(objc_class_stub)
  160. # define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
  161. # define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
  162. # else
  163. # define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
  164. # define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
  165. # endif
  166. #endif
  167. #if !defined(SWIFT_PROTOCOL)
  168. # define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
  169. # define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
  170. #endif
  171. #if !defined(SWIFT_EXTENSION)
  172. # define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
  173. #endif
  174. #if !defined(OBJC_DESIGNATED_INITIALIZER)
  175. # if __has_attribute(objc_designated_initializer)
  176. # define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
  177. # else
  178. # define OBJC_DESIGNATED_INITIALIZER
  179. # endif
  180. #endif
  181. #if !defined(SWIFT_ENUM_ATTR)
  182. # if __has_attribute(enum_extensibility)
  183. # define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility)))
  184. # else
  185. # define SWIFT_ENUM_ATTR(_extensibility)
  186. # endif
  187. #endif
  188. #if !defined(SWIFT_ENUM)
  189. # define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
  190. # if __has_feature(generalized_swift_name)
  191. # 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
  192. # else
  193. # define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
  194. # endif
  195. #endif
  196. #if !defined(SWIFT_UNAVAILABLE)
  197. # define SWIFT_UNAVAILABLE __attribute__((unavailable))
  198. #endif
  199. #if !defined(SWIFT_UNAVAILABLE_MSG)
  200. # define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
  201. #endif
  202. #if !defined(SWIFT_AVAILABILITY)
  203. # define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
  204. #endif
  205. #if !defined(SWIFT_WEAK_IMPORT)
  206. # define SWIFT_WEAK_IMPORT __attribute__((weak_import))
  207. #endif
  208. #if !defined(SWIFT_DEPRECATED)
  209. # define SWIFT_DEPRECATED __attribute__((deprecated))
  210. #endif
  211. #if !defined(SWIFT_DEPRECATED_MSG)
  212. # define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
  213. #endif
  214. #if !defined(SWIFT_DEPRECATED_OBJC)
  215. # if __has_feature(attribute_diagnose_if_objc)
  216. # define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
  217. # else
  218. # define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
  219. # endif
  220. #endif
  221. #if defined(__OBJC__)
  222. #if !defined(IBSegueAction)
  223. # define IBSegueAction
  224. #endif
  225. #endif
  226. #if !defined(SWIFT_EXTERN)
  227. # if defined(__cplusplus)
  228. # define SWIFT_EXTERN extern "C"
  229. # else
  230. # define SWIFT_EXTERN extern
  231. # endif
  232. #endif
  233. #if !defined(SWIFT_CALL)
  234. # define SWIFT_CALL __attribute__((swiftcall))
  235. #endif
  236. #if !defined(SWIFT_INDIRECT_RESULT)
  237. # define SWIFT_INDIRECT_RESULT __attribute__((swift_indirect_result))
  238. #endif
  239. #if !defined(SWIFT_CONTEXT)
  240. # define SWIFT_CONTEXT __attribute__((swift_context))
  241. #endif
  242. #if !defined(SWIFT_ERROR_RESULT)
  243. # define SWIFT_ERROR_RESULT __attribute__((swift_error_result))
  244. #endif
  245. #if defined(__cplusplus)
  246. # define SWIFT_NOEXCEPT noexcept
  247. #else
  248. # define SWIFT_NOEXCEPT
  249. #endif
  250. #if !defined(SWIFT_C_INLINE_THUNK)
  251. # if __has_attribute(always_inline)
  252. # if __has_attribute(nodebug)
  253. # define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline)) __attribute__((nodebug))
  254. # else
  255. # define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline))
  256. # endif
  257. # else
  258. # define SWIFT_C_INLINE_THUNK inline
  259. # endif
  260. #endif
  261. #if defined(_WIN32)
  262. #if !defined(SWIFT_IMPORT_STDLIB_SYMBOL)
  263. # define SWIFT_IMPORT_STDLIB_SYMBOL __declspec(dllimport)
  264. #endif
  265. #else
  266. #if !defined(SWIFT_IMPORT_STDLIB_SYMBOL)
  267. # define SWIFT_IMPORT_STDLIB_SYMBOL
  268. #endif
  269. #endif
  270. #if defined(__OBJC__)
  271. #if __has_feature(objc_modules)
  272. #if __has_warning("-Watimport-in-framework-header")
  273. #pragma clang diagnostic ignored "-Watimport-in-framework-header"
  274. #endif
  275. @import AVFoundation;
  276. @import CoreFoundation;
  277. @import CoreMedia;
  278. @import FBLPromises;
  279. @import Foundation;
  280. @import ObjectiveC;
  281. @import OpenIMCore;
  282. @import ReplayKit;
  283. @import UIKit;
  284. @import WebRTC;
  285. #endif
  286. #endif
  287. #pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
  288. #pragma clang diagnostic ignored "-Wduplicate-method-arg"
  289. #if __has_warning("-Wpragma-clang-attribute")
  290. # pragma clang diagnostic ignored "-Wpragma-clang-attribute"
  291. #endif
  292. #pragma clang diagnostic ignored "-Wunknown-pragmas"
  293. #pragma clang diagnostic ignored "-Wnullability"
  294. #pragma clang diagnostic ignored "-Wdollar-in-identifier-extension"
  295. #if __has_attribute(external_source_symbol)
  296. # pragma push_macro("any")
  297. # undef any
  298. # 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))
  299. # pragma pop_macro("any")
  300. #endif
  301. #if defined(__OBJC__)
  302. @class NSCoder;
  303. @class UITouch;
  304. @class UIEvent;
  305. /// Lottie comes prepacked with a two Animated Controls, <code>AnimatedSwitch</code> and
  306. /// <code>AnimatedButton</code>. Both of these controls are built on top of <code>AnimatedControl</code>
  307. /// <code>AnimatedControl</code> is a subclass of <code>UIControl</code> that provides an interactive
  308. /// mechanism for controlling the visual state of an animation in response to
  309. /// user actions.
  310. /// The <code>AnimatedControl</code> will show and hide layers depending on the current
  311. /// <code>UIControl.State</code> of the control.
  312. /// Users of <code>AnimationControl</code> can set a Layer Name for each <code>UIControl.State</code>.
  313. /// When the state is change the <code>AnimationControl</code> will change the visibility
  314. /// of its layers.
  315. /// NOTE: Do not initialize directly. This is intended to be subclassed.
  316. SWIFT_CLASS("_TtC16OUICallingPlugin15AnimatedControl")
  317. @interface AnimatedControl : UIControl
  318. - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
  319. - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
  320. @property (nonatomic, getter=isEnabled) BOOL enabled;
  321. @property (nonatomic, getter=isSelected) BOOL selected;
  322. @property (nonatomic, getter=isHighlighted) BOOL highlighted;
  323. @property (nonatomic, readonly) CGSize intrinsicContentSize;
  324. - (BOOL)beginTrackingWithTouch:(UITouch * _Nonnull)touch withEvent:(UIEvent * _Nullable)event SWIFT_WARN_UNUSED_RESULT;
  325. - (BOOL)continueTrackingWithTouch:(UITouch * _Nonnull)touch withEvent:(UIEvent * _Nullable)event SWIFT_WARN_UNUSED_RESULT;
  326. - (void)endTrackingWithTouch:(UITouch * _Nullable)touch withEvent:(UIEvent * _Nullable)event;
  327. - (void)cancelTrackingWithEvent:(UIEvent * _Nullable)event;
  328. - (nonnull instancetype)initWithFrame:(CGRect)frame SWIFT_UNAVAILABLE;
  329. @end
  330. /// An interactive button that plays an animation when pressed.
  331. SWIFT_CLASS("_TtC16OUICallingPlugin14AnimatedButton")
  332. @interface AnimatedButton : AnimatedControl
  333. - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
  334. - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
  335. - (BOOL)beginTrackingWithTouch:(UITouch * _Nonnull)touch withEvent:(UIEvent * _Nullable)event SWIFT_WARN_UNUSED_RESULT;
  336. - (void)endTrackingWithTouch:(UITouch * _Nullable)touch withEvent:(UIEvent * _Nullable)event;
  337. @property (nonatomic) UIAccessibilityTraits accessibilityTraits;
  338. @end
  339. @class UIImage;
  340. @class CALayer;
  341. /// Represents a subclass of <code>UIImageView</code> for displaying animated image.
  342. /// Different from showing animated image in a normal <code>UIImageView</code> (which load all frames at one time),
  343. /// <code>AnimatedImageView</code> only tries to load several frames (defined by <code>framePreloadCount</code>) to reduce memory usage.
  344. /// It provides a tradeoff between memory usage and CPU time. If you have a memory issue when using a normal image
  345. /// view to load GIF data, you could give this class a try.
  346. /// Kingfisher supports setting GIF animated data to either <code>UIImageView</code> and <code>AnimatedImageView</code> out of box. So
  347. /// it would be fairly easy to switch between them.
  348. SWIFT_CLASS("_TtC16OUICallingPlugin17AnimatedImageView")
  349. @interface AnimatedImageView : UIImageView
  350. @property (nonatomic, strong) UIImage * _Nullable image;
  351. @property (nonatomic, getter=isHighlighted) BOOL highlighted;
  352. @property (nonatomic, readonly, getter=isAnimating) BOOL animating;
  353. /// Starts the animation.
  354. - (void)startAnimating;
  355. /// Stops the animation.
  356. - (void)stopAnimating;
  357. - (void)displayLayer:(CALayer * _Nonnull)layer;
  358. - (void)didMoveToWindow;
  359. - (void)didMoveToSuperview;
  360. - (nonnull instancetype)initWithImage:(UIImage * _Nullable)image OBJC_DESIGNATED_INITIALIZER;
  361. - (nonnull instancetype)initWithImage:(UIImage * _Nullable)image highlightedImage:(UIImage * _Nullable)highlightedImage OBJC_DESIGNATED_INITIALIZER SWIFT_AVAILABILITY(ios,introduced=3.0);
  362. - (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
  363. - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER;
  364. @end
  365. /// An interactive switch with an ‘On’ and ‘Off’ state. When the user taps on the
  366. /// switch the state is toggled and the appropriate animation is played.
  367. /// Both the ‘On’ and ‘Off’ have an animation play range associated with their state.
  368. SWIFT_CLASS("_TtC16OUICallingPlugin14AnimatedSwitch")
  369. @interface AnimatedSwitch : AnimatedControl
  370. - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
  371. - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
  372. - (void)endTrackingWithTouch:(UITouch * _Nullable)touch withEvent:(UIEvent * _Nullable)event;
  373. @property (nonatomic) UIAccessibilityTraits accessibilityTraits;
  374. @end
  375. /// A view that can be added to a keypath of an AnimationView
  376. SWIFT_CLASS("_TtC16OUICallingPlugin16AnimationSubview")
  377. @interface AnimationSubview : UIView
  378. - (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
  379. - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER;
  380. @end
  381. SWIFT_PROTOCOL("_TtP16OUICallingPlugin14CaptureOptions_")
  382. @protocol CaptureOptions
  383. @end
  384. SWIFT_CLASS("_TtC16OUICallingPlugin19AudioCaptureOptions")
  385. @interface AudioCaptureOptions : NSObject <CaptureOptions>
  386. @property (nonatomic, readonly) BOOL echoCancellation;
  387. @property (nonatomic, readonly) BOOL noiseSuppression;
  388. @property (nonatomic, readonly) BOOL autoGainControl;
  389. @property (nonatomic, readonly) BOOL typingNoiseDetection;
  390. @property (nonatomic, readonly) BOOL highpassFilter;
  391. @property (nonatomic, readonly) BOOL experimentalNoiseSuppression;
  392. @property (nonatomic, readonly) BOOL experimentalAutoGainControl;
  393. - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
  394. @property (nonatomic, readonly) NSUInteger hash;
  395. - (nonnull instancetype)init SWIFT_UNAVAILABLE;
  396. + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
  397. @end
  398. SWIFT_PROTOCOL("_TtP16OUICallingPlugin13MediaEncoding_")
  399. @protocol MediaEncoding
  400. @property (nonatomic, readonly) NSInteger maxBitrate;
  401. @end
  402. SWIFT_CLASS("_TtC16OUICallingPlugin13AudioEncoding")
  403. @interface AudioEncoding : NSObject <MediaEncoding>
  404. @property (nonatomic) NSInteger maxBitrate;
  405. - (nonnull instancetype)initWithMaxBitrate:(NSInteger)maxBitrate OBJC_DESIGNATED_INITIALIZER;
  406. - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
  407. @property (nonatomic, readonly) NSUInteger hash;
  408. - (nonnull instancetype)init SWIFT_UNAVAILABLE;
  409. + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
  410. @end
  411. @interface AudioEncoding (SWIFT_EXTENSION(OUICallingPlugin))
  412. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AudioEncoding * _Nonnull presetTelephone;)
  413. + (AudioEncoding * _Nonnull)presetTelephone SWIFT_WARN_UNUSED_RESULT;
  414. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AudioEncoding * _Nonnull presetSpeech;)
  415. + (AudioEncoding * _Nonnull)presetSpeech SWIFT_WARN_UNUSED_RESULT;
  416. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AudioEncoding * _Nonnull presetMusic;)
  417. + (AudioEncoding * _Nonnull)presetMusic SWIFT_WARN_UNUSED_RESULT;
  418. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AudioEncoding * _Nonnull presetMusicStereo;)
  419. + (AudioEncoding * _Nonnull)presetMusicStereo SWIFT_WARN_UNUSED_RESULT;
  420. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AudioEncoding * _Nonnull presetMusicHighQuality;)
  421. + (AudioEncoding * _Nonnull)presetMusicHighQuality SWIFT_WARN_UNUSED_RESULT;
  422. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AudioEncoding * _Nonnull presetMusicHighQualityStereo;)
  423. + (AudioEncoding * _Nonnull)presetMusicHighQualityStereo SWIFT_WARN_UNUSED_RESULT;
  424. @end
  425. SWIFT_CLASS("_TtC16OUICallingPlugin10Statistics")
  426. @interface Statistics : NSObject
  427. - (nonnull instancetype)init SWIFT_UNAVAILABLE;
  428. + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
  429. @end
  430. SWIFT_CLASS("_TtC16OUICallingPlugin22AudioPlayoutStatistics")
  431. @interface AudioPlayoutStatistics : Statistics
  432. @end
  433. @class NSString;
  434. SWIFT_PROTOCOL("_TtP16OUICallingPlugin14PublishOptions_")
  435. @protocol PublishOptions
  436. @property (nonatomic, readonly, copy) NSString * _Nullable name;
  437. @end
  438. SWIFT_CLASS("_TtC16OUICallingPlugin19AudioPublishOptions")
  439. @interface AudioPublishOptions : NSObject <PublishOptions>
  440. @property (nonatomic, readonly, copy) NSString * _Nullable name;
  441. /// preferred encoding parameters
  442. @property (nonatomic, readonly, strong) AudioEncoding * _Nullable encoding;
  443. @property (nonatomic, readonly) BOOL dtx;
  444. - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
  445. @property (nonatomic, readonly) NSUInteger hash;
  446. - (nonnull instancetype)init SWIFT_UNAVAILABLE;
  447. + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
  448. @end
  449. SWIFT_CLASS("_TtC16OUICallingPlugin21MediaSourceStatistics")
  450. @interface MediaSourceStatistics : Statistics
  451. @end
  452. SWIFT_CLASS("_TtC16OUICallingPlugin21AudioSourceStatistics")
  453. @interface AudioSourceStatistics : MediaSourceStatistics
  454. @end
  455. SWIFT_PROTOCOL("_TtP16OUICallingPlugin10AudioTrack_")
  456. @protocol AudioTrack
  457. @end
  458. SWIFT_CLASS("_TtC16OUICallingPlugin10AvatarView")
  459. @interface AvatarView : UIView
  460. - (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
  461. - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE;
  462. @end
  463. @class Dimensions;
  464. SWIFT_PROTOCOL("_TtP16OUICallingPlugin19VideoCaptureOptions_")
  465. @protocol VideoCaptureOptions <CaptureOptions>
  466. @property (nonatomic, readonly, strong) Dimensions * _Nonnull dimensions;
  467. @property (nonatomic, readonly) NSInteger fps;
  468. @end
  469. SWIFT_CLASS("_TtC16OUICallingPlugin20BufferCaptureOptions")
  470. @interface BufferCaptureOptions : NSObject <VideoCaptureOptions>
  471. @property (nonatomic, readonly, strong) Dimensions * _Nonnull dimensions;
  472. @property (nonatomic, readonly) NSInteger fps;
  473. - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
  474. @property (nonatomic, readonly) NSUInteger hash;
  475. - (nonnull instancetype)init SWIFT_UNAVAILABLE;
  476. + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
  477. @end
  478. SWIFT_CLASS("_TtC16OUICallingPlugin13VideoCapturer")
  479. @interface VideoCapturer : NSObject
  480. - (nonnull instancetype)init SWIFT_UNAVAILABLE;
  481. + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
  482. @end
  483. typedef SWIFT_ENUM(NSInteger, CapturerState, open) {
  484. CapturerStateStopped = 0,
  485. CapturerStateStarted = 1,
  486. };
  487. /// A <code>VideoCapturer</code> that can capture <code>CMSampleBuffer</code>s.
  488. /// Repeatedly call <code>capture(_:)</code> to capture a stream of <code>CMSampleBuffer</code>s.
  489. /// The pixel format must be one of <code>VideoCapturer/supportedPixelFormats</code>. If an unsupported pixel format is used, the SDK will skip the capture.
  490. /// <code>BufferCapturer</code> can be used to provide video buffers from ReplayKit.
  491. /// <blockquote>
  492. /// Note: At least one frame must be captured before publishing the track or the publish will timeout,
  493. /// since dimensions must be resolved at the time of publishing (to compute video parameters).
  494. ///
  495. /// </blockquote>
  496. SWIFT_CLASS("_TtC16OUICallingPlugin14BufferCapturer")
  497. @interface BufferCapturer : VideoCapturer
  498. @end
  499. SWIFT_CLASS("_TtC16OUICallingPlugin15CallbackHandler")
  500. @interface CallbackHandler : NSObject <Open_im_sdk_callbackBase>
  501. - (void)onSuccess:(NSString * _Nullable)data;
  502. - (void)onError:(int32_t)errCode errMsg:(NSString * _Nullable)errMsg;
  503. - (nonnull instancetype)init SWIFT_UNAVAILABLE;
  504. + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
  505. @end
  506. @class CallingUserInfo;
  507. @class NSBundle;
  508. SWIFT_CLASS("_TtC16OUICallingPlugin21CallingBaseController")
  509. @interface CallingBaseController : UIViewController
  510. /// 接收按钮
  511. @property (nonatomic, copy) void (^ _Nullable onAccepted)(void);
  512. /// 拒绝按钮
  513. @property (nonatomic, copy) void (^ _Nullable onRejected)(void);
  514. /// 取消按钮
  515. @property (nonatomic, copy) void (^ _Nullable onCancel)(void);
  516. /// 挂断按钮
  517. @property (nonatomic, copy) void (^ _Nullable onHungup)(NSInteger);
  518. /// 有成员离开
  519. @property (nonatomic, copy) void (^ _Nullable onBeHungup)(NSInteger);
  520. /// 邀请按钮
  521. @property (nonatomic, copy) void (^ _Nullable onInvitedOthers)(void);
  522. /// 链接失败
  523. @property (nonatomic, copy) void (^ _Nullable onConnectFailure)(void);
  524. /// 断开链接
  525. @property (nonatomic, copy) void (^ _Nullable onDisconnect)(void);
  526. /// @param isVideo 是否是音视频
  527. /// @param inviter 邀请者
  528. /// @param others 其它人
  529. - (void)startLiveChatWithInviter:(NSArray<CallingUserInfo *> * _Nonnull (^ _Nonnull)(void))inviter others:(NSArray<CallingUserInfo *> * _Nonnull (^ _Nonnull)(void))others isVideo:(BOOL)isVideo groupID:(NSString * _Nullable)groupID;
  530. /// 链接房间
  531. - (void)connectRoomWithLiveURL:(NSString * _Nonnull)liveURL token:(NSString * _Nonnull)token;
  532. /// 挂断、拒绝等关闭界面
  533. - (void)dismiss;
  534. - (nonnull instancetype)initWithNibName:(NSString * _Nullable)nibNameOrNil bundle:(NSBundle * _Nullable)nibBundleOrNil OBJC_DESIGNATED_INITIALIZER;
  535. - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER;
  536. @end
  537. SWIFT_CLASS("_TtC16OUICallingPlugin25CallingBaseViewController")
  538. @interface CallingBaseViewController : CallingBaseController
  539. /// 链接房间
  540. - (void)connectRoomWithLiveURL:(NSString * _Nonnull)liveURL token:(NSString * _Nonnull)token;
  541. /// 挂断、拒绝等关闭界面
  542. - (void)dismiss;
  543. - (void)viewDidLoad;
  544. - (nonnull instancetype)initWithNibName:(NSString * _Nullable)nibNameOrNil bundle:(NSBundle * _Nullable)nibBundleOrNil OBJC_DESIGNATED_INITIALIZER;
  545. - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER;
  546. @end
  547. SWIFT_CLASS("_TtC16OUICallingPlugin14CallingManager")
  548. @interface CallingManager : NSObject
  549. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) CallingManager * _Nonnull manager;)
  550. + (CallingManager * _Nonnull)manager SWIFT_WARN_UNUSED_RESULT;
  551. - (void)startWithOnEndCallingHandler:(void (^ _Nullable)(NSDictionary<NSString *, id> * _Nonnull))endCallingHandler;
  552. - (void)forceDismiss;
  553. - (void)startLiveChat:(NSDictionary<NSString *, id> * _Nonnull)signingInfo;
  554. - (void)startLiveChatWithInviterID:(NSString * _Nonnull)inviterID othersID:(NSArray<NSString *> * _Nonnull)othersID isVideo:(BOOL)isVideo groupID:(NSString * _Nullable)groupID incoming:(BOOL)incoming;
  555. - (void)startLiveChatWithInviter:(CallingUserInfo * _Nonnull)inviter others:(NSArray<CallingUserInfo *> * _Nonnull)others isVideo:(BOOL)isVideo groupID:(NSString * _Nullable)groupID incoming:(BOOL)incoming;
  556. - (void)joinRoomWithSignalingInfo:(NSDictionary<NSString *, id> * _Nonnull)signalingInfo;
  557. - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
  558. @end
  559. @interface CallingManager (SWIFT_EXTENSION(OUICallingPlugin)) <Open_im_sdk_callbackOnSignalingListener>
  560. - (void)onReceiveCustomSignal:(NSString * _Nullable)CustomSignalCallback;
  561. - (void)onStreamChange:(NSString * _Nullable)s;
  562. - (void)onReceiveNewInvitation:(NSString * _Nullable)s;
  563. - (void)onRoomParticipantConnected:(NSString * _Nullable)connectedInfo;
  564. - (void)onRoomParticipantDisconnected:(NSString * _Nullable)disconnectedInfo;
  565. - (void)onInviteeAcceptedByOtherDevice:(NSString * _Nullable)s;
  566. - (void)onInviteeRejectedByOtherDevice:(NSString * _Nullable)s;
  567. - (void)onInviteeAccepted:(NSString * _Nullable)s;
  568. - (void)onInviteeRejected:(NSString * _Nullable)s;
  569. - (void)onInvitationCancelled:(NSString * _Nullable)s;
  570. - (void)onInvitationTimeout:(NSString * _Nullable)s;
  571. - (void)onHangUp:(NSString * _Nullable)s;
  572. @end
  573. SWIFT_CLASS("_TtC16OUICallingPlugin25CallingReceiverController")
  574. @interface CallingReceiverController : CallingBaseController
  575. /// 链接房间
  576. - (void)connectRoomWithLiveURL:(NSString * _Nonnull)liveURL token:(NSString * _Nonnull)token;
  577. /// 挂断、拒绝等关闭界面
  578. - (void)dismiss;
  579. /// @param isVideo 是否是音视频
  580. /// @param inviter 邀请者
  581. /// @param others 其它人
  582. - (void)startLiveChatWithInviter:(NSArray<CallingUserInfo *> * _Nonnull (^ _Nonnull)(void))inviter others:(NSArray<CallingUserInfo *> * _Nonnull (^ _Nonnull)(void))others isVideo:(BOOL)isVideo groupID:(NSString * _Nullable)groupID;
  583. - (void)joinRoomWithIsVideo:(BOOL)isVideo roomID:(NSString * _Nonnull)roomID liveURL:(NSString * _Nonnull)liveURL token:(NSString * _Nonnull)token;
  584. - (nonnull instancetype)initWithNibName:(NSString * _Nullable)nibNameOrNil bundle:(NSBundle * _Nullable)nibBundleOrNil OBJC_DESIGNATED_INITIALIZER;
  585. - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER;
  586. @end
  587. SWIFT_CLASS("_TtC16OUICallingPlugin23CallingSenderController")
  588. @interface CallingSenderController : CallingBaseController
  589. /// 链接房间
  590. - (void)connectRoomWithLiveURL:(NSString * _Nonnull)liveURL token:(NSString * _Nonnull)token;
  591. /// 挂断、拒绝等关闭界面
  592. - (void)dismiss;
  593. /// @param isVideo 是否是音视频
  594. /// @param inviter 邀请者
  595. /// @param others 其它人
  596. - (void)startLiveChatWithInviter:(NSArray<CallingUserInfo *> * _Nonnull (^ _Nonnull)(void))inviter others:(NSArray<CallingUserInfo *> * _Nonnull (^ _Nonnull)(void))others isVideo:(BOOL)isVideo groupID:(NSString * _Nullable)groupID;
  597. - (nonnull instancetype)initWithNibName:(NSString * _Nullable)nibNameOrNil bundle:(NSBundle * _Nullable)nibBundleOrNil OBJC_DESIGNATED_INITIALIZER;
  598. - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER;
  599. @end
  600. SWIFT_CLASS("_TtC16OUICallingPlugin15CallingUserInfo")
  601. @interface CallingUserInfo : NSObject
  602. - (nonnull instancetype)initWithUserID:(NSString * _Nullable)userID nickname:(NSString * _Nullable)nickname faceURL:(NSString * _Nullable)faceURL ex:(NSString * _Nullable)ex OBJC_DESIGNATED_INITIALIZER;
  603. - (nonnull instancetype)init SWIFT_UNAVAILABLE;
  604. + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
  605. @end
  606. @class AVCaptureDeviceFormat;
  607. SWIFT_CLASS("_TtC16OUICallingPlugin20CameraCaptureOptions")
  608. @interface CameraCaptureOptions : NSObject <VideoCaptureOptions>
  609. @property (nonatomic, readonly) enum AVCaptureDevicePosition position;
  610. @property (nonatomic, readonly, strong) AVCaptureDeviceFormat * _Nullable preferredFormat;
  611. /// preferred dimensions for capturing, the SDK may override with a recommended value.
  612. @property (nonatomic, readonly, strong) Dimensions * _Nonnull dimensions;
  613. /// preferred fps to use for capturing, the SDK may override with a recommended value.
  614. @property (nonatomic, readonly) NSInteger fps;
  615. - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
  616. - (nonnull instancetype)initWithPosition:(enum AVCaptureDevicePosition)position preferredFormat:(AVCaptureDeviceFormat * _Nullable)preferredFormat dimensions:(Dimensions * _Nonnull)dimensions fps:(NSInteger)fps OBJC_DESIGNATED_INITIALIZER;
  617. - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
  618. @property (nonatomic, readonly) NSUInteger hash;
  619. @end
  620. @class AVCaptureDevice;
  621. SWIFT_CLASS("_TtC16OUICallingPlugin14CameraCapturer")
  622. @interface CameraCapturer : VideoCapturer
  623. + (NSArray<AVCaptureDevice *> * _Nonnull)captureDevices SWIFT_WARN_UNUSED_RESULT;
  624. /// Checks whether both front and back capturing devices exist, and can be switched.
  625. + (BOOL)canSwitchPosition SWIFT_WARN_UNUSED_RESULT;
  626. /// Current device used for capturing
  627. @property (nonatomic, readonly, strong) AVCaptureDevice * _Nullable device;
  628. @property (nonatomic, strong) CameraCaptureOptions * _Nonnull options;
  629. @end
  630. @class RTCVideoCapturer;
  631. @class RTCVideoFrame;
  632. @interface CameraCapturer (SWIFT_EXTENSION(OUICallingPlugin)) <RTCVideoCapturerDelegate>
  633. - (void)capturer:(RTCVideoCapturer * _Nonnull)capturer didCaptureVideoFrame:(RTCVideoFrame * _Nonnull)frame;
  634. @end
  635. @class NSNumber;
  636. @interface CameraCapturer (SWIFT_EXTENSION(OUICallingPlugin))
  637. - (FBLPromise<NSNumber *> * _Nonnull)switchCameraPosition;
  638. - (FBLPromise<NSNumber *> * _Nonnull)setCameraPosition:(enum AVCaptureDevicePosition)position;
  639. @end
  640. SWIFT_CLASS("_TtC16OUICallingPlugin21CertificateStatistics")
  641. @interface CertificateStatistics : Statistics
  642. @end
  643. SWIFT_CLASS("_TtC16OUICallingPlugin15CodecStatistics")
  644. @interface CodecStatistics : Statistics
  645. @end
  646. /// An Objective-C compatible wrapper around Lottie’s Animation class.
  647. /// Use in tandem with CompatibleAnimationView when using Lottie in Objective-C
  648. SWIFT_CLASS("_TtC16OUICallingPlugin19CompatibleAnimation")
  649. @interface CompatibleAnimation : NSObject
  650. - (nonnull instancetype)initWithName:(NSString * _Nonnull)name bundle:(NSBundle * _Nonnull)bundle OBJC_DESIGNATED_INITIALIZER;
  651. - (nonnull instancetype)init SWIFT_UNAVAILABLE;
  652. + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
  653. @end
  654. /// An Objective-C compatible wrapper around Lottie’s AnimationKeypath
  655. SWIFT_CLASS("_TtC16OUICallingPlugin26CompatibleAnimationKeypath")
  656. @interface CompatibleAnimationKeypath : NSObject
  657. /// Creates a keypath from a dot separated string. The string is separated by “.”
  658. - (nonnull instancetype)initWithKeypath:(NSString * _Nonnull)keypath OBJC_DESIGNATED_INITIALIZER;
  659. /// Creates a keypath from a list of strings.
  660. - (nonnull instancetype)initWithKeys:(NSArray<NSString *> * _Nonnull)keys OBJC_DESIGNATED_INITIALIZER;
  661. - (nonnull instancetype)init SWIFT_UNAVAILABLE;
  662. + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
  663. @end
  664. @class UIColor;
  665. /// An Objective-C compatible wrapper around Lottie’s LottieAnimationView.
  666. SWIFT_CLASS("_TtC16OUICallingPlugin23CompatibleAnimationView")
  667. @interface CompatibleAnimationView : UIView
  668. - (nonnull instancetype)initWithCompatibleAnimation:(CompatibleAnimation * _Nonnull)compatibleAnimation OBJC_DESIGNATED_INITIALIZER;
  669. - (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
  670. - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)_ SWIFT_UNAVAILABLE;
  671. @property (nonatomic, strong) CompatibleAnimation * _Nullable compatibleAnimation;
  672. @property (nonatomic) CGFloat loopAnimationCount;
  673. @property (nonatomic) UIViewContentMode contentMode;
  674. @property (nonatomic) BOOL shouldRasterizeWhenIdle;
  675. @property (nonatomic) CGFloat currentProgress;
  676. @property (nonatomic) NSTimeInterval currentTime;
  677. @property (nonatomic) CGFloat currentFrame;
  678. @property (nonatomic, readonly) CGFloat realtimeAnimationFrame;
  679. @property (nonatomic, readonly) CGFloat realtimeAnimationProgress;
  680. @property (nonatomic) CGFloat animationSpeed;
  681. @property (nonatomic) BOOL respectAnimationFrameRate;
  682. @property (nonatomic, readonly) BOOL isAnimationPlaying;
  683. - (void)play;
  684. - (void)playWithCompletion:(void (^ _Nullable)(BOOL))completion;
  685. - (void)playFromProgress:(CGFloat)fromProgress toProgress:(CGFloat)toProgress completion:(void (^ _Nullable)(BOOL))completion;
  686. - (void)playFromFrame:(CGFloat)fromFrame toFrame:(CGFloat)toFrame completion:(void (^ _Nullable)(BOOL))completion;
  687. - (void)playFromMarker:(NSString * _Nonnull)fromMarker toMarker:(NSString * _Nonnull)toMarker completion:(void (^ _Nullable)(BOOL))completion;
  688. - (void)playWithMarker:(NSString * _Nonnull)marker completion:(void (^ _Nullable)(BOOL))completion;
  689. - (void)stop;
  690. - (void)pause;
  691. - (void)reloadImages;
  692. - (void)forceDisplayUpdate;
  693. - (id _Nullable)getValueFor:(CompatibleAnimationKeypath * _Nonnull)keypath atFrame:(CGFloat)atFrame SWIFT_WARN_UNUSED_RESULT;
  694. - (void)logHierarchyKeypaths;
  695. - (void)setColorValue:(UIColor * _Nonnull)color forKeypath:(CompatibleAnimationKeypath * _Nonnull)keypath;
  696. - (UIColor * _Nullable)getColorValueFor:(CompatibleAnimationKeypath * _Nonnull)keypath atFrame:(CGFloat)atFrame SWIFT_WARN_UNUSED_RESULT;
  697. - (void)addSubview:(AnimationSubview * _Nonnull)subview forLayerAt:(CompatibleAnimationKeypath * _Nonnull)keypath;
  698. - (CGRect)convertWithRect:(CGRect)rect toLayerAt:(CompatibleAnimationKeypath * _Nullable)keypath SWIFT_WARN_UNUSED_RESULT;
  699. - (CGPoint)convertWithPoint:(CGPoint)point toLayerAt:(CompatibleAnimationKeypath * _Nullable)keypath SWIFT_WARN_UNUSED_RESULT;
  700. - (CGFloat)progressTimeForMarker:(NSString * _Nonnull)named SWIFT_WARN_UNUSED_RESULT;
  701. - (CGFloat)frameTimeForMarker:(NSString * _Nonnull)named SWIFT_WARN_UNUSED_RESULT;
  702. - (CGFloat)durationFrameTimeForMarker:(NSString * _Nonnull)named SWIFT_WARN_UNUSED_RESULT;
  703. @end
  704. @class RTCConfiguration;
  705. enum ProtocolVersion : NSInteger;
  706. /// Options used when establishing a connection.
  707. SWIFT_CLASS("_TtC16OUICallingPlugin14ConnectOptions")
  708. @interface ConnectOptions : NSObject
  709. /// Automatically subscribe to <code>RemoteParticipant</code>’s tracks.
  710. /// Defaults to true.
  711. @property (nonatomic, readonly) BOOL autoSubscribe;
  712. @property (nonatomic, readonly, strong) RTCConfiguration * _Nonnull rtcConfiguration;
  713. /// Providing a string will make the connection publish-only, suitable for iOS Broadcast Upload Extensions.
  714. /// The string can be used to identify the publisher.
  715. @property (nonatomic, readonly, copy) NSString * _Nullable publishOnlyMode;
  716. /// LiveKit server protocol version to use. Generally, it’s not recommended to change this.
  717. @property (nonatomic, readonly) enum ProtocolVersion protocolVersion;
  718. /// The number of attempts to reconnect when the network disconnects.
  719. @property (nonatomic, readonly) NSInteger reconnectAttempts;
  720. /// The delay between reconnect attempts.
  721. @property (nonatomic, readonly) NSTimeInterval reconnectAttemptDelay;
  722. - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
  723. - (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;
  724. - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
  725. @property (nonatomic, readonly) NSUInteger hash;
  726. @end
  727. typedef SWIFT_ENUM(NSInteger, ConnectionQuality, open) {
  728. ConnectionQualityUnknown = 0,
  729. ConnectionQualityPoor = 1,
  730. ConnectionQualityGood = 2,
  731. ConnectionQualityExcellent = 3,
  732. };
  733. typedef SWIFT_ENUM_NAMED(NSInteger, ConnectionState, "ConnectionStateObjC", open) {
  734. ConnectionStateDisconnected = 0,
  735. ConnectionStateConnecting = 1,
  736. ConnectionStateReconnecting = 2,
  737. ConnectionStateConnected = 3,
  738. };
  739. SWIFT_CLASS("_TtC16OUICallingPlugin21DataChannelStatistics")
  740. @interface DataChannelStatistics : Statistics
  741. @end
  742. SWIFT_CLASS("_TtC16OUICallingPlugin18DataPublishOptions")
  743. @interface DataPublishOptions : NSObject <PublishOptions>
  744. @property (nonatomic, readonly, copy) NSString * _Nullable name;
  745. @property (nonatomic, readonly, copy) NSArray<NSString *> * _Nonnull destinations;
  746. @property (nonatomic, readonly, copy) NSString * _Nullable topic;
  747. - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
  748. @property (nonatomic, readonly) NSUInteger hash;
  749. - (nonnull instancetype)init SWIFT_UNAVAILABLE;
  750. + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
  751. @end
  752. SWIFT_CLASS("_TtC16OUICallingPlugin10Dimensions")
  753. @interface Dimensions : NSObject
  754. @property (nonatomic, readonly) int32_t width;
  755. @property (nonatomic, readonly) int32_t height;
  756. - (nonnull instancetype)initWithWidth:(int32_t)width height:(int32_t)height OBJC_DESIGNATED_INITIALIZER;
  757. - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
  758. @property (nonatomic, readonly) NSUInteger hash;
  759. @property (nonatomic, readonly, copy) NSString * _Nonnull description;
  760. - (nonnull instancetype)init SWIFT_UNAVAILABLE;
  761. + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
  762. @end
  763. @interface Dimensions (SWIFT_EXTENSION(OUICallingPlugin))
  764. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) Dimensions * _Nonnull h90_169;)
  765. + (Dimensions * _Nonnull)h90_169 SWIFT_WARN_UNUSED_RESULT;
  766. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) Dimensions * _Nonnull h180_169;)
  767. + (Dimensions * _Nonnull)h180_169 SWIFT_WARN_UNUSED_RESULT;
  768. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) Dimensions * _Nonnull h216_169;)
  769. + (Dimensions * _Nonnull)h216_169 SWIFT_WARN_UNUSED_RESULT;
  770. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) Dimensions * _Nonnull h360_169;)
  771. + (Dimensions * _Nonnull)h360_169 SWIFT_WARN_UNUSED_RESULT;
  772. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) Dimensions * _Nonnull h540_169;)
  773. + (Dimensions * _Nonnull)h540_169 SWIFT_WARN_UNUSED_RESULT;
  774. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) Dimensions * _Nonnull h720_169;)
  775. + (Dimensions * _Nonnull)h720_169 SWIFT_WARN_UNUSED_RESULT;
  776. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) Dimensions * _Nonnull h1080_169;)
  777. + (Dimensions * _Nonnull)h1080_169 SWIFT_WARN_UNUSED_RESULT;
  778. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) Dimensions * _Nonnull h1440_169;)
  779. + (Dimensions * _Nonnull)h1440_169 SWIFT_WARN_UNUSED_RESULT;
  780. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) Dimensions * _Nonnull h2160_169;)
  781. + (Dimensions * _Nonnull)h2160_169 SWIFT_WARN_UNUSED_RESULT;
  782. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) Dimensions * _Nonnull h120_43;)
  783. + (Dimensions * _Nonnull)h120_43 SWIFT_WARN_UNUSED_RESULT;
  784. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) Dimensions * _Nonnull h180_43;)
  785. + (Dimensions * _Nonnull)h180_43 SWIFT_WARN_UNUSED_RESULT;
  786. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) Dimensions * _Nonnull h240_43;)
  787. + (Dimensions * _Nonnull)h240_43 SWIFT_WARN_UNUSED_RESULT;
  788. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) Dimensions * _Nonnull h360_43;)
  789. + (Dimensions * _Nonnull)h360_43 SWIFT_WARN_UNUSED_RESULT;
  790. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) Dimensions * _Nonnull h480_43;)
  791. + (Dimensions * _Nonnull)h480_43 SWIFT_WARN_UNUSED_RESULT;
  792. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) Dimensions * _Nonnull h540_43;)
  793. + (Dimensions * _Nonnull)h540_43 SWIFT_WARN_UNUSED_RESULT;
  794. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) Dimensions * _Nonnull h720_43;)
  795. + (Dimensions * _Nonnull)h720_43 SWIFT_WARN_UNUSED_RESULT;
  796. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) Dimensions * _Nonnull h1080_43;)
  797. + (Dimensions * _Nonnull)h1080_43 SWIFT_WARN_UNUSED_RESULT;
  798. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) Dimensions * _Nonnull h1440_43;)
  799. + (Dimensions * _Nonnull)h1440_43 SWIFT_WARN_UNUSED_RESULT;
  800. @end
  801. SWIFT_CLASS("_TtC16OUICallingPlugin11E2EEManager")
  802. @interface E2EEManager : NSObject
  803. - (nonnull instancetype)init SWIFT_UNAVAILABLE;
  804. + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
  805. @end
  806. @class RTCFrameCryptor;
  807. @interface E2EEManager (SWIFT_EXTENSION(OUICallingPlugin)) <RTCFrameCryptorDelegate>
  808. - (void)frameCryptor:(RTCFrameCryptor * _Nonnull)frameCryptor didStateChangeWithParticipantId:(NSString * _Nonnull)participantId withState:(FrameCryptionState)e2eeState;
  809. @end
  810. @class Room;
  811. @class RemoteParticipant;
  812. @class Participant;
  813. @class TrackPublication;
  814. @class ParticipantPermissions;
  815. @class RemoteTrackPublication;
  816. enum StreamState : NSInteger;
  817. @class Track;
  818. @class NSData;
  819. @class LocalParticipant;
  820. @class LocalTrackPublication;
  821. enum E2EEState : NSInteger;
  822. /// <code>RoomDelegate</code> receives room events as well as <code>Participant</code> events.
  823. /// <blockquote>
  824. /// Important: The thread which the delegate will be called on, is not guranteed to be the <code>main</code> thread.
  825. /// If you will perform any UI update from the delegate, ensure the execution is from the <code>main</code> thread.
  826. ///
  827. /// </blockquote>
  828. /// <h2>Example usage</h2>
  829. /// \code
  830. /// func room(_ room: Room, localParticipant: LocalParticipant, didPublish publication: LocalTrackPublication) {
  831. /// DispatchQueue.main.async {
  832. /// // update UI here
  833. /// self.localVideoView.isHidden = false
  834. /// }
  835. /// }
  836. ///
  837. /// \endcodeSee the source code of <a href="https://github.com/livekit/client-example-swift">Swift Example App</a> for more examples.
  838. SWIFT_PROTOCOL("_TtP16OUICallingPlugin16RoomDelegateObjC_")
  839. @protocol RoomDelegateObjC
  840. @optional
  841. - (void)room:(Room * _Nonnull)room didUpdateConnectionState:(enum ConnectionState)connectionState oldConnectionState:(enum ConnectionState)oldConnectionState;
  842. /// Successfully connected to the room.
  843. - (void)room:(Room * _Nonnull)room didConnectIsReconnect:(BOOL)isReconnect;
  844. /// Could not connect to the room.
  845. - (void)room:(Room * _Nonnull)room didFailToConnectWithError:(NSError * _Nonnull)error;
  846. /// Client disconnected from the room unexpectedly.
  847. /// Using <code>room(_:didUpdate:oldValue:)</code> is preferred since <code>.disconnected</code> state of <code>ConnectionState</code> provides <code>DisconnectReason</code> (Swift only).
  848. - (void)room:(Room * _Nonnull)room didDisconnectWithError:(NSError * _Nullable)error;
  849. /// When a <code>RemoteParticipant</code> joins after the <code>LocalParticipant</code>.
  850. /// It will not emit events for participants that are already in the room.
  851. - (void)room:(Room * _Nonnull)room participantDidJoin:(RemoteParticipant * _Nonnull)participant;
  852. /// When a <code>RemoteParticipant</code> leaves after the <code>LocalParticipant</code> has joined.
  853. - (void)room:(Room * _Nonnull)room participantDidLeave:(RemoteParticipant * _Nonnull)participant;
  854. /// Active speakers changed.
  855. /// List of speakers are ordered by their <code>Participant/audioLevel</code>, loudest speakers first.
  856. /// This will include the <code>LocalParticipant</code> too.
  857. - (void)room:(Room * _Nonnull)room didUpdateSpeakers:(NSArray<Participant *> * _Nonnull)speakers;
  858. /// <code>Room</code>’s metadata has been updated.
  859. - (void)room:(Room * _Nonnull)room didUpdateMetadata:(NSString * _Nullable)metadata;
  860. /// <code>Room</code>’s recording state has been updated.
  861. - (void)room:(Room * _Nonnull)room didUpdateIsRecording:(BOOL)isRecording;
  862. /// Same with <code>ParticipantDelegate/participant(_:didUpdate:)-46iut</code>.
  863. - (void)room:(Room * _Nonnull)room participant:(Participant * _Nonnull)participant didUpdateMetadata:(NSString * _Nullable)metadata;
  864. /// Same with <code>ParticipantDelegate/participant(_:didUpdateName:)</code>.
  865. - (void)room:(Room * _Nonnull)room participant:(Participant * _Nonnull)participant didUpdateName:(NSString * _Nonnull)didUpdateName;
  866. /// Same with <code>ParticipantDelegate/participant(_:didUpdate:)-7zxk1</code>.
  867. - (void)room:(Room * _Nonnull)room participant:(Participant * _Nonnull)participant didUpdateConnectionQuality:(enum ConnectionQuality)connectionQuality;
  868. /// Same with <code>ParticipantDelegate/participant(_:didUpdate:)-84m89</code>.
  869. - (void)room:(Room * _Nonnull)room participant:(Participant * _Nonnull)participant publication:(TrackPublication * _Nonnull)publication didUpdateMuted:(BOOL)muted;
  870. - (void)room:(Room * _Nonnull)room participant:(Participant * _Nonnull)participant didUpdatePermissions:(ParticipantPermissions * _Nonnull)permissions;
  871. /// Same with <code>ParticipantDelegate/participant(_:didUpdate:streamState:)-1lu8t</code>.
  872. - (void)room:(Room * _Nonnull)room participant:(RemoteParticipant * _Nonnull)participant publication:(RemoteTrackPublication * _Nonnull)publication didUpdateStreamState:(enum StreamState)streamState;
  873. /// Same with <code>ParticipantDelegate/participant(_:didPublish:)-60en3</code>.
  874. - (void)room:(Room * _Nonnull)room participant:(RemoteParticipant * _Nonnull)participant didPublishPublication:(RemoteTrackPublication * _Nonnull)publication;
  875. /// Same with <code>ParticipantDelegate/participant(_:didUnpublish:)-3bkga</code>.
  876. - (void)room:(Room * _Nonnull)room participant:(RemoteParticipant * _Nonnull)participant didUnpublishPublication:(RemoteTrackPublication * _Nonnull)publication;
  877. /// Same with <code>ParticipantDelegate/participant(_:didSubscribe:track:)-7mngl</code>.
  878. - (void)room:(Room * _Nonnull)room participant:(RemoteParticipant * _Nonnull)participant didSubscribePublication:(RemoteTrackPublication * _Nonnull)publication track:(Track * _Nonnull)track;
  879. /// Same with <code>ParticipantDelegate/participant(_:didFailToSubscribe:error:)-10pn4</code>.
  880. - (void)room:(Room * _Nonnull)room participant:(RemoteParticipant * _Nonnull)participant didFailToSubscribe:(NSString * _Nonnull)trackSid error:(NSError * _Nonnull)error;
  881. /// Same with <code>ParticipantDelegate/participant(_:didUnsubscribe:track:)-3ksvp</code>.
  882. - (void)room:(Room * _Nonnull)room publication:(RemoteParticipant * _Nonnull)participant didUnsubscribePublication:(RemoteTrackPublication * _Nonnull)publication track:(Track * _Nonnull)track;
  883. /// Same with <code>ParticipantDelegate/participant(_:didReceive:)-2t55a</code>
  884. /// participant could be nil if data was sent by server api.
  885. /// Deprecated, use <code>room(_:participant:didReceiveData:topic:)</code> instead.
  886. - (void)room:(Room * _Nonnull)room participant:(RemoteParticipant * _Nullable)participant didReceiveData:(NSData * _Nonnull)data SWIFT_DEPRECATED_MSG("", "room:participant:didReceiveData:topic:");
  887. - (void)room:(Room * _Nonnull)room participant:(RemoteParticipant * _Nullable)participant didReceiveData:(NSData * _Nonnull)data topic:(NSString * _Nonnull)topic;
  888. /// Same with <code>ParticipantDelegate/localParticipant(_:didPublish:)-90j2m</code>.
  889. - (void)room:(Room * _Nonnull)room localParticipant:(LocalParticipant * _Nonnull)localParticipant didPublishPublication:(LocalTrackPublication * _Nonnull)publication;
  890. /// Same with <code>ParticipantDelegate/participant(_:didUnpublish:)-3bkga</code>.
  891. - (void)room:(Room * _Nonnull)room localParticipant:(LocalParticipant * _Nonnull)localParticipant didUnpublishPublication:(LocalTrackPublication * _Nonnull)publication;
  892. /// Same with <code>ParticipantDelegate/participant(_:didUpdate:permission:)</code>.
  893. - (void)room:(Room * _Nonnull)room participant:(RemoteParticipant * _Nonnull)participant didUpdate:(RemoteTrackPublication * _Nonnull)publication permission:(BOOL)allowed;
  894. /// <code>Room</code>’e2ee state has been updated.
  895. - (void)room:(Room * _Nonnull)room publication:(TrackPublication * _Nonnull)publication didUpdateE2EEState:(enum E2EEState)didUpdateE2EEState;
  896. @end
  897. @interface E2EEManager (SWIFT_EXTENSION(OUICallingPlugin))
  898. - (void)room:(Room * _Nonnull)room localParticipant:(LocalParticipant * _Nonnull)localParticipant didPublishPublication:(LocalTrackPublication * _Nonnull)publication;
  899. - (void)room:(Room * _Nonnull)room localParticipant:(LocalParticipant * _Nonnull)localParticipant didUnpublishPublication:(LocalTrackPublication * _Nonnull)publication;
  900. - (void)room:(Room * _Nonnull)room participant:(RemoteParticipant * _Nonnull)participant didSubscribePublication:(RemoteTrackPublication * _Nonnull)publication track:(Track * _Nonnull)track;
  901. - (void)room:(Room * _Nonnull)room publication:(RemoteParticipant * _Nonnull)participant didUnsubscribePublication:(RemoteTrackPublication * _Nonnull)publication track:(Track * _Nonnull)track;
  902. @end
  903. typedef SWIFT_ENUM(NSInteger, E2EEState, open) {
  904. E2EEStateNew = 0,
  905. E2EEStateOk = 1,
  906. E2EEStateKey_ratcheted = 2,
  907. E2EEStateMissing_key = 3,
  908. E2EEStateEncryption_failed = 4,
  909. E2EEStateDecryption_failed = 5,
  910. E2EEStateInternal_error = 6,
  911. };
  912. typedef SWIFT_ENUM(NSInteger, EncryptionType, open) {
  913. EncryptionTypeNone = 0,
  914. EncryptionTypeGcm = 1,
  915. EncryptionTypeCustom = 2,
  916. };
  917. SWIFT_CLASS("_TtC16OUICallingPlugin26IceCandidatePairStatistics")
  918. @interface IceCandidatePairStatistics : Statistics
  919. @end
  920. SWIFT_CLASS("_TtC16OUICallingPlugin22IceCandidateStatistics")
  921. @interface IceCandidateStatistics : Statistics
  922. @end
  923. SWIFT_CLASS("_TtC16OUICallingPlugin19InAppScreenCapturer") SWIFT_AVAILABILITY(ios,introduced=11.0) SWIFT_AVAILABILITY(macos,introduced=11.0)
  924. @interface InAppScreenCapturer : VideoCapturer
  925. @end
  926. SWIFT_CLASS("_TtC16OUICallingPlugin19RtpStreamStatistics")
  927. @interface RtpStreamStatistics : Statistics
  928. @end
  929. SWIFT_CLASS("_TtC16OUICallingPlugin27ReceivedRtpStreamStatistics")
  930. @interface ReceivedRtpStreamStatistics : RtpStreamStatistics
  931. @end
  932. SWIFT_CLASS("_TtC16OUICallingPlugin26InboundRtpStreamStatistics")
  933. @interface InboundRtpStreamStatistics : ReceivedRtpStreamStatistics
  934. @end
  935. SWIFT_CLASS("_TtC16OUICallingPlugin15LKSampleHandler")
  936. @interface LKSampleHandler : RPBroadcastSampleHandler
  937. - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
  938. - (void)broadcastStartedWithSetupInfo:(NSDictionary<NSString *, NSObject *> * _Nullable)setupInfo;
  939. - (void)broadcastPaused;
  940. - (void)broadcastResumed;
  941. - (void)broadcastFinished;
  942. - (void)processSampleBuffer:(CMSampleBufferRef _Nonnull)sampleBuffer withType:(RPSampleBufferType)sampleBufferType;
  943. @end
  944. SWIFT_CLASS("_TtC16OUICallingPlugin16LayoutConstraint")
  945. @interface LayoutConstraint : NSLayoutConstraint
  946. - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
  947. @end
  948. @interface LayoutConstraint (SWIFT_EXTENSION(OUICallingPlugin))
  949. @property (nonatomic, readonly, copy) NSString * _Nonnull description;
  950. @end
  951. /// The open source platform for real-time communication.
  952. /// See <a href="https://docs.livekit.io/">LiveKit’s Online Docs</a> for more information.
  953. /// Comments are written in <a href="https://developer.apple.com/documentation/docc">DocC</a> compatible format.
  954. /// With Xcode 13 and above you can build documentation right into your Xcode documentation viewer by chosing
  955. /// <em>Product</em> > <em>Build Documentation</em> from Xcode’s menu.
  956. /// Download the <a href="https://github.com/livekit/multiplatform-swiftui-example">Multiplatform SwiftUI Example</a>
  957. /// to try out the features.
  958. SWIFT_CLASS("_TtC16OUICallingPlugin7LiveKit")
  959. @interface LiveKit : NSObject
  960. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull sdkVersion;)
  961. + (NSString * _Nonnull)sdkVersion SWIFT_WARN_UNUSED_RESULT;
  962. + (void)setLoggerStandardOutput;
  963. - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
  964. @end
  965. enum PublishState : NSInteger;
  966. @class NSNull;
  967. SWIFT_PROTOCOL("_TtP16OUICallingPlugin10LocalTrack_")
  968. @protocol LocalTrack
  969. @property (nonatomic, readonly, strong) id <PublishOptions> _Nullable publishOptions;
  970. @property (nonatomic, readonly) enum PublishState publishState;
  971. - (FBLPromise<NSNull *> * _Nonnull)mute;
  972. - (FBLPromise<NSNull *> * _Nonnull)unmute;
  973. @end
  974. enum TrackKind : NSInteger;
  975. enum TrackSource : NSInteger;
  976. @class TrackStats;
  977. @class TrackStatistics;
  978. enum TrackState : NSInteger;
  979. SWIFT_CLASS("_TtC16OUICallingPlugin5Track")
  980. @interface Track : NSObject
  981. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull cameraName;)
  982. + (NSString * _Nonnull)cameraName SWIFT_WARN_UNUSED_RESULT;
  983. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull microphoneName;)
  984. + (NSString * _Nonnull)microphoneName SWIFT_WARN_UNUSED_RESULT;
  985. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull screenShareVideoName;)
  986. + (NSString * _Nonnull)screenShareVideoName SWIFT_WARN_UNUSED_RESULT;
  987. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull screenShareAudioName;)
  988. + (NSString * _Nonnull)screenShareAudioName SWIFT_WARN_UNUSED_RESULT;
  989. @property (nonatomic, readonly) enum TrackKind kind;
  990. @property (nonatomic, readonly) enum TrackSource source;
  991. @property (nonatomic, readonly, copy) NSString * _Nonnull name;
  992. @property (nonatomic, readonly, copy) NSString * _Nullable sid;
  993. @property (nonatomic, readonly) BOOL muted;
  994. @property (nonatomic, readonly, strong) TrackStats * _Nullable stats;
  995. @property (nonatomic, readonly, strong) TrackStatistics * _Nullable statistics;
  996. /// Dimensions of the video (only if video track)
  997. @property (nonatomic, readonly, strong) Dimensions * _Nullable dimensions;
  998. @property (nonatomic, readonly) enum TrackState trackState;
  999. - (nonnull instancetype)init SWIFT_UNAVAILABLE;
  1000. + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
  1001. @end
  1002. typedef SWIFT_ENUM_NAMED(NSInteger, TrackKind, "Kind", open) {
  1003. TrackKindAudio = 0,
  1004. TrackKindVideo = 1,
  1005. TrackKindNone = 2,
  1006. };
  1007. typedef SWIFT_ENUM_NAMED(NSInteger, TrackState, "TrackState", open) {
  1008. TrackStateStopped = 0,
  1009. TrackStateStarted = 1,
  1010. };
  1011. typedef SWIFT_ENUM_NAMED(NSInteger, TrackSource, "Source", open) {
  1012. TrackSourceUnknown = 0,
  1013. TrackSourceCamera = 1,
  1014. TrackSourceMicrophone = 2,
  1015. TrackSourceScreenShareVideo = 3,
  1016. TrackSourceScreenShareAudio = 4,
  1017. };
  1018. typedef SWIFT_ENUM_NAMED(NSInteger, PublishState, "PublishState", open) {
  1019. PublishStateUnpublished = 0,
  1020. PublishStatePublished = 1,
  1021. };
  1022. SWIFT_CLASS("_TtC16OUICallingPlugin15LocalAudioTrack")
  1023. @interface LocalAudioTrack : Track <AudioTrack, LocalTrack>
  1024. @end
  1025. @interface LocalAudioTrack (SWIFT_EXTENSION(OUICallingPlugin))
  1026. - (FBLPromise<NSNull *> * _Nonnull)mute SWIFT_WARN_UNUSED_RESULT;
  1027. - (FBLPromise<NSNull *> * _Nonnull)unmute SWIFT_WARN_UNUSED_RESULT;
  1028. @end
  1029. @interface LocalAudioTrack (SWIFT_EXTENSION(OUICallingPlugin))
  1030. @property (nonatomic, readonly, strong) id <PublishOptions> _Nullable publishOptions;
  1031. @property (nonatomic, readonly) enum PublishState publishState;
  1032. @end
  1033. SWIFT_CLASS("_TtC16OUICallingPlugin27LocalIceCandidateStatistics")
  1034. @interface LocalIceCandidateStatistics : IceCandidateStatistics
  1035. @end
  1036. @class NSDate;
  1037. SWIFT_CLASS("_TtC16OUICallingPlugin11Participant")
  1038. @interface Participant : NSObject
  1039. @property (nonatomic, readonly, copy) NSString * _Nonnull sid;
  1040. @property (nonatomic, readonly, copy) NSString * _Nonnull identity;
  1041. @property (nonatomic, readonly, copy) NSString * _Nonnull name;
  1042. @property (nonatomic, readonly) float audioLevel;
  1043. @property (nonatomic, readonly) BOOL isSpeaking;
  1044. @property (nonatomic, readonly, copy) NSString * _Nullable metadata;
  1045. @property (nonatomic, readonly) enum ConnectionQuality connectionQuality;
  1046. @property (nonatomic, readonly, strong) ParticipantPermissions * _Nonnull permissions;
  1047. @property (nonatomic, readonly, copy) NSDate * _Nullable joinedAt;
  1048. @property (nonatomic, readonly, copy) NSDictionary<NSString *, TrackPublication *> * _Nonnull tracks;
  1049. @property (nonatomic, readonly, copy) NSArray<TrackPublication *> * _Nonnull audioTracks;
  1050. @property (nonatomic, readonly, copy) NSArray<TrackPublication *> * _Nonnull videoTracks;
  1051. - (nonnull instancetype)init SWIFT_UNAVAILABLE;
  1052. + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
  1053. @end
  1054. SWIFT_CLASS("_TtC16OUICallingPlugin16LocalParticipant")
  1055. @interface LocalParticipant : Participant
  1056. @property (nonatomic, readonly, copy) NSArray<LocalTrackPublication *> * _Nonnull localAudioTracks;
  1057. @property (nonatomic, readonly, copy) NSArray<LocalTrackPublication *> * _Nonnull localVideoTracks;
  1058. @end
  1059. @class LocalVideoTrack;
  1060. @class VideoPublishOptions;
  1061. enum Reliability : NSInteger;
  1062. @class ParticipantTrackPermission;
  1063. @interface LocalParticipant (SWIFT_EXTENSION(OUICallingPlugin))
  1064. - (FBLPromise<LocalTrackPublication *> * _Nonnull)setCameraEnabled:(BOOL)enabled;
  1065. - (FBLPromise<LocalTrackPublication *> * _Nonnull)setMicrophoneEnabled:(BOOL)enabled;
  1066. - (FBLPromise<LocalTrackPublication *> * _Nonnull)setScreenShareEnabled:(BOOL)enabled;
  1067. - (FBLPromise<LocalTrackPublication *> * _Nonnull)publishVideoTrack:(LocalVideoTrack * _Nonnull)track options:(VideoPublishOptions * _Nullable)publishOptions;
  1068. - (FBLPromise<LocalTrackPublication *> * _Nonnull)publishAudioTrack:(LocalAudioTrack * _Nonnull)track options:(AudioPublishOptions * _Nullable)publishOptions;
  1069. - (FBLPromise<NSNull *> * _Nonnull)unpublishPublication:(LocalTrackPublication * _Nonnull)publication;
  1070. - (FBLPromise<NSNull *> * _Nonnull)publishData:(NSData * _Nonnull)data reliability:(enum Reliability)reliability destination:(NSArray<NSString *> * _Nonnull)destination;
  1071. - (FBLPromise<NSNull *> * _Nonnull)setTrackSubscriptionPermissionsWithAllParticipantsAllowed:(BOOL)allParticipantsAllowed trackPermissions:(NSArray<ParticipantTrackPermission *> * _Nonnull)trackPermissions;
  1072. @end
  1073. SWIFT_CLASS("_TtC16OUICallingPlugin16TrackPublication")
  1074. @interface TrackPublication : NSObject
  1075. @property (nonatomic, readonly, copy) NSString * _Nonnull sid;
  1076. @property (nonatomic, readonly) enum TrackKind kind;
  1077. @property (nonatomic, readonly) enum TrackSource source;
  1078. @property (nonatomic, readonly, copy) NSString * _Nonnull name;
  1079. @property (nonatomic, readonly, strong) Track * _Nullable track;
  1080. @property (nonatomic, readonly) BOOL muted;
  1081. @property (nonatomic, readonly) enum StreamState streamState;
  1082. /// video-only
  1083. @property (nonatomic, readonly, strong) Dimensions * _Nullable dimensions;
  1084. @property (nonatomic, readonly) BOOL simulcasted;
  1085. /// MIME type of the <code>Track</code>.
  1086. @property (nonatomic, readonly, copy) NSString * _Nonnull mimeType;
  1087. @property (nonatomic, readonly) BOOL subscribed;
  1088. @property (nonatomic, readonly) enum EncryptionType encryptionType;
  1089. - (nonnull instancetype)init SWIFT_UNAVAILABLE;
  1090. + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
  1091. @end
  1092. SWIFT_CLASS("_TtC16OUICallingPlugin21LocalTrackPublication")
  1093. @interface LocalTrackPublication : TrackPublication
  1094. @property (nonatomic, readonly) enum StreamState streamState;
  1095. @end
  1096. SWIFT_PROTOCOL("_TtP16OUICallingPlugin21VideoCapturerDelegate_")
  1097. @protocol VideoCapturerDelegate
  1098. @optional
  1099. - (void)capturer:(VideoCapturer * _Nonnull)capturer didUpdateDimensions:(Dimensions * _Nullable)dimensions;
  1100. - (void)capturer:(VideoCapturer * _Nonnull)capturer didUpdateState:(enum CapturerState)state;
  1101. @end
  1102. @interface LocalTrackPublication (SWIFT_EXTENSION(OUICallingPlugin)) <VideoCapturerDelegate>
  1103. - (void)capturer:(VideoCapturer * _Nonnull)capturer didUpdateDimensions:(Dimensions * _Nullable)dimensions;
  1104. @end
  1105. @protocol VideoRenderer;
  1106. SWIFT_PROTOCOL("_TtP16OUICallingPlugin10VideoTrack_")
  1107. @protocol VideoTrack
  1108. - (void)addVideoRenderer:(id <VideoRenderer> _Nonnull)videoRenderer;
  1109. - (void)removeVideoRenderer:(id <VideoRenderer> _Nonnull)videoRenderer;
  1110. @end
  1111. @class RTCVideoSource;
  1112. SWIFT_CLASS("_TtC16OUICallingPlugin15LocalVideoTrack")
  1113. @interface LocalVideoTrack : Track <LocalTrack, VideoTrack>
  1114. @property (nonatomic, readonly, strong) VideoCapturer * _Nonnull capturer;
  1115. @property (nonatomic, readonly, strong) RTCVideoSource * _Nonnull videoSource;
  1116. @end
  1117. @interface LocalVideoTrack (SWIFT_EXTENSION(OUICallingPlugin))
  1118. - (void)addVideoRenderer:(id <VideoRenderer> _Nonnull)videoRenderer;
  1119. - (void)removeVideoRenderer:(id <VideoRenderer> _Nonnull)videoRenderer;
  1120. @end
  1121. @interface LocalVideoTrack (SWIFT_EXTENSION(OUICallingPlugin))
  1122. + (LocalVideoTrack * _Nonnull)createCameraTrack SWIFT_WARN_UNUSED_RESULT;
  1123. + (LocalVideoTrack * _Nonnull)createCameraTrackWithName:(NSString * _Nullable)name options:(CameraCaptureOptions * _Nullable)options SWIFT_WARN_UNUSED_RESULT;
  1124. @end
  1125. @interface LocalVideoTrack (SWIFT_EXTENSION(OUICallingPlugin))
  1126. - (FBLPromise<NSNull *> * _Nonnull)mute SWIFT_WARN_UNUSED_RESULT;
  1127. - (FBLPromise<NSNull *> * _Nonnull)unmute SWIFT_WARN_UNUSED_RESULT;
  1128. @end
  1129. @interface LocalVideoTrack (SWIFT_EXTENSION(OUICallingPlugin))
  1130. @property (nonatomic, readonly, strong) id <PublishOptions> _Nullable publishOptions;
  1131. @property (nonatomic, readonly) enum PublishState publishState;
  1132. @end
  1133. /// The base view for <code>LottieAnimationView</code> on iOS, tvOS, watchOS, and macCatalyst.
  1134. /// Enables the <code>LottieAnimationView</code> implementation to be shared across platforms.
  1135. SWIFT_CLASS("_TtC16OUICallingPlugin23LottieAnimationViewBase")
  1136. @interface LottieAnimationViewBase : UIView
  1137. @property (nonatomic) UIViewContentMode contentMode;
  1138. - (void)didMoveToWindow;
  1139. - (void)layoutSubviews;
  1140. - (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
  1141. - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER;
  1142. @end
  1143. IB_DESIGNABLE
  1144. SWIFT_CLASS("_TtC16OUICallingPlugin19LottieAnimationView")
  1145. @interface LottieAnimationView : LottieAnimationViewBase
  1146. - (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
  1147. - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
  1148. @property (nonatomic, readonly) CGSize intrinsicContentSize;
  1149. @end
  1150. /// A simple abstraction of a View that is native to the platform.
  1151. /// When built for iOS this will be a UIView.
  1152. /// When built for macOS this will be a NSView.
  1153. SWIFT_CLASS("_TtC16OUICallingPlugin10NativeView")
  1154. @interface NativeView : UIView
  1155. - (nonnull instancetype)initWithFrame:(CGRect)frame SWIFT_UNAVAILABLE;
  1156. - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE;
  1157. - (void)layoutSubviews;
  1158. @end
  1159. SWIFT_CLASS("_TtC16OUICallingPlugin23SentRtpStreamStatistics")
  1160. @interface SentRtpStreamStatistics : RtpStreamStatistics
  1161. @end
  1162. SWIFT_CLASS("_TtC16OUICallingPlugin27OutboundRtpStreamStatistics")
  1163. @interface OutboundRtpStreamStatistics : SentRtpStreamStatistics
  1164. @end
  1165. @interface Participant (SWIFT_EXTENSION(OUICallingPlugin))
  1166. @property (nonatomic, readonly, copy) NSString * _Nonnull description;
  1167. @end
  1168. @interface Participant (SWIFT_EXTENSION(OUICallingPlugin))
  1169. @property (nonatomic, readonly) NSUInteger hash;
  1170. - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
  1171. @end
  1172. @protocol ParticipantDelegate;
  1173. @interface Participant (SWIFT_EXTENSION(OUICallingPlugin))
  1174. - (void)addDelegate:(id <ParticipantDelegate> _Nonnull)delegate;
  1175. - (void)removeDelegate:(id <ParticipantDelegate> _Nonnull)delegate;
  1176. - (void)removeAllDelegates;
  1177. @end
  1178. SWIFT_CLASS("_TtC16OUICallingPlugin15ParticipantCell")
  1179. @interface ParticipantCell : UICollectionViewCell
  1180. - (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
  1181. - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER SWIFT_UNAVAILABLE;
  1182. - (void)prepareForReuse;
  1183. - (void)layoutSubviews;
  1184. @end
  1185. @class UIScrollView;
  1186. @interface ParticipantCell (SWIFT_EXTENSION(OUICallingPlugin)) <UIScrollViewDelegate>
  1187. - (UIView * _Nullable)viewForZoomingInScrollView:(UIScrollView * _Nonnull)scrollView SWIFT_WARN_UNUSED_RESULT;
  1188. - (void)scrollViewDidZoom:(UIScrollView * _Nonnull)scrollView;
  1189. @end
  1190. /// Delegate methods for a participant.
  1191. /// Since <code>Participant</code> inherits from <code>MulticastDelegate</code>,
  1192. /// you can call <code>add(delegate:)</code> on <code>Participant</code> to add as many delegates as you need.
  1193. /// All delegate methods are optional.
  1194. /// To ensure each participant’s delegate is registered, you can look through <code>Room/localParticipant</code> and <code>Room/remoteParticipants</code> on connect
  1195. /// and register it on new participants inside <code>RoomDelegate/room(_:participantDidJoin:)-9bkm4</code>
  1196. SWIFT_PROTOCOL("_TtP16OUICallingPlugin19ParticipantDelegate_")
  1197. @protocol ParticipantDelegate
  1198. @optional
  1199. /// A <code>Participant</code>’s metadata has updated.
  1200. /// <code>participant</code> Can be a <code>LocalParticipant</code> or a <code>RemoteParticipant</code>.
  1201. - (void)participant:(Participant * _Nonnull)participant didUpdateMetadata:(NSString * _Nullable)metadata;
  1202. /// A <code>Participant</code>’s name has updated.
  1203. /// <code>participant</code> Can be a <code>LocalParticipant</code> or a <code>RemoteParticipant</code>.
  1204. - (void)participant:(Participant * _Nonnull)participant didUpdateName:(NSString * _Nonnull)didUpdateName;
  1205. /// The isSpeaking status of a <code>Participant</code> has changed.
  1206. /// <code>participant</code> Can be a <code>LocalParticipant</code> or a <code>RemoteParticipant</code>.
  1207. - (void)participant:(Participant * _Nonnull)participant didUpdateSpeaking:(BOOL)speaking;
  1208. /// The connection quality of a <code>Participant</code> has updated.
  1209. /// <code>participant</code> Can be a <code>LocalParticipant</code> or a <code>RemoteParticipant</code>.
  1210. - (void)participant:(Participant * _Nonnull)participant didUpdateConnectionQuality:(enum ConnectionQuality)connectionQuality;
  1211. /// <code>muted</code> state has updated for the <code>Participant</code>’s <code>TrackPublication</code>.
  1212. /// For the <code>LocalParticipant</code>, the delegate method will be called if setMute was called on <code>LocalTrackPublication</code>,
  1213. /// or if the server has requested the participant to be muted.
  1214. /// <code>participant</code> Can be a <code>LocalParticipant</code> or a <code>RemoteParticipant</code>.
  1215. - (void)participant:(Participant * _Nonnull)participant publication:(TrackPublication * _Nonnull)publication didUpdateMuted:(BOOL)muted;
  1216. - (void)participant:(Participant * _Nonnull)participant didUpdatePermissions:(ParticipantPermissions * _Nonnull)permissions;
  1217. /// <code>RemoteTrackPublication/streamState</code> has updated for the <code>RemoteParticipant</code>.
  1218. - (void)participant:(RemoteParticipant * _Nonnull)participant publication:(RemoteTrackPublication * _Nonnull)publication didUpdateStreamState:(enum StreamState)streamState;
  1219. /// <code>RemoteTrackPublication/subscriptionAllowed</code> has updated for the <code>RemoteParticipant</code>.
  1220. - (void)participant:(RemoteParticipant * _Nonnull)participant publication:(RemoteTrackPublication * _Nonnull)publication didUpdateCanSubscribe:(BOOL)allowed;
  1221. /// When a new <code>RemoteTrackPublication</code> is published to <code>Room</code> after the <code>LocalParticipant</code> has joined.
  1222. /// This delegate method will not be called for tracks that are already published.
  1223. - (void)remoteParticipant:(RemoteParticipant * _Nonnull)participant didPublish:(RemoteTrackPublication * _Nonnull)publication;
  1224. /// The <code>RemoteParticipant</code> has unpublished a <code>RemoteTrackPublication</code>.
  1225. - (void)remoteParticipant:(RemoteParticipant * _Nonnull)participant didUnpublish:(RemoteTrackPublication * _Nonnull)publication;
  1226. /// The <code>LocalParticipant</code> has published a <code>LocalTrackPublication</code>.
  1227. - (void)localParticipant:(LocalParticipant * _Nonnull)participant didPublish:(LocalTrackPublication * _Nonnull)publication;
  1228. /// The <code>LocalParticipant</code> has unpublished a <code>LocalTrackPublication</code>.
  1229. - (void)localParticipant:(LocalParticipant * _Nonnull)participant didUnpublish:(LocalTrackPublication * _Nonnull)publication;
  1230. /// The <code>LocalParticipant</code> has subscribed to a new <code>RemoteTrackPublication</code>.
  1231. /// This event will always fire as long as new tracks are ready for use.
  1232. - (void)participant:(RemoteParticipant * _Nonnull)participant didSubscribe:(RemoteTrackPublication * _Nonnull)publication track:(Track * _Nonnull)track;
  1233. /// Could not subscribe to a track.
  1234. /// This is an error state, the subscription can be retried.
  1235. - (void)participant:(RemoteParticipant * _Nonnull)participant didFailToSubscribeTrackWithSid:(NSString * _Nonnull)trackSid error:(NSError * _Nonnull)error;
  1236. /// Unsubscribed from a <code>RemoteTrackPublication</code> and is no longer available.
  1237. /// Clients should listen to this event and handle cleanup.
  1238. - (void)participant:(RemoteParticipant * _Nonnull)participant didUnsubscribePublication:(RemoteTrackPublication * _Nonnull)publication track:(Track * _Nonnull)track;
  1239. /// Data was received from a <code>RemoteParticipant</code>.
  1240. /// <blockquote>
  1241. /// Notice: Deprecated, use <code>participant(_:didReceiveData:topic:)</code> instead.
  1242. ///
  1243. /// </blockquote>
  1244. - (void)participant:(RemoteParticipant * _Nonnull)participant didReceiveData:(NSData * _Nonnull)data SWIFT_DEPRECATED_MSG("", "participant:didReceiveData:topic:");
  1245. - (void)participant:(RemoteParticipant * _Nonnull)participant didReceiveData:(NSData * _Nonnull)data topic:(NSString * _Nonnull)topic;
  1246. @end
  1247. @interface ParticipantCell (SWIFT_EXTENSION(OUICallingPlugin)) <ParticipantDelegate>
  1248. - (void)participant:(RemoteParticipant * _Nonnull)participant didSubscribe:(RemoteTrackPublication * _Nonnull)publication track:(Track * _Nonnull)track;
  1249. - (void)participant:(RemoteParticipant * _Nonnull)participant didUnsubscribePublication:(RemoteTrackPublication * _Nonnull)publication track:(Track * _Nonnull)track;
  1250. - (void)participant:(Participant * _Nonnull)participant didUpdateSpeaking:(BOOL)speaking;
  1251. - (void)participant:(Participant * _Nonnull)participant publication:(TrackPublication * _Nonnull)publication didUpdateMuted:(BOOL)muted;
  1252. - (void)participant:(RemoteParticipant * _Nonnull)participant publication:(RemoteTrackPublication * _Nonnull)publication didUpdateStreamState:(enum StreamState)streamState;
  1253. - (void)participant:(Participant * _Nonnull)participant didUpdateConnectionQuality:(enum ConnectionQuality)connectionQuality;
  1254. @end
  1255. SWIFT_CLASS("_TtC16OUICallingPlugin26ParticipantCellDefaultView")
  1256. @interface ParticipantCellDefaultView : UIView
  1257. - (nonnull instancetype)initWithFrame:(CGRect)frame SWIFT_UNAVAILABLE;
  1258. - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER;
  1259. @end
  1260. SWIFT_CLASS("_TtC16OUICallingPlugin23ParticipantCellUserView")
  1261. @interface ParticipantCellUserView : UIView
  1262. - (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
  1263. - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE;
  1264. @end
  1265. SWIFT_CLASS("_TtC16OUICallingPlugin22ParticipantPermissions")
  1266. @interface ParticipantPermissions : NSObject
  1267. /// <code>Participant</code> can subscribe to tracks in the room
  1268. @property (nonatomic, readonly) BOOL canSubscribe;
  1269. /// <code>Participant</code> can publish new tracks to room
  1270. @property (nonatomic, readonly) BOOL canPublish;
  1271. /// <code>Participant</code> can publish data
  1272. @property (nonatomic, readonly) BOOL canPublishData;
  1273. /// <code>Participant</code> is hidden to others
  1274. @property (nonatomic, readonly) BOOL hidden;
  1275. /// Indicates it’s a recorder instance
  1276. @property (nonatomic, readonly) BOOL recorder;
  1277. - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
  1278. @property (nonatomic, readonly) NSUInteger hash;
  1279. - (nonnull instancetype)init SWIFT_UNAVAILABLE;
  1280. + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
  1281. @end
  1282. SWIFT_CLASS("_TtC16OUICallingPlugin26ParticipantTrackPermission")
  1283. @interface ParticipantTrackPermission : NSObject
  1284. /// The participant id this permission applies to.
  1285. @property (nonatomic, readonly, copy) NSString * _Nonnull participantSid;
  1286. - (nonnull instancetype)initWithParticipantSid:(NSString * _Nonnull)participantSid allTracksAllowed:(BOOL)allTracksAllowed allowedTrackSids:(NSArray<NSString *> * _Nonnull)allowedTrackSids OBJC_DESIGNATED_INITIALIZER;
  1287. - (nonnull instancetype)init SWIFT_UNAVAILABLE;
  1288. + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
  1289. @end
  1290. SWIFT_CLASS("_TtC16OUICallingPlugin24PeerConnectionStatistics")
  1291. @interface PeerConnectionStatistics : Statistics
  1292. @end
  1293. SWIFT_CLASS("_TtC16OUICallingPlugin11ProgressHUD")
  1294. @interface ProgressHUD : UIView
  1295. - (nonnull instancetype)init SWIFT_UNAVAILABLE;
  1296. + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
  1297. - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE;
  1298. - (nonnull instancetype)initWithFrame:(CGRect)frame SWIFT_UNAVAILABLE;
  1299. @end
  1300. typedef SWIFT_ENUM(NSInteger, ProtocolVersion, open) {
  1301. ProtocolVersionV2 = 2,
  1302. ProtocolVersionV3 = 3,
  1303. ProtocolVersionV4 = 4,
  1304. ProtocolVersionV5 = 5,
  1305. ProtocolVersionV6 = 6,
  1306. ProtocolVersionV7 = 7,
  1307. ProtocolVersionV8 = 8,
  1308. ProtocolVersionV9 = 9,
  1309. };
  1310. @interface RTCConfiguration (SWIFT_EXTENSION(OUICallingPlugin))
  1311. @property (nonatomic, readonly, copy) NSString * _Nonnull description;
  1312. @end
  1313. @interface RTCIceServer (SWIFT_EXTENSION(OUICallingPlugin))
  1314. @property (nonatomic, readonly, copy) NSString * _Nonnull description;
  1315. @end
  1316. @interface RTCRtpEncodingParameters (SWIFT_EXTENSION(OUICallingPlugin))
  1317. @property (nonatomic, readonly, copy) NSString * _Nonnull description;
  1318. @end
  1319. typedef SWIFT_ENUM(NSInteger, ReconnectMode, open) {
  1320. ReconnectModeQuick = 0,
  1321. ReconnectModeFull = 1,
  1322. };
  1323. typedef SWIFT_ENUM(NSInteger, Reliability, open) {
  1324. ReliabilityReliable = 0,
  1325. ReliabilityLossy = 1,
  1326. };
  1327. SWIFT_PROTOCOL("_TtP16OUICallingPlugin11RemoteTrack_")
  1328. @protocol RemoteTrack
  1329. @end
  1330. SWIFT_CLASS("_TtC16OUICallingPlugin16RemoteAudioTrack")
  1331. @interface RemoteAudioTrack : Track <AudioTrack, RemoteTrack>
  1332. @end
  1333. SWIFT_CLASS("_TtC16OUICallingPlugin28RemoteIceCandidateStatistics")
  1334. @interface RemoteIceCandidateStatistics : IceCandidateStatistics
  1335. @end
  1336. SWIFT_CLASS("_TtC16OUICallingPlugin32RemoteInboundRtpStreamStatistics")
  1337. @interface RemoteInboundRtpStreamStatistics : ReceivedRtpStreamStatistics
  1338. @end
  1339. SWIFT_CLASS("_TtC16OUICallingPlugin33RemoteOutboundRtpStreamStatistics")
  1340. @interface RemoteOutboundRtpStreamStatistics : SentRtpStreamStatistics
  1341. @end
  1342. SWIFT_CLASS("_TtC16OUICallingPlugin17RemoteParticipant")
  1343. @interface RemoteParticipant : Participant
  1344. @end
  1345. SWIFT_CLASS("_TtC16OUICallingPlugin22RemoteTrackPublication")
  1346. @interface RemoteTrackPublication : TrackPublication
  1347. @property (nonatomic, readonly) BOOL muted;
  1348. @property (nonatomic, readonly) BOOL subscribed;
  1349. @end
  1350. @interface RemoteTrackPublication (SWIFT_EXTENSION(OUICallingPlugin))
  1351. - (FBLPromise<NSNull *> * _Nonnull)setEnabled:(BOOL)value;
  1352. - (FBLPromise<NSNull *> * _Nonnull)setSubscribed:(BOOL)value;
  1353. @end
  1354. SWIFT_CLASS("_TtC16OUICallingPlugin16RemoteVideoTrack")
  1355. @interface RemoteVideoTrack : Track <RemoteTrack, VideoTrack>
  1356. @end
  1357. @interface RemoteVideoTrack (SWIFT_EXTENSION(OUICallingPlugin))
  1358. - (void)addVideoRenderer:(id <VideoRenderer> _Nonnull)videoRenderer;
  1359. - (void)removeVideoRenderer:(id <VideoRenderer> _Nonnull)videoRenderer;
  1360. @end
  1361. @class RoomOptions;
  1362. SWIFT_CLASS("_TtC16OUICallingPlugin4Room")
  1363. @interface Room : NSObject
  1364. @property (nonatomic, readonly, copy) NSString * _Nullable sid;
  1365. @property (nonatomic, readonly, copy) NSString * _Nullable name;
  1366. /// Room’s metadata.
  1367. @property (nonatomic, readonly, copy) NSString * _Nullable metadata;
  1368. @property (nonatomic, readonly, copy) NSString * _Nullable serverVersion;
  1369. /// Region code the client is currently connected to.
  1370. @property (nonatomic, readonly, copy) NSString * _Nullable serverRegion;
  1371. @property (nonatomic, readonly, strong) LocalParticipant * _Nullable localParticipant;
  1372. @property (nonatomic, readonly, copy) NSDictionary<NSString *, RemoteParticipant *> * _Nonnull remoteParticipants;
  1373. @property (nonatomic, readonly, copy) NSArray<Participant *> * _Nonnull activeSpeakers;
  1374. /// If the current room has a participant with <code>recorder:true</code> in its JWT grant.
  1375. @property (nonatomic, readonly) BOOL isRecording;
  1376. @property (nonatomic, readonly) NSInteger maxParticipants;
  1377. @property (nonatomic, readonly) NSInteger participantCount;
  1378. @property (nonatomic, readonly) NSInteger publishersCount;
  1379. @property (nonatomic, readonly, copy) NSString * _Nullable url;
  1380. @property (nonatomic, readonly, copy) NSString * _Nullable token;
  1381. /// Only for Objective-C.
  1382. @property (nonatomic, readonly) enum ConnectionState connectionState;
  1383. - (nonnull instancetype)init;
  1384. - (nonnull instancetype)initWithDelegate:(id <RoomDelegateObjC> _Nullable)delegate connectOptions:(ConnectOptions * _Nullable)connectOptions roomOptions:(RoomOptions * _Nullable)roomOptions OBJC_DESIGNATED_INITIALIZER;
  1385. @end
  1386. @interface Room (SWIFT_EXTENSION(OUICallingPlugin))
  1387. @property (nonatomic, readonly, copy) NSString * _Nonnull description;
  1388. @end
  1389. @interface Room (SWIFT_EXTENSION(OUICallingPlugin))
  1390. - (FBLPromise<Room *> * _Nonnull)connectWithURL:(NSString * _Nonnull)url token:(NSString * _Nonnull)token connectOptions:(ConnectOptions * _Nullable)connectOptions roomOptions:(RoomOptions * _Nullable)roomOptions;
  1391. - (FBLPromise<NSNull *> * _Nonnull)disconnect;
  1392. @end
  1393. @class RTCDefaultAudioProcessingModule;
  1394. @interface Room (SWIFT_EXTENSION(OUICallingPlugin))
  1395. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) RTCDefaultAudioProcessingModule * _Nonnull audioProcessingModule;)
  1396. + (RTCDefaultAudioProcessingModule * _Nonnull)audioProcessingModule SWIFT_WARN_UNUSED_RESULT;
  1397. @end
  1398. @class RTCAudioDeviceModule;
  1399. @interface Room (SWIFT_EXTENSION(OUICallingPlugin))
  1400. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) RTCAudioDeviceModule * _Nonnull audioDeviceModule;)
  1401. + (RTCAudioDeviceModule * _Nonnull)audioDeviceModule SWIFT_WARN_UNUSED_RESULT;
  1402. /// Set this to true to bypass initialization of voice processing.
  1403. /// Must be set before RTCPeerConnectionFactory gets initialized.
  1404. SWIFT_CLASS_PROPERTY(@property (nonatomic, class) BOOL bypassVoiceProcessing;)
  1405. + (BOOL)bypassVoiceProcessing SWIFT_WARN_UNUSED_RESULT;
  1406. + (void)setBypassVoiceProcessing:(BOOL)newValue;
  1407. @end
  1408. @interface Room (SWIFT_EXTENSION(OUICallingPlugin))
  1409. - (void)removeAllDelegates;
  1410. /// Only for Objective-C.
  1411. - (void)addDelegate:(id <RoomDelegateObjC> _Nonnull)delegate;
  1412. /// Only for Objective-C.
  1413. - (void)removeDelegate:(id <RoomDelegateObjC> _Nonnull)delegate;
  1414. @end
  1415. @class ScreenShareCaptureOptions;
  1416. SWIFT_CLASS("_TtC16OUICallingPlugin11RoomOptions")
  1417. @interface RoomOptions : NSObject
  1418. @property (nonatomic, readonly, strong) CameraCaptureOptions * _Nonnull defaultCameraCaptureOptions;
  1419. @property (nonatomic, readonly, strong) ScreenShareCaptureOptions * _Nonnull defaultScreenShareCaptureOptions;
  1420. @property (nonatomic, readonly, strong) AudioCaptureOptions * _Nonnull defaultAudioCaptureOptions;
  1421. @property (nonatomic, readonly, strong) VideoPublishOptions * _Nonnull defaultVideoPublishOptions;
  1422. @property (nonatomic, readonly, strong) AudioPublishOptions * _Nonnull defaultAudioPublishOptions;
  1423. @property (nonatomic, readonly, strong) DataPublishOptions * _Nonnull defaultDataPublishOptions;
  1424. /// AdaptiveStream lets LiveKit automatically manage quality of subscribed
  1425. /// video tracks to optimize for bandwidth and CPU.
  1426. /// When attached video elements are visible, it’ll choose an appropriate
  1427. /// resolution based on the size of largest video element it’s attached to.
  1428. /// When none of the video elements are visible, it’ll temporarily pause
  1429. /// the data flow until they are visible again.
  1430. @property (nonatomic, readonly) BOOL adaptiveStream;
  1431. /// Dynamically pauses video layers that are not being consumed by any subscribers,
  1432. /// significantly reducing publishing CPU and bandwidth usage.
  1433. @property (nonatomic, readonly) BOOL dynacast;
  1434. @property (nonatomic, readonly) BOOL stopLocalTrackOnUnpublish;
  1435. /// Automatically suspend(mute) local camera video tracks when the app enters background and
  1436. /// resume(unmute) when the app enters foreground again.
  1437. @property (nonatomic, readonly) BOOL suspendLocalVideoTracksInBackground;
  1438. /// <em>Experimental</em>
  1439. /// Report <code>TrackStats</code> every second to <code>TrackDelegate</code> for each local and remote tracks.
  1440. /// This may consume slightly more CPU resources.
  1441. @property (nonatomic, readonly) BOOL reportStats;
  1442. - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
  1443. @property (nonatomic, readonly) NSUInteger hash;
  1444. - (nonnull instancetype)init SWIFT_UNAVAILABLE;
  1445. + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
  1446. @end
  1447. SWIFT_CLASS("_TtC16OUICallingPlugin25ScreenShareCaptureOptions")
  1448. @interface ScreenShareCaptureOptions : NSObject <VideoCaptureOptions>
  1449. @property (nonatomic, readonly, strong) Dimensions * _Nonnull dimensions;
  1450. @property (nonatomic, readonly) NSInteger fps;
  1451. /// Only used for macOS
  1452. @property (nonatomic, readonly) BOOL showCursor;
  1453. @property (nonatomic, readonly) BOOL useBroadcastExtension;
  1454. - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
  1455. @property (nonatomic, readonly) NSUInteger hash;
  1456. - (nonnull instancetype)init SWIFT_UNAVAILABLE;
  1457. + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
  1458. @end
  1459. SWIFT_CLASS_NAMED("SessionDelegate")
  1460. @interface KFSessionDelegate : NSObject
  1461. - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
  1462. @end
  1463. @class NSURLSession;
  1464. @class NSURLSessionDataTask;
  1465. @class NSURLResponse;
  1466. @class NSURLSessionTask;
  1467. @class NSURLAuthenticationChallenge;
  1468. @class NSURLCredential;
  1469. @class NSHTTPURLResponse;
  1470. @class NSURLRequest;
  1471. @interface KFSessionDelegate (SWIFT_EXTENSION(OUICallingPlugin)) <NSURLSessionDataDelegate>
  1472. - (void)URLSession:(NSURLSession * _Nonnull)session dataTask:(NSURLSessionDataTask * _Nonnull)dataTask didReceiveResponse:(NSURLResponse * _Nonnull)response completionHandler:(void (^ _Nonnull)(NSURLSessionResponseDisposition))completionHandler;
  1473. - (void)URLSession:(NSURLSession * _Nonnull)session dataTask:(NSURLSessionDataTask * _Nonnull)dataTask didReceiveData:(NSData * _Nonnull)data;
  1474. - (void)URLSession:(NSURLSession * _Nonnull)session task:(NSURLSessionTask * _Nonnull)task didCompleteWithError:(NSError * _Nullable)error;
  1475. - (void)URLSession:(NSURLSession * _Nonnull)session didReceiveChallenge:(NSURLAuthenticationChallenge * _Nonnull)challenge completionHandler:(void (^ _Nonnull)(NSURLSessionAuthChallengeDisposition, NSURLCredential * _Nullable))completionHandler;
  1476. - (void)URLSession:(NSURLSession * _Nonnull)session task:(NSURLSessionTask * _Nonnull)task didReceiveChallenge:(NSURLAuthenticationChallenge * _Nonnull)challenge completionHandler:(void (^ _Nonnull)(NSURLSessionAuthChallengeDisposition, NSURLCredential * _Nullable))completionHandler;
  1477. - (void)URLSession:(NSURLSession * _Nonnull)session task:(NSURLSessionTask * _Nonnull)task willPerformHTTPRedirection:(NSHTTPURLResponse * _Nonnull)response newRequest:(NSURLRequest * _Nonnull)request completionHandler:(void (^ _Nonnull)(NSURLRequest * _Nullable))completionHandler;
  1478. @end
  1479. typedef SWIFT_ENUM(NSInteger, StreamState, open) {
  1480. StreamStatePaused = 0,
  1481. StreamStateActive = 1,
  1482. };
  1483. typedef SWIFT_ENUM(NSInteger, SubscriptionState, open) {
  1484. SubscriptionStateSubscribed = 0,
  1485. SubscriptionStateNotAllowed = 1,
  1486. SubscriptionStateUnsubscribed = 2,
  1487. };
  1488. @interface Track (SWIFT_EXTENSION(OUICallingPlugin))
  1489. @property (nonatomic, readonly, copy) NSString * _Nonnull description;
  1490. @end
  1491. @interface Track (SWIFT_EXTENSION(OUICallingPlugin))
  1492. - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
  1493. @property (nonatomic, readonly) NSUInteger hash;
  1494. @end
  1495. @interface Track (SWIFT_EXTENSION(OUICallingPlugin))
  1496. - (FBLPromise<NSNumber *> * _Nonnull)start;
  1497. - (FBLPromise<NSNumber *> * _Nonnull)stop;
  1498. @end
  1499. @protocol TrackDelegate;
  1500. @interface Track (SWIFT_EXTENSION(OUICallingPlugin))
  1501. - (void)addDelegate:(id <TrackDelegate> _Nonnull)delegate;
  1502. - (void)removeDelegate:(id <TrackDelegate> _Nonnull)delegate;
  1503. - (void)removeAllDelegates;
  1504. @end
  1505. @class VideoView;
  1506. SWIFT_PROTOCOL("_TtP16OUICallingPlugin13TrackDelegate_")
  1507. @protocol TrackDelegate
  1508. @optional
  1509. /// Dimensions of the video track has updated
  1510. - (void)track:(id <VideoTrack> _Nonnull)track didUpdateDimensions:(Dimensions * _Nullable)dimensions;
  1511. /// A <code>VideoView</code> was attached to the <code>VideoTrack</code>
  1512. - (void)track:(id <VideoTrack> _Nonnull)track didAttach:(VideoView * _Nonnull)videoView;
  1513. /// A <code>VideoView</code> was detached from the <code>VideoTrack</code>
  1514. - (void)track:(id <VideoTrack> _Nonnull)track didDetach:(VideoView * _Nonnull)videoView;
  1515. /// <code>Track/muted</code> has updated.
  1516. - (void)track:(Track * _Nonnull)track didUpdateMuted:(BOOL)muted shouldSendSignal:(BOOL)shouldSendSignal;
  1517. /// Statistics for the track has been generated.
  1518. - (void)track:(Track * _Nonnull)track didUpdateStats:(TrackStats * _Nonnull)stats SWIFT_DEPRECATED_MSG("Use track:didUpdateStatistics: instead");
  1519. /// Statistics for the track has been generated (v2).
  1520. - (void)track:(Track * _Nonnull)track didUpdateStatistics:(TrackStatistics * _Nonnull)didUpdateStatistics;
  1521. @end
  1522. @interface TrackPublication (SWIFT_EXTENSION(OUICallingPlugin))
  1523. @property (nonatomic, readonly, copy) NSString * _Nonnull description;
  1524. @end
  1525. @interface TrackPublication (SWIFT_EXTENSION(OUICallingPlugin))
  1526. - (void)track:(Track * _Nonnull)track didUpdateMuted:(BOOL)muted shouldSendSignal:(BOOL)shouldSendSignal;
  1527. @end
  1528. @interface TrackPublication (SWIFT_EXTENSION(OUICallingPlugin))
  1529. @property (nonatomic, readonly) NSUInteger hash;
  1530. - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
  1531. @end
  1532. SWIFT_CLASS("_TtC16OUICallingPlugin15TrackStatistics")
  1533. @interface TrackStatistics : NSObject
  1534. - (nonnull instancetype)init SWIFT_UNAVAILABLE;
  1535. + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
  1536. @end
  1537. @interface TrackStatistics (SWIFT_EXTENSION(OUICallingPlugin))
  1538. @property (nonatomic, readonly, copy) NSString * _Nonnull description;
  1539. @end
  1540. SWIFT_CLASS("_TtC16OUICallingPlugin10TrackStats") SWIFT_DEPRECATED_MSG("Use Stats v2 and TrackStatistics instead")
  1541. @interface TrackStats : NSObject
  1542. - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
  1543. @property (nonatomic, readonly) NSUInteger hash;
  1544. - (nonnull instancetype)init SWIFT_UNAVAILABLE;
  1545. + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
  1546. @end
  1547. SWIFT_CLASS("_TtC16OUICallingPlugin19TransportStatistics")
  1548. @interface TransportStatistics : Statistics
  1549. @end
  1550. SWIFT_CLASS("_TtC16OUICallingPlugin23VideoCaptureInterceptor")
  1551. @interface VideoCaptureInterceptor : NSObject <RTCVideoCapturerDelegate>
  1552. - (void)capturer:(RTCVideoCapturer * _Nonnull)capturer didCaptureVideoFrame:(RTCVideoFrame * _Nonnull)frame;
  1553. - (nonnull instancetype)init SWIFT_UNAVAILABLE;
  1554. + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
  1555. @end
  1556. @interface VideoCapturer (SWIFT_EXTENSION(OUICallingPlugin))
  1557. - (void)addDelegate:(id <VideoCapturerDelegate> _Nonnull)delegate;
  1558. - (void)removeDelegate:(id <VideoCapturerDelegate> _Nonnull)delegate;
  1559. - (void)removeAllDelegates;
  1560. @end
  1561. SWIFT_CLASS("_TtC16OUICallingPlugin13VideoEncoding")
  1562. @interface VideoEncoding : NSObject <MediaEncoding>
  1563. @property (nonatomic) NSInteger maxBitrate;
  1564. @property (nonatomic) NSInteger maxFps;
  1565. - (nonnull instancetype)initWithMaxBitrate:(NSInteger)maxBitrate maxFps:(NSInteger)maxFps OBJC_DESIGNATED_INITIALIZER;
  1566. - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
  1567. @property (nonatomic, readonly) NSUInteger hash;
  1568. - (nonnull instancetype)init SWIFT_UNAVAILABLE;
  1569. + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
  1570. @end
  1571. SWIFT_CLASS("_TtC16OUICallingPlugin15VideoParameters")
  1572. @interface VideoParameters : NSObject
  1573. @property (nonatomic, readonly, strong) Dimensions * _Nonnull dimensions;
  1574. @property (nonatomic, readonly, strong) VideoEncoding * _Nonnull encoding;
  1575. - (nonnull instancetype)initWithDimensions:(Dimensions * _Nonnull)dimensions encoding:(VideoEncoding * _Nonnull)encoding OBJC_DESIGNATED_INITIALIZER;
  1576. - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
  1577. @property (nonatomic, readonly) NSUInteger hash;
  1578. - (nonnull instancetype)init SWIFT_UNAVAILABLE;
  1579. + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
  1580. @end
  1581. @interface VideoParameters (SWIFT_EXTENSION(OUICallingPlugin))
  1582. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) VideoParameters * _Nonnull presetH90_169;)
  1583. + (VideoParameters * _Nonnull)presetH90_169 SWIFT_WARN_UNUSED_RESULT;
  1584. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) VideoParameters * _Nonnull presetH180_169;)
  1585. + (VideoParameters * _Nonnull)presetH180_169 SWIFT_WARN_UNUSED_RESULT;
  1586. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) VideoParameters * _Nonnull presetH216_169;)
  1587. + (VideoParameters * _Nonnull)presetH216_169 SWIFT_WARN_UNUSED_RESULT;
  1588. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) VideoParameters * _Nonnull presetH360_169;)
  1589. + (VideoParameters * _Nonnull)presetH360_169 SWIFT_WARN_UNUSED_RESULT;
  1590. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) VideoParameters * _Nonnull presetH540_169;)
  1591. + (VideoParameters * _Nonnull)presetH540_169 SWIFT_WARN_UNUSED_RESULT;
  1592. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) VideoParameters * _Nonnull presetH720_169;)
  1593. + (VideoParameters * _Nonnull)presetH720_169 SWIFT_WARN_UNUSED_RESULT;
  1594. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) VideoParameters * _Nonnull presetH1080_169;)
  1595. + (VideoParameters * _Nonnull)presetH1080_169 SWIFT_WARN_UNUSED_RESULT;
  1596. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) VideoParameters * _Nonnull presetH1440_169;)
  1597. + (VideoParameters * _Nonnull)presetH1440_169 SWIFT_WARN_UNUSED_RESULT;
  1598. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) VideoParameters * _Nonnull presetH2160_169;)
  1599. + (VideoParameters * _Nonnull)presetH2160_169 SWIFT_WARN_UNUSED_RESULT;
  1600. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) VideoParameters * _Nonnull presetH120_43;)
  1601. + (VideoParameters * _Nonnull)presetH120_43 SWIFT_WARN_UNUSED_RESULT;
  1602. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) VideoParameters * _Nonnull presetH180_43;)
  1603. + (VideoParameters * _Nonnull)presetH180_43 SWIFT_WARN_UNUSED_RESULT;
  1604. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) VideoParameters * _Nonnull presetH240_43;)
  1605. + (VideoParameters * _Nonnull)presetH240_43 SWIFT_WARN_UNUSED_RESULT;
  1606. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) VideoParameters * _Nonnull presetH360_43;)
  1607. + (VideoParameters * _Nonnull)presetH360_43 SWIFT_WARN_UNUSED_RESULT;
  1608. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) VideoParameters * _Nonnull presetH480_43;)
  1609. + (VideoParameters * _Nonnull)presetH480_43 SWIFT_WARN_UNUSED_RESULT;
  1610. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) VideoParameters * _Nonnull presetH540_43;)
  1611. + (VideoParameters * _Nonnull)presetH540_43 SWIFT_WARN_UNUSED_RESULT;
  1612. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) VideoParameters * _Nonnull presetH720_43;)
  1613. + (VideoParameters * _Nonnull)presetH720_43 SWIFT_WARN_UNUSED_RESULT;
  1614. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) VideoParameters * _Nonnull presetH1080_43;)
  1615. + (VideoParameters * _Nonnull)presetH1080_43 SWIFT_WARN_UNUSED_RESULT;
  1616. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) VideoParameters * _Nonnull presetH1440_43;)
  1617. + (VideoParameters * _Nonnull)presetH1440_43 SWIFT_WARN_UNUSED_RESULT;
  1618. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) VideoParameters * _Nonnull presetScreenShareH360FPS3;)
  1619. + (VideoParameters * _Nonnull)presetScreenShareH360FPS3 SWIFT_WARN_UNUSED_RESULT;
  1620. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) VideoParameters * _Nonnull presetScreenShareH720FPS5;)
  1621. + (VideoParameters * _Nonnull)presetScreenShareH720FPS5 SWIFT_WARN_UNUSED_RESULT;
  1622. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) VideoParameters * _Nonnull presetScreenShareH720FPS15;)
  1623. + (VideoParameters * _Nonnull)presetScreenShareH720FPS15 SWIFT_WARN_UNUSED_RESULT;
  1624. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) VideoParameters * _Nonnull presetScreenShareH1080FPS15;)
  1625. + (VideoParameters * _Nonnull)presetScreenShareH1080FPS15 SWIFT_WARN_UNUSED_RESULT;
  1626. SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) VideoParameters * _Nonnull presetScreenShareH1080FPS30;)
  1627. + (VideoParameters * _Nonnull)presetScreenShareH1080FPS30 SWIFT_WARN_UNUSED_RESULT;
  1628. @end
  1629. SWIFT_CLASS("_TtC16OUICallingPlugin19VideoPublishOptions")
  1630. @interface VideoPublishOptions : NSObject <PublishOptions>
  1631. @property (nonatomic, readonly, copy) NSString * _Nullable name;
  1632. /// preferred encoding parameters
  1633. @property (nonatomic, readonly, strong) VideoEncoding * _Nullable encoding;
  1634. /// encoding parameters for for screen share
  1635. @property (nonatomic, readonly, strong) VideoEncoding * _Nullable screenShareEncoding;
  1636. /// true to enable simulcasting, publishes three tracks at different sizes
  1637. @property (nonatomic, readonly) BOOL simulcast;
  1638. @property (nonatomic, readonly, copy) NSArray<VideoParameters *> * _Nonnull simulcastLayers;
  1639. @property (nonatomic, readonly, copy) NSArray<VideoParameters *> * _Nonnull screenShareSimulcastLayers;
  1640. - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
  1641. @property (nonatomic, readonly) NSUInteger hash;
  1642. - (nonnull instancetype)init SWIFT_UNAVAILABLE;
  1643. + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
  1644. @end
  1645. SWIFT_PROTOCOL("_TtP16OUICallingPlugin13VideoRenderer_")
  1646. @protocol VideoRenderer <RTCVideoRenderer>
  1647. /// Whether this <code>VideoRenderer</code> should be considered visible or not for AdaptiveStream.
  1648. /// This will be invoked on the .main thread.
  1649. @property (nonatomic, readonly) BOOL adaptiveStreamIsEnabled;
  1650. /// The size used for AdaptiveStream computation. Return .zero if size is unknown yet.
  1651. /// This will be invoked on the .main thread.
  1652. @property (nonatomic, readonly) CGSize adaptiveStreamSize;
  1653. @end
  1654. SWIFT_CLASS("_TtC16OUICallingPlugin21VideoSourceStatistics")
  1655. @interface VideoSourceStatistics : MediaSourceStatistics
  1656. @end
  1657. enum LayoutMode : NSInteger;
  1658. enum MirrorMode : NSInteger;
  1659. enum RenderMode : NSInteger;
  1660. SWIFT_CLASS("_TtC16OUICallingPlugin9VideoView")
  1661. @interface VideoView : NativeView
  1662. /// <code>LayoutMode-swift.enum</code> of the <code>VideoView</code>.
  1663. @property (nonatomic) enum LayoutMode layoutMode;
  1664. /// Flips the video horizontally, useful for local VideoViews.
  1665. @property (nonatomic) enum MirrorMode mirrorMode;
  1666. @property (nonatomic) enum RenderMode renderMode;
  1667. /// Calls addRenderer and/or removeRenderer internally for convenience.
  1668. @property (nonatomic, weak) id <VideoTrack> _Nullable track;
  1669. /// If set to false, rendering will be paused temporarily. Useful for performance optimizations with UICollectionViewCell etc.
  1670. @property (nonatomic) BOOL isEnabled;
  1671. @property (nonatomic, getter=isHidden) BOOL hidden;
  1672. @property (nonatomic) BOOL debugMode;
  1673. @property (nonatomic, readonly) BOOL isRendering;
  1674. @property (nonatomic, readonly) BOOL didRenderFirstFrame;
  1675. - (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
  1676. @end
  1677. /// Specifies how to render the video withing the <code>VideoView</code>’s bounds.
  1678. typedef SWIFT_ENUM(NSInteger, LayoutMode, open) {
  1679. /// Video will be fully visible within the <code>VideoView</code>.
  1680. LayoutModeFit = 0,
  1681. /// Video will fully cover up the <code>VideoView</code>.
  1682. LayoutModeFill = 1,
  1683. };
  1684. typedef SWIFT_ENUM(NSInteger, MirrorMode, open) {
  1685. /// Will mirror if the track is a front facing camera track.
  1686. MirrorModeAuto = 0,
  1687. MirrorModeOff = 1,
  1688. MirrorModeMirror = 2,
  1689. };
  1690. typedef SWIFT_ENUM(NSInteger, RenderMode, open) {
  1691. RenderModeAuto = 0,
  1692. RenderModeMetal = 1,
  1693. RenderModeSampleBuffer = 2,
  1694. };
  1695. @interface VideoView (SWIFT_EXTENSION(OUICallingPlugin)) <VideoCapturerDelegate>
  1696. - (void)capturer:(VideoCapturer * _Nonnull)capturer didUpdateState:(enum CapturerState)state;
  1697. @end
  1698. @protocol VideoViewDelegate;
  1699. @interface VideoView (SWIFT_EXTENSION(OUICallingPlugin))
  1700. - (void)addDelegate:(id <VideoViewDelegate> _Nonnull)delegate;
  1701. - (void)removeDelegate:(id <VideoViewDelegate> _Nonnull)delegate;
  1702. - (void)removeAllDelegates;
  1703. @end
  1704. @interface VideoView (SWIFT_EXTENSION(OUICallingPlugin)) <VideoRenderer>
  1705. @property (nonatomic, readonly) BOOL adaptiveStreamIsEnabled;
  1706. @property (nonatomic, readonly) CGSize adaptiveStreamSize;
  1707. - (void)setSize:(CGSize)size;
  1708. - (void)renderFrame:(RTCVideoFrame * _Nullable)frame;
  1709. @end
  1710. SWIFT_PROTOCOL("_TtP16OUICallingPlugin17VideoViewDelegate_")
  1711. @protocol VideoViewDelegate
  1712. @optional
  1713. /// Dimensions of the VideoView itself has updated
  1714. - (void)videoView:(VideoView * _Nonnull)videoView didUpdateSize:(CGSize)size;
  1715. /// VideoView updated the isRendering property
  1716. - (void)videoView:(VideoView * _Nonnull)videoView didUpdateIsRendering:(BOOL)isRendering;
  1717. @end
  1718. #endif
  1719. #if __has_attribute(external_source_symbol)
  1720. # pragma clang attribute pop
  1721. #endif
  1722. #if defined(__cplusplus)
  1723. #endif
  1724. #pragma clang diagnostic pop
  1725. #endif
  1726. #else
  1727. #error unsupported Swift architecture
  1728. #endif