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
} )
===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: <div> Choose your language
<select id="language">
<option value="zh" selected="selected">Chinese</option>
<option value="es">Spanish</option>
</select>
<input type="checkbox" id="accessibility" checked="checked" />All subtitles (accessibility)
== Syntax ==
== Parameters ==
'''Start:''' is the time that you want the subtitle to appear(INT)
'''End:''' is the time that you want 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 ==