59 lines
1.6 KiB
PHTML
59 lines
1.6 KiB
PHTML
<?php
|
|
/**
|
|
* @var \App\Entity\Station $station
|
|
* @var \App\Customization $customization
|
|
*/
|
|
|
|
$this->layout(
|
|
'minimal',
|
|
[
|
|
'page_class' => 'page-station-public-player station-' . $station->getShortName(),
|
|
'title' => $this->e($station->getName()),
|
|
]
|
|
);
|
|
|
|
/** @var \App\Assets $assets */
|
|
$assets->addVueRender('Vue_PublicFullPlayer', '#public-radio-player', $props);
|
|
|
|
// Register PWA service worker
|
|
$swJsRoute = (string)$router->named('public:sw');
|
|
|
|
$assets->addInlineJs(
|
|
<<<JS
|
|
if ('serviceWorker' in navigator) {
|
|
window.addEventListener('load', function() {
|
|
navigator.serviceWorker.register('${swJsRoute}');
|
|
});
|
|
}
|
|
JS
|
|
);
|
|
|
|
$this->push('head');
|
|
?>
|
|
<link rel="manifest" href="<?= $router->fromHere('public:manifest') ?>">
|
|
|
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
|
<meta name="apple-mobile-web-app-title" content="<?= $this->e($station->getName() ?? '') ?>">
|
|
|
|
<meta property="og:title" content="<?= $this->e($station->getName() ?? '') ?>">
|
|
<meta property="og:url" content="<?= $this->e($station->getUrl() ?? '') ?>">
|
|
<meta property="og:image" content="<?= $defaultAlbumArt ?>">
|
|
|
|
<meta property="twitter:card" content="player">
|
|
<meta property="twitter:player" content="<?= $router->named(
|
|
'public:index',
|
|
['station_id' => $station->getShortName(), 'embed' => 'social'],
|
|
[],
|
|
true
|
|
) ?>">
|
|
<meta property="twitter:player:width" content="400">
|
|
<meta property="twitter:player:height" content="125">
|
|
<?php
|
|
$this->end();
|
|
?>
|
|
|
|
<div id="public-radio-player">
|
|
Loading...
|
|
</div>
|