@szdziedzic/sim-on 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/README.md +51 -0
  2. package/bin/sim-on.js +5 -0
  3. package/dist/simon.mjs +307 -0
  4. package/package.json +38 -0
  5. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/LiveKitWebRTC.h +113 -0
  6. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCAudioBuffer.h +38 -0
  7. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCAudioCustomProcessingDelegate.h +52 -0
  8. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCAudioDeviceModule.h +287 -0
  9. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCAudioProcessingConfig.h +37 -0
  10. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCAudioProcessingModule.h +31 -0
  11. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCAudioProcessingState.h +137 -0
  12. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCAudioRenderer.h +35 -0
  13. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCAudioSource.h +32 -0
  14. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCAudioTrack.h +150 -0
  15. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCCVPixelBuffer.h +52 -0
  16. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCCallbackLogger.h +41 -0
  17. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCCameraVideoCapturer.h +71 -0
  18. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCCertificate.h +47 -0
  19. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCCodecSpecificInfo.h +24 -0
  20. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCCodecSpecificInfoH264.h +27 -0
  21. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCConfiguration.h +278 -0
  22. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCCryptoOptions.h +66 -0
  23. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCDataChannel.h +134 -0
  24. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCDataChannelConfiguration.h +52 -0
  25. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCDataPacketCryptor.h +52 -0
  26. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCDefaultAudioProcessingModule.h +47 -0
  27. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCDefaultVideoDecoderFactory.h +26 -0
  28. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCDefaultVideoEncoderFactory.h +31 -0
  29. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCDesktopCapturer.h +60 -0
  30. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCDesktopMediaList.h +51 -0
  31. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCDesktopSource.h +40 -0
  32. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCDispatcher.h +46 -0
  33. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCDtmfSender.h +73 -0
  34. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCEncodedImage.h +52 -0
  35. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCFieldTrials.h +34 -0
  36. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCFileLogger.h +75 -0
  37. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCFileVideoCapturer.h +51 -0
  38. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCFrameCryptor.h +77 -0
  39. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCFrameCryptorKeyProvider.h +76 -0
  40. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCH264ProfileLevelId.h +60 -0
  41. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCI420Buffer.h +22 -0
  42. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCIODevice.h +41 -0
  43. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCIceCandidate.h +50 -0
  44. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCIceCandidateErrorEvent.h +45 -0
  45. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCIceServer.h +114 -0
  46. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCLegacyStatsReport.h +37 -0
  47. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCLogging.h +66 -0
  48. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCMTLNSVideoView.h +22 -0
  49. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCMTLVideoView.h +63 -0
  50. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCMacros.h +69 -0
  51. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCMediaConstraints.h +47 -0
  52. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCMediaSource.h +34 -0
  53. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCMediaStream.h +50 -0
  54. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCMediaStreamTrack.h +50 -0
  55. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCMetrics.h +24 -0
  56. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCMetricsSampleInfo.h +48 -0
  57. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCMutableI420Buffer.h +24 -0
  58. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCMutableYUVPlanarBuffer.h +28 -0
  59. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCNativeI420Buffer.h +23 -0
  60. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCNativeMutableI420Buffer.h +24 -0
  61. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCPeerConnection.h +416 -0
  62. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCPeerConnectionFactory.h +159 -0
  63. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCPeerConnectionFactoryOptions.h +38 -0
  64. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCRtcpParameters.h +30 -0
  65. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCRtpCapabilities.h +31 -0
  66. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCRtpCodecCapability.h +58 -0
  67. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCRtpCodecParameters.h +74 -0
  68. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCRtpEncodingParameters.h +81 -0
  69. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCRtpHeaderExtension.h +33 -0
  70. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCRtpHeaderExtensionCapability.h +39 -0
  71. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCRtpParameters.h +63 -0
  72. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCRtpReceiver.h +105 -0
  73. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCRtpSender.h +55 -0
  74. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCRtpSource.h +66 -0
  75. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCRtpTransceiver.h +180 -0
  76. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCSSLAdapter.h +20 -0
  77. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCSSLCertificateVerifier.h +25 -0
  78. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCSessionDescription.h +48 -0
  79. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCStatisticsReport.h +58 -0
  80. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCTracing.h +21 -0
  81. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoCapturer.h +37 -0
  82. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoCodecInfo.h +43 -0
  83. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoDecoder.h +41 -0
  84. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoDecoderAV1.h +25 -0
  85. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoDecoderFactory.h +33 -0
  86. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoDecoderFactoryH264.h +18 -0
  87. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoDecoderH264.h +18 -0
  88. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoDecoderVP8.h +25 -0
  89. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoDecoderVP9.h +27 -0
  90. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoEncoder.h +62 -0
  91. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoEncoderAV1.h +34 -0
  92. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoEncoderFactory.h +78 -0
  93. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoEncoderFactoryH264.h +18 -0
  94. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoEncoderFactorySimulcast.h +16 -0
  95. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoEncoderH264.h +22 -0
  96. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoEncoderQpThresholds.h +29 -0
  97. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoEncoderSettings.h +42 -0
  98. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoEncoderSimulcast.h +13 -0
  99. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoEncoderVP8.h +30 -0
  100. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoEncoderVP9.h +34 -0
  101. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoFrame.h +86 -0
  102. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoFrameBuffer.h +40 -0
  103. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoRenderer.h +44 -0
  104. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoSource.h +37 -0
  105. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoTrack.h +41 -0
  106. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoViewShading.h +39 -0
  107. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCYUVHelper.h +118 -0
  108. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCYUVPlanarBuffer.h +46 -0
  109. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/LiveKitWebRTC +0 -0
  110. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Modules/module.modulemap +6 -0
  111. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Resources/Info.plist +36 -0
  112. package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Versions/A/Resources/PrivacyInfo.xcprivacy +32 -0
  113. package/vendor/helper/simon-helper +0 -0
  114. package/vendor/web/app.js +54 -0
  115. package/vendor/web/index.html +15 -0
  116. package/vendor/web/styles.css +435 -0
