aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Hubel2020-06-07 23:06:27 +0200
committerAndreas Hubel2020-06-07 23:22:57 +0200
commit71a9c867d101d9341b2e5a0b642d3b510c740a63 (patch)
treef6a0d136c6772e1c228b7127b2a7418d72ef5cfe
parent9fd02c1bfbf7d883b6351b0e0522e51b7cdfd1cf (diff)
netcut: bugfix / optimization
-rw-r--r--index.php2
-rw-r--r--template/relive-player-netcut.phtml16
2 files changed, 11 insertions, 7 deletions
diff --git a/index.php b/index.php
index 02fd136..b109937 100644
--- a/index.php
+++ b/index.php
@@ -70,8 +70,6 @@ try {
$route = rtrim($route, '/');
$GLOBALS['forceopen'] = isset($_GET['forceopen']);
- $GLOBALS['netcut'] = preg_match('@/cut$@', $route);
-
// generic template
$tpl = new PhpTemplate('template/page.phtml');
diff --git a/template/relive-player-netcut.phtml b/template/relive-player-netcut.phtml
index 7cdde6c..61a21b2 100644
--- a/template/relive-player-netcut.phtml
+++ b/template/relive-player-netcut.phtml
@@ -22,7 +22,15 @@
<div class="player-wrap">
<div id="webcut">
- <video class="video-js vjs-default-skin" id="video" preload="auto" data-setup="{}" controls autoplay style="min-height: 480px; width: 100%;" poster="<?=h($talk['thumbnail'])?>">
+ <video class="video-js vjs-default-skin vjs-16-9"
+ id="video" preload="auto" data-setup="{}" controls
+ style="min-height: 100px;"
+ poster="<?=h($talk['thumbnail'])?>"
+ data-sprites="<?= h($talk['sprites']['url']) ?>"
+ data-sprites-n="<?= h($talk['sprites']['n']) ?>"
+ data-sprites-cols="<?= h($talk['sprites']['cols']) ?>"
+ data-sprites-interval="<?= h($talk['sprites']['interval']) ?>"
+ >
<source src="<?= h(forceproto($talk['playlist'])) ?>" type="application/x-mpegURL">
</video>
</div>
@@ -38,10 +46,8 @@
<script type="text/javascript">
VIDEO_FPS = 25;
- //INFRAME = 5073;
- //OUTFRAME = 184746;
- INFRAME = 7179;
- OUTFRAME = 24687;
+ INFRAME = 900*25;
+ OUTFRAME = <?= ($talk['duration']-900)*25 ?>;
</script>
<script type="text/javascript" src="<?=h($assets)?>netcut/assets/script.js"></script>