File tree 7 files changed +35
-0
lines changed
7 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,11 @@ type DataChannel struct {
36
36
api * API
37
37
}
38
38
39
+ // JSValue returns the underlying RTCDataChannel
40
+ func (d * DataChannel ) JSValue () js.Value {
41
+ return d .underlying
42
+ }
43
+
39
44
// OnOpen sets an event handler which is invoked when
40
45
// the underlying data transport has been established (or re-established).
41
46
func (d * DataChannel ) OnOpen (f func ()) {
Original file line number Diff line number Diff line change @@ -17,6 +17,11 @@ type DTLSTransport struct {
17
17
underlying js.Value
18
18
}
19
19
20
+ // JSValue returns the underlying RTCDtlsTransport
21
+ func (r * DTLSTransport ) JSValue () js.Value {
22
+ return r .underlying
23
+ }
24
+
20
25
// ICETransport returns the currently-configured *ICETransport or nil
21
26
// if one has not been configured
22
27
func (r * DTLSTransport ) ICETransport () * ICETransport {
Original file line number Diff line number Diff line change @@ -15,6 +15,11 @@ type ICETransport struct {
15
15
underlying js.Value
16
16
}
17
17
18
+ // JSValue returns the underlying RTCIceTransport
19
+ func (t * ICETransport ) JSValue () js.Value {
20
+ return t .underlying
21
+ }
22
+
18
23
// GetSelectedCandidatePair returns the selected candidate pair on which packets are sent
19
24
// if there is no selected pair nil is returned
20
25
func (t * ICETransport ) GetSelectedCandidatePair () (* ICECandidatePair , error ) {
Original file line number Diff line number Diff line change @@ -13,3 +13,8 @@ type RTPReceiver struct {
13
13
// Pointer to the underlying JavaScript RTCRTPReceiver object.
14
14
underlying js.Value
15
15
}
16
+
17
+ // JSValue returns the underlying RTCRtpReceiver
18
+ func (r * RTPReceiver ) JSValue () js.Value {
19
+ return r .underlying
20
+ }
Original file line number Diff line number Diff line change @@ -13,3 +13,8 @@ type RTPSender struct {
13
13
// Pointer to the underlying JavaScript RTCRTPSender object.
14
14
underlying js.Value
15
15
}
16
+
17
+ // JSValue returns the underlying RTCRtpSender
18
+ func (s * RTPSender ) JSValue () js.Value {
19
+ return s .underlying
20
+ }
Original file line number Diff line number Diff line change @@ -16,6 +16,11 @@ type RTPTransceiver struct {
16
16
underlying js.Value
17
17
}
18
18
19
+ // JSValue returns the underlying RTCRtpTransceiver
20
+ func (r * RTPTransceiver ) JSValue () js.Value {
21
+ return r .underlying
22
+ }
23
+
19
24
// Direction returns the RTPTransceiver's current direction
20
25
func (r * RTPTransceiver ) Direction () RTPTransceiverDirection {
21
26
return NewRTPTransceiverDirection (r .underlying .Get ("direction" ).String ())
Original file line number Diff line number Diff line change @@ -14,6 +14,11 @@ type SCTPTransport struct {
14
14
underlying js.Value
15
15
}
16
16
17
+ // JSValue returns the underlying RTCSctpTransport
18
+ func (r * SCTPTransport ) JSValue () js.Value {
19
+ return r .underlying
20
+ }
21
+
17
22
// Transport returns the DTLSTransport instance the SCTPTransport is sending over.
18
23
func (r * SCTPTransport ) Transport () * DTLSTransport {
19
24
underlying := r .underlying .Get ("transport" )
You can’t perform that action at this time.
0 commit comments