From a3773ea60833a6d27a3f526cc43d439fe8fd028a Mon Sep 17 00:00:00 2001 From: ScottDowne Date: Thu, 3 Mar 2011 11:59:24 -0500 Subject: [PATCH] [#316] subtitle documentation for language attributes --- plugins/subtitle/popcorn.subtitle.js | 33 ++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/plugins/subtitle/popcorn.subtitle.js b/plugins/subtitle/popcorn.subtitle.js index 21fdb27..e20e2a8 100644 --- a/plugins/subtitle/popcorn.subtitle.js +++ b/plugins/subtitle/popcorn.subtitle.js @@ -12,16 +12,41 @@ * Target is the id of the document element that the content is * appended to, this target element must exist on the DOM * Text is the text of the subtitle you want to display. + * + * Language is the expected language the subtitle text is in + * Languagesrc is the target id of the element that contains + * the language value ("en", "fr", etc.) to translate the text into + * example: + * + * Accessibilitysrc is the target id of a checkbox element + * checked means show all subtitles regardless of language and languagesrc + * not checked means only translate if language and languagesrc are different + * if no accessibilitysrc exists, default is to display all subtitles regardless * * @param {Object} options * * Example: var p = Popcorn('#video') .footnote({ - start: 5, // seconds, mandatory - end: 15, // seconds, mandatory - text: 'Hellow world', // optional - target: 'subtitlediv' // optional + start: 5, // seconds, mandatory + end: 15, // seconds, mandatory + text: 'Hellow world', // optional + target: 'subtitlediv', // optional + language: 'en', // optional + languagesrc: 'language', // optional + accessibilitysrc: 'accessibility' // optional } ) * */ -- 2.43.0