2018-08-31 07:41:48 +02:00
|
|
|
<?php
|
|
|
|
/** @var App\Entity\Station $station */
|
2017-08-17 20:28:48 +02:00
|
|
|
|
2021-04-13 08:51:26 +02:00
|
|
|
$pageClasses = [];
|
2021-12-26 23:59:52 +01:00
|
|
|
$pageClasses[] = 'page-station-public-player-embed station-' . $station->getShortName();
|
2021-04-13 08:51:26 +02:00
|
|
|
$pageClasses[] = ($isSocial) ? 'embed-social' : 'embed';
|
|
|
|
|
2021-02-09 07:10:38 +01:00
|
|
|
$this->layout(
|
|
|
|
'minimal',
|
|
|
|
[
|
2021-04-13 08:51:26 +02:00
|
|
|
'page_class' => implode(' ', $pageClasses),
|
2021-02-09 07:10:38 +01:00
|
|
|
'title' => $this->e($station->getName()),
|
|
|
|
'hide_footer' => true,
|
|
|
|
]
|
|
|
|
);
|
2017-04-10 05:21:15 +02:00
|
|
|
|
2021-03-17 08:20:12 +01:00
|
|
|
$props = [
|
|
|
|
'initialNowPlaying' => $nowplaying,
|
|
|
|
'showAlbumArt' => !$customization->hideAlbumArt(),
|
2021-04-13 10:06:30 +02:00
|
|
|
'autoplay' => $autoplay,
|
2021-03-17 08:20:12 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
if ($customization->useWebSocketsForNowPlaying()) {
|
|
|
|
$props['useNchan'] = true;
|
|
|
|
$props['nowPlayingUri'] = '/api/live/nowplaying/' . urlencode($station->getShortName());
|
|
|
|
} else {
|
|
|
|
$props['useNchan'] = false;
|
|
|
|
$props['nowPlayingUri'] = (string)$router->named('api:nowplaying:index', ['station_id' => $station->getId()]);
|
|
|
|
}
|
|
|
|
|
2020-02-06 03:35:13 +01:00
|
|
|
/** @var \App\Assets $assets */
|
2021-03-17 08:20:12 +01:00
|
|
|
$assets->addVueRender('Vue_PublicPlayer', '#station-nowplaying', $props);
|
2017-09-24 13:29:19 +02:00
|
|
|
?>
|
2017-04-10 05:21:15 +02:00
|
|
|
|
2017-06-20 06:44:24 +02:00
|
|
|
<div class="stations nowplaying">
|
2020-10-15 12:01:32 +02:00
|
|
|
<div id="station-nowplaying"></div>
|
2017-04-10 05:21:15 +02:00
|
|
|
</div>
|