Skip to content

Commit

Permalink
Support RTMPS for multistream (#911)
Browse files Browse the repository at this point in the history
  • Loading branch information
leszko authored Oct 10, 2023
1 parent dd52162 commit 8e589ad
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions mapic/mistapiconnector_app.go
Original file line number Diff line number Diff line change
Expand Up @@ -533,8 +533,15 @@ func (mc *mac) reconcileMultistream(mistState clients.MistState) {
return key{stream: stream, target: target}
}
isMultistream := func(k key) bool {
return (strings.HasPrefix(k.stream, "video+") || strings.HasPrefix(k.stream, "videorec+")) &&
(strings.HasPrefix(strings.ToLower(k.target), "rtmp:") || strings.HasPrefix(strings.ToLower(k.target), "srt:"))
acceptedTargetPrefixes := []string{"rtmp:", "rtmps:", "srt:"}
if strings.HasPrefix(k.stream, "video+") || strings.HasPrefix(k.stream, "videorec+") {
for _, acceptedTargetPrefix := range acceptedTargetPrefixes {
if strings.HasPrefix(strings.ToLower(k.target), acceptedTargetPrefix) {
return true
}
}
}
return false
}

// Get the existing PUSH_AUTO from Mist
Expand Down

0 comments on commit 8e589ad

Please sign in to comment.