NICE FINAL STREAMING PAGE

This commit is contained in:
qo-op 2021-06-15 20:16:52 +02:00
parent 010a0c334c
commit 84a8035fda
1 changed files with 30 additions and 3 deletions

View File

@ -68,7 +68,8 @@ do
ANNONCE=$(cat ~/.zen/ipfs/.${IPFSNODEID}/KEY/${id}/${G1PUB}/.gchange.ad)
## CRYPTO EXAMPLE, use natools to decrypt (could also verify signature)
[[ -f ~/.zen/ipfs/.${IPFSNODEID}/KEY/${id}/${G1PUB}/.ipfs.filelink.natools.encrypt ]] && $MY_PATH/tools/natools.py decrypt -f pubsec -k "$HOME/.zen/secret.dunikey" -i "$HOME/.zen/ipfs/.${IPFSNODEID}/KEY/${id}/${G1PUB}/.ipfs.filelink.natools.encrypt" -o "/tmp/${id}_filelink.txt"
## URL ENCODE FILE NAME : cat /tmp/${id}_filelink.txt | rev | cut -d '/' -f 1 | rev | jq -Rr @uri
# file=$(cat /tmp/${id}_filelink.txt | rev | cut -d '/' -f 1 | rev)
IPFSTUBELINK="https://tube.copylaradio.com$(cat /tmp/${id}_filelink.txt)"
MIMETYPE="video/${IPFSTUBELINK##*.}"
[[ "$MIMETYPE" == "video/avi" ]] && MIMETYPE="video/x-msvideo"
@ -90,9 +91,35 @@ Apprenez à programmer le BLOB et ajoutez de nouveaux services au Datacenter Vir
## Write KEY id (provide verification)
[[ ! -f ~/.zen/ipfs/.${IPFSNODEID}/KEY/${id}/${G1PUB}/.id ]] && echo ${id} > ~/.zen/ipfs/.${IPFSNODEID}/KEY/${id}/${G1PUB}/.id
echo "<meta charset=\"UTF-8\"><meta http-equiv=\"Refresh\" content=\"0;URL=http://127.0.0.1:8181$(cat /tmp/${id}_filelink.txt)\">" > ~/.zen/ipfs/.${IPFSNODEID}/KEY/${id}/${G1PUB}/index.html
## LOCALHOST ASTROPORT STATION PAGE
# echo "<meta charset=\"UTF-8\"><meta http-equiv=\"Refresh\" content=\"0;URL=http://127.0.0.1:8181$(cat /tmp/${id}_filelink.txt)\">" > ~/.zen/ipfs/.${IPFSNODEID}/KEY/${id}/${G1PUB}/index.html
# echo "<meta charset=\"UTF-8\"><meta http-equiv=\"Refresh\" content=\"0;URL=https://tube.copylaradio.com$(cat /tmp/${id}_filelink.txt)\">" > ~/.zen/ipfs/.${IPFSNODEID}/KEY/${id}/${G1PUB}/index.html
echo "<video autoplay='autoplay' controls><source src=\"$IPFSTUBELINK\" type=\"$MIMETYPE\"></video>" > ~/.zen/ipfs/.${IPFSNODEID}/KEY/${id}/${G1PUB}/index.html
## NICE FINAL STREAMING PAGE
echo "<!DOCTYPE html>
<html>
<head>
<title>AstroCrowdBuster</title>
<meta charset=\"UTF-8\">
<link rel='stylesheet' href='crowdbunker.css' type='text/css' />
<link rel='icon' type='image/png' href='/astrocrowdbunker.png' />
</head>
<body>
<header>
<h6>
<a href='https://copylaradio.com'><span>Astroport</span> × <span>astrXbian DEMO</span></a>
</h6>
</header>
<main>
<article>
<video autoplay='autoplay' controls><source src=\"$IPFSTUBELINK\" type=\"$MIMETYPE\"></video>
<h1 class='video-title'>$TITLE</h1>
</article>
</main>
<center><br>Faites un don pour connserver la MEDIAKEY (${id}) en ligne<br>
<br><img width=40 src=\"https://tube.copylaradio.com/ipns/$IPNSLINK/QR.png\"></center>
</body>
</html>" > ~/.zen/ipfs/.${IPFSNODEID}/KEY/${id}/${G1PUB}/index.html
if [[ "$source" == "YOUTUBE" ]]
then