]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
Added more in depth comments explaining for process of the demo thoroughly
authorDavid Seifried <david.c.seifried@gmail.com>
Tue, 10 May 2011 17:52:10 +0000 (13:52 -0400)
committerDavid Seifried <david.c.seifried@gmail.com>
Tue, 10 May 2011 17:52:10 +0000 (13:52 -0400)
demos/twittervideo/twitterVideo.html

index e7db497697a21d52754e97977769fe15ef5e71b3..642e62c2bbc70d6316f7edf5cd2e5299a7e99b9b 100644 (file)
@@ -1,4 +1,14 @@
 <!DOCTYPE html>
+<!---
+  To be able to use the demo effectively, the user must create the following:
+    1.  Two input fields/a method to select data of some sort (drop down list, check box, ect)
+        for the user to be able to select a video and a hashtag that will be used in the demo
+    2.  A method of some sort (button, listeners, ect) for the user to submit the data that they
+        entered in the input fields in step 1.
+    3.  Once the above have been added, a listener will listen for a button click on
+        the submit button, and will call a function to create a popcorn object
+        and begin running the twitter plugin and begin the video
+--->
 <html>
   <head>
     <title>Popcorn Twitter Video Demo</title>
@@ -11,6 +21,7 @@
 
         var srtBtn = document.getElementById( "srtBtn" );
 
+          // Add an event listener to the start button to know when it is clicked
           srtBtn.addEventListener( "click", btnClick, false );
 
        }, false );
@@ -22,7 +33,6 @@
                                        // Anytime after the first click, remove the current video and
                                        // wipe the current twitter feed
                                        if(count != 0){
-                                               // Popcorn.removePlugin(popcorn, twitter);
                                                popcorn = "";
                                                document.getElementById('twitterdiv').innerHTML = "";
                                        }
@@ -73,6 +83,7 @@
                                        }
 
                                        if(ok){
+            // Add twitter widget with associated parameters
                                                popcorn = popcorn
                                                        .twitter({
                                                                start: 0, // seconds
@@ -87,6 +98,7 @@
     </script>
   </head>
   <body>
+    <!-- Setup html divs and other tags, as well as input fields and buttons -->
                <h3>Twitter Hashtag video demo</h3>
                <p>Insert a link to a video(youtube,vimeo,.ogv,or.mp4) and supply a hashtag</p>
     <div>