commit cc46f8fff44214115b348bab1db334bfe8e223f7 Author: Christer Warén Date: Wed May 18 12:31:00 2022 +0300 Initial Commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..67f6704 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/system/libs/ diff --git a/.htaccess b/.htaccess new file mode 100755 index 0000000..c9653c2 --- /dev/null +++ b/.htaccess @@ -0,0 +1,17 @@ +ServerSignature off + +#Deny displaying directory tree +IndexIgnore */* +Options -Indexes + + +RewriteEngine On + +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d +RewriteRule ^(.*)$ index.php [NC,L,QSA] + + + +#(c)2020-2022 Waren Group +#Last updated: 24.4.2022 diff --git a/assets/css/main.scss b/assets/css/main.scss new file mode 100644 index 0000000..3adc55f --- /dev/null +++ b/assets/css/main.scss @@ -0,0 +1,69 @@ +body { + background-image: linear-gradient(to bottom right, #7f00be, #0080bf); + background-color: #0080bf; + width: 100vw; + height: 100vh; + margin: 0; + text-align: center; + display: grid; + grid-template-columns: 1fr; + grid-template-rows: 120px 1fr 60px; +} + +*, *:active, *:focus, *:hover, *:visited, *:link { + color: #ffffff; +} + +* { + font-family: sans-serif; + max-width: 100%; + max-height: 100%; +} + +h1 { + margin-bottom: 0px; + margin-top: 0px; +} + +p { + margin-top: 0px; +} + +a { + text-decoration: none; +} + +header, footer { + background-color: #111111; + display: flex; + align-items: center; + justify-content: center; + + a { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + flex: 1; + height: 100%; + font-size: large; + + span { + font-weight: bold; + font-size: small; + } + + img { + height: 50%; + user-select: text; + } + } + + a:focus, a:hover { + background-color: #222222; + } +} + +nav { + display: none; +} diff --git a/assets/css/player.scss b/assets/css/player.scss new file mode 100644 index 0000000..15731b4 --- /dev/null +++ b/assets/css/player.scss @@ -0,0 +1,95 @@ +main { + display: flex; + flex-direction: column; + justify-content: space-between; + + section#schedule { + } + + section#player { + max-width: 100%; + overflow: hidden; + + .button { + background-color: #00000099; + display: flex; + width: 100%; + height: 40px; + font-weight: bold; + align-items: center; + justify-content: center; + } + + .button:focus, .button:hover { + background-color: #00000066; + } + + .button i { + margin-right: 5px; + } + + audio { + display: block; + width: 100%; + } + + video { + width: 100%; + height: initial !important; + } + + .video-js { + width: 100% !important; + height: initial !important; + border: 5px solid #222222; + } + + .video-js .vjs-tech { + position: initial !important; + top: initial !important; + left: initial !important; + } + + .video-js .vjs-control-bar { + position: initial !important; + opacity: 1 !important; + } + + .video-js .vjs-error-display { + display: none; + } + + .video-js .vjs-big-play-button { + top: 50%; + left: 50%; + margin-left: -1em; + margin-top: -1em; + width: 2em; + height: 2em; + line-height: 2em; + border: none; + border-radius: 50%; + font-size: 3.5em; + background-color: rgba(0,0,0,.45); + color: #fff; + -webkit-transition: border-color .4s,outline .4s,background-color .4s; + -moz-transition: border-color .4s,outline .4s,background-color .4s; + -ms-transition: border-color .4s,outline .4s,background-color .4s; + -o-transition: border-color .4s,outline .4s,background-color .4s; + transition: border-color .4s,outline .4s,background-color .4s + } + + .video-js .vjs-big-play-button { + background-color: rgba(0,0,0,0.45); + font-size: 2.5em; + border-radius: 50%; + height: 2em !important; + line-height: 2em !important; + margin-top: -1em !important + } + + .video-js:hover .vjs-big-play-button,.video-js .vjs-big-play-button:focus,.video-js .vjs-big-play-button:active { + background-color: rgba(0,199,248,0.9) + } + } +} diff --git a/assets/images/favicon.png b/assets/images/favicon.png new file mode 100644 index 0000000..69662aa Binary files /dev/null and b/assets/images/favicon.png differ diff --git a/assets/images/favicon.svg b/assets/images/favicon.svg new file mode 100644 index 0000000..d8c971a --- /dev/null +++ b/assets/images/favicon.svg @@ -0,0 +1,239 @@ + + + + + Opiskelijaradio – Logo + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Opiskelijaradio – Logo + 2022-04-22 + + + Christer Warén + + + + + Warén Group + + + + + + diff --git a/assets/images/logo.svg b/assets/images/logo.svg new file mode 100644 index 0000000..e196b4f --- /dev/null +++ b/assets/images/logo.svg @@ -0,0 +1,203 @@ + + + + + Opiskelijaradio – Logo + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Opiskelijaradio – Logo + 2022-04-22 + + + Christer Warén + + + + + Warén Group + + + + + + diff --git a/assets/images/pwa.png b/assets/images/pwa.png new file mode 100644 index 0000000..fdb5c81 Binary files /dev/null and b/assets/images/pwa.png differ diff --git a/assets/images/stream-layout.png b/assets/images/stream-layout.png new file mode 100644 index 0000000..0ccbf2d Binary files /dev/null and b/assets/images/stream-layout.png differ diff --git a/assets/js/javascriptSupportCookie.js b/assets/js/javascriptSupportCookie.js new file mode 100644 index 0000000..ed15bc6 --- /dev/null +++ b/assets/js/javascriptSupportCookie.js @@ -0,0 +1,3 @@ +$(document).ready(function(){ + document.cookie = "javascriptSupport=1; path=/; domain=" + location.hostname + "; secure"; +}); diff --git a/assets/js/unmuteAudio.js b/assets/js/unmuteAudio.js new file mode 100644 index 0000000..d565b8d --- /dev/null +++ b/assets/js/unmuteAudio.js @@ -0,0 +1,10 @@ +$(document).ready(function(){ + var ap = document.getElementById("ap"); + + var timer = setInterval(()=>{ + if(ap.readyState === 4){ + ap.muted = false; + clearInterval(timer); + } + },5000); +}); diff --git a/assets/js/unmuteVideo.js b/assets/js/unmuteVideo.js new file mode 100644 index 0000000..082b666 --- /dev/null +++ b/assets/js/unmuteVideo.js @@ -0,0 +1,10 @@ +$(document).ready(function(){ + var video = document.getElementById("vjs_video_3_html5_api"); + + var timer = setInterval(()=>{ + if(video.readyState === 4){ + video.muted = false; + clearInterval(timer); + } + },5000); +}); diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..5b9940a --- /dev/null +++ b/composer.json @@ -0,0 +1,37 @@ +{ + "name": "warengroup/opiskelijaradio-app", + "description": "Satakunnan opiskelijaradio", + "version": "0.0.0", + "homepage": "https://opiskelijaradio.fi/app", + "time": "2022-00-00", + "license": "proprietary", + "authors": [ + { + "name": "Warén Group", + "email": "support@waren.io", + "homepage": "https://waren.io", + "role": "Organization" + }, + { + "name": "Christer Warén", + "email": "christer.waren@waren.io", + "homepage": "https://christerwaren.fi", + "role": "Developer" + } + ], + "support": { + "email": "support@waren.io", + "issues": "https://git.waren.io/warengroup-private/opiskelijaradio-app/issues", + "irc": "irc://irc.waren.io/opiskelijaradio-app", + "source": "https://git.waren.io/warengroup-private/opiskelijaradio-app" + }, + "config": { + "vendor-dir": "system/libs" + }, + "require": { + "php": "^7.4|^8.0", + "scssphp/scssphp": "^1.4.1", + "guzzlehttp/guzzle": "^6.3|^7.2" + }, + "repositories": [] +} diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..1d4c823 --- /dev/null +++ b/composer.lock @@ -0,0 +1,689 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "cc720c7a1afeed004a033b84719b6d7f", + "packages": [ + { + "name": "guzzlehttp/guzzle", + "version": "7.4.2", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "ac1ec1cd9b5624694c3a40be801d94137afb12b4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/ac1ec1cd9b5624694c3a40be801d94137afb12b4", + "reference": "ac1ec1cd9b5624694c3a40be801d94137afb12b4", + "shasum": "" + }, + "require": { + "ext-json": "*", + "guzzlehttp/promises": "^1.5", + "guzzlehttp/psr7": "^1.8.3 || ^2.1", + "php": "^7.2.5 || ^8.0", + "psr/http-client": "^1.0", + "symfony/deprecation-contracts": "^2.2 || ^3.0" + }, + "provide": { + "psr/http-client-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.4.1", + "ext-curl": "*", + "php-http/client-integration-tests": "^3.0", + "phpunit/phpunit": "^8.5.5 || ^9.3.5", + "psr/log": "^1.1 || ^2.0 || ^3.0" + }, + "suggest": { + "ext-curl": "Required for CURL handler support", + "ext-intl": "Required for Internationalized Domain Name (IDN) support", + "psr/log": "Required for using the Log middleware" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "7.4-dev" + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Jeremy Lindblom", + "email": "jeremeamia@gmail.com", + "homepage": "https://github.com/jeremeamia" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "psr-18", + "psr-7", + "rest", + "web service" + ], + "support": { + "issues": "https://github.com/guzzle/guzzle/issues", + "source": "https://github.com/guzzle/guzzle/tree/7.4.2" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", + "type": "tidelift" + } + ], + "time": "2022-03-20T14:16:28+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "1.5.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/fe752aedc9fd8fcca3fe7ad05d419d32998a06da", + "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "symfony/phpunit-bridge": "^4.4 || ^5.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.5-dev" + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "support": { + "issues": "https://github.com/guzzle/promises/issues", + "source": "https://github.com/guzzle/promises/tree/1.5.1" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", + "type": "tidelift" + } + ], + "time": "2021-10-22T20:56:57+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "2.2.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "c94a94f120803a18554c1805ef2e539f8285f9a2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/c94a94f120803a18554c1805ef2e539f8285f9a2", + "reference": "c94a94f120803a18554c1805ef2e539f8285f9a2", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.0", + "ralouphie/getallheaders": "^3.0" + }, + "provide": { + "psr/http-factory-implementation": "1.0", + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.4.1", + "http-interop/http-factory-tests": "^0.9", + "phpunit/phpunit": "^8.5.8 || ^9.3.10" + }, + "suggest": { + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://sagikazarmark.hu" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ], + "support": { + "issues": "https://github.com/guzzle/psr7/issues", + "source": "https://github.com/guzzle/psr7/tree/2.2.1" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", + "type": "tidelift" + } + ], + "time": "2022-03-20T21:55:58+00:00" + }, + { + "name": "psr/http-client", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-client.git", + "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", + "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0", + "psr/http-message": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Client\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP clients", + "homepage": "https://github.com/php-fig/http-client", + "keywords": [ + "http", + "http-client", + "psr", + "psr-18" + ], + "support": { + "source": "https://github.com/php-fig/http-client/tree/master" + }, + "time": "2020-06-29T06:28:15+00:00" + }, + { + "name": "psr/http-factory", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-factory.git", + "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "shasum": "" + }, + "require": { + "php": ">=7.0.0", + "psr/http-message": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for PSR-7 HTTP message factories", + "keywords": [ + "factory", + "http", + "message", + "psr", + "psr-17", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-factory/tree/master" + }, + "time": "2019-04-30T12:38:16+00:00" + }, + { + "name": "psr/http-message", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/master" + }, + "time": "2016-08-06T14:39:51+00:00" + }, + { + "name": "ralouphie/getallheaders", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "120b605dfeb996808c31b6477290a714d356e822" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "support": { + "issues": "https://github.com/ralouphie/getallheaders/issues", + "source": "https://github.com/ralouphie/getallheaders/tree/develop" + }, + "time": "2019-03-08T08:55:37+00:00" + }, + { + "name": "scssphp/scssphp", + "version": "v1.10.2", + "source": { + "type": "git", + "url": "https://github.com/scssphp/scssphp.git", + "reference": "387f4f4abf5d99f16be16314c5ab856f81c82f46" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/scssphp/scssphp/zipball/387f4f4abf5d99f16be16314c5ab856f81c82f46", + "reference": "387f4f4abf5d99f16be16314c5ab856f81c82f46", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-json": "*", + "php": ">=5.6.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.4", + "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.3 || ^9.4", + "sass/sass-spec": "*", + "squizlabs/php_codesniffer": "~3.5", + "symfony/phpunit-bridge": "^5.1", + "thoughtbot/bourbon": "^7.0", + "twbs/bootstrap": "~5.0", + "twbs/bootstrap4": "4.6.1", + "zurb/foundation": "~6.5" + }, + "suggest": { + "ext-iconv": "Can be used as fallback when ext-mbstring is not available", + "ext-mbstring": "For best performance, mbstring should be installed as it is faster than ext-iconv" + }, + "bin": [ + "bin/pscss" + ], + "type": "library", + "autoload": { + "psr-4": { + "ScssPhp\\ScssPhp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Anthon Pang", + "email": "apang@softwaredevelopment.ca", + "homepage": "https://github.com/robocoder" + }, + { + "name": "Cédric Morin", + "email": "cedric@yterium.com", + "homepage": "https://github.com/Cerdic" + } + ], + "description": "scssphp is a compiler for SCSS written in PHP.", + "homepage": "http://scssphp.github.io/scssphp/", + "keywords": [ + "css", + "less", + "sass", + "scss", + "stylesheet" + ], + "support": { + "issues": "https://github.com/scssphp/scssphp/issues", + "source": "https://github.com/scssphp/scssphp/tree/v1.10.2" + }, + "time": "2022-03-02T21:15:09+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v3.0.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", + "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", + "shasum": "" + }, + "require": { + "php": ">=8.0.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-01-02T09:55:41+00:00" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": "^7.4|^8.0" + }, + "platform-dev": [], + "plugin-api-version": "2.3.0" +} diff --git a/composer.sh b/composer.sh new file mode 100644 index 0000000..81c9145 --- /dev/null +++ b/composer.sh @@ -0,0 +1,4 @@ +docker run --rm --interactive --tty \ + --volume "$PWD":/app \ + --user $(id -u):$(id -g) \ + composer update diff --git a/datastore/program-fi.json b/datastore/program-fi.json new file mode 100644 index 0000000..a51861a --- /dev/null +++ b/datastore/program-fi.json @@ -0,0 +1,38 @@ +[ + { + "name": "Lorem ipsum dolor 1", + "image": "", + "schedule": [ + { + "day": "2022-04-28", + "time": "12:00-15:00" + }, + { + "day": "2022-05-05", + "time": "12:00-15:00" + } + ], + "host": [ "Tarvo Somerkoski", "Miko Koivula", "Raimo Manninen" ], + "producer": "Santeri Vainio" + }, + { + "name": "Lorem ipsum dolor 2", + "schedule": [ + { + "day": "2022-05-18", + "time": "00:00-4:00", + "reoccurence": { + "cycle": "weekly", + "until": "2022-06-01" + } + } + ], + "host": [ "Olavi Immonen" ], + "producer": "Kaisa Varis" + }, + { + "name": "Lorem ipsum dolor 3", + "host": [ "Saija Rissanen", "Asseri Laakso" ], + "producer": "Daniel Lipponen" + } +] \ No newline at end of file diff --git a/index.php b/index.php new file mode 100644 index 0000000..58b3a5e --- /dev/null +++ b/index.php @@ -0,0 +1,150 @@ +header(); + } +} + +?> + + + + Satakunnan opiskelijaradio + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + files(); + } + ?> + + +
+ Satakunnan opiskelijaradio +
+ + + +
+ content(); + } + ?> +
+ + + + + + diff --git a/pwa.json b/pwa.json new file mode 100644 index 0000000..ed10157 --- /dev/null +++ b/pwa.json @@ -0,0 +1,24 @@ +{ + "name": "Satakunnan opiskelijaradio", + "short_name": "Satakunnan opiskelijaradio", + "description": "Tehdään yhdessä satakuntalainen opiskelijaradio!", + "start_url": "index.html", + "id": "satakunnan-opiskelijaradio", + "display": "standalone", + "background_color": "#0080bf", + "theme_color": "#0080bf", + "icons": [ + { + "src": "assets/images/favicon.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "assets/images/pwa.png", + "sizes": "192x192", + "type": "image/png", + "purpose": "maskable" + } + ], + "categories": ["education", "entertainment", "lifestyle", "music", "news"] +} diff --git a/station.json b/station.json new file mode 100644 index 0000000..ec2ae6b --- /dev/null +++ b/station.json @@ -0,0 +1,17 @@ +[ + { + "name": "Satakunnan opiskelijaradio", + "owner": "Satakunnan opiskelijaradio", + "logo": "", + "stream": { + "default": "mp3", + "mp3": "https://icecast.waren.io/play/pf4c-bsma-6dgd-cx98.mp3", + "aac": "https://icecast.waren.io/play/pf4c-bsma-6dgd-cx98.aac", + "ogg": "https://icecast.waren.io/play/pf4c-bsma-6dgd-cx98.ogg", + "opus": "https://icecast.waren.io/play/pf4c-bsma-6dgd-cx98.opus", + "flac": "https://icecast.waren.io/play/pf4c-bsma-6dgd-cx98.flac", + "m3u8": "https://rtmp.waren.io/play/hls/pf4c-bsma-6dgd-cx98/index.m3u8", + "mpd": "https://rtmp.waren.io/play/dash/pf4c-bsma-6dgd-cx98/index.mpd" + } + } +] diff --git a/system/.htaccess b/system/.htaccess new file mode 100644 index 0000000..4200e7b --- /dev/null +++ b/system/.htaccess @@ -0,0 +1,12 @@ +# DISABLE ACCESS TO THIS FOLDER + +# Apache 2.4 + + Require all denied + + +# Apache 2.2 + + Order Allow,Deny + Deny from all + diff --git a/system/pages/play.php b/system/pages/play.php new file mode 100644 index 0000000..514678d --- /dev/null +++ b/system/pages/play.php @@ -0,0 +1,59 @@ +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 ' +
+ +
+ +
+ Kurkista studioon + + '; +if(strpos($_SERVER['HTTP_USER_AGENT'], 'Chrome') !== false){ +echo '
+'; + + } +} + +?> diff --git a/system/pages/program.php b/system/pages/program.php new file mode 100644 index 0000000..d1cab00 --- /dev/null +++ b/system/pages/program.php @@ -0,0 +1,66 @@ + +'; + +foreach($programs as $program){ +/* +echo ' +
+ +
+

'.$program['name'].'

+

+'; + if(isset($program['schedule'])){ + + foreach($program['schedule'] as $schedule){ + echo '00.00.0000 klo 00:00 '; + } + + } else { + echo 'Tulossa'; + } + +echo '

+

Juontaja: '; + + foreach($program['host'] as $host){ + echo $host.', '; + } + +echo '

+

Tuottaja: '.$program['producer'].'

+
+
+'; +*/ +} + +echo ' + +'; + + + } +} + +?> diff --git a/system/pages/watch.php b/system/pages/watch.php new file mode 100644 index 0000000..bf62ff9 --- /dev/null +++ b/system/pages/watch.php @@ -0,0 +1,54 @@ +'; + echo ''; + } + + 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 ' +
+ +
+'; + + + } +} + +?>