Manual negotiation and plan-b support

This commit is contained in:
David Zhao
2021-04-16 00:56:25 -07:00
parent 04f6b61ae1
commit 93d10b2640
16 changed files with 231 additions and 64 deletions
+3 -3
View File
@@ -17,15 +17,15 @@ const (
trackIdSeparator = "|"
)
func UnpackTrackId(packed string) (peerId string, trackId string) {
func UnpackStreamID(packed string) (peerId string, trackId string) {
parts := strings.Split(packed, trackIdSeparator)
if len(parts) > 1 {
return parts[0], packed[len(parts[0])+1:]
}
return "", packed
return packed, ""
}
func PackTrackId(participantId, trackId string) string {
func PackStreamID(participantId, trackId string) string {
return participantId + trackIdSeparator + trackId
}