Commit Graph

196 Commits

Author SHA1 Message Date
Atsushi Watanabe 27d9bbb7bd Upgrade golangci-lint to 1.19.1
Fix whitespace and stylecheck errors.
Disable godox.
2020-01-11 22:59:33 -08:00
Sean DuBois 793a8b92ca Reference save-to-webm in save-to-disk example
Users may want to save H264 to disk, link to webm example to guide users
that way also.

Resolves #889
2019-12-08 02:09:52 -08:00
Yutaka Takeda 7d99edd21a Added logging throughput
Resolves #778
2019-12-08 01:03:17 -08:00
Sean DuBois 1d42a11bde Add vnet to SettingEngine
Also add simple example to show usage

Resolves #778
2019-12-08 01:03:17 -08:00
David Hamilton 6fc786b6a9 Add examples of setting a different port
Those new to Go may be unfamiliar with the syntax for listening on all.
2019-11-23 18:32:26 -08:00
David Hamilton 7d28b4adba Add required step to get source to run examples
Go get with modules on no longer puts source in src.
2019-11-23 18:32:26 -08:00
Sean DuBois 721b342e2e Properly generate DataChannel streamId
Before we computed DataChannel IDs before signaling, this
is incorrect because IDs must take into account if we are
running an DTLS Client or Server.

This updates the DataChannel ID generation code to take this
into account before generating a streamId.

Resolves #908
2019-11-14 10:51:05 -08:00
Vicken Simonian 5f25df2209 Various spell fixes
For error types, vars, docs and comments
2019-10-17 23:31:21 -07:00
Hugo Arregui 6997cc792c Linter fixes
Disable funlen and some fixes

Co-authored-by: Sean DuBois <sean@siobud.com>
2019-09-10 21:48:25 -07:00
Hugo Arregui a595db7fcc Refactor pion-to-pion-tricke example
To use a js compatible candidate buffering pattern
2019-09-10 21:48:25 -07:00
Cecylia Bocovich 5bceb0126f Use synchronization to fix trickle example
This commit uses synchronization primitives so that peers in the
pion-to-pion-trickle example adhere to the trickle ICE specification
https://tools.ietf.org/html/draft-ietf-mmusic-trickle-ice-02
To be more specific, the offering peer waits to send the answering peer
remote ICE candidates until after they have sent the initial offer. The
answering peer then waits to add any remote candidates until after it
has processed the initial offer. Similarly, the offering peer waits to
add remote candidates until it has processed the corresponding answer.
2019-09-06 15:04:51 -04:00
sylba2050 444e0bc576 Rename examples/echo -> examples/reflect
"echo" has two meanings: a Linux command and a pre-built binary.
 so change it to make it easier to identify.
2019-09-04 00:27:48 -07:00
Yutaka Takeda 542ba318f6 Added examples/datachannels-flow-control
Resolves #811
2019-09-01 02:32:08 +00:00
Gareth Hayes 63b2d4da42 Update examples/README.md for modules
Append `v2` to the import path for `go get`

Relates to: #795
2019-08-20 03:17:10 -07:00
Sean DuBois 6209597312 Fix OpusWriter issues that break VLC
* Correctly calculate page CRC
Ogg uses slightly non-standard version of CRC, we are unable to
use the Go's version. You can see the details here[0], in summary
"direct algorithm, initial val and final XOR = 0,
generator polynomial=0x04c11db7"

[0] https://xiph.org/vorbis/doc/framing.html

* Properly set EOS value
Before we created a new page with an EOS. Instead seek backwards
and update the last page with valid Opus to have EOS header and
re-generate the CRC

* Only use 0 timestamp/granule for headers
Audio itself should start from 0

* Rename OpusWriter -> OggWriter
Ogg supports more then just Opus, renaming gives us the flexibility to
expand in the future.
2019-08-15 17:12:01 -07:00
Sean DuBois 0d585106c0 Add examples/play-from-disk
Using IVFReader demonstrate how users can stream a video
from hard disk to browser.

Relates to #636
2019-08-08 16:44:50 -07:00
Mike Coleman 4095d2cde9 Fix for Safari and latest Firefox
This fixes the echo program so it works properly on Safari
and Firefox, where the preferred offered dynamic media type
is not 96/VP8. It loads MediaEngine with codecs found in the
offer and then uses the payload type of the offer's preferred
video codec in the answer.
2019-08-07 11:53:42 -07:00
Sean DuBois 91a3a81fec Fix pion-to-pion-trickle signaling
Answer was sending candidates to itself. This was slowing down
ICE since all we had was prflx candidates on the other side.
2019-08-01 18:33:10 -07:00
Sean DuBois f6734d4474 Simplify pion-to-pion-trickle example
Close Response body right away and use http.Server to block
instead of select{}
2019-08-01 18:03:44 -07:00
Sean DuBois 7124c22824 Add pion-to-pion-trickle
Demonstrate how to use Trickle ICE when communicating pion-to-pion
2019-07-31 12:44:22 +00:00
Ato Araki 60405fe3bd Fix echo example jsfiddle html
The example javascript appends logs to a div element
with id of 'logs', this element was incorrectly named 'div'
before.
2019-07-28 17:42:27 -07:00
Sean DuBois e12a7bf1e7 Fix examples error handling
Panic on the actual error we are checking in
data-channels-close and data-channels
2019-07-18 10:12:55 -07:00
Sean DuBois 2228e7f61e Add custom-logger example
Demonstrate how users can user their own logger via the
SettingEngine

Resolves #726
2019-07-11 20:24:07 +01:00
Sean DuBois 10d2ca3d88 Enable gochecknoglobals linter
Resolves #434
2019-07-09 23:31:56 +01:00
Sean DuBois cc940bc5f4 Rename pion-webrtc -> Pion WebRTC
Mass rename everywhere we forgot to update
2019-06-30 21:29:35 -07:00