aboutsummaryrefslogtreecommitdiff
path: root/template
diff options
context:
space:
mode:
Diffstat (limited to 'template')
-rw-r--r--template/assemblies/player/video.phtml6
-rw-r--r--template/page.phtml14
2 files changed, 17 insertions, 3 deletions
diff --git a/template/assemblies/player/video.phtml b/template/assemblies/player/video.phtml
index 9149a4f..cbbf06b 100644
--- a/template/assemblies/player/video.phtml
+++ b/template/assemblies/player/video.phtml
@@ -1,4 +1,8 @@
-<div style="max-width: <?=h($stream->getVideoWidth())?>px; max-height: <?=h($stream->getVideoHeight())?>px;" class="video-wrap">
+<div
+ style="max-width: <?=h($stream->getVideoWidth())?>px; max-height: <?=h($stream->getVideoHeight())?>px;"
+ class="video-wrap <? if($room->hasSubtitles()): ?>has-subtitles<? endif ?>"
+ data-subtitles-room-id="<?=h($room->getSubtitlesRoomId())?>"
+>
<video
<? if(!isset($autoplay) || $autoplay == true): ?>
autoplay="autoplay"
diff --git a/template/page.phtml b/template/page.phtml
index ae797c0..a358a27 100644
--- a/template/page.phtml
+++ b/template/page.phtml
@@ -42,6 +42,10 @@
<script type="text/javascript" src="<?=h($assets)?>mejs/mediaelement-and-player.min.js"></script>
<script type="text/javascript" src="<?=h($assets)?>js/lustiges-script.js"></script>
+
+ <? if(isset($subtitles) && $subtitles->isEnabled()): ?>
+ <script type="text/javascript" src="<?=h($assets)?>js/lustige-subtitles.js"></script>
+ <? endif ?>
</head>
<body class="<?=h(is_numeric($page[0]) ? 'e'.$page : $page)?>">
<? if(!@$naked): ?>
@@ -54,10 +58,16 @@
<? include("$assemblies/footer.phtml") ?>
<? endif ?>
- <? if(isset($schedule)): ?>
- <span class="js-settings"
+ <? if(isset($schedule) && $schedule->isEnabled()): ?>
+ <span class="js-schedule-settings"
data-scheduleoffset="<?=h($schedule->getSimulationOffset())?>"
></span>
<? endif ?>
+ <? if(isset($subtitles) && $subtitles->isEnabled()): ?>
+ <span class="js-subtitles-settings"
+ data-primus-url="<?=h($subtitles->getPrimusURL())?>"
+ data-frontend-url="<?=h($subtitles->getFrontendURL())?>"
+ ></span>
+ <? endif ?>
</body>
</html>