From 09589645f08a5318aa243472c815a1f41d313971 Mon Sep 17 00:00:00 2001 From: rwldrn Date: Mon, 17 Jan 2011 16:07:51 -0500 Subject: [PATCH] [#266] Support for parsername:file,* --- popcorn.js | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/popcorn.js b/popcorn.js index c6953e7..6cc02d1 100644 --- a/popcorn.js +++ b/popcorn.js @@ -876,11 +876,21 @@ 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 ] ) { -- 2.43.0