19 Commits

Author SHA1 Message Date
Joe Turki
22dd7b733b Replace interface{} with any 2025-06-19 23:44:08 +03:00
WofWca
99eb390362 Implement JSValue for more structures
Previously was only implemented for PeerConnection.
2025-02-11 12:41:11 -05:00
WofWca
4ee374714a Implement DataChannel OnError/OnClosing for WASM
`OnClosing` is only implemented in WASM at this time.

`OnError` isn't tested, but should work as follows the existing
code.

Relates to #479 
Relates to #519
2025-02-11 12:39:56 -05:00
knowmost
a97c420d0c Fix typos in multiple comments 2024-04-27 23:27:55 -04:00
WofWca
66f0c402c1 Docs: correct 'OnBufferedAmountLow' condition
This is in line with
* the docs for 'BufferedAmountLowThreshold' ("When the bufferedAmount
decreases from above this threshold to equal or below it")

* The actual code in 'pion/sctp':
d6446e3b0d/stream.go (L422)

* The Web WebRTC spec:
https://w3c.github.io/webrtc-pc/#event-datachannel-bufferedamountlow
2023-09-11 19:06:22 -04:00
Steffen Vogel
683fc837d0 Make repo REUSE compliant 2023-05-05 11:58:49 -04:00
Sean DuBois
157220e800 Run gofmt to add new build constraints
Also remove some 1.13 specific WASM code
2022-01-17 22:36:01 -05:00
Masahiro Nakamura
9d3c067b1a Update godoc link to pkg.go.dev
Use links and a badge from https://pkg.go.dev.
2020-07-22 15:44:12 -07:00
Slugalisk
d5998ae2dd Replace js.Value comparisons deprecated in Go 1.14
Use IsUndefined() and IsNull() to check for undefined and null js.Value
when building with Go 1.14.
2020-03-07 23:08:51 -08:00
Sean DuBois
d54b494292 Remove RTCDataChannel priority
This has been removed from webrtc-pc[0]

Relates to #748

[0] https://github.com/w3c/webrtc-pc/issues/2258
2019-09-26 15:44:19 -07:00
Hugo Arregui
06733a856b Golang1.13 updates
Update travis to work with golang1.13 + update wasm code
2019-09-08 03:51:46 -04:00
Sean DuBois
0a62e5d4c1 Create WASM covering review
We have a few things that need to be addressed, I
have ticketed them. We should now completely pass godox!

Resolves #106
2019-07-27 09:35:55 -07:00
Antoine Baché
8616aff70b Updated wasm DataChannel
- Added SetBufferedAmountLowThreshold
- Added OnBufferedAmountLow

Fixes #591
2019-04-07 01:14:48 -07:00
Sean DuBois
1cdfc10c84 Mass replace pions -> pion
Pions organization was renamed to pion
2019-04-04 15:32:03 -07:00
backkem
d906c2b43b Detach: WASM Shim
JS/WASM shim for Detach API
2019-04-01 21:00:41 +02:00
backkem
57a3296cf0 WASM: Port API object
Port the API object to the JS/WASM target. This allows more
code to work for both targets.
2019-04-01 21:00:41 +02:00
Alex Browne
012a7ea686 Improve build tags for Wasm
Fixes #515

This includes a few small and closely related changes:

1. All occurrences of the build tag `+build js` have been changed to the
   more precise `+build js,wasm`. This will exclude the files from being
   included by third-party compilers like GopherJS, with which they are
   incompatible.
2. Some files which are incompatible with JavaScript/Wasm now have the
   correct build tag (`+build -js`) so they will be excluded from Wasm
   builds.
3. Some configuration options which are incompatible with
   JavaScript/Wasm (or at least the current bindings) will now no longer
   appear in Wasm builds. This meant creating new files with new struct
   definitions and the appropriate build tags.
2019-03-22 10:48:03 -07:00
Alex Browne
34e5a89f71 Add tests for WASM bindings
The tests are run in a Node.js environment, and this does not include
any browser tests. This requires the wrtc package from npm as well as a
shim which adds portions of the WebRTC API to the global scope.

Some tests introduced here can be combined when differences between the
Go API and the WASM bindings are addressed and as missing features are
added to the WASM bindings.

We can and should add more tests in the future to improve test coverage.
This should be considered the minimum number of tests reuqired to ensure
basic functionality is working.
2019-03-15 15:17:51 -07:00
Alex Browne
0f1ddf0825 Add JavaScript/WASM bindings
Resolves #478. Adds minimal JavaScript/WASM bindings. This makes it
possible to compile core parts of pions/webrtc to WASM and run it in the
browser. Only data channels are supported for now and there is
limited/no support for certificates and credentials.
2019-03-08 00:26:17 +01:00