Permalink
Browse files

subtitle control panel done v2

  • Loading branch information...
1 parent 4168006 commit 5e19f84f02068b0773645918979975a7afd6cf9e @keyanr committed Oct 28, 2011
Showing with 27 additions and 2 deletions.
  1. +27 −2 plugins/subtitle/popcorn.subtitle.html
@@ -6,7 +6,23 @@
<script src="popcorn.subtitle.js"></script>
<script>
var fw, fcol;
-// document.addEventListener( "DOMContentLoaded", function() {
+ document.addEventListener( "DOMContentLoaded", function() {
+ var p = Popcorn( "#video" )
+ .volume( 0 )
+ .play()
+ .subtitle({
+ start: 5,
+ end: 15,
+ text: "this is the first subtitle of 2011",
+ })
+ .subtitle({
+ start: 20,
+ end: 45,
+ text: "this is the second subtitle of 2011",
+ });
+ document.getElementById("txt1").value="";
+
+ }, false);
function play(){
var p = Popcorn( "#video" )
.volume( 0 )
@@ -25,6 +41,7 @@
function changeColor(color){
fcol=color;
+ document.getElementById("txt1").value=color;
};
function pause(){
@@ -35,7 +52,7 @@
});
};
-// }, false);
+
</script>
</head>
@@ -82,6 +99,14 @@ <h1 id="qunit-header">Popcorn Subtitle Plug-in Demo</h1>
<input type="button" value="white" onClick="changeColor('white');"/>
</td>
</tr>
+ <tr>
+ <td>
+ The color you select is:
+ </td>
+ <td colspan="3">
+ <input type="textbox" value="" id="txt1"/>
+ </td>
+ </tr>
</table>
</div>

0 comments on commit 5e19f84

Please sign in to comment.