@gjsify/webrtc 0.3.13 → 0.3.14

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 (36) hide show
  1. package/lib/esm/get-user-media.js +95 -80
  2. package/lib/esm/gst-enum-maps.js +55 -59
  3. package/lib/esm/gst-init.js +19 -22
  4. package/lib/esm/gst-stats-parser.js +94 -67
  5. package/lib/esm/gst-utils.js +24 -13
  6. package/lib/esm/index.js +13 -43
  7. package/lib/esm/media-device-info.js +23 -22
  8. package/lib/esm/media-devices.js +150 -139
  9. package/lib/esm/media-stream-track.js +136 -139
  10. package/lib/esm/media-stream.js +76 -75
  11. package/lib/esm/register/data-channel.js +7 -3
  12. package/lib/esm/register/error.js +6 -2
  13. package/lib/esm/register/media-devices.js +6 -2
  14. package/lib/esm/register/media.js +8 -4
  15. package/lib/esm/register/peer-connection.js +9 -5
  16. package/lib/esm/rtc-certificate.js +62 -66
  17. package/lib/esm/rtc-data-channel.js +240 -251
  18. package/lib/esm/rtc-dtls-transport.js +40 -39
  19. package/lib/esm/rtc-dtmf-sender.js +92 -100
  20. package/lib/esm/rtc-error.js +24 -22
  21. package/lib/esm/rtc-events.js +33 -33
  22. package/lib/esm/rtc-ice-candidate.js +71 -72
  23. package/lib/esm/rtc-ice-transport.js +95 -94
  24. package/lib/esm/rtc-peer-connection.js +796 -845
  25. package/lib/esm/rtc-rtp-receiver.js +89 -87
  26. package/lib/esm/rtc-rtp-sender.js +282 -290
  27. package/lib/esm/rtc-rtp-transceiver.js +92 -93
  28. package/lib/esm/rtc-sctp-transport.js +38 -38
  29. package/lib/esm/rtc-session-description.js +47 -51
  30. package/lib/esm/rtc-stats-report.js +39 -34
  31. package/lib/esm/rtc-track-event.js +29 -27
  32. package/lib/esm/rtp-capabilities.js +81 -35
  33. package/lib/esm/tee-multiplexer.js +58 -60
  34. package/lib/esm/wpt-helpers.js +128 -112
  35. package/package.json +13 -13
  36. package/tsconfig.tsbuildinfo +1 -1
@@ -1,96 +1,97 @@
1
- import "@gjsify/dom-events/register/event-target";
2
1
  import { RTCIceCandidate } from "./rtc-ice-candidate.js";
