mirror of
https://github.com/pion/webrtc.git
synced 2025-09-27 03:25:58 +08:00
Mass replace pions -> pion
Pions organization was renamed to pion
This commit is contained in:
@@ -1,3 +1,3 @@
|
|||||||
---
|
---
|
||||||
exclude_paths:
|
exclude_paths:
|
||||||
- examples/examples.json
|
- examples/examples.json
|
||||||
|
@@ -16,7 +16,7 @@ cross-compiling of multiple libraries, you now can run anywhere with one `go bui
|
|||||||
If you know how to use WebRTC in your browser, you know how to use Pion WebRTC.
|
If you know how to use WebRTC in your browser, you know how to use Pion WebRTC.
|
||||||
We try our best just to duplicate the Javascript API, so your code can look the same everywhere.
|
We try our best just to duplicate the Javascript API, so your code can look the same everywhere.
|
||||||
|
|
||||||
If this is your first time using WebRTC, don't worry! We have multiple [examples](https://github.com/pions/webrtc/tree/master/examples) and [GoDoc](https://godoc.org/github.com/pions/webrtc)
|
If this is your first time using WebRTC, don't worry! We have multiple [examples](https://github.com/pion/webrtc/tree/master/examples) and [GoDoc](https://godoc.org/github.com/pion/webrtc)
|
||||||
|
|
||||||
### Bring your own media
|
### Bring your own media
|
||||||
Pion WebRTC doesn't make any assumptions about where your audio, video or text come from. You can use FFmpeg, GStreamer, MLT or just serve a video file.
|
Pion WebRTC doesn't make any assumptions about where your audio, video or text come from. You can use FFmpeg, GStreamer, MLT or just serve a video file.
|
||||||
|
28
README.md
28
README.md
@@ -7,14 +7,14 @@
|
|||||||
<h4 align="center">A pure Go implementation of the WebRTC API</h4>
|
<h4 align="center">A pure Go implementation of the WebRTC API</h4>
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://pion.ly"><img src="https://img.shields.io/badge/pion-webrtc-gray.svg?longCache=true&colorB=brightgreen" alt="Pion webrtc"></a>
|
<a href="https://pion.ly"><img src="https://img.shields.io/badge/pion-webrtc-gray.svg?longCache=true&colorB=brightgreen" alt="Pion webrtc"></a>
|
||||||
<a href="https://sourcegraph.com/github.com/pions/webrtc?badge"><img src="https://sourcegraph.com/github.com/pions/webrtc/-/badge.svg" alt="Sourcegraph Widget"></a>
|
<a href="https://sourcegraph.com/github.com/pion/webrtc?badge"><img src="https://sourcegraph.com/github.com/pion/webrtc/-/badge.svg" alt="Sourcegraph Widget"></a>
|
||||||
<a href="https://pion.ly/slack"><img src="https://img.shields.io/badge/join-us%20on%20slack-gray.svg?longCache=true&logo=slack&colorB=brightgreen" alt="Slack Widget"></a>
|
<a href="https://pion.ly/slack"><img src="https://img.shields.io/badge/join-us%20on%20slack-gray.svg?longCache=true&logo=slack&colorB=brightgreen" alt="Slack Widget"></a>
|
||||||
<a href="https://waffle.io/pions/webrtc"><img src="https://img.shields.io/badge/pm-waffle-gray.svg?longCache=true&colorB=brightgreen" alt="Waffle board"></a>
|
<a href="https://waffle.io/pion/webrtc"><img src="https://img.shields.io/badge/pm-waffle-gray.svg?longCache=true&colorB=brightgreen" alt="Waffle board"></a>
|
||||||
<br>
|
<br>
|
||||||
<a href="https://travis-ci.org/pions/webrtc"><img src="https://travis-ci.org/pions/webrtc.svg?branch=master" alt="Build Status"></a>
|
<a href="https://travis-ci.org/pion/webrtc"><img src="https://travis-ci.org/pion/webrtc.svg?branch=master" alt="Build Status"></a>
|
||||||
<a href="https://godoc.org/github.com/pions/webrtc"><img src="https://godoc.org/github.com/pions/webrtc?status.svg" alt="GoDoc"></a>
|
<a href="https://godoc.org/github.com/pion/webrtc"><img src="https://godoc.org/github.com/pion/webrtc?status.svg" alt="GoDoc"></a>
|
||||||
<a href="https://coveralls.io/github/pions/webrtc"><img src="https://coveralls.io/repos/github/pions/webrtc/badge.svg" alt="Coverage Status"></a>
|
<a href="https://coveralls.io/github/pion/webrtc"><img src="https://coveralls.io/repos/github/pion/webrtc/badge.svg" alt="Coverage Status"></a>
|
||||||
<a href="https://goreportcard.com/report/github.com/pions/webrtc"><img src="https://goreportcard.com/badge/github.com/pions/webrtc" alt="Go Report Card"></a>
|
<a href="https://goreportcard.com/report/github.com/pion/webrtc"><img src="https://goreportcard.com/badge/github.com/pion/webrtc" alt="Go Report Card"></a>
|
||||||
<a href="https://www.codacy.com/app/Sean-Der/webrtc"><img src="https://api.codacy.com/project/badge/Grade/18f4aec384894e6aac0b94effe51961d" alt="Codacy Badge"></a>
|
<a href="https://www.codacy.com/app/Sean-Der/webrtc"><img src="https://api.codacy.com/project/badge/Grade/18f4aec384894e6aac0b94effe51961d" alt="Codacy Badge"></a>
|
||||||
<a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a>
|
<a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a>
|
||||||
</p>
|
</p>
|
||||||
@@ -24,16 +24,16 @@ See [DESIGN.md](DESIGN.md) for an overview of features and future goals.
|
|||||||
|
|
||||||
### Breaking Changes
|
### Breaking Changes
|
||||||
|
|
||||||
Pion WebRTC v2.0.0 is coming soon! HEAD will be unstable for the next few weeks as we prepare for the new release. See the [release notes](https://github.com/pions/webrtc/wiki/v2.0.0-Release-Notes) to learn about the new features breaking changes.
|
Pion WebRTC v2.0.0 is coming soon! HEAD will be unstable for the next few weeks as we prepare for the new release. See the [release notes](https://github.com/pion/webrtc/wiki/v2.0.0-Release-Notes) to learn about the new features breaking changes.
|
||||||
|
|
||||||
Have any questions? Join [the Slack channel](https://pion.ly/slack) to follow development and speak with the maintainers.
|
Have any questions? Join [the Slack channel](https://pion.ly/slack) to follow development and speak with the maintainers.
|
||||||
|
|
||||||
Use the tag [v1.2.0](https://github.com/pions/webrtc/tree/v1.2.0) if you'd like to continue using the v1.0 API in the meantime. After v2.0 is released v1.0 will be deprecated and unmaintained.
|
Use the tag [v1.2.0](https://github.com/pion/webrtc/tree/v1.2.0) if you'd like to continue using the v1.0 API in the meantime. After v2.0 is released v1.0 will be deprecated and unmaintained.
|
||||||
|
|
||||||
### Usage
|
### Usage
|
||||||
Check out the **[example applications](examples/README.md)** to help you along your Pion WebRTC journey.
|
Check out the **[example applications](examples/README.md)** to help you along your Pion WebRTC journey.
|
||||||
|
|
||||||
The Pion WebRTC API closely matches the JavaScript **[WebRTC API](https://w3c.github.io/webrtc-pc/)**. Most existing documentation is therefore also usefull when working with Pion. Furthermore, our **[GoDoc](https://godoc.org/github.com/pions/webrtc)** is actively maintained.
|
The Pion WebRTC API closely matches the JavaScript **[WebRTC API](https://w3c.github.io/webrtc-pc/)**. Most existing documentation is therefore also usefull when working with Pion. Furthermore, our **[GoDoc](https://godoc.org/github.com/pion/webrtc)** is actively maintained.
|
||||||
|
|
||||||
Now go forth and build some awesome apps! Here are some **ideas** to get your creative juices flowing:
|
Now go forth and build some awesome apps! Here are some **ideas** to get your creative juices flowing:
|
||||||
* Send a video file to multiple browser in real time for perfectly synchronized movie watching.
|
* Send a video file to multiple browser in real time for perfectly synchronized movie watching.
|
||||||
@@ -49,11 +49,11 @@ This allows you to use WebRTC from Go in both server and browser side code with
|
|||||||
little to no changes. Check out the
|
little to no changes. Check out the
|
||||||
**[example applications](examples/README.md#webassembly)** for instructions on
|
**[example applications](examples/README.md#webassembly)** for instructions on
|
||||||
how to compile and run the WebAssembly examples. You can also visit the
|
how to compile and run the WebAssembly examples. You can also visit the
|
||||||
[Wiki page on WebAssembly Development](https://github.com/pions/webrtc/wiki/WebAssembly-Development-and-Testing)
|
[Wiki page on WebAssembly Development](https://github.com/pion/webrtc/wiki/WebAssembly-Development-and-Testing)
|
||||||
for more information.
|
for more information.
|
||||||
|
|
||||||
### Roadmap
|
### Roadmap
|
||||||
The library is in active development, please refer to the [roadmap](https://github.com/pions/webrtc/issues/9) to track our major milestones.
|
The library is in active development, please refer to the [roadmap](https://github.com/pion/webrtc/issues/9) to track our major milestones.
|
||||||
|
|
||||||
### Community
|
### Community
|
||||||
Pion has an active community on the [Golang Slack](https://invite.slack.golangbridge.org/). Sign up and join the **#pion** channel for discussions and support. You can also use [Pion mailing list](https://groups.google.com/forum/#!forum/pion).
|
Pion has an active community on the [Golang Slack](https://invite.slack.golangbridge.org/). Sign up and join the **#pion** channel for discussions and support. You can also use [Pion mailing list](https://groups.google.com/forum/#!forum/pion).
|
||||||
@@ -63,11 +63,11 @@ We are always looking to support **your projects**. Please reach out if you have
|
|||||||
If you need commercial support or don't want to use public methods you can contact us at [team@pion.ly](mailto:team@pion.ly)
|
If you need commercial support or don't want to use public methods you can contact us at [team@pion.ly](mailto:team@pion.ly)
|
||||||
|
|
||||||
### Related projects
|
### Related projects
|
||||||
* [pions/turn](https://github.com/pions/turn): A simple extendable Golang TURN server
|
* [pion/turn](https://github.com/pion/turn): A simple extendable Golang TURN server
|
||||||
* [WIP] [pions/media-server](https://github.com/pions/media-server): A Pion WebRTC powered media server, providing the building blocks for anything RTC.
|
* [WIP] [pion/media-server](https://github.com/pion/media-server): A Pion WebRTC powered media server, providing the building blocks for anything RTC.
|
||||||
|
|
||||||
### Contributing
|
### Contributing
|
||||||
Check out the **[contributing wiki](https://github.com/pions/webrtc/wiki/Contributing)** to join the group of amazing people making this project possible:
|
Check out the **[contributing wiki](https://github.com/pion/webrtc/wiki/Contributing)** to join the group of amazing people making this project possible:
|
||||||
|
|
||||||
* [John Bradley](https://github.com/kc5nra) - *Original Author*
|
* [John Bradley](https://github.com/kc5nra) - *Original Author*
|
||||||
* [Michael Melvin Santry](https://github.com/santrym) - *Mascot*
|
* [Michael Melvin Santry](https://github.com/santrym) - *Mascot*
|
||||||
|
2
api.go
2
api.go
@@ -3,7 +3,7 @@
|
|||||||
package webrtc
|
package webrtc
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/pions/logging"
|
"github.com/pion/logging"
|
||||||
)
|
)
|
||||||
|
|
||||||
// API bundles the global funcions of the WebRTC and ORTC API.
|
// API bundles the global funcions of the WebRTC and ORTC API.
|
||||||
|
@@ -14,8 +14,8 @@ import (
|
|||||||
"math/big"
|
"math/big"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pions/dtls"
|
"github.com/pion/dtls"
|
||||||
"github.com/pions/webrtc/pkg/rtcerr"
|
"github.com/pion/webrtc/pkg/rtcerr"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Certificate represents a x509Cert used to authenticate WebRTC communications.
|
// Certificate represents a x509Cert used to authenticate WebRTC communications.
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
package webrtc
|
package webrtc
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/pions/ice"
|
"github.com/pion/ice"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Configuration defines a set of parameters to configure how the
|
// Configuration defines a set of parameters to configure how the
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
package webrtc
|
package webrtc
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/pions/ice"
|
"github.com/pion/ice"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Configuration defines a set of parameters to configure how the
|
// Configuration defines a set of parameters to configure how the
|
||||||
|
@@ -7,9 +7,9 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/pions/datachannel"
|
"github.com/pion/datachannel"
|
||||||
"github.com/pions/logging"
|
"github.com/pion/logging"
|
||||||
"github.com/pions/webrtc/pkg/rtcerr"
|
"github.com/pion/webrtc/pkg/rtcerr"
|
||||||
)
|
)
|
||||||
|
|
||||||
const dataChannelBufferSize = 16384 // Lowest common denominator among browsers
|
const dataChannelBufferSize = 16384 // Lowest common denominator among browsers
|
||||||
@@ -326,7 +326,7 @@ func (d *DataChannel) ensureOpen() error {
|
|||||||
// webrtc.DetachDataChannels(). Combining detached and normal data channels
|
// webrtc.DetachDataChannels(). Combining detached and normal data channels
|
||||||
// is not supported.
|
// is not supported.
|
||||||
// Please reffer to the data-channels-detach example and the
|
// Please reffer to the data-channels-detach example and the
|
||||||
// pions/datachannel documentation for the correct way to handle the
|
// pion/datachannel documentation for the correct way to handle the
|
||||||
// resulting DataChannel object.
|
// resulting DataChannel object.
|
||||||
func (d *DataChannel) Detach() (datachannel.ReadWriteCloser, error) {
|
func (d *DataChannel) Detach() (datachannel.ReadWriteCloser, error) {
|
||||||
d.mu.Lock()
|
d.mu.Lock()
|
||||||
@@ -458,7 +458,7 @@ func (d *DataChannel) BufferedAmount() uint64 {
|
|||||||
d.mu.RLock()
|
d.mu.RLock()
|
||||||
defer d.mu.RUnlock()
|
defer d.mu.RUnlock()
|
||||||
|
|
||||||
// TODO: wire to SCTP (pions/sctp#11)
|
// TODO: wire to SCTP (pion/sctp#11)
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -471,7 +471,7 @@ func (d *DataChannel) BufferedAmountLowThreshold() uint64 {
|
|||||||
d.mu.RLock()
|
d.mu.RLock()
|
||||||
defer d.mu.RUnlock()
|
defer d.mu.RUnlock()
|
||||||
|
|
||||||
// TODO: wire to SCTP (pions/sctp#11)
|
// TODO: wire to SCTP (pion/sctp#11)
|
||||||
return d.bufferedAmountLowThreshold
|
return d.bufferedAmountLowThreshold
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -484,6 +484,6 @@ func (d *DataChannel) SetBufferedAmountLowThreshold(th uint64) {
|
|||||||
d.mu.Lock()
|
d.mu.Lock()
|
||||||
defer d.mu.Unlock()
|
defer d.mu.Unlock()
|
||||||
|
|
||||||
// TODO: wire to SCTP (pions/sctp#11)
|
// TODO: wire to SCTP (pion/sctp#11)
|
||||||
d.bufferedAmountLowThreshold = th
|
d.bufferedAmountLowThreshold = th
|
||||||
}
|
}
|
||||||
|
@@ -9,7 +9,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pions/transport/test"
|
"github.com/pion/transport/test"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -6,7 +6,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"syscall/js"
|
"syscall/js"
|
||||||
|
|
||||||
"github.com/pions/datachannel"
|
"github.com/pion/datachannel"
|
||||||
)
|
)
|
||||||
|
|
||||||
const dataChannelBufferSize = 16384 // Lowest common denominator among browsers
|
const dataChannelBufferSize = 16384 // Lowest common denominator among browsers
|
||||||
@@ -111,7 +111,7 @@ func (d *DataChannel) SendText(s string) (err error) {
|
|||||||
// webrtc.DetachDataChannels(). Combining detached and normal data channels
|
// webrtc.DetachDataChannels(). Combining detached and normal data channels
|
||||||
// is not supported.
|
// is not supported.
|
||||||
// Please reffer to the data-channels-detach example and the
|
// Please reffer to the data-channels-detach example and the
|
||||||
// pions/datachannel documentation for the correct way to handle the
|
// pion/datachannel documentation for the correct way to handle the
|
||||||
// resulting DataChannel object.
|
// resulting DataChannel object.
|
||||||
func (d *DataChannel) Detach() (datachannel.ReadWriteCloser, error) {
|
func (d *DataChannel) Detach() (datachannel.ReadWriteCloser, error) {
|
||||||
if !d.api.settingEngine.detach.DataChannels {
|
if !d.api.settingEngine.detach.DataChannels {
|
||||||
|
@@ -6,8 +6,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pions/transport/test"
|
"github.com/pion/transport/test"
|
||||||
"github.com/pions/webrtc/internal/util"
|
"github.com/pion/webrtc/internal/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestDataChannel_ORTCE2E(t *testing.T) {
|
func TestDataChannel_ORTCE2E(t *testing.T) {
|
||||||
|
@@ -5,7 +5,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pions/transport/test"
|
"github.com/pion/transport/test"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -13,11 +13,11 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pions/dtls"
|
"github.com/pion/dtls"
|
||||||
"github.com/pions/srtp"
|
"github.com/pion/srtp"
|
||||||
"github.com/pions/webrtc/internal/mux"
|
"github.com/pion/webrtc/internal/mux"
|
||||||
"github.com/pions/webrtc/internal/util"
|
"github.com/pion/webrtc/internal/util"
|
||||||
"github.com/pions/webrtc/pkg/rtcerr"
|
"github.com/pion/webrtc/pkg/rtcerr"
|
||||||
)
|
)
|
||||||
|
|
||||||
// DTLSTransport allows an application access to information about the DTLS
|
// DTLSTransport allows an application access to information about the DTLS
|
||||||
|
@@ -31,8 +31,8 @@ We've made it easy to run the browser based examples on your local machine.
|
|||||||
|
|
||||||
1. Build and run the example server:
|
1. Build and run the example server:
|
||||||
``` sh
|
``` sh
|
||||||
go get github.com/pions/webrtc
|
go get github.com/pion/webrtc
|
||||||
cd $GOPATH/src/github.com/pions/webrtc/examples
|
cd $GOPATH/src/github.com/pion/webrtc/examples
|
||||||
go run examples.go
|
go run examples.go
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@@ -1,2 +1,2 @@
|
|||||||
# data-channels-close
|
# data-channels-close
|
||||||
data-channels-close is a variant of the data-channels example that allow playing with the life cycle of data channels.
|
data-channels-close is a variant of the data-channels example that allow playing with the life cycle of data channels.
|
||||||
|
@@ -5,9 +5,9 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pions/webrtc"
|
"github.com/pion/webrtc"
|
||||||
|
|
||||||
"github.com/pions/webrtc/examples/internal/signal"
|
"github.com/pion/webrtc/examples/internal/signal"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
@@ -4,7 +4,7 @@ data-channels-create is a pion-WebRTC application that shows how you can send/re
|
|||||||
## Instructions
|
## Instructions
|
||||||
### Download data-channels-create
|
### Download data-channels-create
|
||||||
```
|
```
|
||||||
go get github.com/pions/webrtc/examples/data-channels-create
|
go get github.com/pion/webrtc/examples/data-channels-create
|
||||||
```
|
```
|
||||||
|
|
||||||
### Open data-channels-create example page
|
### Open data-channels-create example page
|
||||||
|
@@ -4,9 +4,9 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pions/webrtc"
|
"github.com/pion/webrtc"
|
||||||
|
|
||||||
"github.com/pions/webrtc/examples/internal/signal"
|
"github.com/pion/webrtc/examples/internal/signal"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
@@ -1,12 +1,12 @@
|
|||||||
# data-channels
|
# data-channels
|
||||||
data-channels-detach-create is an example that shows how you can detach a data channel. This allows direct access the the underlying [pions/datachannel](https://github.com/pions/datachannel). This allows you to interact with the data channel using a more idiomatic API based on the `io.ReadWriteCloser` interface.
|
data-channels-detach-create is an example that shows how you can detach a data channel. This allows direct access the the underlying [pion/datachannel](https://github.com/pion/datachannel). This allows you to interact with the data channel using a more idiomatic API based on the `io.ReadWriteCloser` interface.
|
||||||
|
|
||||||
The example mirrors the data-channels-create example.
|
The example mirrors the data-channels-create example.
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
```
|
```
|
||||||
go get github.com/pions/webrtc/examples/data-channels-detach-create
|
go get github.com/pion/webrtc/examples/data-channels-detach-create
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
The example can be used in the same way as the data-channel example or can be paired with the data-channels-detach example. In the latter case; run both example and exchange the offer/answer text by copy-pasting them on the other terminal.
|
The example can be used in the same way as the data-channel example or can be paired with the data-channels-detach example. In the latter case; run both example and exchange the offer/answer text by copy-pasting them on the other terminal.
|
||||||
|
@@ -5,9 +5,9 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pions/webrtc"
|
"github.com/pion/webrtc"
|
||||||
|
|
||||||
"github.com/pions/webrtc/examples/internal/signal"
|
"github.com/pion/webrtc/examples/internal/signal"
|
||||||
)
|
)
|
||||||
|
|
||||||
const messageSize = 15
|
const messageSize = 15
|
||||||
|
@@ -1,12 +1,12 @@
|
|||||||
# data-channels
|
# data-channels
|
||||||
data-channels-detach is an example that shows how you can detach a data channel. This allows direct access the the underlying [pions/datachannel](https://github.com/pions/datachannel). This allows you to interact with the data channel using a more idiomatic API based on the `io.ReadWriteCloser` interface.
|
data-channels-detach is an example that shows how you can detach a data channel. This allows direct access the the underlying [pion/datachannel](https://github.com/pion/datachannel). This allows you to interact with the data channel using a more idiomatic API based on the `io.ReadWriteCloser` interface.
|
||||||
|
|
||||||
The example mirrors the data-channels example.
|
The example mirrors the data-channels example.
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
```
|
```
|
||||||
go get github.com/pions/webrtc/examples/data-channels-detach
|
go get github.com/pion/webrtc/examples/data-channels-detach
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
The example can be used in the same way as the data-channel example or can be paired with the data-channels-detach-create example. In the latter case; run both example and exchange the offer/answer text by copy-pasting them on the other terminal.
|
The example can be used in the same way as the data-channel example or can be paired with the data-channels-detach-create example. In the latter case; run both example and exchange the offer/answer text by copy-pasting them on the other terminal.
|
||||||
|
@@ -8,9 +8,9 @@ import (
|
|||||||
"syscall/js"
|
"syscall/js"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pions/webrtc"
|
"github.com/pion/webrtc"
|
||||||
|
|
||||||
"github.com/pions/webrtc/examples/internal/signal"
|
"github.com/pion/webrtc/examples/internal/signal"
|
||||||
)
|
)
|
||||||
|
|
||||||
const messageSize = 15
|
const messageSize = 15
|
||||||
|
@@ -5,9 +5,9 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pions/webrtc"
|
"github.com/pion/webrtc"
|
||||||
|
|
||||||
"github.com/pions/webrtc/examples/internal/signal"
|
"github.com/pion/webrtc/examples/internal/signal"
|
||||||
)
|
)
|
||||||
|
|
||||||
const messageSize = 15
|
const messageSize = 15
|
||||||
|
@@ -4,7 +4,7 @@ data-channels is a pion-WebRTC application that shows how you can send/recv Data
|
|||||||
## Instructions
|
## Instructions
|
||||||
### Download data-channels
|
### Download data-channels
|
||||||
```
|
```
|
||||||
go get github.com/pions/webrtc/examples/data-channels
|
go get github.com/pion/webrtc/examples/data-channels
|
||||||
```
|
```
|
||||||
|
|
||||||
### Open data-channels example page
|
### Open data-channels example page
|
||||||
|
@@ -6,8 +6,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"syscall/js"
|
"syscall/js"
|
||||||
|
|
||||||
"github.com/pions/webrtc"
|
"github.com/pion/webrtc"
|
||||||
"github.com/pions/webrtc/examples/internal/signal"
|
"github.com/pion/webrtc/examples/internal/signal"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
@@ -4,8 +4,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pions/webrtc"
|
"github.com/pion/webrtc"
|
||||||
"github.com/pions/webrtc/examples/internal/signal"
|
"github.com/pion/webrtc/examples/internal/signal"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
@@ -10,7 +10,7 @@ This example requires you have GStreamer installed, these are the supported plat
|
|||||||
`pacman -S mingw-w64-x86_64-gstreamer mingw-w64-x86_64-gst-libav mingw-w64-x86_64-gst-plugins-good mingw-w64-x86_64-gst-plugins-bad mingw-w64-x86_64-gst-plugins-ugly`
|
`pacman -S mingw-w64-x86_64-gstreamer mingw-w64-x86_64-gst-libav mingw-w64-x86_64-gst-plugins-good mingw-w64-x86_64-gst-plugins-bad mingw-w64-x86_64-gst-plugins-ugly`
|
||||||
### Download gstreamer-receive
|
### Download gstreamer-receive
|
||||||
```
|
```
|
||||||
go get github.com/pions/webrtc/examples/gstreamer-receive
|
go get github.com/pion/webrtc/examples/gstreamer-receive
|
||||||
```
|
```
|
||||||
|
|
||||||
### Open gstreamer-receive example page
|
### Open gstreamer-receive example page
|
||||||
|
@@ -5,11 +5,11 @@ import (
|
|||||||
"runtime"
|
"runtime"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pions/rtcp"
|
"github.com/pion/rtcp"
|
||||||
"github.com/pions/webrtc"
|
"github.com/pion/webrtc"
|
||||||
|
|
||||||
gst "github.com/pions/webrtc/examples/internal/gstreamer-sink"
|
gst "github.com/pion/webrtc/examples/internal/gstreamer-sink"
|
||||||
"github.com/pions/webrtc/examples/internal/signal"
|
"github.com/pion/webrtc/examples/internal/signal"
|
||||||
)
|
)
|
||||||
|
|
||||||
// gstreamerReceiveMain is launched in a goroutine because the main thread is needed
|
// gstreamerReceiveMain is launched in a goroutine because the main thread is needed
|
||||||
|
@@ -5,10 +5,10 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
|
|
||||||
"github.com/pions/webrtc"
|
"github.com/pion/webrtc"
|
||||||
|
|
||||||
gst "github.com/pions/webrtc/examples/internal/gstreamer-src"
|
gst "github.com/pion/webrtc/examples/internal/gstreamer-src"
|
||||||
"github.com/pions/webrtc/examples/internal/signal"
|
"github.com/pion/webrtc/examples/internal/signal"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
@@ -10,7 +10,7 @@ This example requires you have GStreamer installed, these are the supported plat
|
|||||||
`pacman -S mingw-w64-x86_64-gstreamer mingw-w64-x86_64-gst-libav mingw-w64-x86_64-gst-plugins-good mingw-w64-x86_64-gst-plugins-bad mingw-w64-x86_64-gst-plugins-ugly`
|
`pacman -S mingw-w64-x86_64-gstreamer mingw-w64-x86_64-gst-libav mingw-w64-x86_64-gst-plugins-good mingw-w64-x86_64-gst-plugins-bad mingw-w64-x86_64-gst-plugins-ugly`
|
||||||
### Download gstreamer-send
|
### Download gstreamer-send
|
||||||
```
|
```
|
||||||
go get github.com/pions/webrtc/examples/gstreamer-send
|
go get github.com/pion/webrtc/examples/gstreamer-send
|
||||||
```
|
```
|
||||||
|
|
||||||
### Open gstreamer-send example page
|
### Open gstreamer-send example page
|
||||||
|
@@ -5,10 +5,10 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
|
|
||||||
"github.com/pions/webrtc"
|
"github.com/pion/webrtc"
|
||||||
|
|
||||||
gst "github.com/pions/webrtc/examples/internal/gstreamer-src"
|
gst "github.com/pion/webrtc/examples/internal/gstreamer-src"
|
||||||
"github.com/pions/webrtc/examples/internal/signal"
|
"github.com/pion/webrtc/examples/internal/signal"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
@@ -10,7 +10,7 @@ import "C"
|
|||||||
import (
|
import (
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
"github.com/pions/webrtc"
|
"github.com/pion/webrtc"
|
||||||
)
|
)
|
||||||
|
|
||||||
// StartMainLoop starts GLib's main loop
|
// StartMainLoop starts GLib's main loop
|
||||||
|
@@ -12,8 +12,8 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
"github.com/pions/webrtc"
|
"github.com/pion/webrtc"
|
||||||
"github.com/pions/webrtc/pkg/media"
|
"github.com/pion/webrtc/pkg/media"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
@@ -9,7 +9,7 @@ This example demonstrates how to download a video from a Janus streaming room. B
|
|||||||
You should confirm that you can successfully watch `Opus/VP8 live stream coming from gstreamer (live)` in the stream demo web UI
|
You should confirm that you can successfully watch `Opus/VP8 live stream coming from gstreamer (live)` in the stream demo web UI
|
||||||
|
|
||||||
### Running
|
### Running
|
||||||
run `main.go` in `github.com/pions/webrtc/examples/janus-gateway/streaming`
|
run `main.go` in `github.com/pion/webrtc/examples/janus-gateway/streaming`
|
||||||
|
|
||||||
If this worked you will see the following.
|
If this worked you will see the following.
|
||||||
```
|
```
|
||||||
@@ -24,7 +24,7 @@ You will see output.ivf in the current folder.
|
|||||||
This example demonstrates how to stream to a Janus video-room using pion-WebRTC
|
This example demonstrates how to stream to a Janus video-room using pion-WebRTC
|
||||||
|
|
||||||
### Running
|
### Running
|
||||||
run `main.go` in `github.com/pions/webrtc/examples/janus-gateway/video-room`
|
run `main.go` in `github.com/pion/webrtc/examples/janus-gateway/video-room`
|
||||||
|
|
||||||
OSX
|
OSX
|
||||||
```sh
|
```sh
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
module github.com/pions/webrtc/examples/janus-gateway/streaming
|
module github.com/pion/webrtc/examples/janus-gateway/streaming
|
||||||
|
|
||||||
replace github.com/pions/webrtc => ../../../
|
replace github.com/pion/webrtc => ../../../
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/gorilla/websocket v1.4.0 // indirect
|
github.com/gorilla/websocket v1.4.0 // indirect
|
||||||
github.com/notedit/janus-go v0.0.0-20180821162543-a152adf0cb7b
|
github.com/notedit/janus-go v0.0.0-20180821162543-a152adf0cb7b
|
||||||
github.com/pions/webrtc v1.1.1
|
github.com/pion/webrtc v1.1.1
|
||||||
)
|
)
|
||||||
|
@@ -6,8 +6,8 @@ github.com/gorilla/websocket v1.4.0 h1:WDFjx/TMzVgy9VdMMQi2K2Emtwi2QcUQsztZ/zLaH
|
|||||||
github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
|
github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
|
||||||
github.com/notedit/janus-go v0.0.0-20180821162543-a152adf0cb7b h1:GT1/zfKpQHX4Cz7F1QUE/tjE/OP0KM5aYaFiKVRgvkk=
|
github.com/notedit/janus-go v0.0.0-20180821162543-a152adf0cb7b h1:GT1/zfKpQHX4Cz7F1QUE/tjE/OP0KM5aYaFiKVRgvkk=
|
||||||
github.com/notedit/janus-go v0.0.0-20180821162543-a152adf0cb7b/go.mod h1:BN/Txse3qz8tZOmCm2OfajB2wHVujWmX3o9nVdsI6gE=
|
github.com/notedit/janus-go v0.0.0-20180821162543-a152adf0cb7b/go.mod h1:BN/Txse3qz8tZOmCm2OfajB2wHVujWmX3o9nVdsI6gE=
|
||||||
github.com/pions/pkg v0.0.0-20181115215726-b60cd756f712 h1:ciXO7F7PusyAzW/EZJt01bETgfTxP/BIGoWQ15pBP54=
|
github.com/pion/pkg v0.0.0-20181115215726-b60cd756f712 h1:ciXO7F7PusyAzW/EZJt01bETgfTxP/BIGoWQ15pBP54=
|
||||||
github.com/pions/pkg v0.0.0-20181115215726-b60cd756f712/go.mod h1:r9wKZs+Xxv2acLspex4CHQiIhFjGK1zGP+nUm/8klXA=
|
github.com/pion/pkg v0.0.0-20181115215726-b60cd756f712/go.mod h1:r9wKZs+Xxv2acLspex4CHQiIhFjGK1zGP+nUm/8klXA=
|
||||||
github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw=
|
github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw=
|
||||||
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||||
|
@@ -5,10 +5,10 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
janus "github.com/notedit/janus-go"
|
janus "github.com/notedit/janus-go"
|
||||||
"github.com/pions/webrtc"
|
"github.com/pion/webrtc"
|
||||||
"github.com/pions/webrtc/pkg/media"
|
"github.com/pion/webrtc/pkg/media"
|
||||||
"github.com/pions/webrtc/pkg/media/ivfwriter"
|
"github.com/pion/webrtc/pkg/media/ivfwriter"
|
||||||
"github.com/pions/webrtc/pkg/media/opuswriter"
|
"github.com/pion/webrtc/pkg/media/opuswriter"
|
||||||
)
|
)
|
||||||
|
|
||||||
func saveToDisk(i media.Writer, track *webrtc.Track) {
|
func saveToDisk(i media.Writer, track *webrtc.Track) {
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
module github.com/pions/webrtc/examples/janus-gateway/streaming
|
module github.com/pion/webrtc/examples/janus-gateway/streaming
|
||||||
|
|
||||||
replace github.com/pions/webrtc => ../../../
|
replace github.com/pion/webrtc => ../../../
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/gorilla/websocket v1.4.0 // indirect
|
github.com/gorilla/websocket v1.4.0 // indirect
|
||||||
github.com/notedit/janus-go v0.0.0-20180821162543-a152adf0cb7b
|
github.com/notedit/janus-go v0.0.0-20180821162543-a152adf0cb7b
|
||||||
github.com/pions/webrtc v1.1.1
|
github.com/pion/webrtc v1.1.1
|
||||||
)
|
)
|
||||||
|
@@ -6,8 +6,8 @@ github.com/gorilla/websocket v1.4.0 h1:WDFjx/TMzVgy9VdMMQi2K2Emtwi2QcUQsztZ/zLaH
|
|||||||
github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
|
github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
|
||||||
github.com/notedit/janus-go v0.0.0-20180821162543-a152adf0cb7b h1:GT1/zfKpQHX4Cz7F1QUE/tjE/OP0KM5aYaFiKVRgvkk=
|
github.com/notedit/janus-go v0.0.0-20180821162543-a152adf0cb7b h1:GT1/zfKpQHX4Cz7F1QUE/tjE/OP0KM5aYaFiKVRgvkk=
|
||||||
github.com/notedit/janus-go v0.0.0-20180821162543-a152adf0cb7b/go.mod h1:BN/Txse3qz8tZOmCm2OfajB2wHVujWmX3o9nVdsI6gE=
|
github.com/notedit/janus-go v0.0.0-20180821162543-a152adf0cb7b/go.mod h1:BN/Txse3qz8tZOmCm2OfajB2wHVujWmX3o9nVdsI6gE=
|
||||||
github.com/pions/pkg v0.0.0-20181115215726-b60cd756f712 h1:ciXO7F7PusyAzW/EZJt01bETgfTxP/BIGoWQ15pBP54=
|
github.com/pion/pkg v0.0.0-20181115215726-b60cd756f712 h1:ciXO7F7PusyAzW/EZJt01bETgfTxP/BIGoWQ15pBP54=
|
||||||
github.com/pions/pkg v0.0.0-20181115215726-b60cd756f712/go.mod h1:r9wKZs+Xxv2acLspex4CHQiIhFjGK1zGP+nUm/8klXA=
|
github.com/pion/pkg v0.0.0-20181115215726-b60cd756f712/go.mod h1:r9wKZs+Xxv2acLspex4CHQiIhFjGK1zGP+nUm/8klXA=
|
||||||
github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw=
|
github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw=
|
||||||
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||||
|
@@ -7,9 +7,9 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
janus "github.com/notedit/janus-go"
|
janus "github.com/notedit/janus-go"
|
||||||
"github.com/pions/webrtc"
|
"github.com/pion/webrtc"
|
||||||
|
|
||||||
gst "github.com/pions/webrtc/examples/internal/gstreamer-src"
|
gst "github.com/pion/webrtc/examples/internal/gstreamer-src"
|
||||||
)
|
)
|
||||||
|
|
||||||
func watchHandle(handle *janus.Handle) {
|
func watchHandle(handle *janus.Handle) {
|
||||||
|
@@ -5,10 +5,10 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pions/quic"
|
"github.com/pion/quic"
|
||||||
"github.com/pions/webrtc"
|
"github.com/pion/webrtc"
|
||||||
|
|
||||||
"github.com/pions/webrtc/examples/internal/signal"
|
"github.com/pion/webrtc/examples/internal/signal"
|
||||||
)
|
)
|
||||||
|
|
||||||
const messageSize = 15
|
const messageSize = 15
|
||||||
|
@@ -5,9 +5,9 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pions/webrtc"
|
"github.com/pion/webrtc"
|
||||||
|
|
||||||
"github.com/pions/webrtc/examples/internal/signal"
|
"github.com/pion/webrtc/examples/internal/signal"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
@@ -7,12 +7,12 @@ The `answer` side acts like a HTTP server and should therefore be ran first.
|
|||||||
## Instructions
|
## Instructions
|
||||||
First run `answer`:
|
First run `answer`:
|
||||||
```sh
|
```sh
|
||||||
go install github.com/pions/webrtc/examples/pion-to-pion/answer
|
go install github.com/pion/webrtc/examples/pion-to-pion/answer
|
||||||
answer
|
answer
|
||||||
```
|
```
|
||||||
Next, run `offer`:
|
Next, run `offer`:
|
||||||
```sh
|
```sh
|
||||||
go install github.com/pions/webrtc/examples/pion-to-pion/offer
|
go install github.com/pion/webrtc/examples/pion-to-pion/offer
|
||||||
offer
|
offer
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -23,4 +23,4 @@ You should see them connect and start to exchange messages.
|
|||||||
docker-compose up -d
|
docker-compose up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
Now, you can see message exchanging, using `docker logs`.
|
Now, you can see message exchanging, using `docker logs`.
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
FROM golang:1.12
|
FROM golang:1.12
|
||||||
|
|
||||||
RUN go get -u github.com/pions/webrtc/examples/pion-to-pion/answer
|
RUN go get -u github.com/pion/webrtc/examples/pion-to-pion/answer
|
||||||
|
|
||||||
CMD ["answer"]
|
CMD ["answer"]
|
||||||
|
|
||||||
|
@@ -7,9 +7,9 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pions/webrtc"
|
"github.com/pion/webrtc"
|
||||||
|
|
||||||
"github.com/pions/webrtc/examples/internal/signal"
|
"github.com/pion/webrtc/examples/internal/signal"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
FROM golang:1.12
|
FROM golang:1.12
|
||||||
|
|
||||||
RUN go get -u github.com/pions/webrtc/examples/pion-to-pion/offer
|
RUN go get -u github.com/pion/webrtc/examples/pion-to-pion/offer
|
||||||
|
|
||||||
CMD ["offer"]
|
CMD ["offer"]
|
||||||
|
@@ -8,9 +8,9 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pions/webrtc"
|
"github.com/pion/webrtc"
|
||||||
|
|
||||||
"github.com/pions/webrtc/examples/internal/signal"
|
"github.com/pion/webrtc/examples/internal/signal"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
@@ -4,7 +4,7 @@ save-to-disk is a simple application that shows how to record your webcam using
|
|||||||
## Instructions
|
## Instructions
|
||||||
### Download save-to-disk
|
### Download save-to-disk
|
||||||
```
|
```
|
||||||
go get github.com/pions/webrtc/examples/save-to-disk
|
go get github.com/pion/webrtc/examples/save-to-disk
|
||||||
```
|
```
|
||||||
|
|
||||||
### Open save-to-disk example page
|
### Open save-to-disk example page
|
||||||
|
@@ -5,13 +5,13 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pions/rtcp"
|
"github.com/pion/rtcp"
|
||||||
"github.com/pions/webrtc"
|
"github.com/pion/webrtc"
|
||||||
"github.com/pions/webrtc/pkg/media"
|
"github.com/pion/webrtc/pkg/media"
|
||||||
"github.com/pions/webrtc/pkg/media/ivfwriter"
|
"github.com/pion/webrtc/pkg/media/ivfwriter"
|
||||||
"github.com/pions/webrtc/pkg/media/opuswriter"
|
"github.com/pion/webrtc/pkg/media/opuswriter"
|
||||||
|
|
||||||
"github.com/pions/webrtc/examples/internal/signal"
|
"github.com/pion/webrtc/examples/internal/signal"
|
||||||
)
|
)
|
||||||
|
|
||||||
func saveToDisk(i media.Writer, track *webrtc.Track) {
|
func saveToDisk(i media.Writer, track *webrtc.Track) {
|
||||||
|
@@ -6,7 +6,7 @@ This could serve as the building block to building conferencing software, and ot
|
|||||||
## Instructions
|
## Instructions
|
||||||
### Download sfu-minimal
|
### Download sfu-minimal
|
||||||
```
|
```
|
||||||
go get github.com/pions/webrtc/examples/sfu-minimal
|
go get github.com/pion/webrtc/examples/sfu-minimal
|
||||||
```
|
```
|
||||||
|
|
||||||
### Open sfu-minimal example page
|
### Open sfu-minimal example page
|
||||||
@@ -14,7 +14,7 @@ go get github.com/pions/webrtc/examples/sfu-minimal
|
|||||||
|
|
||||||
### Run SFU Minimal
|
### Run SFU Minimal
|
||||||
#### Linux/macOS
|
#### Linux/macOS
|
||||||
Run `sfu-minimal` OR run `main.go` in `github.com/pions/webrtc/examples/sfu-minimal`
|
Run `sfu-minimal` OR run `main.go` in `github.com/pion/webrtc/examples/sfu-minimal`
|
||||||
|
|
||||||
### Start a publisher
|
### Start a publisher
|
||||||
|
|
||||||
|
@@ -5,10 +5,10 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pions/rtcp"
|
"github.com/pion/rtcp"
|
||||||
"github.com/pions/webrtc"
|
"github.com/pion/webrtc"
|
||||||
|
|
||||||
"github.com/pions/webrtc/examples/internal/signal"
|
"github.com/pion/webrtc/examples/internal/signal"
|
||||||
)
|
)
|
||||||
|
|
||||||
var peerConnectionConfig = webrtc.Configuration{
|
var peerConnectionConfig = webrtc.Configuration{
|
||||||
|
@@ -6,7 +6,7 @@ This could serve as the building block to building conferencing software, and ot
|
|||||||
## Instructions
|
## Instructions
|
||||||
### Download sfu-ws
|
### Download sfu-ws
|
||||||
```
|
```
|
||||||
go get github.com/pions/webrtc/examples/sfu-ws
|
go get github.com/pion/webrtc/examples/sfu-ws
|
||||||
```
|
```
|
||||||
|
|
||||||
### Run SFU
|
### Run SFU
|
||||||
|
@@ -3,7 +3,7 @@ package main
|
|||||||
import (
|
import (
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/pions/webrtc"
|
"github.com/pion/webrtc"
|
||||||
)
|
)
|
||||||
|
|
||||||
type BroadcastHub struct {
|
type BroadcastHub struct {
|
||||||
|
@@ -1,11 +1,11 @@
|
|||||||
module github.com/pions/webrtc/examples/sfu-ws
|
module github.com/pion/webrtc/examples/sfu-ws
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/gorilla/websocket v1.4.0
|
github.com/gorilla/websocket v1.4.0
|
||||||
github.com/pions/rtcp v1.1.2
|
github.com/pion/rtcp v1.1.2
|
||||||
github.com/pions/webrtc v1.2.0
|
github.com/pion/webrtc v1.2.0
|
||||||
github.com/povilasv/prommod v0.0.11
|
github.com/povilasv/prommod v0.0.11
|
||||||
github.com/prometheus/client_golang v0.9.2
|
github.com/prometheus/client_golang v0.9.2
|
||||||
)
|
)
|
||||||
|
|
||||||
replace github.com/pions/webrtc => ../../
|
replace github.com/pion/webrtc => ../../
|
||||||
|
@@ -24,41 +24,41 @@ github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs=
|
|||||||
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||||
github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU=
|
github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU=
|
||||||
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
|
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
|
||||||
github.com/pions/datachannel v1.2.0 h1:N12qhHSRVlgBcaal2Hi4skdz7VI4yz6bNC5IJDMzCNw=
|
github.com/pion/datachannel v1.2.0 h1:N12qhHSRVlgBcaal2Hi4skdz7VI4yz6bNC5IJDMzCNw=
|
||||||
github.com/pions/datachannel v1.2.0/go.mod h1:MKPEKJRwX/a9/tyQvcVTUI9szyf8ZuUyZxSA9AVMSro=
|
github.com/pion/datachannel v1.2.0/go.mod h1:MKPEKJRwX/a9/tyQvcVTUI9szyf8ZuUyZxSA9AVMSro=
|
||||||
github.com/pions/dtls v1.2.2 h1:izn/74bIBxVuHb+NdirkmWMH/yFNd8PBVXJgeH/ofGU=
|
github.com/pion/dtls v1.2.2 h1:izn/74bIBxVuHb+NdirkmWMH/yFNd8PBVXJgeH/ofGU=
|
||||||
github.com/pions/dtls v1.2.2/go.mod h1:5o0cLHyBEl8CvuA88enDDM6aBwn4SNo8md2dPhcynfc=
|
github.com/pion/dtls v1.2.2/go.mod h1:5o0cLHyBEl8CvuA88enDDM6aBwn4SNo8md2dPhcynfc=
|
||||||
github.com/pions/ice v0.1.0 h1:V3RaaUV7QEFUrNk2tHzRqNo3ldCwwnghEpDIQ8+m/eA=
|
github.com/pion/ice v0.1.0 h1:V3RaaUV7QEFUrNk2tHzRqNo3ldCwwnghEpDIQ8+m/eA=
|
||||||
github.com/pions/ice v0.1.0/go.mod h1:vGnMrwYxOMmfR093luGSh2yMm1DDpPqj8lGRNsmo9VQ=
|
github.com/pion/ice v0.1.0/go.mod h1:vGnMrwYxOMmfR093luGSh2yMm1DDpPqj8lGRNsmo9VQ=
|
||||||
github.com/pions/ice v0.1.1 h1:SZouAvl9RnrNnCHxSnurOfzqK2+oD0ZeURSoxuOs0tI=
|
github.com/pion/ice v0.1.1 h1:SZouAvl9RnrNnCHxSnurOfzqK2+oD0ZeURSoxuOs0tI=
|
||||||
github.com/pions/ice v0.1.1/go.mod h1:vGnMrwYxOMmfR093luGSh2yMm1DDpPqj8lGRNsmo9VQ=
|
github.com/pion/ice v0.1.1/go.mod h1:vGnMrwYxOMmfR093luGSh2yMm1DDpPqj8lGRNsmo9VQ=
|
||||||
github.com/pions/logging v0.1.0 h1:vr+vInmjaRI06CqPWErEQpywxaqoIZcUjQ2eN68jRbk=
|
github.com/pion/logging v0.1.0 h1:vr+vInmjaRI06CqPWErEQpywxaqoIZcUjQ2eN68jRbk=
|
||||||
github.com/pions/logging v0.1.0/go.mod h1:duuz9/Se8ujqvq7OPzbnPpRlha6A0fk1Ba2wrbn4zew=
|
github.com/pion/logging v0.1.0/go.mod h1:duuz9/Se8ujqvq7OPzbnPpRlha6A0fk1Ba2wrbn4zew=
|
||||||
github.com/pions/qtls-vendor-extracted v0.0.0-20190210024908-018998217c65 h1:skcEQZ2eUdm1WKlYu7y1y0HBzOwa1pgSAwvhG6PrI2s=
|
github.com/pion/qtls-vendor-extracted v0.0.0-20190210024908-018998217c65 h1:skcEQZ2eUdm1WKlYu7y1y0HBzOwa1pgSAwvhG6PrI2s=
|
||||||
github.com/pions/qtls-vendor-extracted v0.0.0-20190210024908-018998217c65/go.mod h1:tSUehzG/8OAT3JvWvnovveLfRMM8NvgfN1LzwSrBX5s=
|
github.com/pion/qtls-vendor-extracted v0.0.0-20190210024908-018998217c65/go.mod h1:tSUehzG/8OAT3JvWvnovveLfRMM8NvgfN1LzwSrBX5s=
|
||||||
github.com/pions/quic v0.0.1 h1:SvloojnZl+wiaee/yKI88n/wQosFMCvatAKyxoRoiFQ=
|
github.com/pion/quic v0.0.1 h1:SvloojnZl+wiaee/yKI88n/wQosFMCvatAKyxoRoiFQ=
|
||||||
github.com/pions/quic v0.0.1/go.mod h1:q62rRbOZG6Keu45rWWljWZHXmB3H7fKdeJ1KtNcDrNQ=
|
github.com/pion/quic v0.0.1/go.mod h1:q62rRbOZG6Keu45rWWljWZHXmB3H7fKdeJ1KtNcDrNQ=
|
||||||
github.com/pions/quic-go v0.7.1-0.20190211221741-ec20a8498576 h1:fD1z2bI0qf8yiZGDg5dxhVPP6xtsACP6FN5rDhpDVfM=
|
github.com/pion/quic-go v0.7.1-0.20190211221741-ec20a8498576 h1:fD1z2bI0qf8yiZGDg5dxhVPP6xtsACP6FN5rDhpDVfM=
|
||||||
github.com/pions/quic-go v0.7.1-0.20190211221741-ec20a8498576/go.mod h1:YvOsXPS6wXEfRGJobrsWSOBmlN6dkEIg+cUpnSDLkhc=
|
github.com/pion/quic-go v0.7.1-0.20190211221741-ec20a8498576/go.mod h1:YvOsXPS6wXEfRGJobrsWSOBmlN6dkEIg+cUpnSDLkhc=
|
||||||
github.com/pions/rtcp v1.1.2 h1:gTb+GOvOYDRZb+3OgZz5PE51xrHGZL0WIM5X37dGi60=
|
github.com/pion/rtcp v1.1.2 h1:gTb+GOvOYDRZb+3OgZz5PE51xrHGZL0WIM5X37dGi60=
|
||||||
github.com/pions/rtcp v1.1.2/go.mod h1:E8DBOVSErqbHrUEs8KINt3yhzO7FvKuZr2bVUKTvyaw=
|
github.com/pion/rtcp v1.1.2/go.mod h1:E8DBOVSErqbHrUEs8KINt3yhzO7FvKuZr2bVUKTvyaw=
|
||||||
github.com/pions/rtp v1.1.0 h1:aioiXSi2UclJptFRqmii76GTrlgry5ucCGtdKc+5VDs=
|
github.com/pion/rtp v1.1.0 h1:aioiXSi2UclJptFRqmii76GTrlgry5ucCGtdKc+5VDs=
|
||||||
github.com/pions/rtp v1.1.0/go.mod h1:Bro/2l0PS5C3SQaEpLA+H34kpKIurx3K2Zln/nKjRMs=
|
github.com/pion/rtp v1.1.0/go.mod h1:Bro/2l0PS5C3SQaEpLA+H34kpKIurx3K2Zln/nKjRMs=
|
||||||
github.com/pions/sctp v1.3.0/go.mod h1:GZTG/xApE7wdUFEQq2Rmzgxl/+YaB/L1k8xUl1D5bmo=
|
github.com/pion/sctp v1.3.0/go.mod h1:GZTG/xApE7wdUFEQq2Rmzgxl/+YaB/L1k8xUl1D5bmo=
|
||||||
github.com/pions/sctp v1.4.2 h1:oOV8oLmGds2GZnIeGSHn8d385kwBxNeWNJ0kJOIR4yY=
|
github.com/pion/sctp v1.4.2 h1:oOV8oLmGds2GZnIeGSHn8d385kwBxNeWNJ0kJOIR4yY=
|
||||||
github.com/pions/sctp v1.4.2/go.mod h1:Yws4nn6vR0npKJ2n2R+Cm+0JGaMKca0M1pYdGXovz3o=
|
github.com/pion/sctp v1.4.2/go.mod h1:Yws4nn6vR0npKJ2n2R+Cm+0JGaMKca0M1pYdGXovz3o=
|
||||||
github.com/pions/sdp/v2 v2.1.0 h1:YbbbaceX1aB6j3hPVdQ6GnniIRKqT/rmfnt4XvKR/E0=
|
github.com/pion/sdp/v2 v2.1.0 h1:YbbbaceX1aB6j3hPVdQ6GnniIRKqT/rmfnt4XvKR/E0=
|
||||||
github.com/pions/sdp/v2 v2.1.0/go.mod h1:KGRBcHfpkgJXjrzKJz2wj/Jf1KWnsHdoIiqtayQ5QmE=
|
github.com/pion/sdp/v2 v2.1.0/go.mod h1:KGRBcHfpkgJXjrzKJz2wj/Jf1KWnsHdoIiqtayQ5QmE=
|
||||||
github.com/pions/srtp v1.1.2 h1:mMhn9jsMUokSq+Owyviz6zw9BblBQhHiCB21kpP8KOE=
|
github.com/pion/srtp v1.1.2 h1:mMhn9jsMUokSq+Owyviz6zw9BblBQhHiCB21kpP8KOE=
|
||||||
github.com/pions/srtp v1.1.2/go.mod h1:oQrU6IspEuRx9kdWeX2eb54y6F0ieS0J8GZayc9yZY0=
|
github.com/pion/srtp v1.1.2/go.mod h1:oQrU6IspEuRx9kdWeX2eb54y6F0ieS0J8GZayc9yZY0=
|
||||||
github.com/pions/stun v0.2.0 h1:spIzpfkEg6HV+2iIo6qeOsAjtadZKzbXbrd2e9ZCCcs=
|
github.com/pion/stun v0.2.0 h1:spIzpfkEg6HV+2iIo6qeOsAjtadZKzbXbrd2e9ZCCcs=
|
||||||
github.com/pions/stun v0.2.0/go.mod h1:rMdCIsqqnTLC4MOHJE3LNiFQRfIjUDzI1kzx//7oPOM=
|
github.com/pion/stun v0.2.0/go.mod h1:rMdCIsqqnTLC4MOHJE3LNiFQRfIjUDzI1kzx//7oPOM=
|
||||||
github.com/pions/transport v0.0.0-20190110151433-e7cbf7d5f464/go.mod h1:HLhzI7I0k8TyiQ99hfRZNRf84lG76eaFnZHnVy/wFnM=
|
github.com/pion/transport v0.0.0-20190110151433-e7cbf7d5f464/go.mod h1:HLhzI7I0k8TyiQ99hfRZNRf84lG76eaFnZHnVy/wFnM=
|
||||||
github.com/pions/transport v0.2.0/go.mod h1:HLhzI7I0k8TyiQ99hfRZNRf84lG76eaFnZHnVy/wFnM=
|
github.com/pion/transport v0.2.0/go.mod h1:HLhzI7I0k8TyiQ99hfRZNRf84lG76eaFnZHnVy/wFnM=
|
||||||
github.com/pions/transport v0.4.0 h1:1N6fluzmj5W/16eFLDsCB18s/xEkjVTek0K4IJz75FU=
|
github.com/pion/transport v0.4.0 h1:1N6fluzmj5W/16eFLDsCB18s/xEkjVTek0K4IJz75FU=
|
||||||
github.com/pions/transport v0.4.0/go.mod h1:9gvUd8ZeyU4ZX7dhNuUq97mPoekopkd7eCJEyhKwVO0=
|
github.com/pion/transport v0.4.0/go.mod h1:9gvUd8ZeyU4ZX7dhNuUq97mPoekopkd7eCJEyhKwVO0=
|
||||||
github.com/pions/transport v0.5.0 h1:/KGBCzjc8bvVh8P5NP8GiSGL/PbupzhqvEOEBSlZux0=
|
github.com/pion/transport v0.5.0 h1:/KGBCzjc8bvVh8P5NP8GiSGL/PbupzhqvEOEBSlZux0=
|
||||||
github.com/pions/transport v0.5.0/go.mod h1:9gvUd8ZeyU4ZX7dhNuUq97mPoekopkd7eCJEyhKwVO0=
|
github.com/pion/transport v0.5.0/go.mod h1:9gvUd8ZeyU4ZX7dhNuUq97mPoekopkd7eCJEyhKwVO0=
|
||||||
github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw=
|
github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw=
|
||||||
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||||
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
|
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
|
||||||
|
@@ -5,7 +5,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/pions/webrtc"
|
"github.com/pion/webrtc"
|
||||||
"github.com/povilasv/prommod"
|
"github.com/povilasv/prommod"
|
||||||
"github.com/prometheus/client_golang/prometheus"
|
"github.com/prometheus/client_golang/prometheus"
|
||||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||||
|
@@ -9,8 +9,8 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/gorilla/websocket"
|
"github.com/gorilla/websocket"
|
||||||
"github.com/pions/rtcp"
|
"github.com/pion/rtcp"
|
||||||
"github.com/pions/webrtc"
|
"github.com/pion/webrtc"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Peer config
|
// Peer config
|
||||||
|
26
go.mod
26
go.mod
@@ -1,16 +1,18 @@
|
|||||||
module github.com/pions/webrtc
|
module github.com/pion/webrtc
|
||||||
|
|
||||||
|
go 1.12
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/pions/datachannel v1.2.1
|
github.com/pion/datachannel v1.2.2
|
||||||
github.com/pions/dtls v1.2.2
|
github.com/pion/dtls v1.2.3
|
||||||
github.com/pions/ice v0.2.0
|
github.com/pion/ice v0.2.1
|
||||||
github.com/pions/logging v0.2.0
|
github.com/pion/logging v0.2.1
|
||||||
github.com/pions/quic v0.1.0
|
github.com/pion/quic v0.1.1
|
||||||
github.com/pions/rtcp v1.1.2
|
github.com/pion/rtcp v1.1.4
|
||||||
github.com/pions/rtp v1.1.0
|
github.com/pion/rtp v1.1.1
|
||||||
github.com/pions/sctp v1.4.3
|
github.com/pion/sctp v1.4.4
|
||||||
github.com/pions/sdp/v2 v2.1.0
|
github.com/pion/sdp/v2 v2.1.1
|
||||||
github.com/pions/srtp v1.1.2
|
github.com/pion/srtp v1.1.3
|
||||||
github.com/pions/transport v0.5.0
|
github.com/pion/transport v0.6.0
|
||||||
github.com/stretchr/testify v1.3.0
|
github.com/stretchr/testify v1.3.0
|
||||||
)
|
)
|
||||||
|
62
go.sum
62
go.sum
@@ -1,6 +1,5 @@
|
|||||||
github.com/cheekybits/genny v1.0.0 h1:uGGa4nei+j20rOSeDeP5Of12XVm7TGUd4dJA9RDitfE=
|
github.com/cheekybits/genny v1.0.0 h1:uGGa4nei+j20rOSeDeP5Of12XVm7TGUd4dJA9RDitfE=
|
||||||
github.com/cheekybits/genny v1.0.0/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ=
|
github.com/cheekybits/genny v1.0.0/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ=
|
||||||
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
|
|
||||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
@@ -21,58 +20,45 @@ github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs=
|
|||||||
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||||
github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU=
|
github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU=
|
||||||
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
|
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
|
||||||
github.com/pions/datachannel v1.2.1 h1:zbSwtPqVcjqUM81A3VTR7lGfeAnQgxJhheXSfBk16SM=
|
github.com/pion/datachannel v1.2.2 h1:Ir4NL3svXjix26skf3Y0yfDXC6ztB5PnwB5EacfV/qY=
|
||||||
github.com/pions/datachannel v1.2.1/go.mod h1:Vd79tKnghclBJLCYNqN0xQzw3u3P2N/7QHYoLCLh2+Q=
|
github.com/pion/datachannel v1.2.2/go.mod h1:OHz0QB98N/iLKf38LwSA8m9A6Y51cswmp/IluvjsPWk=
|
||||||
github.com/pions/dtls v1.0.2/go.mod h1:T22vu8VCOxNmIrbe3nnM1UdIo3m1Bx5CJNkHyehahLg=
|
github.com/pion/dtls v1.2.3 h1:4ZVFJHLIvro3holCH7bs1XhuAzs9idC8gUsMRDfahwM=
|
||||||
github.com/pions/dtls v1.2.2 h1:izn/74bIBxVuHb+NdirkmWMH/yFNd8PBVXJgeH/ofGU=
|
github.com/pion/dtls v1.2.3/go.mod h1:krdyIQPgcrKJu/Rr/lJS9tIFeA6hqMpcpDeVLzLN0+s=
|
||||||
github.com/pions/dtls v1.2.2/go.mod h1:5o0cLHyBEl8CvuA88enDDM6aBwn4SNo8md2dPhcynfc=
|
github.com/pion/ice v0.2.1 h1:DhYn8s52H54SBbS5qu3XoGvTfseU47pe15yV3udNpww=
|
||||||
github.com/pions/ice v0.2.0 h1:1FQNPY3KZHoft9Qg3POnEQFAei2IM3KBfHbJ9Uo0apw=
|
github.com/pion/ice v0.2.1/go.mod h1:igvbO76UeYthbSu0UsUTqjyWpFT3diUmM+x2vt4p4fw=
|
||||||
github.com/pions/ice v0.2.0/go.mod h1:+WYLnnIPnit0VaD+pEx3zZrBoCAWErBYNmlF2bvrUP0=
|
github.com/pion/logging v0.2.1 h1:LwASkBKZ+2ysGJ+jLv1E/9H1ge0k1nTfi1X+5zirkDk=
|
||||||
github.com/pions/logging v0.2.0 h1:xSCkE+7+aebgVimtHBv7Y8b8waT8pgeyKku9Bo+eGdk=
|
github.com/pion/logging v0.2.1/go.mod h1:k0/tDVsRCX2Mb2ZEmTqNa7CWsQPc+YYCB7Q+5pahoms=
|
||||||
github.com/pions/logging v0.2.0/go.mod h1:duuz9/Se8ujqvq7OPzbnPpRlha6A0fk1Ba2wrbn4zew=
|
github.com/pion/quic v0.1.1 h1:D951FV+TOqI9A0rTF7tHx0Loooqz+nyzjEyj8o3PuMA=
|
||||||
github.com/pions/pkg v0.0.0-20181115215726-b60cd756f712/go.mod h1:r9wKZs+Xxv2acLspex4CHQiIhFjGK1zGP+nUm/8klXA=
|
github.com/pion/quic v0.1.1/go.mod h1:zEU51v7ru8Mp4AUBJvj6psrSth5eEFNnVQK5K48oV3k=
|
||||||
github.com/pions/quic v0.1.0 h1:k5oxv8RNd6s7Pf6nH6ypiHVWzjr/X+BeBKDSAoH2WqI=
|
github.com/pion/rtcp v1.1.4 h1:LW1zS49QXeuhKyFr7hFOlvnZZ2cR8lluTYg5jilGnKY=
|
||||||
github.com/pions/quic v0.1.0/go.mod h1:8XSfC7+budvgzjIK29ajdA9ueNY/JCelCFtPz2ZgIpo=
|
github.com/pion/rtcp v1.1.4/go.mod h1:a5dj2d6BKIKHl43EnAOIrCczcjESrtPuMgfmL6/K6QM=
|
||||||
github.com/pions/rtcp v1.1.2 h1:gTb+GOvOYDRZb+3OgZz5PE51xrHGZL0WIM5X37dGi60=
|
github.com/pion/rtp v1.1.1 h1:lag+9/lSOLBEYeYB/28KXm/ka1H++4wkmSj/WkttV6Y=
|
||||||
github.com/pions/rtcp v1.1.2/go.mod h1:E8DBOVSErqbHrUEs8KINt3yhzO7FvKuZr2bVUKTvyaw=
|
github.com/pion/rtp v1.1.1/go.mod h1:/l4cvcKd0D3u9JLs2xSVI95YkfXW87a3br3nqmVtSlE=
|
||||||
github.com/pions/rtp v1.1.0 h1:aioiXSi2UclJptFRqmii76GTrlgry5ucCGtdKc+5VDs=
|
github.com/pion/sctp v1.4.4 h1:0d3c1g7OtvPYMVWPSNu8w37yJaKUcjCupVQ1zVcnIOc=
|
||||||
github.com/pions/rtp v1.1.0/go.mod h1:Bro/2l0PS5C3SQaEpLA+H34kpKIurx3K2Zln/nKjRMs=
|
github.com/pion/sctp v1.4.4/go.mod h1:oS057xrxwNbgFWap0buUuAJalfVezrOEwdmEoydf5x4=
|
||||||
github.com/pions/sctp v1.4.0/go.mod h1:dAna+Ct/aIIFiGW45yhGzuQjULWD7ni1vjoKHa9DsyU=
|
github.com/pion/sdp/v2 v2.1.1 h1:i3fAyjiLuQseYNo0BtCOPfzp91Ppb7vasRGmUUTog28=
|
||||||
github.com/pions/sctp v1.4.3 h1:1nFC6nP9MhO1KNELNTTb8ETnXn5IlVJQr9s6ak0Y4l0=
|
github.com/pion/sdp/v2 v2.1.1/go.mod h1:idSlWxhfWQDtTy9J05cgxpHBu/POwXN2VDRGYxT/EjU=
|
||||||
github.com/pions/sctp v1.4.3/go.mod h1:Yws4nn6vR0npKJ2n2R+Cm+0JGaMKca0M1pYdGXovz3o=
|
github.com/pion/srtp v1.1.3 h1:8VNvpIft38BDgQj6pMSjjQnzd3KyMbheSFnJplKmIDU=
|
||||||
github.com/pions/sdp/v2 v2.1.0 h1:YbbbaceX1aB6j3hPVdQ6GnniIRKqT/rmfnt4XvKR/E0=
|
github.com/pion/srtp v1.1.3/go.mod h1:B5aBwQ5Ae2taFyZy9WBZz5Eqdt1exEYqfq0MGCSBVvA=
|
||||||
github.com/pions/sdp/v2 v2.1.0/go.mod h1:KGRBcHfpkgJXjrzKJz2wj/Jf1KWnsHdoIiqtayQ5QmE=
|
github.com/pion/stun v0.2.1 h1:rSKJ0ynYkRalRD8BifmkaGLeepCFuGTwG6FxPsrPK8o=
|
||||||
github.com/pions/srtp v1.1.2 h1:mMhn9jsMUokSq+Owyviz6zw9BblBQhHiCB21kpP8KOE=
|
github.com/pion/stun v0.2.1/go.mod h1:TChCNKgwnFiFG/c9K+zqEdd6pO6tlODb9yN1W/zVfsE=
|
||||||
github.com/pions/srtp v1.1.2/go.mod h1:oQrU6IspEuRx9kdWeX2eb54y6F0ieS0J8GZayc9yZY0=
|
github.com/pion/transport v0.6.0 h1:WAoyJg/6OI8dhCVFl/0JHTMd1iu2iHgGUXevptMtJ3U=
|
||||||
github.com/pions/stun v0.2.0 h1:spIzpfkEg6HV+2iIo6qeOsAjtadZKzbXbrd2e9ZCCcs=
|
github.com/pion/transport v0.6.0/go.mod h1:iWZ07doqOosSLMhZ+FXUTq+TamDoXSllxpbGcfkCmbE=
|
||||||
github.com/pions/stun v0.2.0/go.mod h1:rMdCIsqqnTLC4MOHJE3LNiFQRfIjUDzI1kzx//7oPOM=
|
|
||||||
github.com/pions/transport v0.2.0 h1:e3B5V7rATCNCxl0qlU0S0ofpt1E77X5pCbeUVQ0ntpA=
|
|
||||||
github.com/pions/transport v0.2.0/go.mod h1:HLhzI7I0k8TyiQ99hfRZNRf84lG76eaFnZHnVy/wFnM=
|
|
||||||
github.com/pions/transport v0.4.0 h1:1N6fluzmj5W/16eFLDsCB18s/xEkjVTek0K4IJz75FU=
|
|
||||||
github.com/pions/transport v0.4.0/go.mod h1:9gvUd8ZeyU4ZX7dhNuUq97mPoekopkd7eCJEyhKwVO0=
|
|
||||||
github.com/pions/transport v0.5.0 h1:/KGBCzjc8bvVh8P5NP8GiSGL/PbupzhqvEOEBSlZux0=
|
|
||||||
github.com/pions/transport v0.5.0/go.mod h1:9gvUd8ZeyU4ZX7dhNuUq97mPoekopkd7eCJEyhKwVO0=
|
|
||||||
github.com/pions/webrtc v1.2.0/go.mod h1:bih1dMY7qksVxZTG2XMjIA6J7D5b92+MJzXYe+G2kng=
|
|
||||||
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||||
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
|
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
|
||||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
|
||||||
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
|
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
|
||||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||||
golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
|
||||||
golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||||
golang.org/x/crypto v0.0.0-20190228161510-8dd112bcdc25 h1:jsG6UpNLt9iAsb0S2AGW28DveNzzgmbXR+ENoPjUeIU=
|
golang.org/x/crypto v0.0.0-20190228161510-8dd112bcdc25 h1:jsG6UpNLt9iAsb0S2AGW28DveNzzgmbXR+ENoPjUeIU=
|
||||||
golang.org/x/crypto v0.0.0-20190228161510-8dd112bcdc25/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
golang.org/x/crypto v0.0.0-20190228161510-8dd112bcdc25/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd h1:nTDtHvHSdCn1m6ITfMRqtOd/9+7a3s8RBNOZ3eYZzJA=
|
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd h1:nTDtHvHSdCn1m6ITfMRqtOd/9+7a3s8RBNOZ3eYZzJA=
|
||||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
golang.org/x/net v0.0.0-20181220203305-927f97764cc3 h1:eH6Eip3UpmR+yM/qI9Ijluzb1bNv/cAU/n+6l8tRSis=
|
|
||||||
golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
|
||||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA=
|
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA=
|
||||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e h1:o3PsSEY8E4eXWkXrIP9YJALUkVZqzHJT5DOasTyn8Vs=
|
|
||||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20190228124157-a34e9553db1e h1:ZytStCyV048ZqDsWHiYDdoI2Vd4msMcrDECFxS+tL9c=
|
golang.org/x/sys v0.0.0-20190228124157-a34e9553db1e h1:ZytStCyV048ZqDsWHiYDdoI2Vd4msMcrDECFxS+tL9c=
|
||||||
|
@@ -5,8 +5,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"net"
|
"net"
|
||||||
|
|
||||||
"github.com/pions/ice"
|
"github.com/pion/ice"
|
||||||
"github.com/pions/sdp/v2"
|
"github.com/pion/sdp/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ICECandidate represents a ice candidate
|
// ICECandidate represents a ice candidate
|
||||||
|
@@ -4,8 +4,8 @@ import (
|
|||||||
"net"
|
"net"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/pions/ice"
|
"github.com/pion/ice"
|
||||||
"github.com/pions/sdp/v2"
|
"github.com/pion/sdp/v2"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -6,7 +6,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/pions/ice"
|
"github.com/pion/ice"
|
||||||
)
|
)
|
||||||
|
|
||||||
// The ICEGatherer gathers local host, server reflexive and relay
|
// The ICEGatherer gathers local host, server reflexive and relay
|
||||||
|
@@ -6,7 +6,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pions/transport/test"
|
"github.com/pion/transport/test"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestNewICEGatherer_Success(t *testing.T) {
|
func TestNewICEGatherer_Success(t *testing.T) {
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
package webrtc
|
package webrtc
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/pions/ice"
|
"github.com/pion/ice"
|
||||||
"github.com/pions/webrtc/pkg/rtcerr"
|
"github.com/pion/webrtc/pkg/rtcerr"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ICEServer describes a single STUN and TURN server that can be used by
|
// ICEServer describes a single STUN and TURN server that can be used by
|
||||||
|
@@ -5,7 +5,7 @@ package webrtc
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
"github.com/pions/ice"
|
"github.com/pion/ice"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ICEServer describes a single STUN and TURN server that can be used by
|
// ICEServer describes a single STUN and TURN server that can be used by
|
||||||
|
@@ -5,8 +5,8 @@ package webrtc
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/pions/ice"
|
"github.com/pion/ice"
|
||||||
"github.com/pions/webrtc/pkg/rtcerr"
|
"github.com/pion/webrtc/pkg/rtcerr"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -69,7 +69,7 @@ func TestICEServer_validate(t *testing.T) {
|
|||||||
Username: "unittest",
|
Username: "unittest",
|
||||||
Credential: false,
|
Credential: false,
|
||||||
CredentialType: ICECredentialTypeOauth,
|
CredentialType: ICECredentialTypeOauth,
|
||||||
}, &rtcerr.SyntaxError{Err: ice.ErrSTUNQuery}},
|
}, ice.ErrSTUNQuery},
|
||||||
}
|
}
|
||||||
|
|
||||||
for i, testCase := range testCases {
|
for i, testCase := range testCases {
|
||||||
|
@@ -7,9 +7,9 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/pions/ice"
|
"github.com/pion/ice"
|
||||||
"github.com/pions/logging"
|
"github.com/pion/logging"
|
||||||
"github.com/pions/webrtc/internal/mux"
|
"github.com/pion/webrtc/internal/mux"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ICETransport allows an application access to information about the ICE
|
// ICETransport allows an application access to information about the ICE
|
||||||
|
@@ -8,7 +8,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pions/transport/test"
|
"github.com/pion/transport/test"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestICETransport_OnSelectedCandidatePairChange(t *testing.T) {
|
func TestICETransport_OnSelectedCandidatePairChange(t *testing.T) {
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
package webrtc
|
package webrtc
|
||||||
|
|
||||||
import "github.com/pions/ice"
|
import "github.com/pion/ice"
|
||||||
|
|
||||||
// ICETransportState represents the current state of the ICE transport.
|
// ICETransportState represents the current state of the ICE transport.
|
||||||
type ICETransportState int
|
type ICETransportState int
|
||||||
|
@@ -3,7 +3,7 @@ package webrtc
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/pions/ice"
|
"github.com/pion/ice"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -4,7 +4,7 @@ import (
|
|||||||
"net"
|
"net"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pions/transport/packetio"
|
"github.com/pion/transport/packetio"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Endpoint implements net.Conn. It is used to read muxed packets.
|
// Endpoint implements net.Conn. It is used to read muxed packets.
|
||||||
|
@@ -4,8 +4,8 @@ import (
|
|||||||
"net"
|
"net"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/pions/logging"
|
"github.com/pion/logging"
|
||||||
"github.com/pions/transport/packetio"
|
"github.com/pion/transport/packetio"
|
||||||
)
|
)
|
||||||
|
|
||||||
// The maximum amount of data that can be buffered before returning errors.
|
// The maximum amount of data that can be buffered before returning errors.
|
||||||
|
@@ -5,8 +5,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pions/logging"
|
"github.com/pion/logging"
|
||||||
"github.com/pions/transport/test"
|
"github.com/pion/transport/test"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestStressDuplex(t *testing.T) {
|
func TestStressDuplex(t *testing.T) {
|
||||||
|
@@ -6,9 +6,9 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/pions/rtp"
|
"github.com/pion/rtp"
|
||||||
"github.com/pions/rtp/codecs"
|
"github.com/pion/rtp/codecs"
|
||||||
"github.com/pions/sdp/v2"
|
"github.com/pion/sdp/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
// PayloadTypes for the default codecs
|
// PayloadTypes for the default codecs
|
||||||
@@ -32,7 +32,7 @@ func (m *MediaEngine) RegisterCodec(codec *RTPCodec) uint8 {
|
|||||||
return codec.PayloadType
|
return codec.PayloadType
|
||||||
}
|
}
|
||||||
|
|
||||||
// RegisterDefaultCodecs is a helper that registers the default codecs supported by pions-webrtc
|
// RegisterDefaultCodecs is a helper that registers the default codecs supported by pion-webrtc
|
||||||
func (m *MediaEngine) RegisterDefaultCodecs() {
|
func (m *MediaEngine) RegisterDefaultCodecs() {
|
||||||
m.RegisterCodec(NewRTPOpusCodec(DefaultPayloadTypeOpus, 48000))
|
m.RegisterCodec(NewRTPOpusCodec(DefaultPayloadTypeOpus, 48000))
|
||||||
m.RegisterCodec(NewRTPG722Codec(DefaultPayloadTypeG722, 8000))
|
m.RegisterCodec(NewRTPG722Codec(DefaultPayloadTypeG722, 8000))
|
||||||
@@ -73,7 +73,7 @@ func (m *MediaEngine) getCodecsByKind(kind RTPCodecType) []*RTPCodec {
|
|||||||
return codecs
|
return codecs
|
||||||
}
|
}
|
||||||
|
|
||||||
// Names for the default codecs supported by pions-webrtc
|
// Names for the default codecs supported by pion-webrtc
|
||||||
const (
|
const (
|
||||||
G722 = "G722"
|
G722 = "G722"
|
||||||
Opus = "opus"
|
Opus = "opus"
|
||||||
|
@@ -5,7 +5,7 @@ package webrtc
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/pions/sdp/v2"
|
"github.com/pion/sdp/v2"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "webrtc",
|
"name": "webrtc",
|
||||||
"repository": "git@github.com:pions/webrtc.git",
|
"repository": "git@github.com:pion/webrtc.git",
|
||||||
"private": true,
|
"private": true,
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"wrtc": "^0.3.5"
|
"wrtc": "^0.3.5"
|
||||||
|
@@ -17,12 +17,12 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pions/ice"
|
"github.com/pion/ice"
|
||||||
"github.com/pions/logging"
|
"github.com/pion/logging"
|
||||||
"github.com/pions/rtcp"
|
"github.com/pion/rtcp"
|
||||||
"github.com/pions/sdp/v2"
|
"github.com/pion/sdp/v2"
|
||||||
"github.com/pions/webrtc/internal/util"
|
"github.com/pion/webrtc/internal/util"
|
||||||
"github.com/pions/webrtc/pkg/rtcerr"
|
"github.com/pion/webrtc/pkg/rtcerr"
|
||||||
)
|
)
|
||||||
|
|
||||||
// PeerConnection represents a WebRTC connection that establishes a
|
// PeerConnection represents a WebRTC connection that establishes a
|
||||||
|
@@ -4,7 +4,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pions/transport/test"
|
"github.com/pion/transport/test"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestPeerConnection_Close is moved to it's own file because the tests
|
// TestPeerConnection_Close is moved to it's own file because the tests
|
||||||
|
@@ -12,10 +12,10 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pions/ice"
|
"github.com/pion/ice"
|
||||||
"github.com/pions/transport/test"
|
"github.com/pion/transport/test"
|
||||||
"github.com/pions/webrtc/internal/mux"
|
"github.com/pion/webrtc/internal/mux"
|
||||||
"github.com/pions/webrtc/pkg/rtcerr"
|
"github.com/pion/webrtc/pkg/rtcerr"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -6,7 +6,7 @@ package webrtc
|
|||||||
import (
|
import (
|
||||||
"syscall/js"
|
"syscall/js"
|
||||||
|
|
||||||
"github.com/pions/webrtc/pkg/rtcerr"
|
"github.com/pion/webrtc/pkg/rtcerr"
|
||||||
)
|
)
|
||||||
|
|
||||||
// PeerConnection represents a WebRTC connection that establishes a
|
// PeerConnection represents a WebRTC connection that establishes a
|
||||||
|
@@ -11,9 +11,9 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pions/rtcp"
|
"github.com/pion/rtcp"
|
||||||
"github.com/pions/transport/test"
|
"github.com/pion/transport/test"
|
||||||
"github.com/pions/webrtc/pkg/media"
|
"github.com/pion/webrtc/pkg/media"
|
||||||
)
|
)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -7,7 +7,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pions/webrtc/pkg/rtcerr"
|
"github.com/pion/webrtc/pkg/rtcerr"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -239,7 +239,7 @@ func TestPeerConnection_GetConfiguration(t *testing.T) {
|
|||||||
assert.Equal(t, expected.BundlePolicy, actual.BundlePolicy)
|
assert.Equal(t, expected.BundlePolicy, actual.BundlePolicy)
|
||||||
assert.Equal(t, expected.RTCPMuxPolicy, actual.RTCPMuxPolicy)
|
assert.Equal(t, expected.RTCPMuxPolicy, actual.RTCPMuxPolicy)
|
||||||
// TODO(albrow): Uncomment this after #513 is fixed.
|
// TODO(albrow): Uncomment this after #513 is fixed.
|
||||||
// See: https://github.com/pions/webrtc/issues/513.
|
// See: https://github.com/pion/webrtc/issues/513.
|
||||||
// assert.Equal(t, len(expected.Certificates), len(actual.Certificates))
|
// assert.Equal(t, len(expected.Certificates), len(actual.Certificates))
|
||||||
assert.Equal(t, expected.ICECandidatePoolSize, actual.ICECandidatePoolSize)
|
assert.Equal(t, expected.ICECandidatePoolSize, actual.ICECandidatePoolSize)
|
||||||
}
|
}
|
||||||
|
@@ -6,8 +6,8 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/pions/rtp"
|
"github.com/pion/rtp"
|
||||||
"github.com/pions/rtp/codecs"
|
"github.com/pion/rtp/codecs"
|
||||||
)
|
)
|
||||||
|
|
||||||
// IVFWriter is used to take RTP packets and write them to an IVF on disk
|
// IVFWriter is used to take RTP packets and write them to an IVF on disk
|
||||||
@@ -71,8 +71,7 @@ func (i *IVFWriter) WriteRTP(packet *rtp.Packet) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
vp8Packet := codecs.VP8Packet{}
|
vp8Packet := codecs.VP8Packet{}
|
||||||
_, err := vp8Packet.Unmarshal(packet)
|
if _, err := vp8Packet.Unmarshal(packet.Payload); err != nil {
|
||||||
if err != nil {
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -6,7 +6,7 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/pions/rtp"
|
"github.com/pion/rtp"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -63,7 +63,7 @@ func TestIVFWriter_AddPacketAndClose(t *testing.T) {
|
|||||||
message: "IVFWriter shouldn't be able to write something an empty packet",
|
message: "IVFWriter shouldn't be able to write something an empty packet",
|
||||||
messageClose: "IVFWriter should be able to close the file",
|
messageClose: "IVFWriter should be able to close the file",
|
||||||
packet: &rtp.Packet{},
|
packet: &rtp.Packet{},
|
||||||
err: fmt.Errorf("Payload is not large enough to container header"),
|
err: fmt.Errorf("invalid nil packet"),
|
||||||
closeErr: nil,
|
closeErr: nil,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
package media
|
package media
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/pions/rtp"
|
"github.com/pion/rtp"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Sample contains media, and the amount of samples in it
|
// Sample contains media, and the amount of samples in it
|
||||||
|
@@ -8,8 +8,8 @@ import (
|
|||||||
"math/rand"
|
"math/rand"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/pions/rtp"
|
"github.com/pion/rtp"
|
||||||
"github.com/pions/rtp/codecs"
|
"github.com/pion/rtp/codecs"
|
||||||
)
|
)
|
||||||
|
|
||||||
// OpusWriter is used to take RTP packets and write them to an OGG on disk
|
// OpusWriter is used to take RTP packets and write them to an OGG on disk
|
||||||
@@ -105,7 +105,7 @@ func (i *OpusWriter) writeHeaders() error {
|
|||||||
oggCommentHeader := make([]byte, 21)
|
oggCommentHeader := make([]byte, 21)
|
||||||
copy(oggCommentHeader[0:], []byte("OpusTags")) // Magic Signature 'OpusTags'
|
copy(oggCommentHeader[0:], []byte("OpusTags")) // Magic Signature 'OpusTags'
|
||||||
binary.LittleEndian.PutUint32(oggCommentHeader[8:], 5) // Vendor Length
|
binary.LittleEndian.PutUint32(oggCommentHeader[8:], 5) // Vendor Length
|
||||||
copy(oggCommentHeader[12:], []byte("pions")) // Vendor name 'pions'
|
copy(oggCommentHeader[12:], []byte("pion")) // Vendor name 'pion'
|
||||||
binary.LittleEndian.PutUint32(oggCommentHeader[17:], 0) // User Comment List Length
|
binary.LittleEndian.PutUint32(oggCommentHeader[17:], 0) // User Comment List Length
|
||||||
|
|
||||||
// RFC specifies that the page where the CommentHeader completes should have a granule position of 0
|
// RFC specifies that the page where the CommentHeader completes should have a granule position of 0
|
||||||
@@ -145,9 +145,9 @@ func (i *OpusWriter) WriteRTP(packet *rtp.Packet) error {
|
|||||||
if i.stream == nil {
|
if i.stream == nil {
|
||||||
return fmt.Errorf("file not opened")
|
return fmt.Errorf("file not opened")
|
||||||
}
|
}
|
||||||
|
|
||||||
opusPacket := codecs.OpusPacket{}
|
opusPacket := codecs.OpusPacket{}
|
||||||
_, err := opusPacket.Unmarshal(packet)
|
if _, err := opusPacket.Unmarshal(packet.Payload); err != nil {
|
||||||
if err != nil {
|
|
||||||
// Only handle Opus packets
|
// Only handle Opus packets
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@@ -163,7 +163,7 @@ func (i *OpusWriter) WriteRTP(packet *rtp.Packet) error {
|
|||||||
|
|
||||||
data := i.createPage(payload, 0, i.previousGranulePosition)
|
data := i.createPage(payload, 0, i.previousGranulePosition)
|
||||||
|
|
||||||
_, err = i.stream.Write(data)
|
_, err := i.stream.Write(data)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -6,7 +6,7 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/pions/rtp"
|
"github.com/pion/rtp"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -62,7 +62,7 @@ func TestOpusWriter_AddPacketAndClose(t *testing.T) {
|
|||||||
message: "OpusWriter shouldn't be able to write an empty packet",
|
message: "OpusWriter shouldn't be able to write an empty packet",
|
||||||
messageClose: "OpusWriter should be able to close the file",
|
messageClose: "OpusWriter should be able to close the file",
|
||||||
packet: &rtp.Packet{},
|
packet: &rtp.Packet{},
|
||||||
err: fmt.Errorf("Payload is not large enough"),
|
err: fmt.Errorf("invalid nil packet"),
|
||||||
closeErr: nil,
|
closeErr: nil,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
package samplebuilder
|
package samplebuilder
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/pions/rtp"
|
"github.com/pion/rtp"
|
||||||
"github.com/pions/webrtc/pkg/media"
|
"github.com/pion/webrtc/pkg/media"
|
||||||
)
|
)
|
||||||
|
|
||||||
// SampleBuilder contains all packets
|
// SampleBuilder contains all packets
|
||||||
|
@@ -3,8 +3,8 @@ package samplebuilder
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/pions/rtp"
|
"github.com/pion/rtp"
|
||||||
"github.com/pions/webrtc/pkg/media"
|
"github.com/pion/webrtc/pkg/media"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -211,7 +211,7 @@ func TestNewRune(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestNewString(t *testing.T) {
|
func TestNewString(t *testing.T) {
|
||||||
value := string("pions")
|
value := string("pion")
|
||||||
nullable := NewString(value)
|
nullable := NewString(value)
|
||||||
|
|
||||||
assert.Equal(t,
|
assert.Equal(t,
|
||||||
|
@@ -13,10 +13,10 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pions/dtls"
|
"github.com/pion/dtls"
|
||||||
"github.com/pions/quic"
|
"github.com/pion/quic"
|
||||||
"github.com/pions/webrtc/internal/mux"
|
"github.com/pion/webrtc/internal/mux"
|
||||||
"github.com/pions/webrtc/pkg/rtcerr"
|
"github.com/pion/webrtc/pkg/rtcerr"
|
||||||
)
|
)
|
||||||
|
|
||||||
// QUICTransport is a specialization of QuicTransportBase focused on
|
// QUICTransport is a specialization of QuicTransportBase focused on
|
||||||
|
@@ -6,9 +6,9 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pions/quic"
|
"github.com/pion/quic"
|
||||||
"github.com/pions/transport/test"
|
"github.com/pion/transport/test"
|
||||||
"github.com/pions/webrtc/internal/util"
|
"github.com/pion/webrtc/internal/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestQUICTransport_E2E(t *testing.T) {
|
func TestQUICTransport_E2E(t *testing.T) {
|
||||||
|
@@ -6,8 +6,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/pions/rtcp"
|
"github.com/pion/rtcp"
|
||||||
"github.com/pions/srtp"
|
"github.com/pion/srtp"
|
||||||
)
|
)
|
||||||
|
|
||||||
// RTPReceiver allows an application to inspect the receipt of a Track
|
// RTPReceiver allows an application to inspect the receipt of a Track
|
||||||
|
@@ -6,10 +6,10 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/pions/ice"
|
"github.com/pion/ice"
|
||||||
"github.com/pions/rtcp"
|
"github.com/pion/rtcp"
|
||||||
"github.com/pions/rtp"
|
"github.com/pion/rtp"
|
||||||
"github.com/pions/srtp"
|
"github.com/pion/srtp"
|
||||||
)
|
)
|
||||||
|
|
||||||
// RTPSender allows an application to control how a given Track is encoded and transmitted to a remote peer
|
// RTPSender allows an application to control how a given Track is encoded and transmitted to a remote peer
|
||||||
|
@@ -7,9 +7,9 @@ import (
|
|||||||
"math"
|
"math"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/pions/datachannel"
|
"github.com/pion/datachannel"
|
||||||
"github.com/pions/logging"
|
"github.com/pion/logging"
|
||||||
"github.com/pions/sctp"
|
"github.com/pion/sctp"
|
||||||
)
|
)
|
||||||
|
|
||||||
const sctpMaxChannels = uint16(65535)
|
const sctpMaxChannels = uint16(65535)
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
package webrtc
|
package webrtc
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/pions/sdp/v2"
|
"github.com/pion/sdp/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
// SessionDescription is used to expose local and remote session descriptions.
|
// SessionDescription is used to expose local and remote session descriptions.
|
||||||
|
@@ -5,8 +5,8 @@ package webrtc
|
|||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pions/ice"
|
"github.com/pion/ice"
|
||||||
"github.com/pions/logging"
|
"github.com/pion/logging"
|
||||||
)
|
)
|
||||||
|
|
||||||
// SettingEngine allows influencing behavior in ways that are not
|
// SettingEngine allows influencing behavior in ways that are not
|
||||||
|
@@ -3,7 +3,7 @@ package webrtc
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/pions/webrtc/pkg/rtcerr"
|
"github.com/pion/webrtc/pkg/rtcerr"
|
||||||
)
|
)
|
||||||
|
|
||||||
type stateChangeOp int
|
type stateChangeOp int
|
||||||
|
@@ -3,7 +3,7 @@ package webrtc
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/pions/webrtc/pkg/rtcerr"
|
"github.com/pion/webrtc/pkg/rtcerr"
|
||||||
|
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user