aboutsummaryrefslogtreecommitdiff
path: root/template
diff options
context:
space:
mode:
authorMaZderMind2015-12-20 15:29:09 +0100
committerMaZderMind2015-12-20 15:29:09 +0100
commita439f454df31093157aaa773e549f5bacc5584c1 (patch)
treefe533d042b76213d0029753a7054090a2a8c5494 /template
parent82fcef7c4cd257c0ee3b666899542e033269af32 (diff)
implement new subtitles L2S2 interface
Diffstat (limited to '')
-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>