Title says it all. I can create an application and I can send an incoming stream to the rtmp url just fine. But I can’t get outgoing playback to work (404 not found) until I log into the UI (enginemanager) re-save the settings (without changing them) and restarting the application. Only after the save and restart will HLS playback start loading.
My php code that successfully creates the application:
$url = "http://$publicIpAddress:8087/$this->wowzaEngineUrlPart/$siteName";
$data = [
'restURI' => "http://$publicIpAddress:8087/$this->wowzaEngineUrlPart/$siteName/",
"name" => $siteName,
"appType" => "Live",
"clientStreamReadAccess" => "*",
"clientStreamWriteAccess" => "*",
"clientStreamWriteAccess" => "*",
"description" => "A basic live application",
"httpCORSHeadersEnabled" => true,
"streamConfig" => [
"restURI" => "http://$publicIpAddress:8087/$this->wowzaEngineUrlPart/$siteName/streamconfiguration/",
"streamType" => "live",
],
];
// use key 'http' even if you send the request to https://...
$options = [
'http' => [
'header' => "Accept:application/json; charset=utf-8\r\n".
"Content-Type:application/json; charset=utf-8\r\n",
'method' => 'POST',
'content' => json_encode($data),
'timeout' => 60,
]
];
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
if ($result === FALSE) { /* Handle error */ }