JAYNESTV commited on
Commit
498a5eb
·
verified ·
1 Parent(s): 0b490ec

Upload index.html

Browse files
Files changed (1) hide show
  1. index.html +75 -2
index.html CHANGED
@@ -802,6 +802,11 @@
802
  .vwrap,.vwrap .seek-zone{touch-action:none}
803
  .pc-dim{position:absolute;inset:0;background:#000;pointer-events:none;z-index:2;opacity:0}
804
  .pc-hud{position:absolute;top:18%;left:50%;transform:translateX(-50%);background:rgba(0,0,0,.65);color:#fff;font-weight:800;font-size:15px;padding:8px 16px;border-radius:999px;opacity:0;transition:opacity .2s;pointer-events:none;z-index:4}
 
 
 
 
 
805
  .pc-hud.on{opacity:1}
806
  .pc-prev{display:none;position:absolute;bottom:52px;transform:translateX(-50%);text-align:center;font-size:12px;font-weight:700;color:#fff}
807
  .pc-prev video{display:none;width:120px;height:68px;object-fit:cover;border:2px solid #fff;border-radius:6px;background:#000}
@@ -2805,6 +2810,8 @@ const I18N_EXTRA7 = {"sw": {"not_live_msg": "Haipatikani kwa LIVE", "vol_warn":
2805
  Object.keys(I18N_EXTRA7).forEach(l => { I18N[l] = Object.assign(I18N[l] || {}, I18N_EXTRA7[l]); });
2806
  const I18N_EXTRA8 = {"sw": {"dq_paused_resume": "Imesimamishwa — gusa ↻ kuendelea"}, "en": {"dq_paused_resume": "Paused — tap ↻ to resume"}, "ar": {"dq_paused_resume": "متوقف مؤقتاً — اضغط ↻ للمتابعة"}, "fr": {"dq_paused_resume": "En pause — touchez ↻ pour reprendre"}};
2807
  Object.keys(I18N_EXTRA8).forEach(l => { I18N[l] = Object.assign(I18N[l] || {}, I18N_EXTRA8[l]); });
 
 
2808
  function T(k, v) { return t(k, v); }
2809
  // Maandishi yaliyoandikwa kwenye HTML kupitia data-i18n / data-i18n-ph / data-i18n-title
2810
  function applyI18nAttrs() {
@@ -5185,6 +5192,7 @@ const PC_I = {
5185
  vol: '<svg viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M11 5 6 9H2v6h4l5 4z" fill="#fff"/><path d="M15.5 8.5a5 5 0 0 1 0 7M18.5 5.5a9 9 0 0 1 0 13"/></svg>',
5186
  mute: '<svg viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M11 5 6 9H2v6h4l5 4z" fill="#fff"/><path d="m22 9-6 6M16 9l6 6"/></svg>',
5187
  fs: '<svg viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M8 3H3v5M16 3h5v5M8 21H3v-5M21 16v5h-5"/></svg>',
 
5188
  back: SEEK_ICON_BACK, fwd: SEEK_ICON_FWD,
5189
  };
5190
  function pcFmt(t){ if (!isFinite(t) || t < 0) t = 0; t = Math.floor(t); const h = Math.floor(t / 3600), m = Math.floor(t % 3600 / 60), s = String(t % 60).padStart(2, '0'); return h ? h + ':' + String(m).padStart(2, '0') + ':' + s : m + ':' + s; }
@@ -5289,7 +5297,7 @@ async function pcPrepareBoost(v){
5289
  let prev = node; eq.forEach(f => { prev.connect(f); prev = f; });
5290
  prev.connect(dly); dly.connect(gain); gain.connect(lim); lim.connect(ac.destination);
5291
  v.__pcEq = eq; v.__pcDly = dly;
5292
- v.__pcGain = gain;
5293
  try { pcEqApply(v); } catch (_) {}
5294
  return true;
5295
  } catch (_) { v.__pcBoostFail = true; return false; }
@@ -5758,6 +5766,69 @@ function ensureSound(v){
5758
  const go = () => { if (v.paused) v.play().catch(() => {}); };
5759
  v.addEventListener('canplay', go, { once: true });
5760
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5761
  function attachCustomControls(v){
5762
  if (!v || v.tagName !== 'VIDEO' || v.closest('.vwrap')) return;
5763
  v.removeAttribute('controls');
@@ -5768,7 +5839,7 @@ function attachCustomControls(v){
5768
  pc.innerHTML = `<div class="pc-spin"></div><div class="pc-hud"></div>
5769
  <div class="pc-mid"><button class="sk pc-b" data-a="back">${PC_I.back}</button><button class="big pc-b" data-a="pp"></button><button class="sk pc-b" data-a="fwd">${PC_I.fwd}</button></div>
5770
  <div class="pc-bar"><div class="pc-prev"><video muted playsinline preload="metadata"></video><span></span></div><div class="pc-seek"><span class="pc-cur">0:00</span><input type="range" min="0" max="1000" value="0" aria-label="Seek"><span class="pc-dur">0:00</span></div>
5771
- <div class="pc-row"><span class="pc-live pc-b" data-a="golive">● LIVE</span><span class="pc-sp"></span><button class="pc-b" data-a="vol" aria-label="${T('tl_audio')}">${PC_I.vol}</button><button class="pc-b pc-pill" data-a="q" style="display:none">Auto</button><button class="pc-b pc-pill" data-a="cc" style="display:none">CC</button><button class="pc-b pc-pill" data-a="tools" aria-label="${T('tl_zan')}">${T('tl_zan')}</button><button class="pc-b" data-a="gear" style="display:none"><svg viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 0 1-4 0v-.1a1.7 1.7 0 0 0-1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 0 1 0-4h.1a1.7 1.7 0 0 0 1.5-1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3h0a1.7 1.7 0 0 0 1-1.5V3a2 2 0 0 1 4 0v.1a1.7 1.7 0 0 0 1 1.5h0a1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8v0a1.7 1.7 0 0 0 1.5 1H21a2 2 0 0 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1z"/></svg></button><button class="pc-b" data-a="cast" style="display:none" aria-label="Cast"><svg viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M2 8V6a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-6"/><path d="M2 12a9 9 0 0 1 8 8M2 16a5 5 0 0 1 4 4M2 20h.01"/></svg></button><button class="pc-b" data-a="rot" aria-label="Zungusha"><svg viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="6" width="14" height="11" rx="2"/><path d="M20 8v6a4 4 0 0 1-4 4h-3m0 0 2-2m-2 2 2 2"/></svg></button><button class="pc-b" data-a="fs">${PC_I.fs}</button></div></div>`;
5772
  wrap.appendChild(pc);
5773
  const q = s => pc.querySelector(s), range = q('input'), big = q('.big'), bq = q('[data-a=q]'), bcc = q('[data-a=cc]'), bg = q('[data-a=gear]');
5774
  const refresh = () => {
@@ -5796,6 +5867,7 @@ function attachCustomControls(v){
5796
  else if (a === 'cc') pcOpenSheet(wrap, ['sub', 'sync']);
5797
  else if (a === 'gear') pcOpenSheet(wrap, ['lang', 'speed']);
5798
  else if (a === 'tools') pcOpenTools(wrap, v);
 
5799
  else if (a === 'golive') { const sp = span(); if (sp) v.currentTime = sp.e; }
5800
  else if (a === 'cast') v.remote.prompt().catch(() => toastMsg(T('cast_unavail')));
5801
  else if (a === 'rot') pcRotate(wrap);
@@ -5946,6 +6018,7 @@ function stopPlayer(){
5946
  playerEl.classList.remove('mini');
5947
  clearUpNext();
5948
  if (document.pictureInPictureElement) { document.exitPictureInPicture().catch(()=>{}); }
 
5949
  stopMediaOnly();
5950
  stage.innerHTML = ''; toastEl.textContent = '';
5951
  qualityRow.style.display = 'none'; qualityRow.innerHTML = '';
 
802
  .vwrap,.vwrap .seek-zone{touch-action:none}
803
  .pc-dim{position:absolute;inset:0;background:#000;pointer-events:none;z-index:2;opacity:0}
804
  .pc-hud{position:absolute;top:18%;left:50%;transform:translateX(-50%);background:rgba(0,0,0,.65);color:#fff;font-weight:800;font-size:15px;padding:8px 16px;border-radius:999px;opacity:0;transition:opacity .2s;pointer-events:none;z-index:4}
805
+ .pc-rec{position:absolute;top:calc(10px + env(safe-area-inset-top,0px));left:12px;z-index:7;display:flex;align-items:center;gap:6px;background:rgba(0,0,0,.6);color:#fff;font-size:12px;font-weight:800;padding:4px 10px;border-radius:999px;pointer-events:none}
806
+ .pc-rec i{width:8px;height:8px;border-radius:50%;background:#ff3b30;animation:pcrecb 1s infinite}
807
+ @keyframes pcrecb{50%{opacity:.25}}
808
+ .pc-b.rec-on svg circle:first-child{stroke:#ff3b30}
809
+ .pc-b.rec-on svg circle:last-child{animation:pcrecb 1s infinite}
810
  .pc-hud.on{opacity:1}
811
  .pc-prev{display:none;position:absolute;bottom:52px;transform:translateX(-50%);text-align:center;font-size:12px;font-weight:700;color:#fff}
812
  .pc-prev video{display:none;width:120px;height:68px;object-fit:cover;border:2px solid #fff;border-radius:6px;background:#000}
 
2810
  Object.keys(I18N_EXTRA7).forEach(l => { I18N[l] = Object.assign(I18N[l] || {}, I18N_EXTRA7[l]); });
2811
  const I18N_EXTRA8 = {"sw": {"dq_paused_resume": "Imesimamishwa — gusa ↻ kuendelea"}, "en": {"dq_paused_resume": "Paused — tap ↻ to resume"}, "ar": {"dq_paused_resume": "متوقف مؤقتاً — اضغط ↻ للمتابعة"}, "fr": {"dq_paused_resume": "En pause — touchez ↻ pour reprendre"}};
2812
  Object.keys(I18N_EXTRA8).forEach(l => { I18N[l] = Object.assign(I18N[l] || {}, I18N_EXTRA8[l]); });
2813
+ const I18N_EXTRA9 = {"sw": {"rec_start": "Rekodi video", "rec_stop": "Simamisha kurekodi", "rec_on": "Inarekodi…", "rec_saved": "Rekodi imehifadhiwa: {n}", "rec_unsupported": "Kivinjari hiki hakiwezi kurekodi video.", "rec_failed": "Imeshindwa kurekodi video hii (huenda ina ulinzi wa CORS/DRM).", "rec_empty": "Hakuna kilichorekodiwa.", "rec_limit": "Kikomo cha ukubwa kimefika — rekodi imehifadhiwa."}, "en": {"rec_start": "Record video", "rec_stop": "Stop recording", "rec_on": "Recording…", "rec_saved": "Recording saved: {n}", "rec_unsupported": "This browser can't record video.", "rec_failed": "Couldn't record this video (it may be CORS/DRM protected).", "rec_empty": "Nothing was recorded.", "rec_limit": "Size limit reached — recording saved."}, "ar": {"rec_start": "تسجيل الفيديو", "rec_stop": "إيقاف التسجيل", "rec_on": "جارٍ التسجيل…", "rec_saved": "تم حفظ التسجيل: {n}", "rec_unsupported": "لا يستطيع هذا المتصفح تسجيل الفيديو.", "rec_failed": "تعذّر تسجيل هذا الفيديو (ربما هو محمي بـ CORS/DRM).", "rec_empty": "لم يتم تسجيل أي شيء.", "rec_limit": "تم بلوغ حد الحجم — تم حفظ التسجيل."}, "fr": {"rec_start": "Enregistrer la vidéo", "rec_stop": "Arrêter l'enregistrement", "rec_on": "Enregistrement…", "rec_saved": "Enregistrement sauvegardé : {n}", "rec_unsupported": "Ce navigateur ne peut pas enregistrer la vidéo.", "rec_failed": "Impossible d'enregistrer cette vidéo (protection CORS/DRM possible).", "rec_empty": "Rien n'a été enregistré.", "rec_limit": "Limite de taille atteinte — enregistrement sauvegardé."}};
2814
+ Object.keys(I18N_EXTRA9).forEach(l => { I18N[l] = Object.assign(I18N[l] || {}, I18N_EXTRA9[l]); });
2815
  function T(k, v) { return t(k, v); }
2816
  // Maandishi yaliyoandikwa kwenye HTML kupitia data-i18n / data-i18n-ph / data-i18n-title
2817
  function applyI18nAttrs() {
 
5192
  vol: '<svg viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M11 5 6 9H2v6h4l5 4z" fill="#fff"/><path d="M15.5 8.5a5 5 0 0 1 0 7M18.5 5.5a9 9 0 0 1 0 13"/></svg>',
5193
  mute: '<svg viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M11 5 6 9H2v6h4l5 4z" fill="#fff"/><path d="m22 9-6 6M16 9l6 6"/></svg>',
5194
  fs: '<svg viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M8 3H3v5M16 3h5v5M8 21H3v-5M21 16v5h-5"/></svg>',
5195
+ rec: '<svg viewBox="0 0 24 24"><circle cx="12" cy="12" r="9" fill="none" stroke="#fff" stroke-width="2"/><circle cx="12" cy="12" r="4.5" fill="#ff3b30"/></svg>',
5196
  back: SEEK_ICON_BACK, fwd: SEEK_ICON_FWD,
5197
  };
5198
  function pcFmt(t){ if (!isFinite(t) || t < 0) t = 0; t = Math.floor(t); const h = Math.floor(t / 3600), m = Math.floor(t % 3600 / 60), s = String(t % 60).padStart(2, '0'); return h ? h + ':' + String(m).padStart(2, '0') + ':' + s : m + ':' + s; }
 
5297
  let prev = node; eq.forEach(f => { prev.connect(f); prev = f; });
5298
  prev.connect(dly); dly.connect(gain); gain.connect(lim); lim.connect(ac.destination);
5299
  v.__pcEq = eq; v.__pcDly = dly;
5300
+ v.__pcGain = gain; v.__pcLim = lim;
5301
  try { pcEqApply(v); } catch (_) {}
5302
  return true;
5303
  } catch (_) { v.__pcBoostFail = true; return false; }
 
5766
  const go = () => { if (v.paused) v.play().catch(() => {}); };
5767
  v.addEventListener('canplay', go, { once: true });
5768
  }
5769
+ // ── Rekodi video (MediaRecorder + captureStream) ──
5770
+ const PC_REC_MAX = 400 * 1024 * 1024; // kikomo cha ukubwa kwa rekodi moja (RAM ya simu)
5771
+ let __pcRec = null;
5772
+ function pcRecMime(){
5773
+ return ['video/mp4;codecs=avc1.42E01E,mp4a.40.2', 'video/webm;codecs=vp9,opus', 'video/webm;codecs=vp8,opus', 'video/webm']
5774
+ .find(m => { try { return MediaRecorder.isTypeSupported(m); } catch (_) { return false; } }) || '';
5775
+ }
5776
+ function pcRecStop(){
5777
+ const r = __pcRec; if (!r) return; __pcRec = null;
5778
+ clearInterval(r.tick); clearTimeout(r.chk);
5779
+ if (r.ind) r.ind.remove();
5780
+ if (r.btn) { r.btn.classList.remove('rec-on'); r.btn.setAttribute('aria-label', T('rec_start')); }
5781
+ try { if (r.dest && r.src) r.src.disconnect(r.dest); } catch (_) {}
5782
+ try { if (r.mr.state !== 'inactive') r.mr.stop(); } catch (_) {}
5783
+ }
5784
+ async function pcRecSave(r){
5785
+ if (!r.bytes) { if (!r.failed) toastMsg(T('rec_empty')); return; }
5786
+ const type = (r.mime || 'video/webm').split(';')[0], ext = type.includes('mp4') ? 'mp4' : 'webm';
5787
+ const blob = new Blob(r.chunks, { type }); r.chunks = [];
5788
+ const base = ((document.getElementById('ptitle') || {}).textContent || 'video').replace(/[^\w\-]+/g, '_').slice(0, 40);
5789
+ const nm = 'JAYNESMAX_REC_' + base + '_' + new Date().toISOString().slice(0, 16).replace(/[:T]/g, '-') + '.' + ext;
5790
+ const file = new File([blob], nm, { type });
5791
+ if (navigator.canShare && navigator.canShare({ files: [file] }) && window.matchMedia && matchMedia('(pointer:coarse)').matches) {
5792
+ try { await navigator.share({ files: [file], title: nm }); toastMsg('⏺ ' + T('rec_saved', { n: nm })); return; }
5793
+ catch (e) { if (e && e.name === 'AbortError') return; }
5794
+ }
5795
+ const a = document.createElement('a'); a.href = URL.createObjectURL(blob); a.download = nm;
5796
+ document.body.appendChild(a); a.click();
5797
+ setTimeout(() => { URL.revokeObjectURL(a.href); a.remove(); }, 8000);
5798
+ toastMsg('⏺ ' + T('rec_saved', { n: nm }));
5799
+ }
5800
+ function pcRecToggle(wrap, v, btn){
5801
+ if (__pcRec) { pcRecStop(); return; }
5802
+ const hud = m => { try { if (v.__pcHud) v.__pcHud(m); } catch (_) {} };
5803
+ if (typeof MediaRecorder === 'undefined' || !(v.captureStream || v.mozCaptureStream)) { hud(T('rec_unsupported')); return; }
5804
+ if (!v.videoWidth) { hud('⏺ ' + T('shot_not_ready')); return; }
5805
+ let stream, dest = null, src = null;
5806
+ try {
5807
+ const cs = (v.captureStream || v.mozCaptureStream).call(v);
5808
+ const tracks = cs.getVideoTracks().slice();
5809
+ if (v.__pcLim && v.__pcLim.context && v.__pcLim.context.state !== 'closed') { // sauti inapita kwenye Web Audio (boost/EQ)
5810
+ dest = v.__pcLim.context.createMediaStreamDestination(); src = v.__pcLim; src.connect(dest);
5811
+ tracks.push(...dest.stream.getAudioTracks());
5812
+ } else tracks.push(...cs.getAudioTracks());
5813
+ stream = new MediaStream(tracks);
5814
+ } catch (e) { hud(T('rec_failed')); return; }
5815
+ const mime = pcRecMime(); let mr;
5816
+ try { mr = new MediaRecorder(stream, Object.assign({ videoBitsPerSecond: 2500000, audioBitsPerSecond: 128000 }, mime ? { mimeType: mime } : {})); }
5817
+ catch (e) { try { mr = new MediaRecorder(stream); } catch (_) { hud(T('rec_failed')); return; } }
5818
+ const r = { mr, chunks: [], bytes: 0, mime: mr.mimeType || mime, btn, dest, src, t0: Date.now(), failed: false };
5819
+ const ind = document.createElement('div'); ind.className = 'pc-rec'; ind.innerHTML = '<i></i><span>0:00</span>'; wrap.appendChild(ind); r.ind = ind;
5820
+ r.tick = setInterval(() => { ind.lastChild.textContent = pcFmt((Date.now() - r.t0) / 1000); }, 500);
5821
+ mr.ondataavailable = e => {
5822
+ if (!e.data || !e.data.size) return;
5823
+ r.chunks.push(e.data); r.bytes += e.data.size;
5824
+ if (r.bytes > PC_REC_MAX && __pcRec === r) { pcRecStop(); toastMsg(T('rec_limit')); }
5825
+ };
5826
+ mr.onstop = () => pcRecSave(r);
5827
+ mr.onerror = () => { r.failed = true; if (__pcRec === r) pcRecStop(); toastMsg(T('rec_failed')); };
5828
+ r.chk = setTimeout(() => { if (__pcRec === r && !r.bytes) { r.failed = true; pcRecStop(); toastMsg(T('rec_failed')); } }, 5000); // video yenye ulinzi haitoi data
5829
+ __pcRec = r; btn.classList.add('rec-on'); btn.setAttribute('aria-label', T('rec_stop'));
5830
+ mr.start(1000); hud('⏺ ' + T('rec_on'));
5831
+ }
5832
  function attachCustomControls(v){
5833
  if (!v || v.tagName !== 'VIDEO' || v.closest('.vwrap')) return;
5834
  v.removeAttribute('controls');
 
5839
  pc.innerHTML = `<div class="pc-spin"></div><div class="pc-hud"></div>
5840
  <div class="pc-mid"><button class="sk pc-b" data-a="back">${PC_I.back}</button><button class="big pc-b" data-a="pp"></button><button class="sk pc-b" data-a="fwd">${PC_I.fwd}</button></div>
5841
  <div class="pc-bar"><div class="pc-prev"><video muted playsinline preload="metadata"></video><span></span></div><div class="pc-seek"><span class="pc-cur">0:00</span><input type="range" min="0" max="1000" value="0" aria-label="Seek"><span class="pc-dur">0:00</span></div>
5842
+ <div class="pc-row"><span class="pc-live pc-b" data-a="golive">● LIVE</span><span class="pc-sp"></span><button class="pc-b" data-a="rec" aria-label="${T('rec_start')}">${PC_I.rec}</button><button class="pc-b" data-a="vol" aria-label="${T('tl_audio')}">${PC_I.vol}</button><button class="pc-b pc-pill" data-a="q" style="display:none">Auto</button><button class="pc-b pc-pill" data-a="cc" style="display:none">CC</button><button class="pc-b pc-pill" data-a="tools" aria-label="${T('tl_zan')}">${T('tl_zan')}</button><button class="pc-b" data-a="gear" style="display:none"><svg viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 0 1-4 0v-.1a1.7 1.7 0 0 0-1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 0 1 0-4h.1a1.7 1.7 0 0 0 1.5-1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3h0a1.7 1.7 0 0 0 1-1.5V3a2 2 0 0 1 4 0v.1a1.7 1.7 0 0 0 1 1.5h0a1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8v0a1.7 1.7 0 0 0 1.5 1H21a2 2 0 0 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1z"/></svg></button><button class="pc-b" data-a="cast" style="display:none" aria-label="Cast"><svg viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M2 8V6a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-6"/><path d="M2 12a9 9 0 0 1 8 8M2 16a5 5 0 0 1 4 4M2 20h.01"/></svg></button><button class="pc-b" data-a="rot" aria-label="Zungusha"><svg viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="6" width="14" height="11" rx="2"/><path d="M20 8v6a4 4 0 0 1-4 4h-3m0 0 2-2m-2 2 2 2"/></svg></button><button class="pc-b" data-a="fs">${PC_I.fs}</button></div></div>`;
5843
  wrap.appendChild(pc);
5844
  const q = s => pc.querySelector(s), range = q('input'), big = q('.big'), bq = q('[data-a=q]'), bcc = q('[data-a=cc]'), bg = q('[data-a=gear]');
5845
  const refresh = () => {
 
5867
  else if (a === 'cc') pcOpenSheet(wrap, ['sub', 'sync']);
5868
  else if (a === 'gear') pcOpenSheet(wrap, ['lang', 'speed']);
5869
  else if (a === 'tools') pcOpenTools(wrap, v);
5870
+ else if (a === 'rec') pcRecToggle(wrap, v, b);
5871
  else if (a === 'golive') { const sp = span(); if (sp) v.currentTime = sp.e; }
5872
  else if (a === 'cast') v.remote.prompt().catch(() => toastMsg(T('cast_unavail')));
5873
  else if (a === 'rot') pcRotate(wrap);
 
6018
  playerEl.classList.remove('mini');
6019
  clearUpNext();
6020
  if (document.pictureInPictureElement) { document.exitPictureInPicture().catch(()=>{}); }
6021
+ try { pcRecStop(); } catch (_) {}
6022
  stopMediaOnly();
6023
  stage.innerHTML = ''; toastEl.textContent = '';
6024
  qualityRow.style.display = 'none'; qualityRow.innerHTML = '';