Youtube Embed Code already provides a way to autoload captions and even set default caption language. We should provide support to activate this feature.

Comments

Status:Active» Needs review
StatusFileSize
new3.3 KB

Patch provided enables captions support with the option to set current system language as default caption too.

Status:Needs work» Needs review

This is really handy!

I'd replace using LANGUAGE_TYPE_INTERFACE and the $GLOBALS variable directly with this:

global $language;
$query['cc_lang_pref'] = $language->language;

And also check against accidentally using an 'und' language.

This patch certainly does the trick though, thank you.

Status:Needs review» Needs work

Would be nice to have one or two line of comment to explain what is doing this new code.

Moving to more consistent

<?php
global $language;
?>
+ typo fix + explanatory comments.

@dagmar Done!

Sorry moving to a single commit...

Status:Needs review» Reviewed & tested by the community

Thanks!

Patch looks good, tested and it works as expected. +1 on RTBC

StatusFileSize
new2.7 KB

Re-rolling dagmar's changes while fixing some merge conflicts.

Issue summary:View changes
Status:Reviewed & tested by the community» Fixed

Status:Fixed» Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.