mirror of
https://github.com/pion/webrtc.git
synced 2025-10-20 05:54:45 +08:00
Remove RTC prefix from all names
Let's pull off the bandaid! * Reduces studdering: webrtc.RTCTrack -> webrtc.Track * Makes it easier to find types by editor autocomplete * Makes code read more fluently (less repetition) Since we're breaking the API in 2.0, our only chance to do this is now. Relates to #408
This commit is contained in:
@@ -14,8 +14,8 @@ func main() {
|
||||
// Everything below is the pion-WebRTC API! Thanks for using it ❤️.
|
||||
|
||||
// Prepare the configuration
|
||||
config := webrtc.RTCConfiguration{
|
||||
IceServers: []webrtc.RTCIceServer{
|
||||
config := webrtc.Configuration{
|
||||
ICEServers: []webrtc.ICEServer{
|
||||
{
|
||||
URLs: []string{"stun:stun.l.google.com:19302"},
|
||||
},
|
||||
@@ -23,7 +23,7 @@ func main() {
|
||||
}
|
||||
|
||||
// Create a new RTCPeerConnection
|
||||
peerConnection, err := webrtc.NewRTCPeerConnection(config)
|
||||
peerConnection, err := webrtc.NewPeerConnection(config)
|
||||
util.Check(err)
|
||||
|
||||
// Create a datachannel with label 'data'
|
||||
@@ -73,7 +73,7 @@ func main() {
|
||||
fmt.Println(util.Encode(offer))
|
||||
|
||||
// Wait for the answer to be pasted
|
||||
answer := webrtc.RTCSessionDescription{}
|
||||
answer := webrtc.SessionDescription{}
|
||||
util.Decode(util.MustReadStdin(), &answer)
|
||||
|
||||
// Apply the answer as the remote description
|
||||
|
Reference in New Issue
Block a user