Skip to content
Snippets Groups Projects
Verified Commit 3f8c7d42 authored by Andrej Ramašeuski's avatar Andrej Ramašeuski
Browse files

Automaticky nahravat vsechno

parent e5c400e6
No related branches found
No related tags found
No related merge requests found
Pipeline #5026 passed
......@@ -2,7 +2,7 @@ image: docker:19.03.12
variables:
DOCKER_TLS_CERTDIR: "/certs"
IMAGE_VER: 1.10.0
IMAGE_VER: 2.0.0
services:
- docker:19.03.12-dind
......
......@@ -24,6 +24,12 @@ rtmp {
hls_path /tmp/hls;
hls_fragment 15s;
record all;
record_suffix -%Y%m%d-%H%M%S.flv;
record_path /records;
record_unique on;
record_max_size 8000m;
recorder all {
record all manual;
record_suffix -%Y%m%d-%H%M%S.flv;
......
......@@ -11,7 +11,6 @@
<th data-field="id" data-visible="false">ID</th>
<th data-field="name" data-width="60" data-width-unit="%">Stream</th>
<th data-field="publish_user_name" data-width="30" data-width-unit="%">Vysílá</th>
<th data-field="recording" data-width="10" data-width-unit="%" data-formatter="formatterRecording">Nahrávání</th>
</tr>
</thead>
</table>
......@@ -19,39 +18,11 @@
<script>
$('#Streams').bootstrapTable({
onClickCell: function (field, value, row, $element) {
if ( field == 'recording' ) {
if ( row.is_recordable ) {
$.ajax({
method: 'put',
url: '/streams/' + row.id + '/recording',
data: { action: (value ? 'stop':'start') },
success: function(rc) {
$('#Streams').bootstrapTable('updateByUniqueId', {
id: row.id,
row: rc
});
}
});
}
}
else {
window.location.href = '/play/' + row.key;
}
window.location.href = '/play/' + row.key;
},
formatNoMatches: function() { return '<p class="text-4xl">Aktuálně neprobíhá žádné živé vysílání</p>' },
});
function formatterRecording(value, row) {
if ( value == 0 ) {
var title = row.is_recordable ? 'Zapnout nahrávání':'Vypnuto';
return '<i class="fa fa-toggle-off text-3xl" title="'+title+'"></i>';
}
else {
var title = row.is_recordable ? 'Vypnout nahrávání':'Zapnuto';
return '<i class="fa fa-toggle-on text-3xl" title="'+title+'"></i>';
}
}
function rowStyle(row, index) {
return {
css: {
......@@ -63,15 +34,6 @@ function rowStyle(row, index) {
function connect() {
var ws = new WebSocket('<%= $c->config->{ws_url} %>');
/*
ws.onopen = function() {
// subscribe to some channels
ws.send(JSON.stringify({
//.... some message the I must send when I connect ....
}));
};
*/
ws.onmessage = function (event) {
console.log(event.data);
$('#Streams').bootstrapTable('refresh', {silent: true})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment