]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
[#316] added documentation to lowerthird, googlename and subtitle plugin.js files
authorScottDowne <sdowne@learn.senecac.on.ca>
Thu, 24 Feb 2011 21:40:47 +0000 (16:40 -0500)
committerScottDowne <sdowne@learn.senecac.on.ca>
Thu, 24 Feb 2011 21:40:47 +0000 (16:40 -0500)
plugins/googlenews/popcorn.googlenews.js
plugins/lowerthird/popcorn.lowerthird.js
plugins/subtitle/popcorn.subtitle.js

index 69cfaf957916929ff533a921e958296279cd5919..b80b55437a7cf16eace48b80814db5ba16550510 100644 (file)
@@ -3,6 +3,27 @@
 (function (Popcorn) {
   
   /**
+   * Google News popcorn plug-in 
+   * Displays Google News information on a topic in a targeted div.
+   * Options parameter will need a start, end and target.
+   * Optional parameters are topic. topic defaults to "top stories"
+   * Start is the time that you want this plug-in to execute
+   * End is the time that you want this plug-in to stop executing
+   * Target is the id of the document element that the content is
+   *  appended to, this target element must exist on the DOM
+   * Topic is the topic of news articles you want to display.
+   * 
+   * @param {Object} options
+   * 
+   * Example:
+     var p = Popcorn('#video')
+        .footnote({
+          start:          5,                 // seconds, mandatory
+          end:            15,                // seconds, mandatory
+          topic:          'oil spill',       // optional
+          target:         'newsdiv'        // mandatory
+        } )
+   *
    */
   Popcorn.plugin( "googlenews" , {
 
index 23e42bc22968b4e3d8285929b39ad57b123d59d9..d655ee53093da90b63db79d26b88ff02f4eb2bba 100644 (file)
@@ -3,7 +3,32 @@
 (function (Popcorn) {
   
   /**
-  */
+   * Lower Third popcorn plug-in 
+   * Displays information about a speaker over the video, or in the target div
+   * Options parameter will need a start, and end.
+   * Optional parameters are target, salutation, name and role.
+   * Start is the time that you want this plug-in to execute
+   * End is the time that you want this plug-in to stop executing
+   * Target is the id of the document element that the content is
+   *  appended to, this target element must exist on the DOM
+   * salutation is the speaker's Mr. Ms. Dr. etc.
+   * name is the speaker's name.
+   * role is information about the speaker, example Engineer.
+   * 
+   * @param {Object} options
+   * 
+   * Example:
+     var p = Popcorn('#video')
+        .footnote({
+          start:          5,                 // seconds, mandatory
+          end:            15,                // seconds, mandatory
+          salutation:     'Mr',              // optional
+          name:           'Scott Downe',     // optional
+          role:           'Programmer',      // optional
+          target:         'subtitlediv'      // optional
+        } )
+   *
+   */
 
   // just a little tool function
   // calculates the top and left position of an element
index 27ad26b188a4cd1009674cb4bc6bc995b7d623e3..21fdb27b737d9e6c0f93e709b5f2954781925a8e 100644 (file)
@@ -3,6 +3,27 @@
 (function (Popcorn) {
   
   /**
+   * Subtitle popcorn plug-in 
+   * Displays a subtitle over the video, or in the target div
+   * Options parameter will need a start, and end.
+   * Optional parameters are target and text.
+   * Start is the time that you want this plug-in to execute
+   * End is the time that you want this plug-in to stop executing
+   * Target is the id of the document element that the content is
+   *  appended to, this target element must exist on the DOM
+   * Text is the text of the subtitle you want to display.
+   * 
+   * @param {Object} options
+   * 
+   * Example:
+     var p = Popcorn('#video')
+        .footnote({
+          start:          5,                 // seconds, mandatory
+          end:            15,                // seconds, mandatory
+          text:           'Hellow world',    // optional
+          target:         'subtitlediv'      // optional
+        } )
+   *
    */
 
   // just a little tool function
     } );
   };
 
-
-/*
-      // Find element offset
-      if (element.offsetParent) {
-        do {
-          offsetX += element.offsetLeft;
-          offsetY += element.offsetTop;
-        } while ((element = element.offsetParent));
-      }
-*/
-
   Popcorn.plugin( "subtitle" , {
     
       manifest: {