Skip to content

Instantly share code, notes, and snippets.

Avatar
🙈
Lexi is the love of my life, I love her more then Daisy loves cheese

Sean DuBois Sean-Der

🙈
Lexi is the love of my life, I love her more then Daisy loves cheese
View GitHub Profile
View gist:3ccd8e76a95b7568ee97cf1fb526cbc9
I know X, what does WebRTC get me?
You already have working infrastructure. You know the ins and outs of your video protocol.
Everything is working, but you feel like things could work even better. If so, this talk is for you!
This talk explores all the things WebRTC could unlock for you. There could be solutions for problems you didn't
even realize were fixable!
I spend most of my time around WebRTC. I am usually helping people use it, so very biased. I wrote
Pion WebRTC, 'WebRTC for the Curious' and worked at AWS on a C implementation for Kinesis Video Streams.
View main.go
// +build !js
package main
import (
"fmt"
"net"
"github.com/pion/rtp"
"github.com/pion/rtp/codecs"
View gist:a16b50dbd0207f86274ad9dd05ab4287
RTCInboundRTPVideoStream_1558728573 (inbound-rtp)
Statistics RTCInboundRTPVideoStream_1558728573
timestamp 1/11/2021, 2:24:13 PM
ssrc 1558728573
isRemote false
mediaType video
kind video
trackId RTCMediaStreamTrack_receiver_5
transportId RTCTransport_0_1
codecId RTCCodec_1_Inbound_96
View gist:23ec80b959db43efad9243b8a4ba93a9
diff --git a/pkg/nack/responder_interceptor.go b/pkg/nack/responder_interceptor.go
index f4201ab..a4f8106 100644
--- a/pkg/nack/responder_interceptor.go
+++ b/pkg/nack/responder_interceptor.go
@@ -45,6 +45,7 @@ func NewResponderInterceptor(opts ...ResponderOption) (*ResponderInterceptor, er
// BindRTCPReader lets you modify any incoming RTCP packets. It is called once per sender/receiver, however this might
// change in the future. The returned method will be called once per packet batch.
func (n *ResponderInterceptor) BindRTCPReader(reader interceptor.RTCPReader) interceptor.RTCPReader {
+ panic("test")
return interceptor.RTCPReaderFunc(func(b []byte, a interceptor.Attributes) (int, interceptor.Attributes, error) {
View gist:285839e21df22de2362ca6958eaa5d88
diff --git a/go.mod b/go.mod
index c9f03e1..be25e8c 100644
--- a/go.mod
+++ b/go.mod
@@ -2,6 +2,8 @@ module github.com/pion/webrtc/v3
go 1.12
+replace github.com/pion/interceptor => /home/sean/go/src/github.com/pion/interceptor
+
View diff.patch
diff --git a/client/main.go b/client/main.go
index 95db8ec..bd65ae3 100644
--- a/client/main.go
+++ b/client/main.go
@@ -57,9 +57,17 @@ func main() {
panic("client expects server host+port")
}
+ i := 0
for range time.NewTicker(5 * time.Second).C {
View gist:d8f871fed60f4043502d37123f8c76a1
diff --git a/client/main.go b/client/main.go
index 95db8ec..bd65ae3 100644
--- a/client/main.go
+++ b/client/main.go
@@ -57,9 +57,17 @@ func main() {
panic("client expects server host+port")
}
+ i := 0
for range time.NewTicker(5 * time.Second).C {
View gist:5f703d80dd1061cc8a4d8b3ddc4a8fff
diff --git a/examples/rtp-forwarder/main.go b/examples/rtp-forwarder/main.go
index e16ef6e..51eb82f 100644
--- a/examples/rtp-forwarder/main.go
+++ b/examples/rtp-forwarder/main.go
@@ -25,9 +25,9 @@ func main() {
m := webrtc.MediaEngine{}
// Setup the codecs you want to use.
- // We'll use a VP8 and Opus but you can also define your own
+ // We'll use a H264 and Opus but you can also define your own
View pion-to-pion-media.patch
diff --git a/examples/pion-to-pion/answer/main.go b/examples/pion-to-pion/answer/main.go
index 81ad7c8..019acbb 100644
--- a/examples/pion-to-pion/answer/main.go
+++ b/examples/pion-to-pion/answer/main.go
@@ -53,6 +53,10 @@ func main() { // nolint:gocognit
panic(err)
}
+ peerConnection.OnTrack(func(track *webrtc.TrackRemote, receiver *webrtc.RTPReceiver) {
+ fmt.Printf("Track %s has started, of type %d: %s \n", track.ID(), track.PayloadType(), track.Codec().MimeType)
View main.go
package main
import (
"fmt"
"github.com/pion/webrtc/v3"
)
const freeSwitchOffer = `
v=0