add the old stuff

This commit is contained in:
Emily Daemon 2023-03-26 10:48:25 +03:00
parent ef39622c85
commit 0c5ba560c0
10 changed files with 1845 additions and 0 deletions

BIN
favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

6
includes/footer.php Normal file
View File

@ -0,0 +1,6 @@
</main>
<footer>
<p>&copy; 2023</p>
</footer>
</body>
</html>

19
includes/header.php Normal file
View File

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html>
<head>
<title>NTV</title>
<link rel="stylesheet" href="styles.css?cache=<?php echo bin2hex(random_bytes(16)); ?>">
</head>
<body>
<header>
<a href="/"><img src="/img/banner.png" class="banner" alt='NTV banner with the tagline "You decide."'></a>
<nav>
<a href="/" class="button">home</a>
<a href="#" class="button">watch</a>
<a href="#" class="button">queue</a>
<a href="#" class="button">request</a>
<a href="#" class="button">about</a>
<a href="#" class="button">contact</a>
</nav>
</header>
<main>

6
index.php Normal file
View File

@ -0,0 +1,6 @@
<?php include("includes/header.php") ?>
<h1>NTV on the Net</h1>
<p>Welcome to NTV's official internet webpage!</p>
<p>On this website, you can watch the broadcast online, request music, and learn more about NTV.</p>
<img src="/img/ntv-online.png">
<?php include("includes/footer.php") ?>

11
js/cp.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/sh
mkdir npmtemp
cd npmtemp
npm init -y
npm i video.js videojs-contrib-quality-levels tingtingan-videojs-hls-quality-selector
cp node_modules/video.js/dist/video-js.css ..
cp node_modules/video.js/dist/video.min.js ..
cp node_modules/videojs-contrib-quality-levels/dist/videojs-contrib-quality-levels.min.js ..
cp node_modules/tingtingan-videojs-hls-quality-selector/dist/videojs-hls-quality-selector.min.js ..
cd ..
rm -rf npmtemp

1679
js/video-js.css Normal file

File diff suppressed because one or more lines are too long

40
js/video.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,2 @@
/*! @name videojs-contrib-quality-levels @version 3.0.0 @license Apache-2.0 */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("video.js")):"function"==typeof define&&define.amd?define(["video.js"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).videojsContribQualityLevels=t(e.videojs)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=t(e);class i{constructor(e){let t=this;return t.id=e.id,t.label=t.id,t.width=e.width,t.height=e.height,t.bitrate=e.bandwidth,t.frameRate=e.frameRate,t.enabled_=e.enabled,Object.defineProperty(t,"enabled",{get:()=>t.enabled_(),set(e){t.enabled_(e)}}),t}}class n extends l.default.EventTarget{constructor(){super();let e=this;return e.levels_=[],e.selectedIndex_=-1,Object.defineProperty(e,"selectedIndex",{get:()=>e.selectedIndex_}),Object.defineProperty(e,"length",{get:()=>e.levels_.length}),e}addQualityLevel(e){let t=this.getQualityLevelById(e.id);if(t)return t;const l=this.levels_.length;return t=new i(e),""+l in this||Object.defineProperty(this,l,{get(){return this.levels_[l]}}),this.levels_.push(t),this.trigger({qualityLevel:t,type:"addqualitylevel"}),t}removeQualityLevel(e){let t=null;for(let l=0,i=this.length;l<i;l++)if(this[l]===e){t=this.levels_.splice(l,1)[0],this.selectedIndex_===l?this.selectedIndex_=-1:this.selectedIndex_>l&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:"removequalitylevel"}),t}getQualityLevelById(e){for(let t=0,l=this.length;t<l;t++){const l=this[t];if(l.id===e)return l}return null}dispose(){this.selectedIndex_=-1,this.levels_.length=0}}n.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"};for(const e in n.prototype.allowedEvents_)n.prototype["on"+e]=null;var s="3.0.0";const d=l.default.registerPlugin||l.default.plugin,r=function(e){return function(e,t){const l=e.qualityLevels,i=new n,d=function(){i.dispose(),e.qualityLevels=l,e.off("dispose",d)};return e.on("dispose",d),e.qualityLevels=()=>i,e.qualityLevels.VERSION=s,i}(this,l.default.mergeOptions({},e))};return d("qualityLevels",r),r.VERSION=s,r}));

