sampotts / plyr

A simple HTML5, YouTube and Vimeo player
https://plyr.io
MIT License
26.38k stars 2.92k forks source link

Captions Won't Turn Off Youtube #568

Open sparkktv opened 7 years ago

sparkktv commented 7 years ago

I just updated my Plyr from version 2.0.11 to 2.0.12 in my code on my website. However now the captions won't turn off like they did in the older version. Here is the script I am using... Can someone please tell me what is wrong because it worked in 2.0.11 but not in 2.0.12.

`

`
evaliyev commented 7 years ago

+1

sampotts commented 7 years ago

This is a limitation of the API I think. I will investigate though.

friday commented 6 years ago

Seems to work now in v3 (including for youtube) with new Plyr(video, {captions: {active: false}});

Edit: Nope ^

Igcorreia commented 6 years ago

From my tests today, policy should be 3 in order to disable CC.

https://stackoverflow.com/questions/23070024/how-to-disable-youtube-captions-in-a-youtube-embed-link

friday commented 6 years ago

Thanks @Igcorreia

I think what actually happened is that I tried it with a YouTube link with generated captions, which seem to be off by default. YouTube also support importing captions using VTT files and other options, which seem to be default on.

The option I suggested using has no effect for YouTube.

Reproduced here: https://codepen.io/fullkornslimpa/pen/OEKmpK

Igcorreia commented 6 years ago

@friday I have changed my plyr.js to force 3 as default and it worked perfectly. https://www.cloudtv.app/player/?id=26

If you inspect after the video loads with 'cc_load_policy=3' captions are turned off.

mlapworth commented 5 years ago

It would be so simple for youtube to add a way of forcing captions to be turned off. Why don't they do this? (I tried setting the cc_load_policy to 3, and this seemed to work for a short while, but no longer...)