2021-04-20 23:58:59

Weird thing. When I watch trailers for anime, in the wiedget that appears at the bottom of the site I can read subtitles at the top using typical reading commands. but I can't find them in the usual player widget when watching an episode even though I've selected subtitles. Am I missing something here?

Discord: clemchowder633

2021-04-21 13:08:09

Yes and no. The subtitles aren't accessible mostly because of some inappropriate use of web technologies in the Netflix player on the web. There's a somewhat hacky way to still get the subs read  though.
Start your video playing, then pause it. Bring up devtools and paste the following into the console:
document.getElementsByClassName("VideoContainer")[0].removeAttribute('aria-hidden');document.getElementsByClassName("player-timedtext")[0].setAttribute("role", "alert")

Hit enter, dismiss devtools and unpause the video, you should now have NVDA toss aria alerts at you with the subs in them. That does mean you get the word "alert" echoed at you for every sub, something that doesn't bother me all that much personally, but you can speechDictionary that away if it gets too annoying.

2021-04-21 18:45:03

Oh cool. Thanks for that! I might have to try it. I was just wondering why I could still read them when watching the trailers and not regular episodes of shows. It was weird.

Discord: clemchowder633

2021-04-21 19:47:51

yes, this is cool. I thought the subs were streamed as images. I know a few people which will like this. I could turn it into a greaseMonkey script, I guess.
btw, wouldn't setAttribute("aria-live", "assertive") remove the alert prefix?
To remove it, I guess you could use document.getElementsByClassName("player-timedtext")[0].removeAttribute("role") or aria-live, if you used my suggestion

2021-04-22 00:15:23

So the string should look like this then?

document.getElementsByClassName("VideoContainer")[0].removeAttribute('aria-hidden');document.getElementsByClassName("player-timedtext")[0].removeAttribute("role")

I tried that and it didn't work.

Discord: clemchowder633

2021-04-22 00:23:24

I played with various incarnations of this. I'm not entirely certain why but turning it into a live region just ...doesn't work properly. Using the alert role does work for me at least, the console should respond with " undefined". Removing the role kinda defeats the whole purpose of the script to begin with smile

2021-04-22 20:27:04

I see, going to try it when I get to in front of a pc with netflix. I guess the remove attribute was for disabling the script, he asked about this above.

2021-04-24 00:28:38

Could reading subtitles work with Lion, that NVDA addon?

2021-04-24 00:39:26

Lion works just fine. But this hack is actually more reliable.

Discord: clemchowder633

2021-05-04 23:11:55

@zersiax, tried this and it doesn't seem to work. the role gets assigned to the div, but the div is empty each time I look at it, so it doesn't announce everything. I checkked that subtitles display on the screen. Any ideas?