--- a/src/js/init.js Wed Jan 25 12:53:10 2012 +0100
+++ b/src/js/init.js Wed Jan 25 15:37:39 2012 +0100
@@ -47,14 +47,15 @@
delete opts.container;
delete opts.type;
- if (options.provider === "rtmp") {
+
+ /* Try to guess options.file and options.streamer only if file and streamer
+ are not already defined in the configuration */
+ if (options.provider === "rtmp" && !opts.hasOwnProperty("file") && !opts.hasOwnProperty("streamer")) {
/* exit if we can't access the metadata */
if (typeof(IriSP.__jsonMetadata) === "undefined") {
break;
};
-
-
// the json format is totally illogical
//opts.streamer = IriSP.__jsonMetadata["medias"][0]["meta"]["item"]["value"];
//var source = IriSP.__jsonMetadata["medias"][0]["href"];
@@ -81,8 +82,7 @@
if (i < pathSplit.length - 1)
opts.file += "/";
}
- }
-
+ }
} else {
/* other providers type, video for instance -
pass everything as is */
@@ -114,7 +114,7 @@
case "allocine":
/* pass the options as-is to the allocine player and let it handle everything */
- pop = new PopcornReplacement.allocine("#" + containerDiv, options);
+ pop = new IriSP.PopcornReplacement.allocine("#" + containerDiv, options);
break;
default: