Add WebRTC sources for Amazon Kinesis and Wyze
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
package webrtc
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/AlexxIT/go2rtc/pkg/core"
|
||||
"github.com/pion/webrtc/v3"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestClient(t *testing.T) {
|
||||
@@ -100,3 +101,10 @@ a=recvonly
|
||||
err = sender.ReplaceTrack(track)
|
||||
require.Nil(t, err)
|
||||
}
|
||||
|
||||
func TestUnmarshalICEServers(t *testing.T) {
|
||||
s := `[{"credential":"xxx","urls":"xxx","username":"xxx"},{"credential":null,"urls":"xxx","username":null}]`
|
||||
servers, err := UnmarshalICEServers([]byte(s))
|
||||
require.Nil(t, err)
|
||||
require.Len(t, servers, 2)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user