diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 30c510f1807da28a412e283488e002f11b32b428..3dfe9d5240096ffba1775d88d5fbcfbfde7cb791 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 diff --git a/nginx.conf b/nginx.conf index 0460dd10e88c9fad2e5198e6a2835d8c649fda92..fa8f8b612590d2281cc5b4935f1c5cb00784b446 100644 --- a/nginx.conf +++ b/nginx.conf @@ -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; diff --git a/templates/live.html.ep b/templates/live.html.ep index 4b360ad2b77cb0dcbfca03550c72bfe6f3048ad9..227814696c9c685744e599f6465cf27264b24880 100644 --- a/templates/live.html.ep +++ b/templates/live.html.ep @@ -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})