Example #1
0
 public IActionResult StartStream([FromBody] StartStreamModel streamInfo)
 {
     try
     {
         var stream = new Stream
         {
             Title        = streamInfo.Title,
             Description  = streamInfo.Description,
             BroadcastUri = streamInfo.StreamUri
         };
         stream = _streamService.StartStream(stream, streamInfo.Broadcaster);
         return(Ok(stream));
     }
     catch (Exception e)
     {
         PrintException(e);
         return(BadRequest(new { message = e.Message }));
     }
 }
Example #2
0
 public void StartStream(string stream)
 {
     _streamService.StartStream(stream, Response, Request);
 }