removed mediafragment references as they're implemented by the mediafragment lab-port
authorhamidouk
Wed, 21 Dec 2011 15:35:21 +0100
branchlab-port
changeset 500 a784e70993b3
parent 499 0a09ff3db7c2
child 501 63e7b66d2a80
removed mediafragment references as they're implemented by the mediafragment module now.
src/js/init.js
src/js/libs/popcorn.mediafragment.js
--- a/src/js/init.js	Wed Dec 21 15:02:04 2011 +0100
+++ b/src/js/init.js	Wed Dec 21 15:35:21 2011 +0100
@@ -30,7 +30,7 @@
            if (options.hasOwnProperty("height"))
              IriSP.jQuery("#" + containerDiv).css("height", options.height);
 
-           pop = Popcorn("#" + tmpId).mediafragment({start : 0});
+           pop = Popcorn("#" + tmpId);
         break;
         
       case "jwplayer":
@@ -69,7 +69,7 @@
           // Popcorn.youtube wants us to specify the size of the player in the style attribute of its container div.
           IriSP.jQuery("#" + containerDiv).attr("style", str);
           
-          pop = Popcorn.youtube("#" + containerDiv, opts.video, opts).mediafragment({start : 0});
+          pop = Popcorn.youtube("#" + containerDiv, opts.video, opts);
         break;
         
       default:
--- a/src/js/libs/popcorn.mediafragment.js	Wed Dec 21 15:02:04 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-// PLUGIN: Mediafragment
-
-(function ( Popcorn ) {
-
-  /**
-   * Mediafragment popcorn plug-in
-   * Adds (limited) support for mediafragment requests
-   * to a popcorn video.
-   * @param {Object} options
-   *
-  **/
-    Popcorn.plugin( "mediafragment" , {
-
-      manifest: {
-        about: {
-          name: "Popcorn mediafragment plugin",
-          version: "0.1",
-          author: "Karim Hamidou",
-          website: "http://neyret.fr/~karim"
-        },
-        options: {
-        }
-      },
-
-    _setup: function( options ) {
-        var advanceTime = function() {
-              var url = window.location.href;
-
-              if ( url.split( "#" )[ 1 ] != null ) {
-                  pageoffset = url.split( "#" )[1];
-
-                  if ( pageoffset.substring( 2 ) != null ) {
-                    var offsettime = pageoffset.substring( 2 );
-                    this.currentTime( parseFloat( offsettime ) );
-                  }
-              }
-        }
-
-        var updateTime = function() {
-            var history = window.history;
-            if ( !history.pushState ) {
-              return false;
-            }
-            
-            splitArr = window.location.href.split( "#" )
-            history.replaceState( {}, "", splitArr[0] + "#t=" + this.currentTime().toFixed( 2 ) );
-        };
-
-        this.listen( "loadedmetadata", advanceTime );
-        this.listen( "pause", updateTime );
-        this.listen( "seeked", updateTime );
-    },
-
-    _teardown: function( options ) {
-      // FIXME: anything to implement here ?
-    }
-  });
-})( Popcorn );