Skip to content

Instantly share code, notes, and snippets.

🙈
Lexi is the love of my life, I love her more than she loves me

Sean DuBois Sean-Der

🙈
Lexi is the love of my life, I love her more than she loves me
Block or report user

Report or block Sean-Der

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View demo.js
/* eslint-env browser */
let pc = new RTCPeerConnection({
iceServers: [
{
urls: "stun:stun.l.google.com:19302"
}
]
});
let log = msg => {
View main.go
package main
import (
"fmt"
"time"
"github.com/pion/webrtc/v2"
"github.com/pion/webrtc/v2/examples/internal/signal"
)
View gist:14972d662ef8b2d105c440505171dda5
package main
import (
"fmt"
"time"
"github.com/pion/webrtc/v2"
"github.com/pion/webrtc/v2/examples/internal/signal"
)
@Sean-Der
Sean-Der / croc.diff
Created Nov 11, 2019
Pion DataChannel Bug + Croc
View croc.diff
diff --git a/src/webrtc/wasm/main.go b/src/webrtc/wasm/main.go
index 6048392..9b4eb6d 100644
--- a/src/webrtc/wasm/main.go
+++ b/src/webrtc/wasm/main.go
@@ -50,9 +50,11 @@ func createOfferer() (pc *webrtc.PeerConnection, err error) {
ordered := false
maxRetransmits := uint16(0)
+ var id uint16 = 5
options := &webrtc.DataChannelInit{
@Sean-Der
Sean-Der / main.go
Created Nov 11, 2019
Working Server + WASM Pion
View main.go
package main
import (
"fmt"
"github.com/pion/webrtc/v2"
)
func main() {
// Create two PeerConnections
View gist:fdf3458b0a322ad4a32d9e0c9d29adfb
package main
import (
"fmt"
"github.com/pion/webrtc/v2"
)
func main() {
// Create two PeerConnections
View dtls.diff
diff --git a/conn.go b/conn.go
index bf5a88e..33c805a 100644
--- a/conn.go
+++ b/conn.go
@@ -500,6 +500,7 @@ func (c *Conn) handleIncomingPacket(buf []byte) (*alert, error) {
}
if h.epoch < c.getRemoteEpoch() {
+ c.log.Debugf("retransmitting, got message from old epoch: %v %v", h.epoch, c.getRemoteEpoch())
if _, alertPtr, err := c.flightHandler(c); err != nil {
View gist:49b3d53d0e2b85d7dff1b82b9f3678ea
diff --git a/conn.go b/conn.go
index 1698b07..c45e131 100644
--- a/conn.go
+++ b/conn.go
@@ -570,6 +570,7 @@ func (c *Conn) handleIncomingPacket(buf []byte) (*alert, error) {
}
if h.epoch < c.getRemoteEpoch() {
+ c.log.Debugf("retransmitting, got message from old epoch: %v %v", h.epoch, c.getRemoteEpoch())
if _, alertPtr, err := c.flightHandler(c); err != nil {
View main.go
package main
import (
"fmt"
"time"
"github.com/pion/webrtc/v2"
"github.com/pion/webrtc/v2/examples/internal/signal"
)
View pion.diff
diff --git a/examples/pion-to-pion/answer/main.go b/examples/pion-to-pion/answer/main.go
index aa44fd7..d6a56e7 100644
--- a/examples/pion-to-pion/answer/main.go
+++ b/examples/pion-to-pion/answer/main.go
@@ -22,9 +22,12 @@ func main() {
config := webrtc.Configuration{
ICEServers: []webrtc.ICEServer{
{
- URLs: []string{"stun:stun.l.google.com:19302"},
+ URLs: []string{"turn:global.turn.twilio.com:443?transport=tcp"},
You can’t perform that action at this time.