@kangsicj/nexussync 1.6.19 → 1.6.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/NexusSync.meta.js +1 -1
- package/dist/NexusSync.user.js +47 -13
- package/package.json +1 -1
package/dist/NexusSync.meta.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
// @icon https://cdn.jsdelivr.net/npm/@kangsicj/nexussync@latest/assets/icon.svg
|
|
9
9
|
// @updateURL https://cdn.jsdelivr.net/npm/@kangsicj/nexussync@latest/dist/NexusSync.meta.js
|
|
10
10
|
// @downloadURL https://cdn.jsdelivr.net/npm/@kangsicj/nexussync@latest/dist/NexusSync.user.js
|
|
11
|
-
// @version 1.6.
|
|
11
|
+
// @version 1.6.20
|
|
12
12
|
// @description Watch any web video together in perfect sync: cinema mode, live AI subtitles & translation, chat bubbles with auto-translation, quick ink, cover, go-together to the next episode.
|
|
13
13
|
// @description:ko 어떤 웹 영상이든 완벽한 싱크로 함께 보기: 시네마 모드, 실시간 AI 자막·번역, 자동 번역 말풍선 채팅, 잠깐 그리기, 가리기, 다음 화도 함께.
|
|
14
14
|
// @match *://*/*
|
package/dist/NexusSync.user.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
// @icon https://cdn.jsdelivr.net/npm/@kangsicj/nexussync@latest/assets/icon.svg
|
|
9
9
|
// @updateURL https://cdn.jsdelivr.net/npm/@kangsicj/nexussync@latest/dist/NexusSync.meta.js
|
|
10
10
|
// @downloadURL https://cdn.jsdelivr.net/npm/@kangsicj/nexussync@latest/dist/NexusSync.user.js
|
|
11
|
-
// @version 1.6.
|
|
11
|
+
// @version 1.6.20
|
|
12
12
|
// @description Watch any web video together in perfect sync: cinema mode, live AI subtitles & translation, chat bubbles with auto-translation, quick ink, cover, go-together to the next episode.
|
|
13
13
|
// @description:ko 어떤 웹 영상이든 완벽한 싱크로 함께 보기: 시네마 모드, 실시간 AI 자막·번역, 자동 번역 말풍선 채팅, 잠깐 그리기, 가리기, 다음 화도 함께.
|
|
14
14
|
// @match *://*/*
|
|
@@ -46,12 +46,12 @@
|
|
|
46
46
|
|
|
47
47
|
// The version of the code that is actually running (the manager's metadata can lag
|
|
48
48
|
// behind when an old copy is still installed).
|
|
49
|
-
const NXU_VERSION = '1.6.
|
|
49
|
+
const NXU_VERSION = '1.6.20';
|
|
50
50
|
// Rank used by the one-instance guard below and to tell newer builds apart in a room.
|
|
51
51
|
// It is independent of the public version (1.0.0 is the first public release, after
|
|
52
52
|
// private builds that reached ranks up to 10.2.0), so every older copy still installed
|
|
53
53
|
// steps aside instead of this release.
|
|
54
|
-
const NXU_RANK = '11.6.
|
|
54
|
+
const NXU_RANK = '11.6.20';
|
|
55
55
|
const NXU_SESSION = Math.random().toString(36).slice(2, 10); // this page load // raise with every release
|
|
56
56
|
// App icon (same artwork as assets/icon.svg / @icon), inlined so it shows offline too.
|
|
57
57
|
const NXU_ICON = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTYgMjU2IiByb2xlPSJpbWciIGFyaWEtbGFiZWw9Ik5leHVzU3luYyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJueGJnIiB4MT0iMCIgeTE9IjAiIHgyPSIxIiB5Mj0iMSI+PHN0b3Agb2Zmc2V0PSIwIiBzdG9wLWNvbG9yPSIjNWIyZWZmIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjZmY0ZmEzIi8+PC9saW5lYXJHcmFkaWVudD48cmFkaWFsR3JhZGllbnQgaWQ9Im54Z2xvdyIgY3g9IjAuODIiIGN5PSIwLjE0IiByPSIwLjciPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iIzdjZjlmZiIgc3RvcC1vcGFjaXR5PSIwLjU1Ii8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNv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zz4=';
|
|
@@ -716,7 +716,7 @@ async function handle(m) {
|
|
|
716
716
|
ccFit: 'Fit / fill screen (Z)', ccFitCover: 'Fill screen', ccFitContain: 'Original ratio', ccSpeed: 'Playback speed', ccNormal: 'Normal', ccLive: 'LIVE',
|
|
717
717
|
ccTimeToggle: 'Show elapsed / remaining time', ccSeconds: '{n}s', ccWatching: '{n} watching together', ccWaitPeer: 'Waiting for {name}…', ccWaitSelf: 'Loading — the room is waiting',
|
|
718
718
|
ccHelp: 'Keyboard shortcuts (?)', ccKeyPlay: 'Play / pause', ccKeySeek5: 'Back / forward 5s (Shift: 10s)', ccKeySeek10: 'Back / forward 10s', ccKeyVolume: 'Volume',
|
|
719
|
-
ccKeyPercent: 'Jump to 0%–90%', ccKeySpeed: 'Slower / faster', ccKeyMute: 'Mute', ccKeySubs: 'AI subtitles', ccKeyFull: 'Fullscreen', ccKeyFit: 'Fit / fill screen',
|
|
719
|
+
ccKeyPercent: 'Jump to 0%–90%', ccKeySpeed: 'Slower / faster', ccKeyMute: 'Mute', ccKeySubs: 'AI subtitles', ccKeyFull: 'Fullscreen', ccKeyFit: 'Fit / fill screen', ccKeySyncAll: 'Bring everyone in the room to my picture', ccSyncAll: 'everyone here',
|
|
720
720
|
ccKeyExit: 'Close menu / exit cinema', ccKeyHelp: 'This help',
|
|
721
721
|
ccTouchHelp: 'Touch: tap = show/hide controls · double-tap left/right = ∓10s (keep tapping for more) · drag sideways = scrub.', ccFullscreen: 'Fullscreen (F) — keeps subtitles & controls', fullscreenUnsupported: 'Fullscreen is not available here.',
|
|
722
722
|
syncLoopCalm: '🔁 Play/pause kept flipping by itself — automatic sync paused for 30 s (your own taps still sync)', peerLeft: '👋 {name} left the room', someone: 'Someone',
|
|
@@ -843,7 +843,7 @@ async function handle(m) {
|
|
|
843
843
|
ccFit: '화면 맞춤 / 채우기 (Z)', ccFitCover: '화면 채우기', ccFitContain: '원본 비율', ccSpeed: '재생 속도', ccNormal: '보통', ccLive: '실시간',
|
|
844
844
|
ccTimeToggle: '경과 / 남은 시간 전환', ccSeconds: '{n}초', ccWatching: '{n}명이 함께 시청 중', ccWaitPeer: '{name} 기기를 기다리는 중…', ccWaitSelf: '로딩 중 — 방이 기다려 줍니다',
|
|
845
845
|
ccHelp: '단축키 (?)', ccKeyPlay: '재생 / 일시정지', ccKeySeek5: '5초 뒤로 / 앞으로 (Shift: 10초)', ccKeySeek10: '10초 뒤로 / 앞으로', ccKeyVolume: '볼륨',
|
|
846
|
-
ccKeyPercent: '0%–90% 위치로 이동', ccKeySpeed: '느리게 / 빠르게', ccKeyMute: '음소거', ccKeySubs: 'AI 자막', ccKeyFull: '전체화면', ccKeyFit: '화면 맞춤 / 채우기',
|
|
846
|
+
ccKeyPercent: '0%–90% 위치로 이동', ccKeySpeed: '느리게 / 빠르게', ccKeyMute: '음소거', ccKeySubs: 'AI 자막', ccKeyFull: '전체화면', ccKeyFit: '화면 맞춤 / 채우기', ccKeySyncAll: '방 전체를 내 화면 위치로 맞추기', ccSyncAll: '모두 여기로',
|
|
847
847
|
ccKeyExit: '메뉴 닫기 / 시네마 종료', ccKeyHelp: '이 도움말',
|
|
848
848
|
ccTouchHelp: '터치: 탭 = 컨트롤 표시/숨김 · 좌우 두 번 탭 = ∓10초 (계속 탭하면 누적) · 옆으로 끌기 = 탐색.', ccFullscreen: '전체화면 (F) — 자막·컨트롤 유지', fullscreenUnsupported: '이 환경에서는 전체화면을 사용할 수 없습니다.',
|
|
849
849
|
syncLoopCalm: '🔁 재생/일시정지가 저절로 반복되어 자동 동기화를 30초간 멈췄습니다 (직접 누르는 조작은 그대로 동기화)', peerLeft: '👋 {name} 님이 나갔습니다', someone: '누군가',
|
|
@@ -7540,6 +7540,8 @@ async function handle(m) {
|
|
|
7540
7540
|
// A plain row of names: a tap does nothing (it used to flip the row into a column).
|
|
7541
7541
|
pill.addEventListener('click', (e) => e.stopPropagation());
|
|
7542
7542
|
uiElements.uiWrapper.appendChild(pill);
|
|
7543
|
+
// Placed at once (it used to wait for the next drag or resize and showed up off screen).
|
|
7544
|
+
placePresencePill();
|
|
7543
7545
|
}
|
|
7544
7546
|
if (!pill) return;
|
|
7545
7547
|
const entries = Object.values(STATE.presenceMap);
|
|
@@ -8068,13 +8070,24 @@ async function handle(m) {
|
|
|
8068
8070
|
dock.style.transformOrigin = `${isTop ? 'top' : 'bottom'} ${isLeft ? 'left' : 'right'}`;
|
|
8069
8071
|
dock.style.transform = dock.classList.contains('open') ? 'translateY(0)' : `translateY(${isTop ? '-15px' : '15px'})`;
|
|
8070
8072
|
reactPill.style.transform = reactPill.classList.contains('visible') ? 'translateX(0)' : `translateX(${isLeft ? '-20px' : '20px'})`;
|
|
8073
|
+
placePresencePill();
|
|
8074
|
+
}
|
|
8075
|
+
|
|
8076
|
+
// The names row sits just outside the ⚙ button, on the side facing the middle of the screen
|
|
8077
|
+
// (above it in the lower half, below it in the upper half), and never past the screen's edge.
|
|
8078
|
+
function placePresencePill() {
|
|
8071
8079
|
const pill = shadow?.getElementById('nxu-presence-pill');
|
|
8072
|
-
|
|
8073
|
-
|
|
8074
|
-
|
|
8075
|
-
|
|
8076
|
-
|
|
8077
|
-
|
|
8080
|
+
const wrapper = uiElements.uiWrapper;
|
|
8081
|
+
if (!pill || !wrapper) return;
|
|
8082
|
+
const rect = localBox(wrapper), w = getW(), h = getH();
|
|
8083
|
+
const isLeft = rect.left + 24 < w / 2, isTop = rect.top + 24 < h / 2;
|
|
8084
|
+
pill.style.top = isTop ? 'auto' : '-30px';
|
|
8085
|
+
pill.style.bottom = isTop ? '-30px' : 'auto';
|
|
8086
|
+
pill.style.left = isLeft ? '0' : 'auto';
|
|
8087
|
+
pill.style.right = isLeft ? 'auto' : '0';
|
|
8088
|
+
// Room on that side: from the button's edge to the screen's edge (8 px margin).
|
|
8089
|
+
const room = isLeft ? w - rect.left - 8 : rect.left + rect.width - 8;
|
|
8090
|
+
pill.style.maxWidth = Math.max(120, Math.min(360, room)) + 'px';
|
|
8078
8091
|
}
|
|
8079
8092
|
|
|
8080
8093
|
// Notch / home-indicator insets (iPhone), so controls never sit under them.
|
|
@@ -8622,7 +8635,7 @@ async function handle(m) {
|
|
|
8622
8635
|
.nx-spark { position:absolute; font-size:13px; pointer-events:none; transform:translate(-50%,-50%); opacity:0; animation:nxSpark .7s cubic-bezier(.2,.7,.3,1) both; z-index:2100; }
|
|
8623
8636
|
@keyframes nxSpark { 0% { opacity:1; transform:translate(-50%,-50%) scale(.6); } 100% { opacity:0; transform:translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.05) rotate(var(--rot)); } }
|
|
8624
8637
|
@media (prefers-reduced-motion: reduce) { .react-btn.pop, .react-btn.pop::after, .nx-spark { animation:none !important; } }
|
|
8625
|
-
.presence-pill { position:absolute; display:flex; gap:3px; align-items:center; font-size:11px; padding:3px 4px; border-radius:99px; background:rgba(0,0,0,0.45); color:#e0e0e0; white-space:nowrap; pointer-events:auto; cursor:default; max-width:min(78vw, 360px); overflow:hidden; }
|
|
8638
|
+
.presence-pill { position:absolute; right:0; top:-30px; display:flex; gap:3px; align-items:center; font-size:11px; padding:3px 4px; border-radius:99px; background:rgba(0,0,0,0.45); color:#e0e0e0; white-space:nowrap; pointer-events:auto; cursor:default; max-width:min(78vw, 360px); overflow:hidden; }
|
|
8626
8639
|
.nx-who { display:inline-flex; align-items:center; gap:4px; padding:2px 7px 2px 5px; border-radius:99px; background:rgba(255,255,255,0.1); font-size:11.5px; font-weight:600; line-height:1.3; max-width:140px; color:rgba(255,255,255,0.92); text-shadow:0 1px 2px rgba(0,0,0,0.6); }
|
|
8627
8640
|
.nx-who.me { background:rgba(255,255,255,0.18); }
|
|
8628
8641
|
.nx-who.away { opacity:0.55; }
|
|
@@ -11535,6 +11548,18 @@ async function handle(m) {
|
|
|
11535
11548
|
start() {
|
|
11536
11549
|
if (this._timer || !IS_TOP) return;
|
|
11537
11550
|
this._timer = setInterval(() => { try { this.tick(); } catch (_) { } }, 1000);
|
|
11551
|
+
// Back from another app or tab (phones pause or freeze a page in the background):
|
|
11552
|
+
// put the picture in step with the room at once instead of after a few seconds.
|
|
11553
|
+
if (!this._onVis) {
|
|
11554
|
+
this._onVis = () => {
|
|
11555
|
+
if (document.hidden || !STATE.handshakeVerified || STATE.isViewer) return;
|
|
11556
|
+
setTimeout(() => {
|
|
11557
|
+
const room = _getVideoState(), me = this.local();
|
|
11558
|
+
if (room && me && ((room.play && me === 'z') || (!room.play && me === 'p'))) { logDebug('Play check: back in front — putting the picture in step with the room.', 'info'); this.heal(room); }
|
|
11559
|
+
}, 400);
|
|
11560
|
+
};
|
|
11561
|
+
document.addEventListener('visibilitychange', this._onVis);
|
|
11562
|
+
}
|
|
11538
11563
|
},
|
|
11539
11564
|
stop() { clearInterval(this._timer); this._timer = null; this._hide(); this._since = 0; this._kind = ''; this._tries = 0; this._last = ''; },
|
|
11540
11565
|
tick() {
|
|
@@ -13667,7 +13692,7 @@ async function handle(m) {
|
|
|
13667
13692
|
const rows = [
|
|
13668
13693
|
[['Space', 'K'], 'ccKeyPlay'], [['←', '→'], 'ccKeySeek5'], [['J', 'L'], 'ccKeySeek10'], [['↑', '↓'], 'ccKeyVolume'],
|
|
13669
13694
|
[['0', '9'], 'ccKeyPercent'], [['<', '>'], 'ccKeySpeed'], [['M'], 'ccKeyMute'], [['C'], 'ccKeySubs'],
|
|
13670
|
-
[['F'], 'ccKeyFull'], [['Z'], 'ccKeyFit'], [['Esc'], 'ccKeyExit'], [['?'], 'ccKeyHelp']
|
|
13695
|
+
[['F'], 'ccKeyFull'], [['Z'], 'ccKeyFit'], ...(STATE.handshakeVerified ? [[['G'], 'ccKeySyncAll']] : []), [['Esc'], 'ccKeyExit'], [['?'], 'ccKeyHelp']
|
|
13671
13696
|
];
|
|
13672
13697
|
const dl = createEl('dl');
|
|
13673
13698
|
rows.forEach(([keys, label]) => {
|
|
@@ -13918,6 +13943,15 @@ async function handle(m) {
|
|
|
13918
13943
|
if (e.shiftKey) return false;
|
|
13919
13944
|
if (IS_TOP) COVER.toggle(); else up('cover');
|
|
13920
13945
|
break;
|
|
13946
|
+
case 'KeyG':
|
|
13947
|
+
// Everyone in the room to this device's picture: where it is, playing or
|
|
13948
|
+
// paused (when someone drifted or got stuck). Only in a room.
|
|
13949
|
+
if (e.shiftKey || !STATE.handshakeVerified) return false;
|
|
13950
|
+
if (control) { const info = control.info(); if (!info) return false; control.seek(info.time); }
|
|
13951
|
+
else if (STATE.video) act('seek', STATE.video.currentTime);
|
|
13952
|
+
else return false;
|
|
13953
|
+
this.flash('⇆ ' + t('ccSyncAll'));
|
|
13954
|
+
break;
|
|
13921
13955
|
default:
|
|
13922
13956
|
return false;
|
|
13923
13957
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kangsicj/nexussync",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.20",
|
|
4
4
|
"description": "Watch-together userscript: media sync, cinema mode, live AI subtitles, chat bubbles and quick ink for Violentmonkey, Tampermonkey and iOS Userscripts.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"userscript",
|