Initial Commit
This commit is contained in:
12
system/.htaccess
Normal file
12
system/.htaccess
Normal file
@ -0,0 +1,12 @@
|
||||
# DISABLE ACCESS TO THIS FOLDER
|
||||
|
||||
# Apache 2.4
|
||||
<IfModule mod_authz_core.c>
|
||||
Require all denied
|
||||
</IfModule>
|
||||
|
||||
# Apache 2.2
|
||||
<IfModule !mod_authz_core.c>
|
||||
Order Allow,Deny
|
||||
Deny from all
|
||||
</IfModule>
|
59
system/pages/play.php
Normal file
59
system/pages/play.php
Normal file
@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
class Page {
|
||||
|
||||
public function header() {
|
||||
|
||||
}
|
||||
|
||||
public function style() {
|
||||
$scss = new ScssPhp\ScssPhp\Compiler();
|
||||
$file = __DIR__."/../../assets/css/player.scss";
|
||||
echo $scss->compile(file_get_contents($file));
|
||||
|
||||
echo '
|
||||
main section#player audio::-webkit-media-controls {
|
||||
background-color: #000000BE;
|
||||
}
|
||||
|
||||
main section#player audio::-webkit-media-controls-enclosure {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
main section#player audio::-webkit-media-controls-play-button, main section#player audio::-webkit-media-controls-current-time-display, main section#player audio::-webkit-media-controls-time-remaining-display, main section#player audio::-webkit-media-controls-timeline, main section#player audio::-webkit-media-controls-mute-button, main section#player audio::-webkit-media-controls-volume-slider {
|
||||
filter: invert(100%);
|
||||
}
|
||||
';
|
||||
}
|
||||
|
||||
public function content() {
|
||||
|
||||
echo '
|
||||
<section id="schedule">
|
||||
|
||||
</section>
|
||||
|
||||
<section id="player">
|
||||
<a class="button" href="watch"><i class="fas fa-broadcast-tower"></i> Kurkista studioon</a>
|
||||
|
||||
';
|
||||
if(strpos($_SERVER['HTTP_USER_AGENT'], 'Chrome') !== false){
|
||||
echo '<audio id="ap" controls preload="none" controlsList="nodownload noplaybackrate">';
|
||||
} else {
|
||||
echo '<audio id="ap" controls preload="none">';
|
||||
}
|
||||
|
||||
echo '
|
||||
<source src="https://icecast.waren.io/play/pf4c-bsma-6dgd-cx98.mp3" type="audio/mpeg">
|
||||
<source src="https://icecast.waren.io/play/pf4c-bsma-6dgd-cx98.aac" type="audio/aac">
|
||||
<source src="https://icecast.waren.io/play/pf4c-bsma-6dgd-cx98.ogg" type="audio/ogg">
|
||||
<source src="https://icecast.waren.io/play/pf4c-bsma-6dgd-cx98.opus" type="audio/opus">
|
||||
<source src="https://icecast.waren.io/play/pf4c-bsma-6dgd-cx98.flac" type="audio/flac">
|
||||
</audio>
|
||||
</section>
|
||||
';
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
66
system/pages/program.php
Normal file
66
system/pages/program.php
Normal file
@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
class Page {
|
||||
|
||||
public function header() {
|
||||
|
||||
}
|
||||
|
||||
public function content() {
|
||||
|
||||
$file = __DIR__.'/../../datastore/program-fi.json';
|
||||
if(file_exists($file)){
|
||||
try {
|
||||
$programs = json_decode(file_get_contents($file), true);
|
||||
} catch (\Error $e) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
echo '
|
||||
<section id="program">
|
||||
';
|
||||
|
||||
foreach($programs as $program){
|
||||
/*
|
||||
echo '
|
||||
<article style="display: flex; flex-direction: row; height: 250px; padding: 25px; background-color: #111111; margin: 50px; border-radius: 25px;">
|
||||
<img src="assets/images/stream-layout.png" style="padding: 10px; margin: 25px; border-radius: 25px;">
|
||||
<header style="display: flex; flex-direction: column; text-align: left; align-items: initial;">
|
||||
<h3>'.$program['name'].'</h3>
|
||||
<p class="schedule">
|
||||
';
|
||||
if(isset($program['schedule'])){
|
||||
|
||||
foreach($program['schedule'] as $schedule){
|
||||
echo '<span style="background-color: #ffffff; border-radius: 25px; padding: 5px; color: #000000;">00.00.0000 klo 00:00</span> ';
|
||||
}
|
||||
|
||||
} else {
|
||||
echo '<span>Tulossa</span>';
|
||||
}
|
||||
|
||||
echo '</p>
|
||||
<p class="host">Juontaja: ';
|
||||
|
||||
foreach($program['host'] as $host){
|
||||
echo $host.', ';
|
||||
}
|
||||
|
||||
echo '</p>
|
||||
<p class="producer">Tuottaja: '.$program['producer'].'</p>
|
||||
</header>
|
||||
</article>
|
||||
';
|
||||
*/
|
||||
}
|
||||
|
||||
echo '
|
||||
</section>
|
||||
';
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
54
system/pages/watch.php
Normal file
54
system/pages/watch.php
Normal file
@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
class Page {
|
||||
|
||||
public function header() {
|
||||
|
||||
}
|
||||
|
||||
public function files(){
|
||||
echo '<link rel="stylesheet" href="https://cdn.cwinfo.net/frameworks/video-js/7.18.1/video-js.min.css" crossorigin="anonymous" media="screen">';
|
||||
echo '<script type="application/javascript" src="https://cdn.cwinfo.net/frameworks/video-js/7.18.1/video.min.js" crossorigin="anonymous"></script>';
|
||||
}
|
||||
|
||||
public function style() {
|
||||
$scss = new ScssPhp\ScssPhp\Compiler();
|
||||
$file = __DIR__."/../../assets/css/player.scss";
|
||||
echo $scss->compile(file_get_contents($file));
|
||||
|
||||
echo "
|
||||
main {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-top: 0px;
|
||||
}
|
||||
|
||||
main section#player {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
main section#player .video-js {
|
||||
width: 75vmin !important;
|
||||
}
|
||||
";
|
||||
}
|
||||
|
||||
public function content() {
|
||||
|
||||
echo '
|
||||
<section id="player">
|
||||
<video class="video-js" controls autoplay muted preload="auto" poster="assets/images/stream-layout.png" data-setup=\'{
|
||||
"inactivityTimeout": 0
|
||||
}\'>
|
||||
<source src="https://rtmp.waren.io/play/hls/pf4c-bsma-6dgd-cx98/index.m3u8" type="application/x-mpegURL">
|
||||
<source src="https://rtmp.waren.io/play/dash/pf4c-bsma-6dgd-cx98/index.mpd" type="application/dash+xml">
|
||||
</video>
|
||||
</section>
|
||||
';
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
Reference in New Issue
Block a user