mirror of
https://gitlab.com/octospacc/octospacc.gitlab.io
synced 2025-02-13 10:20:48 +01:00
update build
This commit is contained in:
parent
7d51d28bf3
commit
0c7cb2c7ac
24
Build.sh
24
Build.sh
@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
SourceApps="SpiderADB TiVuOcto WuppiMini"
|
SourceApps="SpiderADB TiktOctt TiVuOcto WuppiMini"
|
||||||
HubSdkApps="${SourceApps} MatrixStickerHelper TiktOctt"
|
HubSdkApps="${SourceApps} MatrixStickerHelper"
|
||||||
HtmlHeadInject='<script src="../../shared/OctoHub-Global.js"></script>'
|
HtmlHeadInject='<script src="../../shared/OctoHub-Global.js"></script>'
|
||||||
|
|
||||||
quoteVar(){ echo '"'"$1"'"' ;}
|
quoteVar(){ echo '"'"$1"'"' ;}
|
||||||
@ -20,8 +20,20 @@ for App in ${SourceApps}
|
|||||||
do
|
do
|
||||||
mkdir -p "./public/${App}"
|
mkdir -p "./public/${App}"
|
||||||
cd "./source/${App}"
|
cd "./source/${App}"
|
||||||
sh ./Requirements.sh
|
if [ -f ./Requirements.sh ]
|
||||||
cp -vr $(sh ./Build.sh) "../../public/${App}/"
|
then sh ./Requirements.sh
|
||||||
|
else
|
||||||
|
[ -f ./package.json ] && (npm update; npm install)
|
||||||
|
fi
|
||||||
|
copyfiles="$(sh ./Build.sh)"
|
||||||
|
cp -vr $copyfiles "../../public/${App}/"
|
||||||
|
for file in $copyfiles
|
||||||
|
do
|
||||||
|
path="../../public/${App}/${file}"
|
||||||
|
if [ ! -e "${path}" ]
|
||||||
|
then mkdir -p "${path}" && rm -rf "${path}" && cp "${file}" "${path}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
cd ../..
|
cd ../..
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -33,10 +45,10 @@ do
|
|||||||
file="./${App}/index.html"
|
file="./${App}/index.html"
|
||||||
name="$( getMetaAttr "${file}" og:title)"
|
name="$( getMetaAttr "${file}" og:title)"
|
||||||
description="$(getMetaAttr "${file}" og:description)"
|
description="$(getMetaAttr "${file}" og:description)"
|
||||||
url="$( getMetaAttr "${file}" Url OctoSpaccHubSdk)"
|
url="$( getMetaAttr "${file}" OctoSpaccHubSdk:Url)"
|
||||||
cat << [OctoSpaccHubSdk-WebManifest-EOF] > "./${App}/WebManifest.json"
|
cat << [OctoSpaccHubSdk-WebManifest-EOF] > "./${App}/WebManifest.json"
|
||||||
{
|
{
|
||||||
$(getMetaAttr "${file}" WebManifestExtra OctoSpaccHubSdk | sed s/\'/\"/g)
|
$(getMetaAttr "${file}" OctoSpaccHubSdk:WebManifestExtra | sed s/\'/\"/g)
|
||||||
$([ -n "${description}" ] && echo "$(quoteVar description): $(quoteVar "${description}"),")
|
$([ -n "${description}" ] && echo "$(quoteVar description): $(quoteVar "${description}"),")
|
||||||
"start_url": "${url}",
|
"start_url": "${url}",
|
||||||
"scope": "${url}",
|
"scope": "${url}",
|
||||||
|
0
source/SpiderADB/Build.sh
Normal file → Executable file
0
source/SpiderADB/Build.sh
Normal file → Executable file
0
source/SpiderADB/Requirements.sh
Normal file → Executable file
0
source/SpiderADB/Requirements.sh
Normal file → Executable file
@ -4,8 +4,8 @@
|
|||||||
<meta charset="UTF-8"/>
|
<meta charset="UTF-8"/>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||||
<meta property="og:title" content="SpiderADB"/>
|
<meta property="og:title" content="SpiderADB"/>
|
||||||
<meta OctoSpaccHubSdk="Url" content="https://hub.octt.eu.org/SpiderADB/"/>
|
<meta property="OctoSpaccHubSdk:Url" content="https://hub.octt.eu.org/SpiderADB/"/>
|
||||||
<meta OctoSpaccHubSdk="WebManifestExtra" content="'display':'standalone', 'icons':[{ 'src':'./icon.png', 'type':'image/png', 'sizes':'512x512' }],"/>
|
<meta property="OctoSpaccHubSdk:WebManifestExtra" content="'display':'standalone', 'icons':[{ 'src':'./icon.png', 'type':'image/png', 'sizes':'512x512' }],"/>
|
||||||
<link rel="apple-touch-icon" href="./icon.png"/>
|
<link rel="apple-touch-icon" href="./icon.png"/>
|
||||||
<link rel="stylesheet" href="./holo-web/holo-base-elements.css"/>
|
<link rel="stylesheet" href="./holo-web/holo-base-elements.css"/>
|
||||||
<link rel="stylesheet" href="./holo-web/holo-base-widgets.css"/>
|
<link rel="stylesheet" href="./holo-web/holo-base-widgets.css"/>
|
||||||
|
@ -1,2 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
echo index.html node_modules
|
echo index.html menu.svg \
|
||||||
|
node_modules/muicss/dist/css/mui.min.css node_modules/muicss/dist/js/mui.min.js \
|
||||||
|
node_modules/video.js/dist/video-js.min.css node_modules/video.js/dist/video.min.js \
|
||||||
|
;
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
npm update
|
|
||||||
npm install
|
|
@ -5,10 +5,10 @@
|
|||||||
<meta charset="utf-8"/>
|
<meta charset="utf-8"/>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||||
<meta property="og:title" content="TiVuOcto 📺️"/>
|
<meta property="og:title" content="TiVuOcto 📺️"/>
|
||||||
<meta OctoSpaccHubSdk="Url" content="https://hub.octt.eu.org/TiVuOcto/"/>
|
<meta property="OctoSpaccHubSdk:Url" content="https://hub.octt.eu.org/TiVuOcto/"/>
|
||||||
<meta OctoSpaccHubSdk="WebManifestExtra" content="'display':'standalone',"/>
|
<meta property="OctoSpaccHubSdk:WebManifestExtra" content="'display':'standalone',"/>
|
||||||
<link href="./node_modules/muicss/dist/css/mui.min.css" rel="stylesheet"/>
|
<link rel="stylesheet" href="./node_modules/muicss/dist/css/mui.min.css"/>
|
||||||
<link href="./node_modules/video.js/dist/video-js.min.css" rel="stylesheet"/>
|
<link rel="stylesheet" href="./node_modules/video.js/dist/video-js.min.css"/>
|
||||||
<style>
|
<style>
|
||||||
:root {
|
:root {
|
||||||
--headerHeight: 48px;
|
--headerHeight: 48px;
|
||||||
@ -25,7 +25,6 @@
|
|||||||
html,
|
html,
|
||||||
body {
|
body {
|
||||||
background-color: var(--colorBackground);
|
background-color: var(--colorBackground);
|
||||||
color: var(--colorForeground);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
body a {
|
body a {
|
||||||
@ -40,6 +39,12 @@ button {
|
|||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004);
|
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004);
|
||||||
|
color: var(--colorForeground) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mui-textfield > input::placeholder {
|
||||||
|
color: var(--colorForeground2);
|
||||||
|
border-bottom-color: var(--colorForeground2);
|
||||||
}
|
}
|
||||||
|
|
||||||
.mui-dropdown hr {
|
.mui-dropdown hr {
|
||||||
@ -57,7 +62,6 @@ button {
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.mui-dropdown__menu > div > li > *:focus,
|
.mui-dropdown__menu > div > li > *:focus,
|
||||||
.mui-dropdown__menu > div > li > *:hover {
|
.mui-dropdown__menu > div > li > *:hover {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
@ -65,7 +69,6 @@ button {
|
|||||||
background-color: #EEE;
|
background-color: #EEE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#header {
|
#header {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
@ -132,6 +135,7 @@ button {
|
|||||||
|
|
||||||
#header .sidedrawer-toggle,
|
#header .sidedrawer-toggle,
|
||||||
#header .sidemenu-toggle {
|
#header .sidemenu-toggle {
|
||||||
|
line-height: 20px;
|
||||||
color: var(--colorForeground);
|
color: var(--colorForeground);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
@ -139,8 +143,11 @@ button {
|
|||||||
|
|
||||||
#header .sidedrawer-toggle {
|
#header .sidedrawer-toggle {
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
line-height: 20px;
|
}
|
||||||
font-size: 19px;
|
|
||||||
|
#header .sidedrawer-toggle > img {
|
||||||
|
vertical-align: middle;
|
||||||
|
padding-bottom: 0.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
#header .sidemenu-toggle {
|
#header .sidemenu-toggle {
|
||||||
@ -151,7 +158,7 @@ button {
|
|||||||
#header .sidedrawer-toggle:hover,
|
#header .sidedrawer-toggle:hover,
|
||||||
#header .sidemenu-toggle:focus,
|
#header .sidemenu-toggle:focus,
|
||||||
#header .sidemenu-toggle:hover {
|
#header .sidemenu-toggle:hover {
|
||||||
color: var(--colorForeground2);
|
opacity: 70%;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -163,11 +170,14 @@ button {
|
|||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#sidedrawer .mui-dropdown {
|
#sidedrawer > div.side-padded {
|
||||||
z-index: 2;
|
|
||||||
padding: 1em;
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
padding: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sidedrawer .mui-dropdown {
|
||||||
|
z-index: 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
#sidedrawer .mui-dropdown > button {
|
#sidedrawer .mui-dropdown > button {
|
||||||
@ -184,11 +194,6 @@ button {
|
|||||||
padding-left: 0px;
|
padding-left: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* #sidedrawer > ul > li > ul > li {
|
|
||||||
margin-top: 1em;
|
|
||||||
margin-bottom: 1em;
|
|
||||||
} */
|
|
||||||
|
|
||||||
#sidedrawer > ul > li > ul > li,
|
#sidedrawer > ul > li > ul > li,
|
||||||
#sidedrawer > ul > li > ul > li > a {
|
#sidedrawer > ul > li > ul > li > a {
|
||||||
padding: 0.5em;
|
padding: 0.5em;
|
||||||
@ -274,30 +279,33 @@ button {
|
|||||||
<span class="mui--text-title"></span>
|
<span class="mui--text-title"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="mui-divider"></div>
|
<div class="mui-divider"></div>
|
||||||
<div class="mui-dropdown" id="channel-select">
|
<div class="side-padded">
|
||||||
<button class="mui-btn mui-btn--primary" data-mui-toggle="dropdown">
|
<div class="mui-dropdown" id="channel-select">
|
||||||
<span id="channel-selected">Channels</span> <span class="mui-caret"></span>
|
<button class="mui-btn mui-btn--primary" data-mui-toggle="dropdown">
|
||||||
</button>
|
<span id="channel-selected">Channels</span> <span class="mui-caret"></span>
|
||||||
<ul class="mui-dropdown__menu">
|
</button>
|
||||||
<!-- TODO: implement these, add playlists, delete playlists, delete history
|
<ul class="mui-dropdown__menu">
|
||||||
<li><a>⭐️ Favorites</a></li>
|
<!-- TODO: implement these, add playlists, delete playlists, delete history
|
||||||
<li><a>📅️ Recent</a></li>
|
<li><a>⭐️ Favorites</a></li>
|
||||||
<hr/> -->
|
<li><a>📅️ Recent</a></li>
|
||||||
<li><a data-m3u="https://raw.githubusercontent.com/Free-TV/IPTV/master/playlist.m3u8">
|
<hr/> -->
|
||||||
Free-TV IPTV
|
<li><a data-m3u="https://raw.githubusercontent.com/Free-TV/IPTV/master/playlist.m3u8">
|
||||||
</a></li>
|
Free-TV IPTV
|
||||||
<li><a data-m3u="https://iptv-org.github.io/iptv/index.m3u">
|
</a></li>
|
||||||
iptv-org IPTV
|
<li><a data-m3u="https://iptv-org.github.io/iptv/index.m3u">
|
||||||
</a></li>
|
iptv-org IPTV
|
||||||
</ul>
|
</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<!--<div class="mui-textfield"><input type="text" placeholder="Search..."/></div>-->
|
||||||
</div>
|
</div>
|
||||||
<ul id="channels-list"></ul>
|
<ul id="channels-list"></ul>
|
||||||
</div>
|
</div>
|
||||||
<header id="header">
|
<header id="header">
|
||||||
<div class="mui-appbar mui--appbar-line-height">
|
<div class="mui-appbar mui--appbar-line-height">
|
||||||
<div class="mui-container-fluid"><!--
|
<div class="mui-container-fluid"><!--
|
||||||
--><a class="sidedrawer-toggle mui--visible-xs-inline-block mui--visible-sm-inline-block js-show-sidedrawer">𝋯</a><!--
|
--><a class="sidedrawer-toggle mui--visible-xs-inline-block mui--visible-sm-inline-block js-show-sidedrawer"><img src="./menu.svg"/></a><!--
|
||||||
--><a class="sidedrawer-toggle mui--hidden-xs mui--hidden-sm js-hide-sidedrawer">𝋯</a><!--
|
--><a class="sidedrawer-toggle mui--hidden-xs mui--hidden-sm js-hide-sidedrawer"><img src="./menu.svg"/></a><!--
|
||||||
--><span class="mui--text-title"></span>
|
--><span class="mui--text-title"></span>
|
||||||
<div class="mui-dropdown">
|
<div class="mui-dropdown">
|
||||||
<a class="sidemenu-toggle" data-mui-toggle="dropdown">︙</a>
|
<a class="sidemenu-toggle" data-mui-toggle="dropdown">︙</a>
|
||||||
@ -372,12 +380,8 @@ button {
|
|||||||
<li>Channel list in sidebar, divided by country with flag emojis.</li>
|
<li>Channel list in sidebar, divided by country with flag emojis.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<p id="label-loading" hidden="true"><!-- TODO make this more useful -->
|
<p id="label-loading" hidden="true">Loading...</p><!-- TODO make this more useful -->
|
||||||
Loading...
|
<p id="no-video" hidden="true">Select a valid channel to play video.</p>
|
||||||
</p>
|
|
||||||
<p id="no-video" hidden="true">
|
|
||||||
Select a valid channel to play video.
|
|
||||||
</p>
|
|
||||||
<video id="video-player" class="video-js" controls="controls" data-setup="{}"></video>
|
<video id="video-player" class="video-js" controls="controls" data-setup="{}"></video>
|
||||||
</div>
|
</div>
|
||||||
<script src="./node_modules/muicss/dist/js/mui.min.js"></script>
|
<script src="./node_modules/muicss/dist/js/mui.min.js"></script>
|
||||||
|
1
source/TiVuOcto/menu.svg
Normal file
1
source/TiVuOcto/menu.svg
Normal file
@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z" fill="white"/></svg>
|
After Width: | Height: | Size: 197 B |
2
source/TiktOctt/Build.sh
Executable file
2
source/TiktOctt/Build.sh
Executable file
@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
echo index.html logo.png node_modules/vlitejs/dist/vlite.css node_modules/vlitejs/dist/vlite.js
|
11
source/TiktOctt/Requirements.sh
Executable file
11
source/TiktOctt/Requirements.sh
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
npm update
|
||||||
|
npm install
|
||||||
|
cd ./node_modules/vlitejs/dist
|
||||||
|
[ ! -f ./vlite.js.old ] && mv ./vlite.js ./vlite.js.old
|
||||||
|
> ./vlite.js
|
||||||
|
echo '(function(){' >> ./vlite.js
|
||||||
|
cat ./vlite.js.old >> ./vlite.js
|
||||||
|
echo '})();' >> ./vlite.js
|
||||||
|
sed -i -e 's|;export{|;window.Vlitejs=|' ./vlite.js
|
||||||
|
sed -i -e 's|as default};|;|' ./vlite.js
|
@ -4,8 +4,8 @@
|
|||||||
<meta charset="UTF-8"/>
|
<meta charset="UTF-8"/>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||||
<meta property="og:title" content="🎵️ TiktOctt"/>
|
<meta property="og:title" content="🎵️ TiktOctt"/>
|
||||||
<meta OctoSpaccHubSdk="Url" content="https://hub.octt.eu.org/TiktOctt/"/>
|
<meta property="OctoSpaccHubSdk:Url" content="https://hub.octt.eu.org/TiktOctt/"/>
|
||||||
<meta OctoSpaccHubSdk="WebManifestExtra" content="'display':'standalone', 'icons':[{ 'src':'./logo.png', 'type':'image/png', 'sizes':'1024x1024' }],"/>
|
<meta property="OctoSpaccHubSdk:WebManifestExtra" content="'display':'standalone', 'icons':[{ 'src':'./logo.png', 'type':'image/png', 'sizes':'1024x1024' }],"/>
|
||||||
<link rel="apple-touch-icon" href="./logo.png"/>
|
<link rel="apple-touch-icon" href="./logo.png"/>
|
||||||
<style>
|
<style>
|
||||||
:root {
|
:root {
|
||||||
@ -228,11 +228,8 @@ button[name="menu"] {
|
|||||||
background: black;
|
background: black;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<link href="https://cdn.jsdelivr.net/npm/vlitejs@6/dist/vlite.css" rel="stylesheet" crossorigin />
|
<link rel="stylesheet" href="./node_modules/vlitejs/dist/vlite.css"/>
|
||||||
<script type="module">
|
<script src="./node_modules/vlitejs/dist/vlite.js"></script>
|
||||||
import Vlitejs from 'https://cdn.jsdelivr.net/npm/vlitejs@6';
|
|
||||||
window.Vlitejs = Vlitejs;
|
|
||||||
</script>
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="splash">
|
<div class="splash">
|
||||||
@ -250,7 +247,6 @@ button[name="menu"] {
|
|||||||
<div class="videosContainer">
|
<div class="videosContainer">
|
||||||
<div class="videosList"></div>
|
<div class="videosList"></div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="footer"></div> -->
|
|
||||||
<script>(function(){
|
<script>(function(){
|
||||||
|
|
||||||
const icons = {
|
const icons = {
|
||||||
@ -263,7 +259,7 @@ const icons = {
|
|||||||
let currentVideoElem, firstVideoElem, lastVideoElem;
|
let currentVideoElem, firstVideoElem, lastVideoElem;
|
||||||
let isSplashNeeded = true;
|
let isSplashNeeded = true;
|
||||||
let userInteracted = false;
|
let userInteracted = false;
|
||||||
let preloadCount = 5;
|
let videoPreloadCount = 5;
|
||||||
const backendFetchCount = 50;
|
const backendFetchCount = 50;
|
||||||
const videoObjects = [];
|
const videoObjects = [];
|
||||||
const postsCache = {};
|
const postsCache = {};
|
||||||
@ -272,7 +268,7 @@ const postsHistory = [];
|
|||||||
const scrollObserver = new IntersectionObserver(function(elems){
|
const scrollObserver = new IntersectionObserver(function(elems){
|
||||||
for (elem of elems) {
|
for (elem of elems) {
|
||||||
if (elem.isIntersecting) {
|
if (elem.isIntersecting) {
|
||||||
addVideos();
|
addVideos(videoPreloadCount);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -305,7 +301,6 @@ async function pullNewVideos () {
|
|||||||
function onUserInteract () {
|
function onUserInteract () {
|
||||||
userInteracted = true;
|
userInteracted = true;
|
||||||
if (currentVideoElem) {
|
if (currentVideoElem) {
|
||||||
//currentVideoElem.muted = false;
|
|
||||||
videoObjects[currentVideoElem.dataset.videoId].player.unMute();
|
videoObjects[currentVideoElem.dataset.videoId].player.unMute();
|
||||||
}
|
}
|
||||||
document.querySelector('.audioNag')?.remove();
|
document.querySelector('.audioNag')?.remove();
|
||||||
@ -380,16 +375,16 @@ function openContentFrame (content, name, link) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async function addVideos () {
|
async function addVideos (preloadCount) {
|
||||||
const fragmentElem = document.createDocumentFragment();
|
const fragmentElem = document.createDocumentFragment();
|
||||||
if (firstVideoElem) { //if (lastVideoElem) {
|
if (firstVideoElem) {
|
||||||
scrollObserver.unobserve(firstVideoElem);//lastVideoElem);
|
scrollObserver.unobserve(firstVideoElem);
|
||||||
firstVideoElem = null;
|
firstVideoElem = null;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
await pullNewVideos();
|
await pullNewVideos();
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
setTimeout(addVideos, 1000);
|
setTimeout((function(){ addVideos(preloadCount); }), 1000);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (let i=0; i<preloadCount; i++) {
|
for (let i=0; i<preloadCount; i++) {
|
||||||
@ -418,8 +413,7 @@ async function addVideos () {
|
|||||||
hudElem.querySelector('button[name="share"]').onclick = shareLink;
|
hudElem.querySelector('button[name="share"]').onclick = shareLink;
|
||||||
const videoElem = Object.assign(document.createElement('video'), {
|
const videoElem = Object.assign(document.createElement('video'), {
|
||||||
src: post.videoUrl,
|
src: post.videoUrl,
|
||||||
muted: true, loop: true, //autoplay: true,
|
muted: true, loop: true,
|
||||||
//onclick: onClickVideo,
|
|
||||||
onerror: (function(){
|
onerror: (function(){
|
||||||
// we must find a clean way to make the video autoplay if it loads
|
// we must find a clean way to make the video autoplay if it loads
|
||||||
// after failing the first time, this is just a temporary patch
|
// after failing the first time, this is just a temporary patch
|
||||||
@ -446,8 +440,6 @@ async function addVideos () {
|
|||||||
}
|
}
|
||||||
itemElem.classList.add('videoItem');
|
itemElem.classList.add('videoItem');
|
||||||
itemElem.appendChild(videoElem);
|
itemElem.appendChild(videoElem);
|
||||||
//const videoObject = videojs(videoElem);
|
|
||||||
//videoElem.dataset.videoObject = (videoObjects.push(videoObject) - 1);
|
|
||||||
itemElem.appendChild(hudElem);
|
itemElem.appendChild(hudElem);
|
||||||
fragmentElem.appendChild(itemElem);
|
fragmentElem.appendChild(itemElem);
|
||||||
const videoObject = await new Vlitejs(videoElem, { onReady: onCanPlayVideo });
|
const videoObject = await new Vlitejs(videoElem, { onReady: onCanPlayVideo });
|
||||||
@ -455,16 +447,11 @@ async function addVideos () {
|
|||||||
videoElem.parentElement.onclick = onClickVideo;
|
videoElem.parentElement.onclick = onClickVideo;
|
||||||
}
|
}
|
||||||
document.querySelector('.videosList').appendChild(fragmentElem);
|
document.querySelector('.videosList').appendChild(fragmentElem);
|
||||||
scrollObserver.observe(firstVideoElem);//lastVideoElem);
|
scrollObserver.observe(firstVideoElem);
|
||||||
}
|
}
|
||||||
addVideos();
|
addVideos(1);
|
||||||
//preloadCount -= 1;
|
|
||||||
|
|
||||||
function onClickVideo () {
|
function onClickVideo () {
|
||||||
//currentVideoElem = (this.querySelector('video') || this);
|
|
||||||
//if (userInteracted) {
|
|
||||||
//currentVideoElem[currentVideoElem.paused ? 'play' : 'pause']();
|
|
||||||
//} else {
|
|
||||||
if (!userInteracted) {
|
if (!userInteracted) {
|
||||||
onUserInteract();
|
onUserInteract();
|
||||||
videoObjects[this.querySelector('video').dataset.videoId].player.play();
|
videoObjects[this.querySelector('video').dataset.videoId].player.play();
|
||||||
@ -492,31 +479,21 @@ function onCanPlayVideo () {
|
|||||||
// TODO fix, it's kinda bad with touch scrolling since so many events are generated;
|
// TODO fix, it's kinda bad with touch scrolling since so many events are generated;
|
||||||
// pausing should maybe only happen when the scoll is completed?
|
// pausing should maybe only happen when the scoll is completed?
|
||||||
function onVideosScroll () {
|
function onVideosScroll () {
|
||||||
//let alignedVideoElem;
|
|
||||||
for (const videoElem of document.querySelectorAll('.videoItem video')) {
|
for (const videoElem of document.querySelectorAll('.videoItem video')) {
|
||||||
const videoObject = videoObjects[videoElem.dataset.videoId];
|
const videoObject = videoObjects[videoElem.dataset.videoId];
|
||||||
if (~~videoElem.getBoundingClientRect().y === 0) {
|
if (~~videoElem.getBoundingClientRect().y === 0) {
|
||||||
/* alignedVideoElem = */ currentVideoElem = videoElem;
|
currentVideoElem = videoElem;
|
||||||
//videoElem.load();
|
|
||||||
//videoElem.currentTime = 0;
|
|
||||||
//videoElem.play();
|
|
||||||
videoObject.player.seekTo(0);
|
videoObject.player.seekTo(0);
|
||||||
videoObject.player.play();
|
videoObject.player.play();
|
||||||
if (userInteracted) {
|
if (userInteracted) {
|
||||||
//videoElem.muted = false;
|
|
||||||
videoObject.player.unMute();
|
videoObject.player.unMute();
|
||||||
}
|
}
|
||||||
videoElem.parentElement.focus();
|
videoElem.parentElement.focus();
|
||||||
} else {
|
} else {
|
||||||
//videoElem.pause();
|
|
||||||
//videoElem.currentTime = 0;
|
|
||||||
videoObject.player.pause();
|
videoObject.player.pause();
|
||||||
videoObject.player.seekTo(0);
|
videoObject.player.seekTo(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//document.querySelector('.videoItem').remove();
|
|
||||||
//videoObjects.pop();
|
|
||||||
//if (alignedVideoElem) {}
|
|
||||||
}
|
}
|
||||||
document.querySelector('.videosContainer').onscroll = onVideosScroll;
|
document.querySelector('.videosContainer').onscroll = onVideosScroll;
|
||||||
document.querySelector('.videosContainer').focus();
|
document.querySelector('.videosContainer').focus();
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
35
source/TiktOctt/package-lock.json
generated
Normal file
35
source/TiktOctt/package-lock.json
generated
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
{
|
||||||
|
"name": "TiktOctt",
|
||||||
|
"lockfileVersion": 3,
|
||||||
|
"requires": true,
|
||||||
|
"packages": {
|
||||||
|
"": {
|
||||||
|
"dependencies": {
|
||||||
|
"vlitejs": "^6.0.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/validate-target": {
|
||||||
|
"version": "3.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/validate-target/-/validate-target-3.1.1.tgz",
|
||||||
|
"integrity": "sha512-MRTgeSwwI8fyNPzRi8SsZiU6LSwlsRE3cLiynyse8G82hjEkfq/setjs0D789FwKrtnDCZn7m0MHlklDPzs74g==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=16.20.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/vlitejs": {
|
||||||
|
"version": "6.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/vlitejs/-/vlitejs-6.0.3.tgz",
|
||||||
|
"integrity": "sha512-v/m95c3LkxR5AaNW0lUZiNSSECWHYIzrh+yspbsxa46Zeas2OHiiTH3VDMdrWOg4dSBku/jUcuohOhas7kwOSA==",
|
||||||
|
"dependencies": {
|
||||||
|
"validate-target": "^3.1.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=16.20.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "individual",
|
||||||
|
"url": "https://github.com/sponsors/yoriiis"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
5
source/TiktOctt/package.json
Normal file
5
source/TiktOctt/package.json
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"dependencies": {
|
||||||
|
"vlitejs": "^6.0.3"
|
||||||
|
}
|
||||||
|
}
|
@ -1,3 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
npm update
|
|
||||||
npm install
|
|
@ -148,8 +148,8 @@ const htmlPager = (content, title, opts={}, ctx) => `<!DOCTYPE html><html><head>
|
|||||||
<meta charset="utf-8"/>
|
<meta charset="utf-8"/>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||||
<meta property="og:title" content="${title ? `${title} — ` : ''}${appName}"/>
|
<meta property="og:title" content="${title ? `${title} — ` : ''}${appName}"/>
|
||||||
<meta OctoSpaccHubSdk="Url" content="https://hub.octt.eu.org/WuppiMini/"/>
|
<meta property="OctoSpaccHubSdk:Url" content="https://hub.octt.eu.org/WuppiMini/"/>
|
||||||
<meta OctoSpaccHubSdk="WebManifestExtra" content="'display':'standalone', 'icons':[{ 'src':'./icon.png', 'type':'image/png', 'sizes':'256x256' }],"/>
|
<meta property="OctoSpaccHubSdk:WebManifestExtra" content="'display':'standalone', 'icons':[{ 'src':'./icon.png', 'type':'image/png', 'sizes':'256x256' }],"/>
|
||||||
<title>${title ? `${title} — ` : ''}${appName}</title>
|
<title>${title ? `${title} — ` : ''}${appName}</title>
|
||||||
<link rel="apple-touch-icon" href="./icon.png"/>
|
<link rel="apple-touch-icon" href="./icon.png"/>
|
||||||
${linkStyles.map((path) => SpaccDotWebServer.makeHtmlStyleFragment(path, appSelfContained)).join('')}
|
${linkStyles.map((path) => SpaccDotWebServer.makeHtmlStyleFragment(path, appSelfContained)).join('')}
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
<meta charset="utf-8"/>
|
<meta charset="utf-8"/>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||||
<meta property="og:title" content="🃏️ [Matrix] Sticker Helper"/>
|
<meta property="og:title" content="🃏️ [Matrix] Sticker Helper"/>
|
||||||
<meta OctoSpaccHubSdk="Url" content="https://hub.octt.eu.org/MatrixStickerHelper/"/>
|
<meta property="OctoSpaccHubSdk:Url" content="https://hub.octt.eu.org/MatrixStickerHelper/"/>
|
||||||
<meta OctoSpaccHubSdk="WebManifestExtra" content="'display':'standalone',"/>
|
<meta property="OctoSpaccHubSdk:WebManifestExtra" content="'display':'standalone',"/>
|
||||||
|
|
||||||
<script src="../../shared/OctoHub-Global.js"></script>
|
<script src="../../shared/OctoHub-Global.js"></script>
|
||||||
<script src="../../../SpaccDotWeb/SpaccDotWeb.Alt.js" module="SpaccDotWeb"></script><!-- offline -->
|
<script src="../../../SpaccDotWeb/SpaccDotWeb.Alt.js" module="SpaccDotWeb"></script><!-- offline -->
|
||||||
|
Loading…
x
Reference in New Issue
Block a user