This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
peerConnection, err := webrtc.NewPeerConnection(webrtc.Configuration{}) | |
if err != nil { | |
panic(err) | |
} | |
// Allow us to receive 1 audio track, and 1 video track | |
if _, err = peerConnection.AddTransceiverFromKind(webrtc.RTPCodecTypeAudio, webrtc.RTPTransceiverInit{Direction: webrtc.RTPTransceiverDirectionRecvonly}); err != nil { | |
panic(err) | |
} else if _, err = peerConnection.AddTransceiverFromKind(webrtc.RTPCodecTypeVideo, webrtc.RTPTransceiverInit{Direction: webrtc.RTPTransceiverDirectionRecvonly}); err != nil { | |
panic(err) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const H264Codecs = RTCRtpReceiver.getCapabilities('video').codecs.sort((a, b) => { | |
if (a.mimeType.includes('H264') && b.mimeType.includes('H264')) { | |
return 0 | |
} else if (a.mimeType.includes('H264')) { | |
return -1 | |
} else { | |
return 1 | |
} | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module set-receiver-codec | |
go 1.18 | |
require github.com/pion/webrtc/v3 v3.1.41 | |
require ( | |
github.com/google/uuid v1.3.0 // indirect | |
github.com/pion/datachannel v1.5.2 // indirect | |
github.com/pion/dtls/v2 v2.1.5 // indirect |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module srtp | |
go 1.15 | |
require ( | |
github.com/pion/rtp v1.6.1 | |
github.com/pion/srtp v1.5.2 | |
github.com/pion/webrtc/v3 v3.0.0-beta.13 | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/binary" | |
"errors" | |
"io" | |
"os" | |
"github.com/pion/rtp/v2" | |
"github.com/pion/rtp/v2/codecs" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit c8ae82a0bdca9171d297b6fa9739225f4d2f399a | |
Author: Sean DuBois <sean@siobud.com> | |
Date: Mon Mar 21 14:28:00 2022 -0400 | |
Unlock on error in internal/mux | |
Resolves #2154 | |
commit 24c1ad6abcab1cb874a0767ec7a4d26a6a5e78d8 | |
Author: Pion <59523206+pionbot@users.noreply.github.com> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Live.go b/Live.go | |
index 0096cb7..0051ef4 100644 | |
--- a/Live.go | |
+++ b/Live.go | |
@@ -8,6 +8,7 @@ import ( | |
"runtime/debug" | |
"sync" | |
+ "github.com/pion/rtcp" | |
"github.com/pion/webrtc/v3" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"bytes" | |
"encoding/json" | |
"fmt" | |
"net/http" | |
"os" | |
"strings" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/peerconnection.go b/peerconnection.go | |
index a5d50ee..5dbf46e 100644 | |
--- a/peerconnection.go | |
+++ b/peerconnection.go | |
@@ -1313,28 +1313,6 @@ func (pc *PeerConnection) startSCTP() { | |
return | |
} | |
- | |
- // DataChannels that need to be opened now that SCTP is available |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/server/main.go b/server/main.go | |
index 3f5b52f..fecd6c5 100644 | |
--- a/server/main.go | |
+++ b/server/main.go | |
@@ -5,6 +5,7 @@ import ( | |
"fmt" | |
"io" | |
"log" | |
+ "net" | |
"net/http" |