Inserting AMF0 messages in RTMP Push Publisher | 0.17.3.0+
When re-streaming a live stream to another system using the RTMP protocol, you can insert AMF0 messages. Utilizing this feature, you can deliver messages such as subtitle insertions and advertisement markers to another system. The method for inserting messages is as follows:
If the Media Source received through the RTMP Provider includes a message, it will be automatically inserted.
You can dynamically insert messages using the REST API.
Inserting onTextData message
The onTextData message is used for various purposes, such as subtitle insertion and ad marker insertion.
API Interface
Request
POST /v1/vhosts{vhost}/apps/{app}/streams/{stream}:sendEvent
Header
Authorization: Basic {credentials}
# Authorization
Credentials for HTTP Basic Authentication created with <AccessToken>
Body
{
"eventFormat": "amf",
"events":[
{
"amfType": "onTextData",
"data": {
"key1": "value", // String Type
"key2": 354.1, // Number Type [Double]
"key3": true // Boolean Type [true | false]
}
}
]
}
POST /v1/vhosts{vhost}/apps/{app}/streams/{stream}:sendEvents
Header
Authorization: Basic {credentials}
# Authorization
Credentials for HTTP Basic Authentication created with <AccessToken>