Bug 1840583: PiP subtitle fix for Disney+ Hotstar r=pip-reviewers,mhowell

Differential Revision: https://phabricator.services.mozilla.com/D182252
This commit is contained in:
Devesh Bisen 2023-07-05 15:18:40 +00:00
parent b02dbe2bb1
commit 1fc617b3b9

View File

@ -6,14 +6,12 @@
class PictureInPictureVideoWrapper {
setCaptionContainerObserver(video, updateCaptionsFunction) {
let container = document.querySelector(".subtitle-container");
let container = document.querySelector(".shaka-text-container");
if (container) {
updateCaptionsFunction("");
const callback = function (mutationsList, observer) {
let textNodeList = container
.querySelector(".shaka-text-container")
?.querySelectorAll("span");
let textNodeList = container?.querySelectorAll("span");
if (!textNodeList) {
updateCaptionsFunction("");
return;