mirror of
https://github.com/gosticks/PiPer.git
synced 2026-07-04 07:00:01 +00:00
Worked around Safari bug causing captions to persist in YouTube
Worked around Safari bug causing captions to persist in Picture in Picture mode when MediaSource buffers demonstrated in YouTube when changing videos
This commit is contained in:
Binary file not shown.
@@ -638,6 +638,16 @@ const resources = {
|
||||
neighbourButton.title = neighbourTitle;
|
||||
});
|
||||
bypassBackgroundTimerThrottling();
|
||||
|
||||
// Workaround Safari bug; old captions persist in Picture in Picture mode when MediaSource buffers change
|
||||
const video = /** @type {?HTMLVideoElement} */ (currentResource.videoElement());
|
||||
document.addEventListener('spfrequest', function(){
|
||||
showingCaptions = false;
|
||||
removeCaptions(video);
|
||||
});
|
||||
document.addEventListener('spfdone', function(){
|
||||
showingCaptions = video.webkitPresentationMode == 'picture-in-picture';
|
||||
});
|
||||
},
|
||||
buttonInsertBefore: function(/** Element */ parent) {
|
||||
return parent.lastChild;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.2.1</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>61</string>
|
||||
<string>62</string>
|
||||
<key>Developer Identifier</key>
|
||||
<string>BQ6Q24MF9X</string>
|
||||
<key>URL</key>
|
||||
|
||||
Reference in New Issue
Block a user