mirror of
https://github.com/pion/webrtc.git
synced 2025-09-27 03:25:58 +08:00
New Track API
The Pion WebRTC API has been dramatically redesigned. The design docs are located here [0] You can also read the release notes [1] on how to migrate your application. [0] https://github.com/pion/webrtc-v3-design [1] https://github.com/pion/webrtc/wiki/Release-WebRTC@v3.0.0
This commit is contained in:
@@ -4,6 +4,8 @@ package webrtc
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestNewAPI(t *testing.T) {
|
||||
@@ -22,7 +24,7 @@ func TestNewAPI_Options(t *testing.T) {
|
||||
s := SettingEngine{}
|
||||
s.DetachDataChannels()
|
||||
m := MediaEngine{}
|
||||
m.RegisterDefaultCodecs()
|
||||
assert.NoError(t, m.RegisterDefaultCodecs())
|
||||
|
||||
api := NewAPI(
|
||||
WithSettingEngine(s),
|
||||
@@ -33,7 +35,7 @@ func TestNewAPI_Options(t *testing.T) {
|
||||
t.Error("Failed to set settings engine")
|
||||
}
|
||||
|
||||
if len(api.mediaEngine.codecs) == 0 {
|
||||
if len(api.mediaEngine.audioCodecs) == 0 || len(api.mediaEngine.videoCodecs) == 0 {
|
||||
t.Error("Failed to set media engine")
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user