@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,58 @@
1
+ /*
2
+ * Copyright 2024 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 (RTCRtpCodecCapability) : NSObject
19
+
20
+ /** The preferred RTP payload type. */
21
+ @property(nonatomic, readonly, nullable) NSNumber *preferredPayloadType;
22
+
23
+ /**
24
+ * The codec MIME subtype. Valid types are listed in:
25
+ * http://www.iana.org/assignments/rtp-parameters/rtp-parameters.xhtml#rtp-parameters-2
26
+ *
27
+ * Several supported types are represented by the constants above.
28
+ */
29
+ @property(nonatomic, readonly) NSString *name;
30
+
31
+ /**
32
+ * The media type of this codec. Equivalent to MIME top-level type.
33
+ *
34
+ * Valid values are kRTCMediaStreamTrackKindAudio and
35
+ * kRTCMediaStreamTrackKindVideo.
36
+ */
37
+ @property(nonatomic, readonly) NSString *kind;
38
+
39
+ /** The codec clock rate expressed in Hertz. */
40
+ @property(nonatomic, readonly, nullable) NSNumber *clockRate;
41
+
42
+ /**
43
+ * The number of audio channels (mono=1, stereo=2).
44
+ * Set to null for video codecs.
45
+ **/
46
+ @property(nonatomic, readonly, nullable) NSNumber *numChannels;
47
+
48
+ /** The "format specific parameters" field from the "a=fmtp" line in the SDP */
49
+ @property(nonatomic, readonly) NSDictionary<NSString *, NSString *> *parameters;
50
+
51
+ /** The MIME type of the codec. */
52
+ @property(nonatomic, readonly) NSString *mimeType;
53
+
54
+ - (instancetype)init NS_UNAVAILABLE;
55
+
56
+ @end
57
+
58
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,74 @@
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
+ NS_ASSUME_NONNULL_BEGIN
16
+
17
+ RTC_EXTERN const NSString *const RTC_CONSTANT_TYPE(RTCRtxCodecName);
18
+ RTC_EXTERN const NSString *const RTC_CONSTANT_TYPE(RTCRedCodecName);
19
+ RTC_EXTERN const NSString *const RTC_CONSTANT_TYPE(RTCUlpfecCodecName);
20
+ RTC_EXTERN const NSString *const RTC_CONSTANT_TYPE(RTCFlexfecCodecName);
21
+ RTC_EXTERN const NSString *const RTC_CONSTANT_TYPE(RTCOpusCodecName);
22
+ RTC_EXTERN const NSString *const RTC_CONSTANT_TYPE(RTCIsacCodecName);
23
+ RTC_EXTERN const NSString *const RTC_CONSTANT_TYPE(RTCL16CodecName);
24
+ RTC_EXTERN const NSString *const RTC_CONSTANT_TYPE(RTCG722CodecName);
25
+ RTC_EXTERN const NSString *const RTC_CONSTANT_TYPE(RTCIlbcCodecName);
26
+ RTC_EXTERN const NSString *const RTC_CONSTANT_TYPE(RTCPcmuCodecName);
27
+ RTC_EXTERN const NSString *const RTC_CONSTANT_TYPE(RTCPcmaCodecName);
28
+ RTC_EXTERN const NSString *const RTC_CONSTANT_TYPE(RTCDtmfCodecName);
29
+ RTC_EXTERN const NSString *const RTC_CONSTANT_TYPE(RTCComfortNoiseCodecName);
30
+ RTC_EXTERN const NSString *const RTC_CONSTANT_TYPE(RTCVp8CodecName);
31
+ RTC_EXTERN const NSString *const RTC_CONSTANT_TYPE(RTCVp9CodecName);
32
+ RTC_EXTERN const NSString *const RTC_CONSTANT_TYPE(RTCH264CodecName);
33
+ RTC_EXTERN const NSString *const RTC_CONSTANT_TYPE(RTCAv1CodecName);
34
+
35
+ /** Defined in https://www.w3.org/TR/webrtc/#idl-def-rtcrtpcodecparameters */
36
+ RTC_OBJC_EXPORT
37
+ @interface RTC_OBJC_TYPE (RTCRtpCodecParameters) : NSObject
38
+
39
+ /** The RTP payload type. */
40
+ @property(nonatomic, assign) int payloadType;
41
+
42
+ /**
43
+ * The codec MIME subtype. Valid types are listed in:
44
+ * http://www.iana.org/assignments/rtp-parameters/rtp-parameters.xhtml#rtp-parameters-2
45
+ *
46
+ * Several supported types are represented by the constants above.
47
+ */
48
+ @property(nonatomic, readonly, nonnull) NSString *name;
49
+
50
+ /**
51
+ * The media type of this codec. Equivalent to MIME top-level type.
52
+ *
53
+ * Valid values are kRTCMediaStreamTrackKindAudio and
54
+ * kRTCMediaStreamTrackKindVideo.
55
+ */
56
+ @property(nonatomic, readonly, nonnull) NSString *kind;
57
+
58
+ /** The codec clock rate expressed in Hertz. */
59
+ @property(nonatomic, readonly, nullable) NSNumber *clockRate;
60
+
61
+ /**
62
+ * The number of channels (mono=1, stereo=2).
63
+ * Set to null for video codecs.
64
+ **/
65
+ @property(nonatomic, readonly, nullable) NSNumber *numChannels;
66
+
67
+ /** The "format specific parameters" field from the "a=fmtp" line in the SDP */
68
+ @property(nonatomic, readonly, nonnull) NSDictionary *parameters;
69
+
70
+ - (instancetype)init;
71
+
72
+ @end
73
+
74
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,81 @@
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
+ NS_ASSUME_NONNULL_BEGIN
16
+
17
+ /** Corresponds to webrtc::Priority. */
18
+ typedef NS_ENUM(NSInteger, RTC_OBJC_TYPE(RTCPriority)) {
19
+ RTC_OBJC_TYPE(RTCPriorityVeryLow),
20
+ RTC_OBJC_TYPE(RTCPriorityLow),
21
+ RTC_OBJC_TYPE(RTCPriorityMedium),
22
+ RTC_OBJC_TYPE(RTCPriorityHigh)
23
+ };
24
+
25
+ RTC_OBJC_EXPORT
26
+ @interface RTC_OBJC_TYPE (RTCRtpEncodingParameters) : NSObject
27
+
28
+ /** The idenfifier for the encoding layer. This is used in simulcast. */
29
+ @property(nonatomic, copy, nullable) NSString *rid;
30
+
31
+ /** Controls whether the encoding is currently transmitted. */
32
+ @property(nonatomic, assign) BOOL isActive;
33
+
34
+ /** The maximum bitrate to use for the encoding, or nil if there is no
35
+ * limit.
36
+ */
37
+ @property(nonatomic, copy, nullable) NSNumber *maxBitrateBps;
38
+
39
+ /** The minimum bitrate to use for the encoding, or nil if there is no
40
+ * limit.
41
+ */
42
+ @property(nonatomic, copy, nullable) NSNumber *minBitrateBps;
43
+
44
+ /** The maximum framerate to use for the encoding, or nil if there is no
45
+ * limit.
46
+ */
47
+ @property(nonatomic, copy, nullable) NSNumber *maxFramerate;
48
+
49
+ /** The requested number of temporal layers to use for the encoding, or nil
50
+ * if the default should be used.
51
+ */
52
+ @property(nonatomic, copy, nullable) NSNumber *numTemporalLayers;
53
+
54
+ /** Scale the width and height down by this factor for video. If nil,
55
+ * implementation default scaling factor will be used.
56
+ */
57
+ @property(nonatomic, copy, nullable) NSNumber *scaleResolutionDownBy;
58
+
59
+ /** The SSRC being used by this encoding. */
60
+ @property(nonatomic, readonly, nullable) NSNumber *ssrc;
61
+
62
+ /** The relative bitrate priority. */
63
+ @property(nonatomic, assign) double bitratePriority;
64
+
65
+ /** The relative DiffServ Code Point priority. */
66
+ @property(nonatomic, assign) RTC_OBJC_TYPE(RTCPriority) networkPriority;
67
+
68
+ /** Allow dynamic frame length changes for audio:
69
+ https://w3c.github.io/webrtc-extensions/#dom-rtcrtpencodingparameters-adaptiveptime
70
+ */
71
+ @property(nonatomic, assign) BOOL adaptiveAudioPacketTime;
72
+
73
+ /** A case-sensitive identifier of the scalability mode to be used for this stream.
74
+ https://w3c.github.io/webrtc-svc/#rtcrtpencodingparameters */
75
+ @property(nonatomic, copy, nullable) NSString *scalabilityMode;
76
+
77
+ - (instancetype)init;
78
+
79
+ @end
80
+
81
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,33 @@
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 <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 (RTCRtpHeaderExtension) : NSObject
19
+
20
+ /** The URI of the RTP header extension, as defined in RFC5285. */
21
+ @property(nonatomic, readonly, copy) NSString *uri;
22
+
23
+ /** The value put in the RTP packet to identify the header extension. */
24
+ @property(nonatomic, readonly) int id;
25
+
26
+ /** Whether the header extension is encrypted or not. */
27
+ @property(nonatomic, readonly, getter=isEncrypted) BOOL encrypted;
28
+
29
+ - (instancetype)init;
30
+
31
+ @end
32
+
33
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,39 @@
1
+ /*
2
+ * Copyright 2024 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(RTCRtpTransceiverDirection));
16
+
17
+ NS_ASSUME_NONNULL_BEGIN
18
+
19
+ RTC_OBJC_EXPORT
20
+ @interface RTC_OBJC_TYPE (RTCRtpHeaderExtensionCapability) : NSObject
21
+
22
+ /** The URI of the RTP header extension, as defined in RFC5285. */
23
+ @property(nonatomic, readonly, copy) NSString *uri;
24
+
25
+ /** The value put in the RTP packet to identify the header extension. */
26
+ @property(nonatomic, readonly, nullable) NSNumber* preferredId;
27
+
28
+ /** Whether the header extension is encrypted or not. */
29
+ @property(nonatomic, readonly, getter=isPreferredEncrypted)
30
+ BOOL preferredEncrypted;
31
+
32
+ /** Direction of the header extension. */
33
+ @property(nonatomic) RTC_OBJC_TYPE(RTCRtpTransceiverDirection) direction;
34
+
35
+ - (instancetype)init NS_UNAVAILABLE;
36
+
37
+ @end
38
+
39
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,63 @@
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/RTCRtcpParameters.h>
14
+ #import <LiveKitWebRTC/RTCRtpCodecParameters.h>
15
+ #import <LiveKitWebRTC/RTCRtpEncodingParameters.h>
16
+ #import <LiveKitWebRTC/RTCRtpHeaderExtension.h>
17
+ #import <LiveKitWebRTC/RTCMacros.h>
18
+
19
+ NS_ASSUME_NONNULL_BEGIN
20
+
21
+ /** Corresponds to webrtc::DegradationPreference. */
22
+ typedef NS_ENUM(NSInteger, RTC_OBJC_TYPE(RTCDegradationPreference)) {
23
+ RTC_OBJC_TYPE(RTCDegradationPreferenceMaintainFramerateAndResolution),
24
+ // TODO(webrtc:450044904): Switch downstream projects to
25
+ // RTCDegradationPreferenceMaintainFramerateAndResolution and remove
26
+ // RTCDegradationPreferenceDisabled.
27
+ RTC_OBJC_TYPE(RTCDegradationPreferenceMaintainFramerate),
28
+ RTC_OBJC_TYPE(RTCDegradationPreferenceMaintainResolution),
29
+ RTC_OBJC_TYPE(RTCDegradationPreferenceBalanced)
30
+ };
31
+
32
+ RTC_OBJC_EXPORT
33
+ @interface RTC_OBJC_TYPE (RTCRtpParameters) : NSObject
34
+
35
+ /** A unique identifier for the last set of parameters applied. */
36
+ @property(nonatomic, copy) NSString *transactionId;
37
+
38
+ /** Parameters used for RTCP. */
39
+ @property(nonatomic, readonly, copy) RTC_OBJC_TYPE(RTCRtcpParameters) * rtcp;
40
+
41
+ /** An array containing parameters for RTP header extensions. */
42
+ @property(nonatomic, readonly, copy)
43
+ NSArray<RTC_OBJC_TYPE(RTCRtpHeaderExtension) *> *headerExtensions;
44
+
45
+ /** The currently active encodings in the order of preference. */
46
+ @property(nonatomic, copy)
47
+ NSArray<RTC_OBJC_TYPE(RTCRtpEncodingParameters) *> *encodings;
48
+
49
+ /** The negotiated set of send codecs in order of preference. */
50
+ @property(nonatomic, copy)
51
+ NSArray<RTC_OBJC_TYPE(RTCRtpCodecParameters) *> *codecs;
52
+
53
+ /**
54
+ * Degradation preference in case of CPU adaptation or constrained bandwidth.
55
+ * If nil, implementation default degradation preference will be used.
56
+ */
57
+ @property(nonatomic, copy, nullable) NSNumber *degradationPreference;
58
+
59
+ - (instancetype)init;
60
+
61
+ @end
62
+
63
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,105 @@
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/RTCMediaStreamTrack.h>
14
+ #import <LiveKitWebRTC/RTCRtpParameters.h>
15
+ #import <LiveKitWebRTC/RTCMacros.h>
16
+
17
+ NS_ASSUME_NONNULL_BEGIN
18
+
19
+ /** Represents the media type of the RtpReceiver. */
20
+ typedef NS_ENUM(NSInteger, RTC_OBJC_TYPE(RTCRtpMediaType)) {
21
+ RTC_OBJC_TYPE(RTCRtpMediaTypeAudio),
22
+ RTC_OBJC_TYPE(RTCRtpMediaTypeVideo),
23
+ RTC_OBJC_TYPE(RTCRtpMediaTypeData),
24
+ RTC_OBJC_TYPE(RTCRtpMediaTypeUnsupported),
25
+ RTC_OBJC_TYPE(RTCRtpMediaTypeAny),
26
+ };
27
+
28
+ @class RTC_OBJC_TYPE(RTCRtpReceiver);
29
+ @class RTC_OBJC_TYPE(RTCRtpSource);
30
+
31
+ RTC_OBJC_EXPORT
32
+ @protocol RTC_OBJC_TYPE
33
+ (RTCRtpReceiverDelegate)<NSObject>
34
+
35
+ /** Called when the first RTP packet is received.
36
+ *
37
+ * Note: Currently if there are multiple RtpReceivers of the same media
38
+ * type, they will all call OnFirstPacketReceived at once.
39
+ *
40
+ * For example, if we create three audio receivers, A/B/C, they will listen
41
+ * to the same signal from the underneath network layer. Whenever the first
42
+ * audio packet is received, the underneath signal will be fired. All the
43
+ * receivers A/B/C will be notified and the callback of the receiver's
44
+ * delegate will be called.
45
+ *
46
+ * The process is the same for video receivers.
47
+ */
48
+ - (void)rtpReceiver : (RTC_OBJC_TYPE(RTCRtpReceiver) *)
49
+ rtpReceiver didReceiveFirstPacketForMediaType
50
+ : (RTC_OBJC_TYPE(RTCRtpMediaType))mediaType;
51
+ /** Called when the first RTP packet is received after a change in
52
+ * receptiveness.
53
+ */
54
+ // TODO: crbug.com/40821064 - remove @optional.
55
+ @optional
56
+ - (void)rtpReceiver:(RTC_OBJC_TYPE(RTCRtpReceiver) *)rtpReceiver
57
+ didReceiveFirstPacketForMediaTypeAfterReceptiveChange:
58
+ (RTC_OBJC_TYPE(RTCRtpMediaType))mediaType;
59
+
60
+ @end
61
+
62
+ RTC_OBJC_EXPORT
63
+ @protocol RTC_OBJC_TYPE
64
+ (RTCRtpReceiver)<NSObject>
65
+
66
+ /** A unique identifier for this receiver. */
67
+ @property(nonatomic, readonly) NSString *receiverId;
68
+
69
+ /** The currently active RTCRtpParameters, as defined in
70
+ * https://www.w3.org/TR/webrtc/#idl-def-RTCRtpParameters.
71
+ *
72
+ * The WebRTC specification only defines RTCRtpParameters in terms of senders,
73
+ * but this API also applies them to receivers, similar to ORTC:
74
+ * http://ortc.org/wp-content/uploads/2016/03/ortc.html#rtcrtpparameters*.
75
+ */
76
+ @property(nonatomic, readonly) RTC_OBJC_TYPE(RTCRtpParameters) * parameters;
77
+
78
+ /** The RTCMediaStreamTrack associated with the receiver.
79
+ * Note: reading this property returns a new instance of
80
+ * RTCMediaStreamTrack. Use isEqual: instead of == to compare
81
+ * RTCMediaStreamTrack instances.
82
+ */
83
+ @property(nonatomic, readonly, nullable) RTC_OBJC_TYPE(RTCMediaStreamTrack) *
84
+ track;
85
+
86
+ /**
87
+ Returns an array that contains an object for each unique SSRC (synchronization
88
+ source) identifier and for each unique CSRC (contributing source) received by
89
+ the current RTCRtpReceiver in the last ten seconds.
90
+ */
91
+ @property(nonatomic, readonly) NSArray<RTC_OBJC_TYPE(RTCRtpSource) *> *sources;
92
+
93
+ /** The delegate for this RtpReceiver. */
94
+ @property(nonatomic, weak) id<RTC_OBJC_TYPE(RTCRtpReceiverDelegate)> delegate;
95
+
96
+ @end
97
+
98
+ RTC_OBJC_EXPORT
99
+ @interface RTC_OBJC_TYPE (RTCRtpReceiver) : NSObject <RTC_OBJC_TYPE(RTCRtpReceiver)>
100
+
101
+ - (instancetype)init NS_UNAVAILABLE;
102
+
103
+ @end
104
+
105
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,55 @@
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/RTCDtmfSender.h>
14
+ #import <LiveKitWebRTC/RTCMediaStreamTrack.h>
15
+ #import <LiveKitWebRTC/RTCRtpParameters.h>
16
+ #import <LiveKitWebRTC/RTCMacros.h>
17
+
18
+ NS_ASSUME_NONNULL_BEGIN
19
+
20
+ RTC_OBJC_EXPORT
21
+ @protocol RTC_OBJC_TYPE
22
+ (RTCRtpSender)<NSObject>
23
+
24
+ /** A unique identifier for this sender. */
25
+ @property(nonatomic, readonly) NSString *senderId;
26
+
27
+ /** The currently active RTCRtpParameters, as defined in
28
+ * https://www.w3.org/TR/webrtc/#idl-def-RTCRtpParameters.
29
+ */
30
+ @property(nonatomic, copy) RTC_OBJC_TYPE(RTCRtpParameters) * parameters;
31
+
32
+ /** The RTCMediaStreamTrack associated with the sender.
33
+ * Note: reading this property returns a new instance of
34
+ * RTCMediaStreamTrack. Use isEqual: instead of == to compare
35
+ * RTCMediaStreamTrack instances.
36
+ */
37
+ @property(nonatomic, copy, nullable) RTC_OBJC_TYPE(RTCMediaStreamTrack) * track;
38
+
39
+ /** IDs of streams associated with the RTP sender */
40
+ @property(nonatomic, copy) NSArray<NSString *> *streamIds;
41
+
42
+ /** The RTCDtmfSender accociated with the RTP sender. */
43
+ @property(nonatomic, readonly, nullable) id<RTC_OBJC_TYPE(RTCDtmfSender)>
44
+ dtmfSender;
45
+
46
+ @end
47
+
48
+ RTC_OBJC_EXPORT
49
+ @interface RTC_OBJC_TYPE (RTCRtpSender) : NSObject <RTC_OBJC_TYPE(RTCRtpSender)>
50
+
51
+ - (instancetype)init NS_UNAVAILABLE;
52
+
53
+ @end
54
+
55
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,66 @@
1
+ /*
2
+ * Copyright 2024 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
+ /** Represents the source type of received media. */
18
+ typedef NS_ENUM(NSInteger, RTCRtpSourceType) {
19
+ RTCRtpSourceTypeSSRC,
20
+ RTCRtpSourceTypeCSRC,
21
+ };
22
+
23
+ @class RTC_OBJC_TYPE(RTCRtpSource);
24
+
25
+ RTC_OBJC_EXPORT
26
+ @protocol RTC_OBJC_TYPE
27
+ (RTCRtpSource)<NSObject>
28
+
29
+ /**
30
+ A positive integer value specifying the CSRC identifier of the contributing
31
+ source or SSRC identifier of the synchronization source. This uniquely
32
+ identifies the source of the particular stream RTP packets. */
33
+ @property(nonatomic, readonly) uint32_t sourceId;
34
+
35
+ @property(nonatomic, readonly) RTCRtpSourceType sourceType;
36
+
37
+ /**
38
+ A floating-point value between 0.0 and 1.0 specifying the audio level contained
39
+ in the last RTP packet played from the contributing source.
40
+ */
41
+ @property(nonatomic, readonly, nullable) NSNumber *audioLevel;
42
+
43
+ /**
44
+ A timestamp indicating the most recent time at which a frame originating from
45
+ this source was delivered to the receiver's track
46
+ */
47
+ @property(nonatomic, readonly) CFTimeInterval timestampUs;
48
+
49
+ /**
50
+ The RTP timestamp of the media. This source-generated timestamp indicates the
51
+ time at which the media in this packet, scheduled for play out at the time
52
+ indicated by timestamp, was initially sampled or generated. It may be useful for
53
+ sequencing and synchronization purposes.
54
+ */
55
+ @property(nonatomic, readonly) uint32_t rtpTimestamp;
56
+
57
+ @end
58
+
59
+ RTC_OBJC_EXPORT
60
+ @interface RTC_OBJC_TYPE (RTCRtpSource) : NSObject <RTC_OBJC_TYPE(RTCRtpSource)>
61
+
62
+ - (instancetype)init NS_UNAVAILABLE;
63
+
64
+ @end
65
+
66
+ NS_ASSUME_NONNULL_END