@@ -0,0 +1,60 @@
1
+ /*
2
+ * Copyright 2017 The WebRTC project authors. All Rights Reserved.
3
+ *
4
+ * Use of this source code is governed by a BSD-style license
5
+ * that can be found in the LICENSE file in the root of the source
6
+ * tree. An additional intellectual property rights grant can be found
7
+ * in the file PATENTS. All contributing project authors may
8
+ * be found in the AUTHORS file in the root of the source tree.
9
+ */
10
+
11
+ #import <Foundation/Foundation.h>
12
+
13
+ #import <LiveKitWebRTC/RTCMacros.h>
14
+
15
+ RTC_OBJC_EXPORT extern NSString *const RTC_CONSTANT_TYPE(RTCVideoCodecH264Name);
16
+ RTC_OBJC_EXPORT extern NSString *const RTC_CONSTANT_TYPE(RTCLevel31ConstrainedHigh);
17
+ RTC_OBJC_EXPORT extern NSString *const RTC_CONSTANT_TYPE(RTCLevel31ConstrainedBaseline);
18
+ RTC_OBJC_EXPORT extern NSString *const RTC_CONSTANT_TYPE(RTCMaxSupportedH264ProfileLevelConstrainedHigh);
19
+ RTC_OBJC_EXPORT extern NSString *const RTC_CONSTANT_TYPE(RTCMaxSupportedH264ProfileLevelConstrainedBaseline);
20
+
21
+ /** H264 Profiles and levels. */
22
+ typedef NS_ENUM(NSUInteger, RTC_OBJC_TYPE(RTCH264Profile)) {
23
+ RTC_OBJC_TYPE(RTCH264ProfileConstrainedBaseline),
24
+ RTC_OBJC_TYPE(RTCH264ProfileBaseline),
25
+ RTC_OBJC_TYPE(RTCH264ProfileMain),
26
+ RTC_OBJC_TYPE(RTCH264ProfileConstrainedHigh),
27
+ RTC_OBJC_TYPE(RTCH264ProfileHigh),
28
+ };
29
+
30
+ typedef NS_ENUM(NSUInteger, RTC_OBJC_TYPE(RTCH264Level)) {
31
+ RTC_OBJC_TYPE(RTCH264Level1_b) = 0,
32
+ RTC_OBJC_TYPE(RTCH264Level1) = 10,
33
+ RTC_OBJC_TYPE(RTCH264Level1_1) = 11,
34
+ RTC_OBJC_TYPE(RTCH264Level1_2) = 12,
35
+ RTC_OBJC_TYPE(RTCH264Level1_3) = 13,
36
+ RTC_OBJC_TYPE(RTCH264Level2) = 20,
37
+ RTC_OBJC_TYPE(RTCH264Level2_1) = 21,
38
+ RTC_OBJC_TYPE(RTCH264Level2_2) = 22,
39
+ RTC_OBJC_TYPE(RTCH264Level3) = 30,
40
+ RTC_OBJC_TYPE(RTCH264Level3_1) = 31,
41
+ RTC_OBJC_TYPE(RTCH264Level3_2) = 32,
42
+ RTC_OBJC_TYPE(RTCH264Level4) = 40,
43
+ RTC_OBJC_TYPE(RTCH264Level4_1) = 41,
44
+ RTC_OBJC_TYPE(RTCH264Level4_2) = 42,
45
+ RTC_OBJC_TYPE(RTCH264Level5) = 50,
46
+ RTC_OBJC_TYPE(RTCH264Level5_1) = 51,
47
+ RTC_OBJC_TYPE(RTCH264Level5_2) = 52
48
+ };
49
+
50
+ RTC_OBJC_EXPORT
51
+ @interface RTC_OBJC_TYPE (RTCH264ProfileLevelId) : NSObject
52
+
53
+ @property(nonatomic, readonly) RTC_OBJC_TYPE(RTCH264Profile) profile;
54
+ @property(nonatomic, readonly) RTC_OBJC_TYPE(RTCH264Level) level;
55
+ @property(nonatomic, readonly) NSString *hexString;
56
+
57
+ - (instancetype)initWithHexString:(NSString *)hexString;
58
+ - (instancetype)initWithProfile:(RTC_OBJC_TYPE(RTCH264Profile))profile level:(RTC_OBJC_TYPE(RTCH264Level))level;
59
+
60
+ @end
@@ -0,0 +1,22 @@
1
+ /*
2
+ * Copyright 2018 The WebRTC project authors. All Rights Reserved.
3
+ *
4
+ * Use of this source code is governed by a BSD-style license
5
+ * that can be found in the LICENSE file in the root of the source
6
+ * tree. An additional intellectual property rights grant can be found
7
+ * in the file PATENTS. All contributing project authors may
8
+ * be found in the AUTHORS file in the root of the source tree.
9
+ */
10
+
11
+ #import <AVFoundation/AVFoundation.h>
12
+
13
+ #import <LiveKitWebRTC/RTCYUVPlanarBuffer.h>
14
+
15
+ NS_ASSUME_NONNULL_BEGIN
16
+
17
+ /** Protocol for RTCYUVPlanarBuffers containing I420 data */
18
+ RTC_OBJC_EXPORT
19
+ @protocol RTC_OBJC_TYPE
20
+ (RTCI420Buffer)<RTC_OBJC_TYPE(RTCYUVPlanarBuffer)> @end
21
+
22
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,41 @@
1
+ /*
2
+ * Copyright 2022 LiveKit
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ #import <Foundation/Foundation.h>
18
+
19
+ #import <LiveKitWebRTC/RTCMacros.h>
20
+
21
+ NS_ASSUME_NONNULL_BEGIN
22
+
23
+ typedef NS_ENUM(NSInteger, RTC_OBJC_TYPE(RTCIODeviceType)) {
24
+ RTC_OBJC_TYPE(RTCIODeviceTypeOutput),
25
+ RTC_OBJC_TYPE(RTCIODeviceTypeInput),
26
+ };
27
+
28
+ RTC_OBJC_EXPORT
29
+ @interface RTC_OBJC_TYPE(RTCIODevice) : NSObject
30
+
31
+ + (instancetype)defaultDeviceWithType: (RTC_OBJC_TYPE(RTCIODeviceType))type;
32
+ - (instancetype)init NS_UNAVAILABLE;
33
+
34
+ @property(nonatomic, readonly) BOOL isDefault;
35
+ @property(nonatomic, readonly) RTC_OBJC_TYPE(RTCIODeviceType) type;
36
+ @property(nonatomic, copy, readonly) NSString *deviceId;
37
+ @property(nonatomic, copy, readonly) NSString *name;
38
+
39
+ @end
40
+
41
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,50 @@
1
+ /*
2
+ * Copyright 2015 The WebRTC project authors. All Rights Reserved.
3
+ *
4
+ * Use of this source code is governed by a BSD-style license
5
+ * that can be found in the LICENSE file in the root of the source
6
+ * tree. An additional intellectual property rights grant can be found
7
+ * in the file PATENTS. All contributing project authors may
8
+ * be found in the AUTHORS file in the root of the source tree.
9
+ */
10
+
11
+ #import <Foundation/Foundation.h>
12
+
13
+ #import <LiveKitWebRTC/RTCMacros.h>
14
+
15
+ NS_ASSUME_NONNULL_BEGIN
16
+
17
+ RTC_OBJC_EXPORT
18
+ @interface RTC_OBJC_TYPE (RTCIceCandidate) : NSObject
19
+
20
+ /**
21
+ * If present, the identifier of the "media stream identification" for the media
22
+ * component this candidate is associated with.
23
+ */
24
+ @property(nonatomic, readonly, nullable) NSString *sdpMid;
25
+
26
+ /**
27
+ * The index (starting at zero) of the media description this candidate is
28
+ * associated with in the SDP.
29
+ */
30
+ @property(nonatomic, readonly) int sdpMLineIndex;
31
+
32
+ /** The SDP string for this candidate. */
33
+ @property(nonatomic, readonly) NSString *sdp;
34
+
35
+ /** The URL of the ICE server which this candidate is gathered from. */
36
+ @property(nonatomic, readonly, nullable) NSString *serverUrl;
37
+
38
+ - (instancetype)init NS_UNAVAILABLE;
39
+
40
+ /**
41
+ * Initialize an RTCIceCandidate from SDP.
42
+ */
43
+ - (instancetype)initWithSdp:(NSString *)sdp
44
+ sdpMLineIndex:(int)sdpMLineIndex
45
+ sdpMid:(nullable NSString *)sdpMid
46
+ NS_DESIGNATED_INITIALIZER;
47
+
48
+ @end
49
+
50
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,45 @@
1
+ /*
2
+ * Copyright (c) 2021 The WebRTC project authors. All Rights Reserved.
3
+ *
4
+ * Use of this source code is governed by a BSD-style license
5
+ * that can be found in the LICENSE file in the root of the source
6
+ * tree. An additional intellectual property rights grant can be found
7
+ * in the file PATENTS. All contributing project authors may
8
+ * be found in the AUTHORS file in the root of the source tree.
9
+ */
10
+
11
+ #import <Foundation/Foundation.h>
12
+
13
+ #import <LiveKitWebRTC/RTCMacros.h>
14
+
15
+ NS_ASSUME_NONNULL_BEGIN
16
+
17
+ RTC_OBJC_EXPORT
18
+ @interface RTC_OBJC_TYPE (RTCIceCandidateErrorEvent) : NSObject
19
+
20
+ /** The local IP address used to communicate with the STUN or TURN server. */
21
+ @property(nonatomic, readonly) NSString *address;
22
+
23
+ /** The port used to communicate with the STUN or TURN server. */
24
+ @property(nonatomic, readonly) int port;
25
+
26
+ /** The STUN or TURN URL that identifies the STUN or TURN server for which the
27
+ * failure occurred. */
28
+ @property(nonatomic, readonly) NSString *url;
29
+
30
+ /** The numeric STUN error code returned by the STUN or TURN server. If no host
31
+ * candidate can reach the server, errorCode will be set to the value 701 which
32
+ * is outside the STUN error code range. This error is only fired once per
33
+ * server URL while in the RTCIceGatheringState of "gathering". */
34
+ @property(nonatomic, readonly) int errorCode;
35
+
36
+ /** The STUN reason text returned by the STUN or TURN server. If the server
37
+ * could not be reached, errorText will be set to an implementation-specific
38
+ * value providing details about the error. */
39
+ @property(nonatomic, readonly) NSString *errorText;
40
+
41
+ - (instancetype)init NS_DESIGNATED_INITIALIZER;
42
+
43
+ @end
44
+
45
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,114 @@
1
+ /*
2
+ * Copyright 2015 The WebRTC project authors. All Rights Reserved.
3
+ *
4
+ * Use of this source code is governed by a BSD-style license
5
+ * that can be found in the LICENSE file in the root of the source
6
+ * tree. An additional intellectual property rights grant can be found
7
+ * in the file PATENTS. All contributing project authors may
8
+ * be found in the AUTHORS file in the root of the source tree.
9
+ */
10
+
11
+ #import <Foundation/Foundation.h>
12
+
13
+ #import <LiveKitWebRTC/RTCMacros.h>
14
+
15
+ typedef NS_ENUM(NSUInteger, RTC_OBJC_TYPE(RTCTlsCertPolicy)) {
16
+ RTC_OBJC_TYPE(RTCTlsCertPolicySecure),
17
+ RTC_OBJC_TYPE(RTCTlsCertPolicyInsecureNoCheck)
18
+ };
19
+
20
+ NS_ASSUME_NONNULL_BEGIN
21
+
22
+ RTC_OBJC_EXPORT
23
+ @interface RTC_OBJC_TYPE (RTCIceServer) : NSObject
24
+
25
+ /** URI(s) for this server represented as NSStrings. */
26
+ @property(nonatomic, readonly) NSArray<NSString *> *urlStrings;
27
+
28
+ /** Username to use if this RTCIceServer object is a TURN server. */
29
+ @property(nonatomic, readonly, nullable) NSString *username;
30
+
31
+ /** Credential to use if this RTCIceServer object is a TURN server. */
32
+ @property(nonatomic, readonly, nullable) NSString *credential;
33
+
34
+ /**
35
+ * TLS certificate policy to use if this RTCIceServer object is a TURN server.
36
+ */
37
+ @property(nonatomic, readonly) RTC_OBJC_TYPE(RTCTlsCertPolicy) tlsCertPolicy;
38
+
39
+ /**
40
+ If the URIs in `urls` only contain IP addresses, this field can be used
41
+ to indicate the hostname, which may be necessary for TLS (using the SNI
42
+ extension). If `urls` itself contains the hostname, this isn't necessary.
43
+ */
44
+ @property(nonatomic, readonly, nullable) NSString *hostname;
45
+
46
+ /** List of protocols to be used in the TLS ALPN extension. */
47
+ @property(nonatomic, readonly) NSArray<NSString *> *tlsAlpnProtocols;
48
+
49
+ /**
50
+ List elliptic curves to be used in the TLS elliptic curves extension.
51
+ Only curve names supported by OpenSSL should be used (eg. "P-256","X25519").
52
+ */
53
+ @property(nonatomic, readonly) NSArray<NSString *> *tlsEllipticCurves;
54
+
55
+ - (nonnull instancetype)init NS_UNAVAILABLE;
56
+
57
+ /** Convenience initializer for a server with no authentication (e.g. STUN). */
58
+ - (instancetype)initWithURLStrings:(NSArray<NSString *> *)urlStrings;
59
+
60
+ /**
61
+ * Initialize an RTCIceServer with its associated URLs, optional username,
62
+ * optional credential, and credentialType.
63
+ */
64
+ - (instancetype)initWithURLStrings:(NSArray<NSString *> *)urlStrings
65
+ username:(nullable NSString *)username
66
+ credential:(nullable NSString *)credential;
67
+
68
+ /**
69
+ * Initialize an RTCIceServer with its associated URLs, optional username,
70
+ * optional credential, and TLS cert policy.
71
+ */
72
+ - (instancetype)initWithURLStrings:(NSArray<NSString *> *)urlStrings
73
+ username:(nullable NSString *)username
74
+ credential:(nullable NSString *)credential
75
+ tlsCertPolicy:(RTC_OBJC_TYPE(RTCTlsCertPolicy))tlsCertPolicy;
76
+
77
+ /**
78
+ * Initialize an RTCIceServer with its associated URLs, optional username,
79
+ * optional credential, TLS cert policy and hostname.
80
+ */
81
+ - (instancetype)initWithURLStrings:(NSArray<NSString *> *)urlStrings
82
+ username:(nullable NSString *)username
83
+ credential:(nullable NSString *)credential
84
+ tlsCertPolicy:(RTC_OBJC_TYPE(RTCTlsCertPolicy))tlsCertPolicy
85
+ hostname:(nullable NSString *)hostname;
86
+
87
+ /**
88
+ * Initialize an RTCIceServer with its associated URLs, optional username,
89
+ * optional credential, TLS cert policy, hostname and ALPN protocols.
90
+ */
91
+ - (instancetype)initWithURLStrings:(NSArray<NSString *> *)urlStrings
92
+ username:(nullable NSString *)username
93
+ credential:(nullable NSString *)credential
94
+ tlsCertPolicy:(RTC_OBJC_TYPE(RTCTlsCertPolicy))tlsCertPolicy
95
+ hostname:(nullable NSString *)hostname
96
+ tlsAlpnProtocols:(NSArray<NSString *> *)tlsAlpnProtocols;
97
+
98
+ /**
99
+ * Initialize an RTCIceServer with its associated URLs, optional username,
100
+ * optional credential, TLS cert policy, hostname, ALPN protocols and
101
+ * elliptic curves.
102
+ */
103
+ - (instancetype)initWithURLStrings:(NSArray<NSString *> *)urlStrings
104
+ username:(nullable NSString *)username
105
+ credential:(nullable NSString *)credential
106
+ tlsCertPolicy:(RTC_OBJC_TYPE(RTCTlsCertPolicy))tlsCertPolicy
107
+ hostname:(nullable NSString *)hostname
108
+ tlsAlpnProtocols:(nullable NSArray<NSString *> *)tlsAlpnProtocols
109
+ tlsEllipticCurves:(nullable NSArray<NSString *> *)tlsEllipticCurves
110
+ NS_DESIGNATED_INITIALIZER;
111
+
112
+ @end
113
+
114
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,37 @@
1
+ /*
2
+ * Copyright 2015 The WebRTC project authors. All Rights Reserved.
3
+ *
4
+ * Use of this source code is governed by a BSD-style license
5
+ * that can be found in the LICENSE file in the root of the source
6
+ * tree. An additional intellectual property rights grant can be found
7
+ * in the file PATENTS. All contributing project authors may
8
+ * be found in the AUTHORS file in the root of the source tree.
9
+ */
10
+
11
+ #import <Foundation/Foundation.h>
12
+
13
+ #import <LiveKitWebRTC/RTCMacros.h>
14
+
15
+ NS_ASSUME_NONNULL_BEGIN
16
+
17
+ /** This does not currently conform to the spec. */
18
+ RTC_OBJC_EXPORT
19
+ @interface RTC_OBJC_TYPE (RTCLegacyStatsReport) : NSObject
20
+
21
+ /** Time since 1970-01-01T00:00:00Z in milliseconds. */
22
+ @property(nonatomic, readonly) CFTimeInterval timestamp;
23
+
24
+ /** The type of stats held by this object. */
25
+ @property(nonatomic, readonly) NSString *type;
26
+
27
+ /** The identifier for this object. */
28
+ @property(nonatomic, readonly) NSString *reportId;
29
+
30
+ /** A dictionary holding the actual stats. */
31
+ @property(nonatomic, readonly) NSDictionary<NSString *, NSString *> *values;
32
+
33
+ - (instancetype)init NS_UNAVAILABLE;
34
+
35
+ @end
36
+
37
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,66 @@
1
+ /*
2
+ * Copyright 2015 The WebRTC project authors. All Rights Reserved.
3
+ *
4
+ * Use of this source code is governed by a BSD-style license
5
+ * that can be found in the LICENSE file in the root of the source
6
+ * tree. An additional intellectual property rights grant can be found
7
+ * in the file PATENTS. All contributing project authors may
8
+ * be found in the AUTHORS file in the root of the source tree.
9
+ */
10
+
11
+ #import <Foundation/Foundation.h>
12
+
13
+ #import <LiveKitWebRTC/RTCMacros.h>
14
+
15
+ // Subset of webrtc::LoggingSeverity.
16
+ typedef NS_ENUM(NSInteger, RTC_OBJC_TYPE(RTCLoggingSeverity)) {
17
+ RTC_OBJC_TYPE(RTCLoggingSeverityVerbose),
18
+ RTC_OBJC_TYPE(RTCLoggingSeverityInfo),
19
+ RTC_OBJC_TYPE(RTCLoggingSeverityWarning),
20
+ RTC_OBJC_TYPE(RTCLoggingSeverityError),
21
+ RTC_OBJC_TYPE(RTCLoggingSeverityNone),
22
+ };
23
+
24
+ // Wrapper for C++ RTC_LOG(sev) macros.
25
+ // Logs the log string to the webrtc logstream for the given severity.
26
+ RTC_EXTERN void RTC_OBJC_TYPE(RTCLogEx)(RTC_OBJC_TYPE(RTCLoggingSeverity) severity, NSString* log_string);
27
+
28
+ // Wrapper for webrtc::LogMessage::LogToDebug.
29
+ // Sets the minimum severity to be logged to console.
30
+ RTC_EXTERN void RTC_OBJC_TYPE(RTCSetMinDebugLogLevel)(RTC_OBJC_TYPE(RTCLoggingSeverity) severity);
31
+
32
+ // Returns the filename with the path prefix removed.
33
+ RTC_EXTERN NSString* RTC_OBJC_TYPE(RTCFileName)(const char* filePath);
34
+
35
+ // Some convenience macros.
36
+
37
+ #define RTCLogString(format, ...) \
38
+ [NSString stringWithFormat:@"(%@:%d %s): " format, \
39
+ RTC_OBJC_TYPE(RTCFileName)(__FILE__), \
40
+ __LINE__, \
41
+ __FUNCTION__, \
42
+ ##__VA_ARGS__]
43
+
44
+ #define RTCLogFormat(severity, format, ...) \
45
+ do { \
46
+ NSString* log_string = RTCLogString(format, ##__VA_ARGS__); \
47
+ RTC_OBJC_TYPE(RTCLogEx)(severity, log_string); \
48
+ } while (false)
49
+
50
+ #define RTCLogVerbose(format, ...) RTCLogFormat(RTC_OBJC_TYPE(RTCLoggingSeverityVerbose), format, ##__VA_ARGS__)
51
+
52
+ #define RTCLogInfo(format, ...) RTCLogFormat(RTC_OBJC_TYPE(RTCLoggingSeverityInfo), format, ##__VA_ARGS__)
53
+
54
+ #define RTCLogWarning(format, ...) RTCLogFormat(RTC_OBJC_TYPE(RTCLoggingSeverityWarning), format, ##__VA_ARGS__)
55
+
56
+ #define RTCLogError(format, ...) RTCLogFormat(RTC_OBJC_TYPE(RTCLoggingSeverityError), format, ##__VA_ARGS__)
57
+
58
+ #if !defined(NDEBUG)
59
+ #define RTCLogDebug(format, ...) RTCLogInfo(format, ##__VA_ARGS__)
60
+ #else
61
+ #define RTCLogDebug(format, ...) \
62
+ do { \
63
+ } while (false)
64
+ #endif
65
+
66
+ #define RTCLog(format, ...) RTCLogInfo(format, ##__VA_ARGS__)
@@ -0,0 +1,22 @@
1
+ /*
2
+ * Copyright 2017 The WebRTC project authors. All Rights Reserved.
3
+ *
4
+ * Use of this source code is governed by a BSD-style license
5
+ * that can be found in the LICENSE file in the root of the source
6
+ * tree. An additional intellectual property rights grant can be found
7
+ * in the file PATENTS. All contributing project authors may
8
+ * be found in the AUTHORS file in the root of the source tree.
9
+ */
10
+
11
+ #import <AppKit/AppKit.h>
12
+
13
+ #import <LiveKitWebRTC/RTCVideoRenderer.h>
14
+
15
+ RTC_OBJC_EXPORT
16
+ @interface RTC_OBJC_TYPE (RTCMTLNSVideoView) : NSView <RTC_OBJC_TYPE(RTCVideoRenderer)>
17
+
18
+ @property(nonatomic, weak) id<RTC_OBJC_TYPE(RTCVideoViewDelegate)> delegate;
19
+
20
+ + (BOOL)isMetalAvailable;
21
+
22
+ @end
@@ -0,0 +1,63 @@
1
+ /*
2
+ * Copyright 2017 The WebRTC project authors. All Rights Reserved.
3
+ *
4
+ * Use of this source code is governed by a BSD-style license
5
+ * that can be found in the LICENSE file in the root of the source
6
+ * tree. An additional intellectual property rights grant can be found
7
+ * in the file PATENTS. All contributing project authors may
8
+ * be found in the AUTHORS file in the root of the source tree.
9
+ */
10
+
11
+ #import <Foundation/Foundation.h>
12
+
13
+ #if TARGET_OS_OSX
14
+ #import <AppKit/AppKit.h>
15
+ #endif
16
+
17
+ #import <LiveKitWebRTC/RTCMacros.h>
18
+ #import <LiveKitWebRTC/RTCVideoFrame.h>
19
+ #import <LiveKitWebRTC/RTCVideoRenderer.h>
20
+ #import <LiveKitWebRTC/RTCMacros.h>
21
+
22
+ NS_ASSUME_NONNULL_BEGIN
23
+
24
+ /**
25
+ * RTCMTLVideoView is thin wrapper around MTKView.
26
+ *
27
+ * It has id<RTCVideoRenderer> property that renders video frames in the view's
28
+ * bounds using Metal.
29
+ */
30
+ #if TARGET_OS_IPHONE
31
+ NS_CLASS_AVAILABLE_IOS(9)
32
+ #elif TARGET_OS_OSX
33
+ NS_AVAILABLE_MAC(10.11)
34
+ #endif
35
+
36
+ RTC_OBJC_EXPORT
37
+ @interface RTC_OBJC_TYPE (RTCMTLVideoView) :
38
+
39
+ #if TARGET_OS_IPHONE
40
+ UIView<RTC_OBJC_TYPE(RTCVideoRenderer)>
41
+ #elif TARGET_OS_OSX
42
+ NSView<RTC_OBJC_TYPE(RTCVideoRenderer)>
43
+ #endif
44
+
45
+ @property(nonatomic, weak) id<RTC_OBJC_TYPE(RTCVideoViewDelegate)> delegate;
46
+
47
+ #if TARGET_OS_IPHONE
48
+ @property(nonatomic) UIViewContentMode videoContentMode;
49
+ #endif
50
+
51
+ /** @abstract Enables/disables rendering.
52
+ */
53
+ @property(nonatomic, getter=isEnabled) BOOL enabled;
54
+
55
+ /** @abstract Wrapped RTCVideoRotation, or nil.
56
+ */
57
+ @property(nonatomic, nullable) NSValue* rotationOverride;
58
+
59
+ + (BOOL)isMetalAvailable;
60
+
61
+ @end
62
+
63
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,69 @@
1
+ /*
2
+ * Copyright 2016 The WebRTC Project Authors. All rights reserved.
3
+ *
4
+ * Use of this source code is governed by a BSD-style license
5
+ * that can be found in the LICENSE file in the root of the source
6
+ * tree. An additional intellectual property rights grant can be found
7
+ * in the file PATENTS. All contributing project authors may
8
+ * be found in the AUTHORS file in the root of the source tree.
9
+ */
10
+
11
+ #ifndef SDK_OBJC_BASE_RTCMACROS_H_
12
+ #define SDK_OBJC_BASE_RTCMACROS_H_
13
+
14
+ #ifdef WEBRTC_ENABLE_OBJC_SYMBOL_EXPORT
15
+
16
+ #if defined(WEBRTC_LIBRARY_IMPL)
17
+ #define RTC_OBJC_EXPORT __attribute__((visibility("default")))
18
+ #endif
19
+
20
+ #endif // WEBRTC_ENABLE_OBJC_SYMBOL_EXPORT
21
+
22
+ #ifndef RTC_OBJC_EXPORT
23
+ #define RTC_OBJC_EXPORT
24
+ #endif
25
+
26
+ // Macro used to mark a function as deprecated.
27
+ #define RTC_OBJC_DEPRECATED(msg) __attribute__((deprecated(msg)))
28
+
29
+ // Internal macros used to correctly concatenate symbols.
30
+ #define RTC_SYMBOL_CONCAT_HELPER(a, b) a##b
31
+ #define RTC_SYMBOL_CONCAT(a, b) RTC_SYMBOL_CONCAT_HELPER(a, b)
32
+
33
+ // RTC_OBJC_TYPE_PREFIX
34
+ //
35
+ // Macro used to prepend a prefix to the API types that are exported with
36
+ // RTC_OBJC_EXPORT.
37
+ //
38
+ // Clients can patch the definition of this macro locally and build
39
+ // WebRTC.framework with their own prefix in case symbol clashing is a
40
+ // problem.
41
+ //
42
+ // This macro must be defined uniformily across all the translation units.
43
+ #define RTC_OBJC_TYPE_PREFIX LK
44
+
45
+ #define RTC_CONSTANT_TYPE_PREFIX kLK
46
+
47
+ // RCT_OBJC_TYPE
48
+ //
49
+ // Macro used internally to declare API types. Declaring an API type without
50
+ // using this macro will not include the declared type in the set of types
51
+ // that will be affected by the configurable RTC_OBJC_TYPE_PREFIX.
52
+ #define RTC_OBJC_TYPE(type_name) \
53
+ RTC_SYMBOL_CONCAT(RTC_OBJC_TYPE_PREFIX, type_name)
54
+
55
+ #define RTC_CONSTANT_TYPE(type_name) RTC_SYMBOL_CONCAT(RTC_CONSTANT_TYPE_PREFIX, type_name)
56
+
57
+ #if defined(__cplusplus)
58
+ #define RTC_EXTERN extern "C" RTC_OBJC_EXPORT
59
+ #else
60
+ #define RTC_EXTERN extern RTC_OBJC_EXPORT
61
+ #endif
62
+
63
+ #ifdef __OBJC__
64
+ #define RTC_FWD_DECL_OBJC_CLASS(classname) @class classname
65
+ #else
66
+ #define RTC_FWD_DECL_OBJC_CLASS(classname) typedef struct objc_object classname
67
+ #endif
68
+
69
+ #endif // SDK_OBJC_BASE_RTCMACROS_H_
@@ -0,0 +1,47 @@
1
+ /*
2
+ * Copyright 2015 The WebRTC project authors. All Rights Reserved.
3
+ *
4
+ * Use of this source code is governed by a BSD-style license
5
+ * that can be found in the LICENSE file in the root of the source
6
+ * tree. An additional intellectual property rights grant can be found
7
+ * in the file PATENTS. All contributing project authors may
8
+ * be found in the AUTHORS file in the root of the source tree.
9
+ */
10
+
11
+ #import <Foundation/Foundation.h>
12
+
13
+ #import <LiveKitWebRTC/RTCMacros.h>
14
+
15
+ NS_ASSUME_NONNULL_BEGIN
16
+
17
+ /** Constraint keys for media sources. */
18
+ /** The value for this key should be a base64 encoded string containing
19
+ * the data from the serialized configuration proto.
20
+ */
21
+ RTC_EXTERN NSString *const RTC_CONSTANT_TYPE(RTCMediaConstraintsAudioNetworkAdaptorConfig);
22
+
23
+ /** Constraint keys for generating offers and answers. */
24
+ RTC_EXTERN NSString *const RTC_CONSTANT_TYPE(RTCMediaConstraintsIceRestart);
25
+ RTC_EXTERN NSString *const RTC_CONSTANT_TYPE(RTCMediaConstraintsOfferToReceiveAudio);
26
+ RTC_EXTERN NSString *const RTC_CONSTANT_TYPE(RTCMediaConstraintsOfferToReceiveVideo);
27
+ RTC_EXTERN NSString *const RTC_CONSTANT_TYPE(RTCMediaConstraintsVoiceActivityDetection);
28
+
29
+ /** Constraint values for Boolean parameters. */
30
+ RTC_EXTERN NSString *const RTC_CONSTANT_TYPE(RTCMediaConstraintsValueTrue);
31
+ RTC_EXTERN NSString *const RTC_CONSTANT_TYPE(RTCMediaConstraintsValueFalse);
32
+
33
+ RTC_OBJC_EXPORT
34
+ @interface RTC_OBJC_TYPE (RTCMediaConstraints) : NSObject
35
+
36
+ - (instancetype)init NS_UNAVAILABLE;
37
+
38
+ /** Initialize with mandatory and/or optional constraints. */
39
+ - (instancetype)initWithMandatoryConstraints:
40
+ (nullable NSDictionary<NSString *, NSString *> *)mandatory
41
+ optionalConstraints:
42
+ (nullable NSDictionary<NSString *, NSString *> *)
43
+ optional NS_DESIGNATED_INITIALIZER;
44
+
45
+ @end
46
+
47
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,34 @@
1
+ /*
2
+ * Copyright 2016 The WebRTC project authors. All Rights Reserved.
3
+ *
4
+ * Use of this source code is governed by a BSD-style license
5
+ * that can be found in the LICENSE file in the root of the source
6
+ * tree. An additional intellectual property rights grant can be found
7
+ * in the file PATENTS. All contributing project authors may
8
+ * be found in the AUTHORS file in the root of the source tree.
9
+ */
10
+
11
+ #import <Foundation/Foundation.h>
12
+
13
+ #import <LiveKitWebRTC/RTCMacros.h>
14
+
15
+ typedef NS_ENUM(NSInteger, RTC_OBJC_TYPE(RTCSourceState)) {
16
+ RTC_OBJC_TYPE(RTCSourceStateInitializing),
17
+ RTC_OBJC_TYPE(RTCSourceStateLive),
18
+ RTC_OBJC_TYPE(RTCSourceStateEnded),
19
+ RTC_OBJC_TYPE(RTCSourceStateMuted),
20
+ };
21
+
22
+ NS_ASSUME_NONNULL_BEGIN
23
+
24
+ RTC_OBJC_EXPORT
25
+ @interface RTC_OBJC_TYPE (RTCMediaSource) : NSObject
26
+
27
+ /** The current state of the RTCMediaSource. */
28
+ @property(nonatomic, readonly) RTC_OBJC_TYPE(RTCSourceState) state;
29
+
30
+ - (instancetype)init NS_UNAVAILABLE;
31
+
32
+ @end
33
+
34
+ NS_ASSUME_NONNULL_END