I was trying to automate the live Streaming using Wowza Streaming Engine. For that, I installed the streaming engine in my AWS EC2 instance then I tried the following REST API for the create Application and I connected from the Wowza GoCoder using mobile.
When I do that I can’t the receive the distributed stream in JW player due to CORS error.
So I called a REST API to update the cors. But after that my wowza Gocoder couldn’t connect the application.
Let me know what I missed on my API calls.
Please find the create API
URL : http://52.37.27.133:8087/v2/servers/defaultServer/vhosts/defaultVHost/applications/may26-6
Method : POST
Body :
{
"restURI": "http://52.37.27.133:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/may26-6",
"name": "may26-6",
"appType": "Live",
"clientStreamReadAccess": "*",
"clientStreamWriteAccess": "*",
"description": "A basic live application",
"streamConfig": {
"restURI": "http://52.37.27.133:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/may26-6/streamconfiguration",
"streamType": "live-record-lowlatency",
"storageDirExists": "false",
"createStorageDir": "true",
"storageDir": "/usr/local/WowzaStreamingEngine/content/may26-6"
}
}
<br>
Update API
URL :http://52.37.27.133:8087/v2/servers/defaultServer/vhosts/defaultVHost/applications/may26-6/adv
Method : PUT
Body :
{
"restURI": "http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/may23-1/adv",
"version": "1430682096001",
"advancedSettings": [
{
"enabled": true,
"canRemove": true,
"name": "CORSHeadersEnableMain",
"value": "true",
"defaultValue": true,
"type": "Boolean",
"sectionName": "Application",
"section": "/Root/Application/HTTPStreamer",
"documented": true
},
{
"enabled": true,
"canRemove": true,
"name": "httpCORSHeadersEnabled",
"value": "true",
"defaultValue": true,
"type": "Boolean",
"sectionName": "Application",
"section": "/Root/Application/HTTPStreamer",
"documented": true
}
]
}
Thanks,
Ram