web: watch-party layer for the Discord Activity
party.js is inert unless a transport attaches. The host publishes route changes and playback snapshots; viewers mirror the route, load the host's stream without scraping and follow its clock. Also: forceProxy playback, bug-tv-tmdb/bug-tv-img meta overrides, relative API bases (/tv), trailer hidden in party mode, and the web package no longer ships web/test.
This commit is contained in:
1 parent
5ab3683f44
commit
ee0e36d2c7
14 files changed
+800
-17
No files matched your search
@@ -24,6 +24,11 @@ export const TMDB_KEY_STORAGE_KEY = 'bug-tv.tmdbKey.v1';
|
||||
function normalize(value) {
|
||||
let v = String(value || '').trim();
|
||||
if (!v) return '';
|
||||
// "/tv" (Discord Activity URL mapping): same-origin path
|
||||
if (v.startsWith('/') && !v.startsWith('//')) {
|
||||
const origin = typeof location !== 'undefined' && /^https?:$/.test(location.protocol) ? location.origin : '';
|
||||
return (origin + v).replace(/\/+$/, '');
|
||||
}
|
||||
if (!/^https?:\/\//i.test(v)) v = `${/^(localhost|127\.|\[::1\])/.test(v) ? 'http' : 'https'}://${v}`;
|
||||
return v.replace(/\/+$/, '');
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user