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

Pocitadlo sledujicich

parent 2f02e955
No related branches found
No related tags found
No related merge requests found
Pipeline #7381 passed
...@@ -2,7 +2,6 @@ image: docker:20.10.9 ...@@ -2,7 +2,6 @@ image: docker:20.10.9
variables: variables:
DOCKER_TLS_CERTDIR: "/certs" DOCKER_TLS_CERTDIR: "/certs"
IMAGE_VER: 2.2.3
services: services:
- docker:20.10.9-dind - docker:20.10.9-dind
...@@ -13,7 +12,8 @@ before_script: ...@@ -13,7 +12,8 @@ before_script:
build: build:
stage: build stage: build
script: script:
- VERSION=`cat VERSION`
- docker pull $CI_REGISTRY_IMAGE:latest || true - docker pull $CI_REGISTRY_IMAGE:latest || true
- docker build --cache-from $CI_REGISTRY_IMAGE:latest --tag $CI_REGISTRY_IMAGE:$IMAGE_VER --tag $CI_REGISTRY_IMAGE:latest . - docker build --cache-from $CI_REGISTRY_IMAGE:latest --tag $CI_REGISTRY_IMAGE:$VERSION --tag $CI_REGISTRY_IMAGE:latest .
- docker push $CI_REGISTRY_IMAGE:$IMAGE_VER - docker push $CI_REGISTRY_IMAGE:$VERSION
- docker push $CI_REGISTRY_IMAGE:latest - docker push $CI_REGISTRY_IMAGE:latest
2.3.0
...@@ -7,9 +7,13 @@ ...@@ -7,9 +7,13 @@
<script src="/js/videojs-flvjs.min.js"></script> <script src="/js/videojs-flvjs.min.js"></script>
% } % }
<div id="VideoContainer">
<video id="player" class="video-js vjs-default-skin"> <video id="player" class="video-js vjs-default-skin">
<source src="<%= $src %>" type="<%= $live ? 'application/x-mpegURL':'video/flv' %>" /> <source src="<%= $src %>" type="<%= $live ? 'application/x-mpegURL':'video/flv' %>" />
</video> </video>
<div class="Info">Počet sledujících: <span id="Watchers">0</span></div>
</div>
<script> <script>
...@@ -50,3 +54,15 @@ player.ready(function() { ...@@ -50,3 +54,15 @@ player.ready(function() {
</script> </script>
<style>
.Info {
padding: .2em;
margin-top: 1px;
background-color: #000;
font-size: 80%;
color: #fff;
text-align: right;
}
</style>
...@@ -12,6 +12,7 @@ function connect() { ...@@ -12,6 +12,7 @@ function connect() {
ws.onmessage = function (event) { ws.onmessage = function (event) {
var data = JSON.parse(event.data) var data = JSON.parse(event.data)
if ( typeof data.watchers !== 'undefined' ) { if ( typeof data.watchers !== 'undefined' ) {
$('#Watchers').text(data.watchers);
console.log(data); console.log(data);
} }
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment