Browse Source

Added simple Setup guide

master
Shyim 7 years ago
parent
commit
666b18964f
  1. 3
      public/theme/src/components/ReCast/Streams/List.vue
  2. 42
      public/theme/src/components/ReCast/Streams/SetupStream.vue
  3. 6
      public/theme/src/routes/routes.js
  4. 6
      src/Controller/Streams.php
  5. 2
      src/Entity/Queue.php

3
public/theme/src/components/ReCast/Streams/List.vue

@ -12,7 +12,6 @@ @@ -12,7 +12,6 @@
<th>Live</th>
<th>Name</th>
<th>Endpoints</th>
<th>Stream Key</th>
<th>Action</th>
</tr>
</thead>
@ -21,8 +20,8 @@ @@ -21,8 +20,8 @@
<td><i class="fa fa-circle" :class="stream.live ? 'text-success' : 'text-danger'" aria-hidden="true"></i></td>
<td>{{ stream.name }}</td>
<td>{{ getProviders(stream) }}</td>
<td>{{ stream.streamKey }}</td>
<td>
<a :href="'#/ucp/streams/' + stream.id + '/setup'" class="btn btn-info">Setup</a>
<a :href="'#/ucp/streams/' + stream.id + '/endpoints'" class="btn btn-primary">Endpoints</a>
<a :href="'#/ucp/streams/' + stream.id + '/'" class="btn btn-secondary">Edit</a>
<a v-on:click="regenerateKey(stream)" class="btn btn-danger">Regenerate Stream Key</a>

42
public/theme/src/components/ReCast/Streams/SetupStream.vue

@ -0,0 +1,42 @@ @@ -0,0 +1,42 @@
<template>
<div class="content">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<h3>Setup</h3>
<fg-input label="URL" v-model="stream.streamUrl" disabled="true"></fg-input>
<fg-input label="Stream Key" v-model="stream.streamKey" disabled="true"></fg-input>
<h4>OBS</h4>
<ul>
<li>Go to File, Settings, Stream and choose as Stream Type "Custom Streaming Server"</li>
<li>Fill the Server and Stream Key in</li>
</ul>
<img src="https://i.imgur.com/ltaKXiy.png"/>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
stream: {}
}
},
mounted() {
this.axios.get('/streams/one?id=' + this.$route.params.id).then(response => {
this.stream = response.data;
});
}
}
</script>
<style>
</style>

6
public/theme/src/routes/routes.js

@ -11,6 +11,7 @@ import NotFound from '../components/GeneralViews/NotFoundPage.vue' @@ -11,6 +11,7 @@ import NotFound from '../components/GeneralViews/NotFoundPage.vue'
import Overview from 'src/components/ReCast/Overview.vue'
import ListStreams from 'src/components/ReCast/Streams/List.vue'
import EditStream from 'src/components/ReCast/Streams/EditStream.vue'
import SetupStream from 'src/components/ReCast/Streams/SetupStream.vue'
import ListEndpoints from 'src/components/ReCast/Endpoints/List.vue'
import EditEndpoint from 'src/components/ReCast/Endpoints/EditEndpoint.vue'
@ -52,6 +53,11 @@ const routes = [ @@ -52,6 +53,11 @@ const routes = [
component: ListEndpoints,
meta: {auth: true},
},
{
path: 'streams/:id/setup',
component: SetupStream,
meta: {auth: true},
},
{
path: 'streams/:streamId/endpoints/:id',
component: EditEndpoint,

6
src/Controller/Streams.php

@ -71,7 +71,11 @@ class Streams extends Controller @@ -71,7 +71,11 @@ class Streams extends Controller
return new Response('Access denied', 401);
}
return new JsonResponse($stream);
$host = parse_url($this->container->getParameter('appHost'), PHP_URL_HOST);
$data = $stream->jsonSerialize();
$data['streamUrl'] = sprintf('rtmp://%s/%s', $host, $stream->getUser()->getUsername() . '_' . $stream->getId());
return new JsonResponse($data);
}
/**

2
src/Entity/Queue.php

@ -18,7 +18,7 @@ class Queue @@ -18,7 +18,7 @@ class Queue
private $id;
/**
* @ORM\Column(type="string", length=100, unique=true)
* @ORM\Column(type="string", length=100)
* @var string
*/
private $task;

Loading…
Cancel
Save