3
- class RTCIceTransport extends EventTarget {
4
- _state = "new";
5
- _gatheringState = "new";
6
- _role = "unknown";
7
- _component = "rtp";
8
- _localCandidates = [];
9
- _remoteCandidates = [];
10
- _localParams = null;
11
- _remoteParams = null;
12
- _onstatechange = null;
13
- _ongatheringstatechange = null;
14
- _onselectedcandidatepairchange = null;
15
- get state() {
16
- return this._state;
17
- }
18
- get gatheringState() {
19
- return this._gatheringState;
20
- }
21
- get role() {
22
- return this._role;
23
- }
24
- get component() {
25
- return this._component;
26
- }
27
- get onstatechange() {
28
- return this._onstatechange;
29
- }
30
- set onstatechange(v) {
31
- this._onstatechange = v;
32
- }
33
- get ongatheringstatechange() {
34
- return this._ongatheringstatechange;
35
- }
36
- set ongatheringstatechange(v) {
37
- this._ongatheringstatechange = v;
38
- }
39
- get onselectedcandidatepairchange() {
40
- return this._onselectedcandidatepairchange;
41
- }
42
- set onselectedcandidatepairchange(v) {
43
- this._onselectedcandidatepairchange = v;
44
- }
45
- getLocalCandidates() {
46
- return [...this._localCandidates];
47
- }
48
- getRemoteCandidates() {
49
- return [...this._remoteCandidates];
50
- }
51
- getSelectedCandidatePair() {
52
- return null;
53
- }
54
- getLocalParameters() {
55
- return this._localParams;
56
- }
57
- getRemoteParameters() {
58
- return this._remoteParams;
59
- }
60
- // ---- Internal setters (called by RTCPeerConnection) ---------------------
61
- /** @internal */
62
- _setState(state) {
63
- if (this._state === state) return;
64
- this._state = state;
65
- const ev = new Event("statechange");
66
- this._onstatechange?.call(this, ev);
67
- this.dispatchEvent(ev);
68
- }
69
- /** @internal */
70
- _setGatheringState(state) {
71
- if (this._gatheringState === state) return;
72
- this._gatheringState = state;
73
- const ev = new Event("gatheringstatechange");
74
- this._ongatheringstatechange?.call(this, ev);
75
- this.dispatchEvent(ev);
76
- }
77
- /** @internal */
78
- _addLocalCandidate(init) {
79
- this._localCandidates.push(new RTCIceCandidate(init));
80
- }
81
- /** @internal */
82
- _addRemoteCandidate(init) {
83
- this._remoteCandidates.push(new RTCIceCandidate(init));
84
- }
85
- /** @internal */
86
- _setLocalParameters(params) {
87
- this._localParams = params;
88
- }
89
- /** @internal */
90
- _setRemoteParameters(params) {
91
- this._remoteParams = params;
92
- }
93
- }
94
- export {
95
- RTCIceTransport
2
+ import "@gjsify/dom-events/register/event-target";
3
+
4
+ //#region src/rtc-ice-transport.ts
5
+ var RTCIceTransport = class extends EventTarget {
6
+ _state = "new";
7
+ _gatheringState = "new";
8
+ _role = "unknown";
9
+ _component = "rtp";
10
+ _localCandidates = [];
11
+ _remoteCandidates = [];
12
+ _localParams = null;
13
+ _remoteParams = null;
14
+ _onstatechange = null;
15
+ _ongatheringstatechange = null;
16
+ _onselectedcandidatepairchange = null;
17
+ get state() {
18
+ return this._state;
19
+ }
20
+ get gatheringState() {
21
+ return this._gatheringState;
22
+ }
23
+ get role() {
24
+ return this._role;
25
+ }
26
+ get component() {
27
+ return this._component;
28
+ }
29
+ get onstatechange() {
30
+ return this._onstatechange;
31
+ }
32
+ set onstatechange(v) {
33
+ this._onstatechange = v;
34
+ }
35
+ get ongatheringstatechange() {
36
+ return this._ongatheringstatechange;
37
+ }
38
+ set ongatheringstatechange(v) {
39
+ this._ongatheringstatechange = v;
40
+ }
41
+ get onselectedcandidatepairchange() {
42
+ return this._onselectedcandidatepairchange;
43
+ }
44
+ set onselectedcandidatepairchange(v) {
45
+ this._onselectedcandidatepairchange = v;
46
+ }
47
+ getLocalCandidates() {
48
+ return [...this._localCandidates];
49
+ }
50
+ getRemoteCandidates() {
51
+ return [...this._remoteCandidates];
52
+ }
53
+ getSelectedCandidatePair() {
54
+ return null;
55
+ }
56
+ getLocalParameters() {
57
+ return this._localParams;
58
+ }
59
+ getRemoteParameters() {
60
+ return this._remoteParams;
61
+ }
62
+ /** @internal */
63
+ _setState(state) {
64
+ if (this._state === state) return;
65
+ this._state = state;
66
+ const ev = new Event("statechange");
67
+ this._onstatechange?.call(this, ev);
68
+ this.dispatchEvent(ev);
69
+ }
70
+ /** @internal */
71
+ _setGatheringState(state) {
72
+ if (this._gatheringState === state) return;
73
+ this._gatheringState = state;
74
+ const ev = new Event("gatheringstatechange");
75
+ this._ongatheringstatechange?.call(this, ev);
76
+ this.dispatchEvent(ev);
77
+ }
78
+ /** @internal */
79
+ _addLocalCandidate(init) {
80
+ this._localCandidates.push(new RTCIceCandidate(init));
81
+ }
82
+ /** @internal */
83
+ _addRemoteCandidate(init) {
84
+ this._remoteCandidates.push(new RTCIceCandidate(init));
85
+ }
86
+ /** @internal */
87
+ _setLocalParameters(params) {
88
+ this._localParams = params;
89
+ }
90
+ /** @internal */
91
+ _setRemoteParameters(params) {
92
+ this._remoteParams = params;
93
+ }
96
94
  };
95
+
96
+ //#endregion
97
+ export { RTCIceTransport };