1
edit
Changes
→Subtitle Plug-in
== Subtitle Plug-in ==
<script src="popcorn.subtitle.js"></script>
To use Google translate, import:
<script src="http://google.com/jsapi"></script>
== Examples ==
===Simple Example===
.subtitle({
start: 5, // seconds
end: 15, // seconds
text: 'this is the a subtitle',
} )
<option value="zh" selected="selected">Chinese</option>
<option value="en">English</option>
<option value="pt">Portuguese</option>
<option value="es">Spanish</option>
<div>
<input type="checkbox" id="accessibility" checked="checked" />All subtitles (accessibility)
</div>
== Syntax ==
.subtitle({
start:
end:
text:
language:
languagesrc:
accessibilitysrc:
} )
== Parameters ==
'''Start:''' is the time the subtitle to appear (INT)
'''End:''' is the time the subtitle to disappear (INT)
'''Text:''' is the text that will appear (STRING)
'''Language:''' [optional] the language of the subtitle (STRING)
'''Languagesrc:''' [optional] the source of the language option (Combo Box)
'''Accessibilitysrc:''' [optional] the source of the accessibility option (Check Box)
== Returns ==
Nothing
== Links ==
*[https://github.com/annasob/popcorn-js/blob/0.4/plugins/subtitle/popcorn.subtitle.js Subtitle Source Code]
*[https://github.com/annasob/popcorn-js/blob/0.4/plugins/subtitle/popcorn.subtitle.html Example Source Code]