mirror of
https://github.com/owncast/owncast.git
synced 2024-11-22 12:49:37 +03:00
Use onMetaData instead of setDataFrame to try to parse out RTMP
metadata. Closes #419
This commit is contained in:
parent
40e63546cb
commit
2abea78e3c
1 changed files with 2 additions and 2 deletions
|
@ -13,8 +13,8 @@ import (
|
|||
|
||||
func getInboundDetailsFromMetadata(metadata []interface{}) (models.RTMPStreamMetadata, error) {
|
||||
metadataComponentsString := fmt.Sprintf("%+v", metadata)
|
||||
if !strings.Contains(metadataComponentsString, "@setDataFrame") {
|
||||
return models.RTMPStreamMetadata{}, errors.New("Not a setDataFrame message")
|
||||
if !strings.Contains(metadataComponentsString, "onMetaData") {
|
||||
return models.RTMPStreamMetadata{}, errors.New("Not a onMetaData message")
|
||||
}
|
||||
re := regexp.MustCompile(`\{(.*?)\}`)
|
||||
submatchall := re.FindAllString(metadataComponentsString, 1)
|
||||
|
|
Loading…
Reference in a new issue