soiz1 commited on
Commit
d63e3c8
Β·
1 Parent(s): ee790c5

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +14 -1
index.html CHANGED
@@ -1454,7 +1454,20 @@ document.getElementById('sw-register-btn').addEventListener('click', registerSer
1454
  playbackSpeedValue.textContent = speed.toFixed(2) + 'x';
1455
  speedSlider.value = speed;
1456
  }
1457
-
 
 
 
 
 
 
 
 
 
 
 
 
 
1458
  // γƒ—γƒ¬γ‚€γƒ€γƒΌγ‚³γƒ³γƒˆγƒ­γƒΌγƒ«γ‚’ζœ‰εŠΉεŒ–
1459
  function enablePlayerControls() {
1460
  disabledOverlay.style.display = 'none';
 
1454
  playbackSpeedValue.textContent = speed.toFixed(2) + 'x';
1455
  speedSlider.value = speed;
1456
  }
1457
+ document.addEventListener('visibilitychange', function() {
1458
+ if (document.hidden) {
1459
+ // γ‚Ώγƒ–γŒιžγ‚’γ‚―γƒ†γ‚£γƒ–γ«γͺγ£γŸγ‚‰εŒζœŸγƒγ‚§γƒƒγ‚―γ‚’εœζ­’
1460
+ stopSyncCheck();
1461
+ if (isPlaying) {
1462
+ pauseMedia();
1463
+ }
1464
+ } else {
1465
+ // γ‚Ώγƒ–γŒγ‚’γ‚―γƒ†γ‚£γƒ–γ«γͺγ£γŸγ‚‰εŒζœŸγƒγ‚§γƒƒγ‚―γ‚’ε†ι–‹
1466
+ if (isPlaying) {
1467
+ startSyncCheck();
1468
+ }
1469
+ }
1470
+ });
1471
  // γƒ—γƒ¬γ‚€γƒ€γƒΌγ‚³γƒ³γƒˆγƒ­γƒΌγƒ«γ‚’ζœ‰εŠΉεŒ–
1472
  function enablePlayerControls() {
1473
  disabledOverlay.style.display = 'none';