-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed Captions (WebVTT) aren't displayed in IE11 in some Windows 10 OS when stream is encrypted (AES-128), cueChange event isn't fired in IE11 #3051
Comments
Hi @porasl, WebVTT or 608 captions?
Try step debugging through subtitle-stream-controller After that timeline-controller is where cues get created for either 608 or WebVTT if I am not mistaken. |
Hi @robwalch It is WebVTT. Encrypted caption works in all other browsers and in all win 10 OS instances except IE11. It works in IE11 only in an instance where TPM is available, and even not in all Win10 OS where TPM is available. Does the player need any hardware module or configuration in Win10 to support caption decryption in IE11? I ask this since the player manages the decryption of captions with no hardware dependency in other browsers and I see logic about it in the HLS JS code. When I debug my JS code (in those instances where IE11 doesn't work) I get the first cue and track 0 is used, but thereafter no "cueChange" event gets fired by IE11. It sounds like a bug in IE11 in some instances about the support of 'cueChange" event or a configuration value is required to let this IE11 event be fired (in Win10 or IE11) Or there are no captions (because of the player failure in decryption, no trace about the error in console log). I am running Chrome in parallel and I see the stream has captions and it gets displayed on the player in Chrome. And always encoded captions work in IE11 on my own laptop, same Win10 build, same IE11 version, same stream, and at the same time. ( Win10 OS build V19041) Unfortunately, I am behind the firewall and I can't share my HLS stream, but anytime I can share my screen if it is needed. I start debugging the player code as you mentioned, Thank You, |
@porasl - with which content-type are you serving the captions? |
@blacktrash In the Chrome Network tab we can see cations are encoded: |
I don't know anything about TPM or how it would impact decryption. Another sanity check you can do is look at If captions are being decrypted then they would be added to a TextTrack - you mentioned you see one - so are there more but they aren't displayed? |
@porasl - it's a shot in the dark, but can you try to serve the .vtt as |
@robwalch @blacktrash But in another Windows 10 instance which encrypted captions works I see fragment types equal to 'subtitle" are received in the function onFragDecrypted(data). Is there anything else I can debug in hls.js to see why subtitle fragments don't get decrypted? In the next step I will follow what @blacktrash recommended above about the MIME Type for VTT. |
@porasl So what happens in onFragLoaded (data) {
//...
if (this.state === State.FRAG_LOADING &&
fragCurrent &&
data.frag.type === 'subtitle' &&
fragCurrent.sn === data.frag.sn) {
// check to see if the payload needs to be decrypted
if (data.payload.byteLength > 0 && (decryptData && decryptData.key && decryptData.method === 'AES-128')) {
// decrypt the subtitles
this.decrypter.decrypt(data.payload, decryptData.key.buffer, decryptData.iv.buffer, function (decryptedData) {
hls.trigger(Event.FRAG_DECRYPTED, { frag: fragLoaded, payload: decryptedData, stats: { tstart: startTime, tdecrypt: endTime } }); decrypt (data, key, iv, callback) {
if (this.disableWebCrypto && this.config.enableSoftwareAES) {
if (this.logEnabled) {
logger.log('JS AES decrypt');
this.logEnabled = false;
}
let decryptor = this.decryptor;
if (!decryptor) {
this.decryptor = decryptor = new AESDecryptor();
}
decryptor.expandKey(key);
callback(decryptor.decrypt(data, 0, iv, this.removePKCS7Padding));
} else {
if (this.logEnabled) {
logger.log('WebCrypto AES decrypt');
this.logEnabled = false;
}
const subtle = this.subtle;
if (this.key !== key) {
this.key = key;
this.fastAesKey = new FastAESKey(subtle, key);
}
this.fastAesKey.expandKey()
.then((aesKey) => {
// decrypt using web crypto
let crypto = new AESCrypto(subtle, iv);
crypto.decrypt(data, aesKey)
.catch((err) => {
this.onWebCryptoError(err, data, key, iv, callback);
})
.then((result) => {
callback(result);
});
})
.catch((err) => {
this.onWebCryptoError(err, data, key, iv, callback);
});
}
} |
@robwalch @blacktrash I have 4 windows 10 instances and 3 have this issue with IE11. When the caption stream isn't decrypted captions are working on all of my 4 windows 10 instances. That is why there is no issue related to downloading .vtt files. All instances are windows pro and they have the latest Windows 10 builds. It seems when captions are encrypted something prevents IE11 to send GET request to get the caption VTT file. What is confusing are 1) in 5% of cases captions get downloaded and they get parsed just once (after loading of the player). 2) In one of my Windows10 instances (on my laptop), it works always. I checked IE11 settings I can't find differences and I even did reset IE11 settings, but the same result. |
@robwalch I am behind the firewall and I can't share my encrypted stream with the public. But if you want I can provide private access or I can share my desktop to demonstrate this issue. @blacktrash I changed the server to serve the vtt's Mime type as text/vtt, but this issue isn't resolved. |
I tested this issue with HLS JS V0.14.16 and found the issue is resolved. That is why I closed this ticket. |
When HLS stream is encrypted in some Windows10 instances captions aren't displayed in IE11. I wonder if there is a minimum requirement for OS version to support this feature? Is there any other configuration do we need for IE11/Windows10 to enable captions in the player when the stream is encrypted?
For example in player V0.14.12 in Windows Pro, OS build 19041 (latest Win10 OS) where TPM and PCR7 configuration are available we can see the captions when the stream is encrypted (AES-128). In those Win10 instances where captions aren't displayed we see 'cueChange' event isn't fired in IE11. I wonder if it can depend on "unknown/limited" IE11 support of 'cueChange' event as it is mentioned here: https://developer.mozilla.org/en-US/docs/Web/API/TextTrack/cuechange_event ? Or it can be because of player failure in the decryption of encrypted captions? I enabled the debug log and I don't see any error in the console log. Do we need TPM and PCR7 configuration in Windows 10 to enable captions in this scenario? Please note there is no issue with captions with encrypted HLS stream in Edge, Firefox and Chrome.
Unfortunately, I can't share my encrypted stream, but if it is necessary I can demonstrate the issue via Zoom.
The text was updated successfully, but these errors were encountered: