Force closed caption in YouTube Video

Hello!

I'm embedding some YouTube videos in a Rise course. We have added Japanese closed captions, and I'd like to force the video to play with those closed captions. If I use the following URL, the video displays in my web browser as I'd like it to, with Japanese subtitles:

https://www.youtube.com/embed/puWWEylmPIs?rel=0&showinfo=0&hl=ja&cc_lang_pref=ja&cc_load_policy=1

If I then copy and paste that URL into my Rise course into a video Block, it displays the subtitles in English instead of Japanese. If I try to use the embed code with that exact same URL:

<iframe width="570" height="350" src="https://www.youtube.com/embed/puWWEylmPIs?rel=0&showinfo=0&hl=ja&cc_lang_pref=ja&cc_load_policy=1” frameborder="0" allowfullscreen></iframe>

I get an error from Rise displayed under the block that says "Please enter a valid URL or iframe"

Does Rise filter out some of the parameters in these Youtube URLs?

Thanks for any help you can offer.
Dan Fletcher

2 Replies
Daniel Fletcher

OK, this is really weird. 

If I copy the Embed code from Youtube and paste it into Rise, it works fine.

If I copy the Embed code from Youtube, paste it into Rise and manually edit it to add the parameters I want (?rel=0&cc_load_policy=1&hl=ja&autoplay=1), it works fine.

If I copy the Embed code from Youtube, paste it into TextEdit (on the Mac) or into Word, edit the embed code to add the parameters listed above, paste it into Rise, I get the "please enter a valid URL or iFrame" message.

If I copy the Embed code from Youtube, paste it into Rise, copy the parameters I want from TextEdit on the Mac (?rel=0&cc_load_policy=1&hl=ja&autoplay=1), paste them into the middle of the embed code I already copied into Rise, it works fine.

If I copy the Embed code from Youtube, paste it into TextEdit or Word, then immediately select it in either of those programs and copy the exact same Embed code into Rise, I get the "please enter a valid URL or iFrame" error message again.

So it seems that Rise gets upset when you edit an embed code in an external program and then paste the edited text into Rise.

Can anyone out there replicate this very weird behavior?

At least I now have a workaround, but it's very weird!

Dan

Ashley Terwilliger

Hi Dan,

I suspect that pasting it into Word or another Text editor is changing the quotes associated with the embed code. I've seen that happen when our team is sharing links in Slack.

Here are a few tips for troubleshooting invalid embed code:

  • Make sure your embed code has opening and closing iframe tags: <iframe …></iframe>.
  • Don't add text between or outside the opening and closing iframe tags. For example, this won't work: <iframe …>Powered by Office Online.</iframe>.
  • Don't use single quotes for iframe attributes. Use double quotes. Invalid: width='500px'. Valid: width="500px".
  • Don't use curly quotes for iframe attributes. Use straight quotes. Invalid: width=“500px”. Valid: width="500px".