Create push URL
The UpStream SDK is mainly used for live push of Real-Time Streaming (RTS). The SDK can push audio and video contents captured by the browser from the camera, screen, or a local media file to live streaming servers. The DownStream SDK mainly pulls streams from RTN for distribution to the viewing side
Basics
Read the following basics before the SDK integration:
Splicing the push URL
To use CloudHub live streaming services, you should splice the push URL in the following format, which contains 4 parts:
You haven’t your own domain names:
rtn://[AppID.streaming.cloudhub.vip]/StreamName?sign=tokentoken
- AppID: The system-generated AppID or the user’s AppID.
- streaming.cloudhub.vip : Default is Second-Domain of CloudHub
- StreamName:Stream name
- token:token
eg: AppID is " D3adAdfvA34432Sh",StreamName is “fifagame2021”,token is “"。 push URL is :
rtn://D3adAdfvA34432Sh.streaming.cloudhub.vip/fifagame2021
You have your own domain names:
rtn://Domain/StreamName+token
eg: Domain is abc.com(Note: your own domain names require legitimate domain name rules),StreamName is “fifagame2021”,push URL is :
rtn://abc.com/fifagame2021
Note:If the user’s incoming url is streaming.cloudhub.vip, the domain name is not defined and the AppID is obtained directly; If the user’s incoming url is not streaming.cloudhub.vip, the domain name is customized and the appID is locked according to the custom domain name
Splicing the pull URL
To use CloudHub live streaming services, you should splice the pull URL in the following format, which contains 3 parts:
You haven’t your own domain names:
rtn://[AppID.streaming.cloudhub.vip]/StreamName
- AppID:The system-generated AppID or the user’s AppID.
- streaming.cloudhub.vip: Default is Second-Domain of CloudHub
- StreamName:Stream Name
eg: AppID is “D3adAdfvA34432Sh”,StreamName is “fifagame2021” pull URL is :
rtn://D3adAdfvA34432Sh.streaming.cloudhub.vip/fifagame2021
You have your own domain names:
rtn://domain/StreamName
eg: domain is abc.com(Note: your own domain names require legitimate domain name rules),StreamName is “fifagame2021”, pull URL is : rtn://abc.com/fifagame2021
Note:If the user’s incoming url is streaming.cloudhub.vip, the domain name is not defined and the AppID is obtained directly; If the user’s incoming url is not streaming.cloudhub.vip, the domain name is customized and the appID is locked according to the custom domain name
Splicing the URL addresses after server mixing
To use CloudHub live streaming services, you should splice the URL after server mixing in the following format :
You haven’t your own domain names:
rtn://[AppID.streaming.cloudhub.vip]/mixed/StreamName
- AppID:The system-generated AppID or the user’s AppID.
- streaming.cloudhub.vip: Default is Second-Domain of CloudHub
- mixed: Placeholder
- StreamName:Stream Name
eg: AppID is “D3adAdfvA34432Sh”,StreamName is “fifagame2021” the URL after server mixing is :
rtn://D3adAdfvA34432Sh.streaming.cloudhub.vip/mixed/fifagame2021
You have your own domain names:
rtn://domain/mixed/StreamName
eg: domain is abc.com(Note: your own domain names require legitimate domain name rules),StreamName is “fifagame2021”, the URL after server mixing is : rtn://abc.com/mixed/fifagame2021
Note:If the user’s incoming url is streaming.cloudhub.vip, the domain name is not defined and the AppID is obtained directly; If the user’s incoming url is not streaming.cloudhub.vip, the domain name is customized and the appID is locked according to the custom domain name