Compare commits
2 Commits
4b67a1a11c
...
v1
| Author | SHA1 | Date | |
|---|---|---|---|
| 88623e66e6 | |||
| 51d848cf07 |
+3
-2
@@ -31,7 +31,7 @@
|
|||||||
<h1>Quest VRChat Video Server</h1>
|
<h1>Quest VRChat Video Server</h1>
|
||||||
<div>Import YouTube videos onto this server to...</div>
|
<div>Import YouTube videos onto this server to...</div>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Make the videos work for your friends on Quest</li>
|
<li>Make the videos work for your friends on Quest (allow untrusted URLs)</li>
|
||||||
<li><b>NEW:</b> Get memorable short URLs that you can type in Quest!</li>
|
<li><b>NEW:</b> Get memorable short URLs that you can type in Quest!</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>
|
<p>
|
||||||
@@ -40,6 +40,7 @@
|
|||||||
<div>and click <input id="submit_button" type="submit" />!</div>
|
<div>and click <input id="submit_button" type="submit" />!</div>
|
||||||
</p>
|
</p>
|
||||||
<p id="server_output"></p>
|
<p id="server_output"></p>
|
||||||
|
<p><b>NEW:</b> Watch YouTube on Quest WITHOUT PC friends or memorized URLs with <a href="https://www.u2b.cx/">u2b.cx</a>!</p>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var url_input = document.getElementById("url_input");
|
var url_input = document.getElementById("url_input");
|
||||||
@@ -99,7 +100,7 @@
|
|||||||
list.forEach((file, index) => {
|
list.forEach((file, index) => {
|
||||||
var url = `${location.origin}/v/${encodeURIComponent(file.name)}`;
|
var url = `${location.origin}/v/${encodeURIComponent(file.name)}`;
|
||||||
var row = tbody.insertRow(0);
|
var row = tbody.insertRow(0);
|
||||||
row.insertCell().innerText = [index, ...file.aliases||[]].map(x => `http://${location.host}/${x}`).join('\n');
|
row.insertCell().innerText = [index, ...file.aliases||[]].map(x => `${location.origin}/${x}`).join('\n');
|
||||||
row.insertCell().innerHTML = `<button title="Copy URL" onclick="navigator.clipboard.writeText('${url}')">📋</button>`;
|
row.insertCell().innerHTML = `<button title="Copy URL" onclick="navigator.clipboard.writeText('${url}')">📋</button>`;
|
||||||
row.insertCell().innerHTML = `<a href="${url}">${file.name}</a>`;
|
row.insertCell().innerHTML = `<a href="${url}">${file.name}</a>`;
|
||||||
row.insertCell().innerHTML = `<span title="${file.duration} seconds">${formatDuration(file.duration)}</span>`;
|
row.insertCell().innerHTML = `<span title="${file.duration} seconds">${formatDuration(file.duration)}</span>`;
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ wss.on("connection", function(ws, req) {
|
|||||||
let file = files.find(file => file.includes(`[${ytid}]`));
|
let file = files.find(file => file.includes(`[${ytid}]`));
|
||||||
if (file) {
|
if (file) {
|
||||||
if (alias) fs.writeFileSync(`aliases/${alias}`, file);
|
if (alias) fs.writeFileSync(`aliases/${alias}`, file);
|
||||||
let url = `http://${req.headers.host}/v/${file}`;
|
let url = `https://${req.headers.host}/v/${file}`;
|
||||||
ws.send(`MP4 URL (<button onclick="navigator.clipboard.writeText(\`${url}\`)">Copy</button>): <a href="${url}">${url}</a>`)
|
ws.send(`MP4 URL (<button onclick="navigator.clipboard.writeText(\`${url}\`)">Copy</button>): <a href="${url}">${url}</a>`)
|
||||||
} else {
|
} else {
|
||||||
ws.send(color("red", "error: couldn't find file to alias"));
|
ws.send(color("red", "error: couldn't find file to alias"));
|
||||||
|
|||||||
Reference in New Issue
Block a user