]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
[#266] Support for parsername:file,*
authorrwldrn <waldron.rick@gmail.com>
Mon, 17 Jan 2011 21:07:51 +0000 (16:07 -0500)
committerrwldrn <waldron.rick@gmail.com>
Mon, 17 Jan 2011 21:07:51 +0000 (16:07 -0500)
popcorn.js

index c6953e71923a5c3f821469682de2d83883a57ed0..6cc02d1aca41c367308e9b952d279b4b75819e22 100644 (file)
 
           Popcorn.forEach( dataSources, function ( source ) {
 
-            dataTemp = source.split( "." );
+            dataTemp = source.split( ":" );
 
-            dataType = ( dataTemp[ dataTemp.length - 1 ] ).toUpperCase(); 
-
-            parserFn = "parse" + ( dataTemp[ dataTemp.length - 1 ] ).toUpperCase();
+            dataType = dataTemp[0];
+            
+            if ( dataTemp.length === 1 ) {
+              
+              dataTemp = source.split( "." );
+              
+              dataType = dataTemp[ dataTemp.length - 1 ]; 
+              
+            }
+            
+            dataType.toUpperCase();
+            
+            parserFn = "parse" + dataType;
 
             //  If the video has data sources and the correct parser is registered, continue to load
             if ( dataSources && Popcorn.parsers[ dataType ] ) {