/** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param int $id * @return \Illuminate\Http\Response */ public function postUpdate(StoreStreamingServerRequest $request, $id) { try { $input = $request->input(); $input['enabled'] = isset($input['enabled']); $server = StreamingServer::find($id); $server->update($input); return redirect()->back()->with("status", "Streaming Server have been successfully updated."); } catch (Exception $e) { return redirect()->back()->with("error", "Creation error. Please check your inputs."); } }
function get_server_embed_code($server_id, Webinar $webinar) { $server = StreamingServer::find($server_id); $html = ' <div id="wowza" style="width:644px;height:276px;margin:0 auto;text-align:center"> <img src="/media/img/player/splash_black.jpg" height="276" width="548" style="cursor:pointer" /> </div> <script> $f("wowza", "http://releases.flowplayer.org/swf/flowplayer-3.2.18.swf", { clip: { url: "mp4:vod/demo.flowplayer/buffalo_soldiers.mp4", scaling: "fit", // configure clip to use hddn as our provider, referring to our rtmp plugin provider: "hddn" }, // streaming plugins are configured under the plugins node plugins: { // here is our rtmp plugin configuration hddn: { url: "flowplayer.rtmp-3.2.13.swf", // netConnectionUrl defines where the streams are found netConnectionUrl: "rtmp://' . $server->streaming_url . '/live/' . $webinar->uuid . '" } }, canvas: { backgroundGradient: "none" } }); </script>'; return $html; }