1 module libwasm.bindings.RTCRtpSources; 2 3 import libwasm.types; 4 5 import memutils.ct: tuple; 6 import libwasm.bindings.Performance; 7 8 @safe: 9 nothrow: 10 11 struct RTCRtpContributingSource { 12 nothrow: 13 JsHandle handle; 14 alias handle this; 15 this(Handle h) { 16 this.handle = JsHandle(h); 17 } 18 static auto create() { 19 return RTCRtpContributingSource(libwasm_add__object()); 20 } 21 void timestamp()(double timestamp) { 22 Object_Call_double__void(this.handle, "timestamp", timestamp); 23 } 24 double timestamp()() { 25 return Object_Getter__double(this.handle, "timestamp"); 26 } 27 void source()(uint source) { 28 Object_Call_uint__void(this.handle, "source", source); 29 } 30 uint source()() { 31 return Object_Getter__uint(this.handle, "source"); 32 } 33 void audioLevel()(double audioLevel) { 34 Object_Call_double__void(this.handle, "audioLevel", audioLevel); 35 } 36 double audioLevel()() { 37 return Object_Getter__double(this.handle, "audioLevel"); 38 } 39 } 40 struct RTCRtpSourceEntry { 41 nothrow: 42 libwasm.bindings.RTCRtpSources.RTCRtpSynchronizationSource _parent; 43 alias _parent this; 44 this(Handle h) { 45 _parent = .RTCRtpSynchronizationSource(h); 46 } 47 static auto create() { 48 return RTCRtpSourceEntry(libwasm_add__object()); 49 } 50 void sourceType()(RTCRtpSourceEntryType sourceType) { 51 Object_Call_int__void(this._parent, "sourceType", sourceType); 52 } 53 RTCRtpSourceEntryType sourceType()() { 54 return Object_Getter__int(this._parent, "sourceType"); 55 } 56 } 57 enum RTCRtpSourceEntryType { 58 contributing, 59 synchronization 60 } 61 struct RTCRtpSynchronizationSource { 62 nothrow: 63 libwasm.bindings.RTCRtpSources.RTCRtpContributingSource _parent; 64 alias _parent this; 65 this(Handle h) { 66 _parent = .RTCRtpContributingSource(h); 67 } 68 static auto create() { 69 return RTCRtpSynchronizationSource(libwasm_add__object()); 70 } 71 void voiceActivityFlag(T0)(scope auto ref Optional!(T0) voiceActivityFlag) if (isTOrPointer!(T0, bool)) { 72 Serialize_Object_VarArgCall!void(this._parent, "voiceActivityFlag", "Optional!(bool)", tuple(!voiceActivityFlag.empty, voiceActivityFlag.front)); 73 } 74 Optional!(bool) voiceActivityFlag()() { 75 return Object_Getter__OptionalBool(this._parent, "voiceActivityFlag"); 76 } 77 } 78 79