View File

@ -0,0 +1,7 @@
/**
* tingtingan-videojs-hls-quality-selector
* @version 1.1.10
* @copyright 2022 Chris Boustead (chris@forgemotion.com)
* @license MIT
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("video.js")):"function"==typeof define&&define.amd?define(["video.js"],e):t.videojsHlsQualitySelector=e(t.videojs)}(this,function(o){"use strict";o=o&&o.hasOwnProperty("default")?o.default:o;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function t(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t,e){if(t)return!e||"object"!=typeof e&&"function"!=typeof e?t:e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}var e=o.getComponent("MenuButton"),n=o.getComponent("Menu"),u=o.getComponent("Component"),r=o.dom;t(c,a=e),c.prototype.createItems=function(){return[]},c.prototype.createMenu=function(){var t,e=new n(this.player_,{menuButton:this});if(e.addClass("hls-quality-button"),this.hideThreshold_=0,this.options_.title&&(t=r.createEl("li",{className:"vjs-menu-title",innerHTML:"string"!=typeof(t=this.options_.title)?t:t.charAt(0).toUpperCase()+t.slice(1),tabIndex:-1}),t=new u(this.player_,{el:t}),this.hideThreshold_+=1,e.addItem(t)),this.items=this.createItems(),this.items)for(var i=0;i<this.items.length;i++)e.addItem(this.items[i]);return e};var a,h=c;function c(t){return l(this,c),s(this,a.call(this,t,{title:t.localize("Quality"),name:"QualityButton"}))}var y,e=o.getComponent("MenuItem"),p=(t(f,y=e),f.prototype.handleClick=function(){for(var t=0;t<this.qualityButton.items.length;++t)this.qualityButton.items[t].selected(!1);this.plugin.setQuality(this.item.value),this.selected(!0)},f);function f(t,e,i,n){l(this,f);t=s(this,y.call(this,t,{label:e.label,selectable:!0,selected:e.selected||!1}));return t.item=e,t.qualityButton=i,t.plugin=n,t}var d={},e=o.registerPlugin||o.plugin,m=(v.prototype.getHls=function(){return this.player.tech({IWillNotUseThisInPlugins:!0}).vhs},v.prototype.bindPlayerEvents=function(){this.player.qualityLevels().on("addqualitylevel",this.onAddQualityLevel.bind(this))},v.prototype.createQualityButton=function(){var t=this.player,e=(this._qualityButton=new h(t),t.controlBar.children().length-2),t=t.controlBar.addChild(this._qualityButton,{componentClass:"qualitySelector"},this.config.placementIndex||e);t.addClass("vjs-quality-selector"),this.config.displayCurrentQuality?this.setButtonInnerText(this.player.localize("Auto")):(e=" "+(this.config.vjsIconClass||"vjs-icon-hd"),t.menuButton_.$(".vjs-icon-placeholder").className+=e),t.removeClass("vjs-hidden")},v.prototype.setButtonInnerText=function(t){this._qualityButton.menuButton_.$(".vjs-icon-placeholder").innerHTML=t},v.prototype.getQualityMenuItem=function(t){var e=this.player;return new p(e,t,this._qualityButton,this)},v.prototype.onAddQualityLevel=function(){for(var n=this,t=this.player,o=t.qualityLevels().levels_||[],l=[],e=0;e<o.length;++e)!function(t){var t=o[t],e=t.width,t=t.height,i=t<e?t:e;if(!i)return;l.filter(function(t){return t.item&&t.item.value===i}).length||(t=n.getQualityMenuItem.call(n,{label:i+"p",value:i}),l.push(t))}(e);l.sort(function(t,e){return"object"!==(void 0===t?"undefined":i(t))||"object"!==(void 0===e?"undefined":i(e))||t.item.value<e.item.value?-1:t.item.value>e.item.value?1:0}),l.push(this.getQualityMenuItem.call(this,{label:t.localize("Auto"),value:"auto",selected:!0})),this._qualityButton&&(this._qualityButton.createItems=function(){return l},this._qualityButton.update())},v.prototype.setQuality=function(t){var e=this.player.qualityLevels();this._currentQuality=t,this.config.displayCurrentQuality&&this.setButtonInnerText("auto"===t?this.player.localize("Auto"):t+"p");for(var i=0;i<e.length;++i){var n=e[i],o=n.width,n=n.height;e[i].enabled=(n<o?n:o)===t||"auto"===t}this._qualityButton.unpressButton()},v.prototype.getCurrentQuality=function(){return this._currentQuality||"auto"},v);function v(t,e){l(this,v),this.player=t,this.config=e,this.player.qualityLevels&&this.getHls()&&(this.createQualityButton(),this.bindPlayerEvents())}function g(i){var n=this;this.ready(function(){var t,e;t=n,e=o.mergeOptions(d,i),t.addClass("vjs-hls-quality-selector"),t.hlsQualitySelector=new m(t,e)})}return e("hlsQualitySelector",g),g.VERSION="1.1.10",g});

75
styles.css Normal file
View File

@ -0,0 +1,75 @@
button, a.button {
height: 17px;
background: rgb(255,255,255);
background: -moz-linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(168,176,194,1) 13%, rgba(73,80,93,1) 49%, rgba(39,46,55,1) 51%, rgba(13,27,35,1) 87%, rgba(0,6,10,1) 100%);
background: -webkit-linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(168,176,194,1) 13%, rgba(73,80,93,1) 49%, rgba(39,46,55,1) 51%, rgba(13,27,35,1) 87%, rgba(0,6,10,1) 100%);
background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(168,176,194,1) 13%, rgba(73,80,93,1) 49%, rgba(39,46,55,1) 51%, rgba(13,27,35,1) 87%, rgba(0,6,10,1) 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#ffffff",endColorstr="#00060a",GradientType=1);
border: 1px solid #1e2229;
border-top: 1px solid #848998;
border-bottom: 1px solid #02070c;
color: #ffffff;
text-decoration: none;
font-family: sans-serif;
font-size: 11pt;
padding: 3px;
min-width: 70px;
display: inline-block;
text-align: center;
vertical-align: middle;
}
button:hover, a.button:hover {
font-weight: bold;
}
button:active, a.button:active {
padding: 2px;
margin: 1px;
font-size: 10pt;
}
body, html {
margin: 0;
padding: 0;
}
body {
max-width: 800px;
margin: auto;
background-color: #ffffff;
/*
border-left: 1px solid #c0c0c0;
border-right: 1px solid #c0c0c0;
*/
font-family: sans-serif;
font-size: 11pt;
}
nav {
display: block;
width: fit-content;
margin: auto;
}
header {
background: rgb(17,62,76);
background: -moz-linear-gradient(180deg, rgba(17,62,76,1) 0%, rgba(17,61,74,1) 74%, rgba(9,32,40,1) 100%);
background: -webkit-linear-gradient(180deg, rgba(17,62,76,1) 0%, rgba(17,61,74,1) 74%, rgba(9,32,40,1) 100%);
background: linear-gradient(180deg, rgba(17,62,76,1) 0%, rgba(17,61,74,1) 74%, rgba(9,32,40,1) 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#113e4c",endColorstr="#092028",GradientType=1);
padding-bottom: 4px;
border-bottom: 1px solid #082026;
}
img.banner {
border-bottom: 1px solid #082026;
}
footer {
background: rgb(17,62,76);
background: -moz-linear-gradient(180deg, rgba(17,62,76,1) 0%, rgba(9,32,40,1) 100%);
background: -webkit-linear-gradient(180deg, rgba(17,62,76,1) 0%, rgba(9,32,40,1) 100%);
background: linear-gradient(180deg, rgba(17,62,76,1) 0%, rgba(9,32,40,1) 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#113e4c",endColorstr="#092028",GradientType=1);
color: #ffffff;
padding: 15px;
text-align: center;
border-top: 1px solid #082026;
}
main {
padding: 15px;
margin: 0;
}