mirror of
https://github.com/owncast/owncast.git
synced 2024-11-25 22:31:09 +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) {
|
func getInboundDetailsFromMetadata(metadata []interface{}) (models.RTMPStreamMetadata, error) {
|
||||||
metadataComponentsString := fmt.Sprintf("%+v", metadata)
|
metadataComponentsString := fmt.Sprintf("%+v", metadata)
|
||||||
if !strings.Contains(metadataComponentsString, "@setDataFrame") {
|
if !strings.Contains(metadataComponentsString, "onMetaData") {
|
||||||
return models.RTMPStreamMetadata{}, errors.New("Not a setDataFrame message")
|
return models.RTMPStreamMetadata{}, errors.New("Not a onMetaData message")
|
||||||
}
|
}
|
||||||
re := regexp.MustCompile(`\{(.*?)\}`)
|
re := regexp.MustCompile(`\{(.*?)\}`)
|
||||||
submatchall := re.FindAllString(metadataComponentsString, 1)
|
submatchall := re.FindAllString(metadataComponentsString, 1)
|
||||||
|
|
Loading…
Reference in a new issue