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

GDrupal’s picture

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.

helior’s picture

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.

dagmar’s picture

Status:Needs review» Needs work

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

GDrupal’s picture

Moving to more consistent

<?php
global $language;
?>

+ typo fix + explanatory comments.

dagmar’s picture

GDrupal’s picture

@dagmar Done!

GDrupal’s picture

Sorry moving to a single commit...

dagmar’s picture

Status:Needs review» Reviewed & tested by the community

Thanks!

iamEAP’s picture

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

helior’s picture

StatusFileSize
new2.7 KB

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

aaron’s picture

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.