<footnotes>
<footnote in="00:00:00" out="00:14:00" target="footnotediv">Look around the page as info is updated!</footnote>
</footnotes>
- <!--<resources>
+ <resources>
<footnote in="00:00:00" out="00:15:00" target="footnotediv">This video made exclusively for drumbeat.org </footnote>
- <videotag target="inthisvideo" in="00:00:05:02" out="00:00:10:07">Steve Song</videotag>
- <attribution in="00:00:05:02" out="00:00:10:07" target="container5" resourceid="villagetelcoattrib"></attribution>
- <twitter in="00:00:05:02" out="00:00:10:07" title="Steve Song" source="from:stevesong" target="personaltwitter" width="238" height="120"/>
- <wiki in="00:00:05:02" out="00:00:10:07" resourceid="villagetelco" numberOfWords="200" lang="en" target="wikidiv"/>
+ <tagThisPerson target="inthisvideo" in="00:00:05:02" out="00:00:10:07" person="Steve Song" />
+ <!--<attribution in="00:00:05:02" out="00:00:10:07" target="container5" resourceid="villagetelcoattrib"></attribution>-->
+ <twitter in="00:00:05:02" out="00:00:10:07" title="Steve Song" src="@stevesong" target="personaltwitter" width="238" height="120"/>
+ <wikipedia in="00:00:05:02" out="00:00:10:07" resourceid="villagetelco" numberOfWords="200" lang="en" target="wikidiv"/>
<flickr in="00:00:05:02" out="00:00:10:07" target="personalflickr" userid="78868639@N00" numberofimages="8" padding="4px"/>
- <googlenews in="00:00:05:02" out="00:00:10:07" target="googlenewsdiv" topic="Village Telco"/>
+ <googleNews in="00:00:05:02" out="00:00:10:07" target="googlenewsdiv" topic="Village Telco"/>
- <twitter in="00:00:10:07" out="00:00:18:04" title="Oil Spill" source="#oilspill" target="twitter" width="238" height="120"/>
- <googlenews in="00:00:10:07" out="00:00:18:04" target="googlenewsdiv" topic="Oil Spill"/>
- <attribution in="00:00:10:07" out="00:00:18:04" target="container5">Grassroots Mapping, Tungsten Monkey</attribution>
+ <twitter in="00:00:10:07" out="00:00:18:04" title="Oil Spill" src="#oilspill" target="twitter" width="238" height="120"/>
+ <googleNews in="00:00:10:07" out="00:00:18:04" target="googlenewsdiv" topic="Oil Spill"/>
+ <!--<attribution in="00:00:10:07" out="00:00:18:04" target="container5">Grassroots Mapping, Tungsten Monkey</attribution>-->
- <videotag target="inthisvideo" in="00:00:18:04" out="00:00:25:02">Keyboard Cat</videotag>
- <twitter in="00:00:18:04" out="00:00:25:02" title="Keyboard Cat" source="#keyboardcat" target="twitter" width="238" height="120"/>
- <attribution in="00:00:18:04" out="00:00:25:02" target="container5">KeyBoard Cat, Charlie Schmidt</attribution>
- <googlenews in="00:00:18:04" out="00:00:25:02" target="googlenewsdiv" topic="Keyboard Cat"/>
+ <tagThisPerson target="inthisvideo" in="00:00:18:04" out="00:00:25:02" person="Keyboard Cat"/>
+ <twitter in="00:00:18:04" out="00:00:25:02" title="Keyboard Cat" src="#keyboardcat" target="twitter" width="238" height="120"/>
+ <!--<attribution in="00:00:18:04" out="00:00:25:02" target="container5">KeyBoard Cat, Charlie Schmidt</attribution>-->
+ <googleNews in="00:00:18:04" out="00:00:25:02" target="googlenewsdiv" topic="Keyboard Cat"/>
- <videotag target="inthisvideo" in="00:00:28:09" out="00:00:29:07">Jeffrey Warren</videotag>
- <attribution in="00:00:28:09" out="00:00:29:07" target="container5">Grassroots Mapping, Tungsten Monkey</attribution>
- <videotag target="inthisvideo" in="00:00:29:08" out="00:00:31:00">Village Telco Guy</videotag>
+ <tagThisPerson target="inthisvideo" in="00:00:28:09" out="00:00:29:07" person="Jeffrey Warren" />
+ <!--<attribution in="00:00:28:09" out="00:00:29:07" target="container5">Grassroots Mapping, Tungsten Monkey</attribution>-->
+ <tagThisPerson target="inthisvideo" in="00:00:29:08" out="00:00:31:00" person="Village Telco Guy" />
- <wiki in="00:00:32:00" out="00:00:41:00" resourceid="theinternet" numberOfWords="200" target="wikidiv"/>
- <googlenews in="00:00:32:00" out="00:00:41:00" target="googlenewsdiv" topic="the internet"/>
+ <wikipedia in="00:00:32:00" out="00:00:41:00" resourceid="theinternet" numberOfWords="200" target="wikidiv"/>
+ <googleNews in="00:00:32:00" out="00:00:41:00" target="googlenewsdiv" topic="the internet"/>
- <videotag target="inthisvideo" in="00:00:41:00" out="00:01:07:09">Jeffrey Warren</videotag>
+ <tagThisPerson target="inthisvideo" in="00:00:41:00" out="00:01:07:09" person="Jeffrey Warren" />
<flickr in="00:00:41:00" out="00:01:07:09" target="personalflickr" userid="35034346917@N01" numberofimages="8" padding="4px"/>
- <twitter in="00:00:41:00" out="00:01:07:09" title="Oil Spill" source="#oilspill" target="twitter" width="238" height="120"/>
- <googlenews in="00:00:41:00" out="00:01:07:09" target="googlenewsdiv" topic="Oil Spill"/>
- <location resourceid="grandislewiki" in="00:00:41:00" out="00:01:07:09" lat="29.2720" long="-90.0233 " target="container2" zoom="8"/>
- <wiki in="00:00:41:00" out="00:01:07:09" resourceid="oilspill" numberOfWords="200" target="wikidiv"/>
+ <twitter in="00:00:41:00" out="00:01:07:09" title="Oil Spill" src="#oilspill" target="twitter" width="238" height="120"/>
+ <googleNews in="00:00:41:00" out="00:01:07:09" target="googlenewsdiv" topic="Oil Spill"/>
+ <!--<location resourceid="grandislewiki" in="00:00:41:00" out="00:01:07:09" lat="29.2720" long="-90.0233 " target="container2" zoom="8"/>-->
+ <wikipedia in="00:00:41:00" out="00:01:07:09" resourceid="oilspill" numberOfWords="200" target="wikidiv"/>
<footnote in="00:00:41:00" out="00:01:07:09" target="footnotediv">Learn more about Grass Roots mapping at www.grassrootsmapping.org</footnote>
- <twitter in="00:01:07:10" out="00:01:25:07" title="Steve Song" source="from:stevesong" target="personaltwitter" width="238" height="120"/>
+ <twitter in="00:01:07:10" out="00:01:25:07" title="Steve Song" src="@stevesong" target="personaltwitter" width="238" height="120"/>
<flickr in="00:01:07:10" out="00:01:25:07" target="personalflickr" userid="78868639@N00" numberofimages="8" padding="4px"/>
- <location id="CapeTown" resourceid="capetownwiki" in="00:01:07:10" out="00:01:32:07" lat="-33.9238" long="18.4233" target="container2" zoom="8"/>
- <wiki in="00:01:07:10" out="00:01:32:07" resourceid="villagetelco" numberOfWords="200" target="wikidiv"/>
- <videotag target="inthisvideo" in="00:01:25:08" out="00:01:32:07">Michael Adeyeye</videotag>
+ <!--<location id="CapeTown" resourceid="capetownwiki" in="00:01:07:10" out="00:01:32:07" lat="-33.9238" long="18.4233" target="container2" zoom="8"/>-->
+ <wikipedia in="00:01:07:10" out="00:01:32:07" resourceid="villagetelco" numberOfWords="200" target="wikidiv"/>
+ <tagThisPerson target="inthisvideo" in="00:01:25:08" out="00:01:32:07" person="Michael Adeyeye" />
- <videotag target="inthisvideo" in="00:01:32:08" out="00:01:38:02">Charlie Schmidt</videotag>
- <twitter in="00:01:32:08" out="00:01:57:11" title="Charlie Schmidt" source="from:chuckieart" target="personaltwitter" width="238" height="120"/>
- <location id="MITMediaLab" resourceid="mitmedialabhome" in="00:01:32:08" out="00:01:57:11" lat="42.3613" long="-71.0863" target="container2" zoom="12"/>
- <videotag target="inthisvideo" in="00:01:38:02" out="00:01:41:10">Keyboard Cat</videotag>
- <videotag target="inthisvideo" in="00:01:41:11" out="00:01:57:11">Charlie Schmidt</videotag>
+ <tagThisPerson target="inthisvideo" in="00:01:32:08" out="00:01:38:02" person="Charlie Schmidt" />
+ <twitter in="00:01:32:08" out="00:01:57:11" title="Charlie Schmidt" src="@chuckieart" target="personaltwitter" width="238" height="120"/>
+ <!--<location id="MITMediaLab" resourceid="mitmedialabhome" in="00:01:32:08" out="00:01:57:11" lat="42.3613" long="-71.0863" target="container2" zoom="12"/>-->
+ <tagThisPerson target="inthisvideo" in="00:01:38:02" out="00:01:41:10" person="Keyboard Cat" />
+ <tagThisPerson target="inthisvideo" in="00:01:41:11" out="00:01:57:11" person="Charlie Schmidt" />
- <videotag target="inthisvideo" in="00:02:09:00" out="00:03:07:05">Jonathan Zittrain</videotag>
- <twitter in="00:02:09:00" out="00:03:07:05" title="Jonathan Zittrain" source="from:zittrain" target="personaltwitter" width="238" height="120"/>
- <location resourceid="harvardlawhome" in="00:02:09:00" out="00:03:07:05" lat="42.4222" long="-88.6137" target="container2" zoom="12"/>
- <wiki in="00:02:09:00" out="00:02:20:00" resourceid="zittrain" numberOfWords="200" target="wikidiv"/>
- <wiki in="00:02:20:01" out="00:02:23:00" resourceid="compuserve" numberOfWords="200" target="wikidiv"/>
- <wiki in="00:02:23:01" out="00:02:26:00" resourceid="aol" numberOfWords="200" target="wikidiv"/>
- <wiki in="00:02:26:01" out="00:02:33:00" resourceid="prodigy" numberOfWords="200" target="wikidiv"/>
+ <tagThisPerson target="inthisvideo" in="00:02:09:00" out="00:03:07:05" person="Jonathan Zittrain" />
+ <twitter in="00:02:09:00" out="00:03:07:05" title="Jonathan Zittrain" source="@zittrain" target="personaltwitter" width="238" height="120"/>
+ <!--<location resourceid="harvardlawhome" in="00:02:09:00" out="00:03:07:05" lat="42.4222" long="-88.6137" target="container2" zoom="12"/>-->
+ <wikipedia in="00:02:09:00" out="00:02:20:00" resourceid="zittrain" numberOfWords="200" target="wikidiv"/>
+ <wikipedia in="00:02:20:01" out="00:02:23:00" resourceid="compuserve" numberOfWords="200" target="wikidiv"/>
+ <wikipedia in="00:02:23:01" out="00:02:26:00" resourceid="aol" numberOfWords="200" target="wikidiv"/>
+ <wikipedia in="00:02:26:01" out="00:02:33:00" resourceid="prodigy" numberOfWords="200" target="wikidiv"/>
- <attribution in="00:02:15:09" out="00:02:17:00" target="container5" resourceid="compuserveattrib"></attribution>
+ <!--<attribution in="00:02:15:09" out="00:02:17:00" target="container5" resourceid="compuserveattrib"></attribution>
<attribution in="00:02:17:01" out="00:02:20:00" target="container5" resourceid="aolattrib"></attribution>
<attribution in="00:02:20:01" out="00:02:17:00" target="container5" resourceid="compuserveattrib"></attribution>
<attribution in="00:02:17:01" out="00:02:26:00" target="container5" resourceid="aolattrib"></attribution>
<attribution in="00:02:26:01" out="00:02:33:00" target="container5" resourceid="prodigyattrib"></attribution>
<attribution in="00:02:37:00" out="00:02:47:00" target="container5" resourceid="networksattrib"></attribution>
<attribution in="00:02:47:01" out="00:02:55:00" target="container5" resourceid="bankattrib"></attribution>
- <attribution in="00:03:07:10" out="00:03:29:00" target="container5" resourceid="bankattrib"></attribution>
+ <attribution in="00:03:07:10" out="00:03:29:00" target="container5" resourceid="bankattrib"></attribution>-->
- <wiki in="00:02:41:00" out="00:02:57:00" resourceid="internetprotocol" numberOfWords="200" target="wikidiv"/>
- <wiki in="00:02:57:01" out="00:03:03:00" resourceid="timbernerslee" numberOfWords="200" target="wikidiv"/>
- <twitter in="00:02:57:01" out="00:03:03:00" title="Tim Berners-Lee" source="from:timberners_lee" target="twitter" width="238" height="120"/>
+ <wikipedia in="00:02:41:00" out="00:02:57:00" resourceid="internetprotocol" numberOfWords="200" target="wikidiv"/>
+ <wikipedia in="00:02:57:01" out="00:03:03:00" resourceid="timbernerslee" numberOfWords="200" target="wikidiv"/>
+ <twitter in="00:02:57:01" out="00:03:03:00" title="Tim Berners-Lee" src="@timberners_lee" target="twitter" width="238" height="120"/>
- <googlenews in="00:02:57:01" out="00:03:03:00" target="googlenewsdiv" topic="Tim Berners-Lee"/>
+ <googleNews in="00:02:57:01" out="00:03:03:00" target="googlenewsdiv" topic="Tim Berners-Lee"/>
- <wiki in="00:03:03:01" out="00:03:28:00" resourceid="worldwideweb" numberOfWords="200" target="wikidiv"/>
- <googlenews in="00:03:03:01" out="00:03:28:00" target="googlenewsdiv" topic="World Wide Web"/>
+ <wikipedia in="00:03:03:01" out="00:03:28:00" resourceid="worldwideweb" numberOfWords="200" target="wikidiv"/>
+ <googleNews in="00:03:03:01" out="00:03:28:00" target="googlenewsdiv" topic="World Wide Web"/>
- <googlenews in="00:03:28:00" out="00:03:32:00" target="googlenewsdiv" topic="Wikipedia"/>
- <wiki in="00:03:28:01" out="00:03:32:00" resourceid="wikipedia" numberOfWords="200" target="wikidiv"/>
+ <googleNews in="00:03:28:00" out="00:03:32:00" target="googlenewsdiv" topic="Wikipedia"/>
+ <wikipedia in="00:03:28:01" out="00:03:32:00" resourceid="wikipedia" numberOfWords="200" target="wikidiv"/>
- <wiki in="00:03:36:00" out="00:03:43:00" resourceid="openstandards" numberOfWords="200" target="wikidiv"/>
+ <wikipedia in="00:03:36:00" out="00:03:43:00" resourceid="openstandards" numberOfWords="200" target="wikidiv"/>
- <videotag target="inthisvideo" in="00:03:09:00" out="00:03:16:00">NCSA guy</videotag>
- <videotag target="inthisvideo" in="00:03:16:01" out="00:03:18:05">Computer Chronicles guy #1</videotag>
- <videotag target="inthisvideo" in="00:03:16:02" out="00:03:21:00">Computer Chronicles guy #2</videotag>
- <videotag target="inthisvideo" in="00:03:21:01" out="00:03:28:06">Computer Chronicles guy #3</videotag>
+ <tagThisPerson target="inthisvideo" in="00:03:09:00" out="00:03:16:00" person="NCSA guy" />
+ <tagThisPerson target="inthisvideo" in="00:03:16:01" out="00:03:18:05" person="Computer Chronicles guy #1" />
+ <tagThisPerson target="inthisvideo" in="00:03:16:02" out="00:03:21:00" person="Computer Chronicles guy #2" />
+ <tagThisPerson target="inthisvideo" in="00:03:21:01" out="00:03:28:06" person="Computer Chronicles guy #3" />
- <videotag target="inthisvideo" in="00:03:43:00" out="00:03:56:00">Jonathan Zittrain</videotag>
- <twitter in="00:03:43:00" out="00:03:56:00" title="Jonathan Zittrain" source="from:zittrain" target="personaltwitter" width="238" height="120"/>
+ <tagThisPerson target="inthisvideo" in="00:03:43:00" out="00:03:56:00" person="Jonathan Zittrain" />
+ <twitter in="00:03:43:00" out="00:03:56:00" title="Jonathan Zittrain" src="@zittrain" target="personaltwitter" width="238" height="120"/>
<footnote in="00:03:43:00" out="00:03:57:00" target="footnotediv">Read Zittrain's book 'The Future of the Internet — And How to Stop It'</footnote>
- <videotag target="inthisvideo" in="00:03:59:00" out="00:04:03:05">Mona Kasra</videotag>
- <videotag target="inthisvideo" in="00:04:03:06" out="00:04:07:00">Noah Workman</videotag>
- <twitter in="00:04:03:06" out="00:04:07:00" title="Noah Workman" source="from:noahworkman" target="personaltwitter" width="238" height="120"/>
- <videotag target="inthisvideo" in="00:04:03:06" out="00:04:13:01">Wilken Sanches</videotag>
- <attribution in="00:04:10:00" out="00:04:13:00" target="container5" resourceid="attrib"></attribution>
- <videotag target="inthisvideo" in="00:04:13:02" out="00:04:19:05">Keechang Kim</videotag>
- <twitter in="00:04:19:06" out="00:04:24:01" title="Celine Celines" source="from:celinecelines" target="personaltwitter" width="238" height="120"/>
- <videotag target="inthisvideo" in="00:04:19:06" out="00:04:24:01">Celine Celines</videotag>
+ <tagThisPerson target="inthisvideo" in="00:03:59:00" out="00:04:03:05" person="Mona Kasra" />
+ <tagThisPerson target="inthisvideo" in="00:04:03:06" out="00:04:07:00" person="Noah Workman" />
+ <twitter in="00:04:03:06" out="00:04:07:00" title="Noah Workman" src="@noahworkman" target="personaltwitter" width="238" height="120"/>
+ <tagThisPerson target="inthisvideo" in="00:04:03:06" out="00:04:13:01" person="Wilken Sanches" />
+ <!--<attribution in="00:04:10:00" out="00:04:13:00" target="container5" resourceid="attrib"></attribution>-->
+ <tagThisPerson target="inthisvideo" in="00:04:13:02" out="00:04:19:05" person="Keechang Kim" />
+ <twitter in="00:04:19:06" out="00:04:24:01" title="Celine Celines" src="from:celinecelines" target="personaltwitter" width="238" height="120"/>
+ <tagThisPerson target="inthisvideo" in="00:04:19:06" out="00:04:24:01" person="Celine Celines" />
<flickr in="00:04:19:06" out="00:04:24:01" target="personalflickr" userid="13072070@N00" numberofimages="8" padding="4px"/>
- <lastfm in="00:40:00" out="01:24:00" artist="yacht" target="lastfmdiv"/>
+ <!--<lastfm in="00:40:00" out="01:24:00" artist="yacht" target="lastfmdiv"/>-->
</resources>
- <map>
+ <!--<map>
<googleMap resourceid="capetownwiki" in="00:00:03:00" out="00:00:11:07" lat="-33.9238" long="18.4233" target="container2" zoom="8"/>
<googleMap resourceid="grandislewiki" in="00:00:11:07" out="00:00:19:07" lat="29.2720" long="-90.0233 " target="container2" zoom="8"/>
<googleMap resourceid="mitmedialabhome" in="00:00:19:08" out="00:00:27:00" lat="42.3613" long="-71.0863" target="container2" zoom="12"/>
<googleMap resourceid="saopaulowiki" in="00:04:07:02" out="00:04:13:01" lat="-23.5489" long="-46.6388 " target="container2" zoom="8"/>
<googleMap resourceid="seoulwiki" in="00:04:13:02" out="00:04:19:05" lat="37.5665" long="126.9780" target="container2" zoom="8"/>
<googleMap resourceid="montrealwiki" in="00:04:19:06" out="00:04:24:01" lat="45.5089" long="-73.5542 " target="container2" zoom="8"/>
- </map>
+ </map>-->
<subtitles languagesrc="language" accessibilitysrc="accessibility">
<subtitles language="en" align="center">
<subtitle in="00:04:07:01" out="00:04:08:06">producing and sharing music</subtitle>
<subtitle in="00:04:08:07" out="00:04:10:01">using Creative Commons</subtitle>
</subtitles>
- </subtitles>-->
+ </subtitles>
<webpages>
<webpage in="00:04:00:08" out="00:04:19:00" target="iframes" resourceid="monahomepage" width="100"/>
<webpage in="00:04:19:06" out="00:04:24:01" target="iframes" resourceid="celinehomepage" width="100"/>
// just a little tool function
// calculates the top and left position of an element
- var offset = function(elem) {
- if(!elem) elem = this;
+ var offset = function(obj) {
+ var left, top;
+ left = top = 0;
+ if (obj.offsetParent) {
+ do {
+ left += obj.offsetLeft;
+ top += obj.offsetTop;
+ } while (obj = obj.offsetParent);
+ }
+ return {
+ left : left,
+ top : top
+ };
+ };
- var x = elem.offsetLeft;
- var y = elem.offsetTop;
+ // translates whatever is in options.container into selected language
+ var translate = function( options, text ) {
- while (elem = elem.offsetParent) {
- x += elem.offsetLeft;
- y += elem.offsetTop;
- }
+ options.selectedLanguage = options.languageSrc.options[ options.languageSrc.selectedIndex ].value;
+
+ google.language.translate( text, '', options.selectedLanguage, function( result ) {
+
+ options.container.innerHTML = result.translation;
- return { left: x, top: y };
- }
+ } );
+ };
+
+
+/*
+ // Find element offset
+ if (element.offsetParent) {
+ do {
+ offsetX += element.offsetLeft;
+ offsetY += element.offsetTop;
+ } while ((element = element.offsetParent));
+ }
+*/
Popcorn.plugin( "subtitle" , {
// the video element must have height and width defined
this.container.style.width = this.video.offsetWidth + "px";
- //this.container.style.top = offset( this.video ).top + "px";
+ this.container.style.top = offset( this.video ).top + this.video.offsetHeight - 65 + "px";
this.container.style.left = offset( this.video ).left + "px";
this.video.parentNode.appendChild( this.container );
options.container = this.container;
}
- options.translatedText = options.text;
- var selectedLanguage = ( options.language || "" ),
- // declared as a function, it can be called, but does nothing if not needed
- toggleSubtitles = function() {},
- accessibility = document.getElementById( options.accessibilitysrc ),
+ var accessibility = document.getElementById( options.accessibilitysrc ),
that = this;
- if ( options.languagesrc ) {
- var languageSrc = document.getElementById( options.languagesrc );
-
- var updateLanguage = function() {
+ options.showSubtitle = function() {
+ options.container.innerHTML = options.text;
+ };
+ options.toggleSubtitles = function() {};
+ options.that = this;
+
- selectedLanguage = document.getElementById( options.languagesrc ).options[ languageSrc.selectedIndex ].value;
+ if ( options.languagesrc ) {
+ options.showSubtitle = translate;
+ options.languageSrc = document.getElementById( options.languagesrc );
+ options.selectedLanguage = options.languageSrc.options[ options.languageSrc.selectedIndex ].value;
- google.language.translate( options.text, '', selectedLanguage, function( result ) {
+ if ( !this.languageSources ) {
+ this.languageSources = {};
+ }
- options.translatedText = result.translation;
+
- } );
+ if ( !this.languageSources[ options.languagesrc ] ) {
+ this.languageSources[ options.languagesrc ] = {};
+
+ }
- google.language.translate( options.container.innerHTML, '', selectedLanguage, function( result ) {
+ if ( !this.languageSources[ options.languagesrc ][ options.target ] ) {
+ this.languageSources[ options.languagesrc ][ options.target ] = true;
- options.container.innerHTML = result.translation;
- toggleSubtitles(); // update visuals if accessibility is used
+ options.languageSrc.addEventListener( "change", function() {
- } );
- that.container.style.top = offset( that.video ).top + that.video.offsetHeight - ( 40 + that.container.offsetHeight ) + "px";
+ options.toggleSubtitles();
+ options.showSubtitle( options, options.container.innerHTML );
- };
+ }, false );
- languageSrc.addEventListener( "change", updateLanguage, false );
+ }
- // initiate it once to set starting state
- updateLanguage();
}
if ( accessibility ) {
-
- toggleSubtitles = function() {
-
- if ( accessibility.checked || selectedLanguage !== ( options.language || "") ) {
- options.container.style.display = "inline";
- } else if ( selectedLanguage === ( options.language || "") ) {
- options.container.style.display = "none";
+ options.accessibility = accessibility;
+
+ options.toggleSubtitles = function() {
+ options.selectedLanguage = options.languageSrc.options[ options.languageSrc.selectedIndex ].value;
+ if ( options.accessibility.checked || options.selectedLanguage !== ( options.language || "") ) {
+ options.display = "inline";
+ options.container.style.display = options.display;
+ } else if ( options.selectedLanguage === ( options.language || "") ) {
+ options.display = "none";
+ options.container.style.display = options.display;
}
- that.container.style.top = offset( that.video ).top + that.video.offsetHeight - ( 40 + that.container.offsetHeight ) + "px";
};
- accessibility.addEventListener( "change", toggleSubtitles, false );
+ options.accessibility.addEventListener( "change", options.toggleSubtitles, false );
// initiate it once to set starting state
- toggleSubtitles();
+ options.toggleSubtitles();
}
},
* options variable
*/
start: function(event, options){
- options.container.innerHTML = options.translatedText;
- this.container.style.top = offset( this.video ).top + this.video.offsetHeight - ( 40 + this.container.offsetHeight ) + "px";
+ options.container.style.display = options.display;
+ options.showSubtitle( options, options.text );
},
/**
* @member subtitle
* options variable
*/
end: function(event, options){
+ options.container.style.display = options.display;
options.container.innerHTML = "";
}