Difference between revisions of "User:Cgomes7/Subtitle Documentation"
(→Parameters) |
(→Parameters) |
||
Line 70: | Line 70: | ||
'''Text:''' is the text that will appear | '''Text:''' is the text that will appear | ||
− | '''Language:''' the language of the subtitle | + | '''Language:''' [optional] the language of the subtitle |
− | '''Languagesrc:''' the source of the language option | + | '''Languagesrc:''' [optional] the source of the language option |
− | '''Accessibilitysrc:''' the source of the accessibility option | + | '''Accessibilitysrc:''' [optional] the source of the accessibility option |
== Returns == | == Returns == |
Revision as of 17:00, 7 March 2011
Contents
Subtitle Plug-in
Description
<script src="popcorn.subtitle.js"></script>
Examples
Simple Example
.subtitle({ start: 5, // seconds end: 15, // seconds text: 'this is the a subtitle', } )
Simple Example with Google Translate:
.subtitle({ start: 20, // seconds end: 45, // seconds text: 'this is another subtitle', language: "en", languagesrc: "language", } )
Then use combo box to select language:
Choose your language <select id="language"> <option value="zh" selected="selected">Chinese</option> <option value="en">English</option> <option value="fr">French</option> <option value="de">German</option> <option value="it">Italian</option> <option value="ja">Japanese</option> <option value="ko">Korean</option> <option value="fa">Persian</option> <option value="pl">Polish</option> <option value="pt">Portuguese</option> <option value="es">Spanish</option> </select>
Simple Example with Accessibility:
.subtitle({ start: 20, // seconds end: 45, // seconds text: 'this is another subtitle', language: "en", accessibilitysrc: "accessibility" } )
Then use check box to turn accessibility on and off:
<input type="checkbox" id="accessibility" checked="checked" />All subtitles (accessibility)
Syntax
.subtitle({ start: end: text: language: languagesrc: accessibilitysrc: } )
Parameters
Start: is the time the subtitle to appear
End: is the time the subtitle to disappear
Text: is the text that will appear
Language: [optional] the language of the subtitle
Languagesrc: [optional] the source of the language option
Accessibilitysrc: [optional] the source of the accessibility option
Returns
Nothing