equal
deleted
inserted
replaced
75 the rest, we uglily do this : |
75 the rest, we uglily do this : |
76 */ |
76 */ |
77 opts.file = ""; |
77 opts.file = ""; |
78 opts.streamer = ""; |
78 opts.streamer = ""; |
79 var fullPath = IriSP.__jsonMetadata["medias"][0]["href"]; |
79 var fullPath = IriSP.__jsonMetadata["medias"][0]["href"]; |
|
80 |
|
81 /* files can either use href or url to refer to the stream */ |
|
82 if (IriSP.null_or_undefined(fullPath)) { |
|
83 fullPath = IriSP.__jsonMetadata["medias"][0]["url"]; |
|
84 } |
|
85 |
|
86 if (IriSP.null_or_undefined(fullPath)) { |
|
87 console.log("no url or href field defined in the metadata."); |
|
88 } |
|
89 |
80 var pathSplit = fullPath.split('/'); |
90 var pathSplit = fullPath.split('/'); |
81 |
91 |
82 for (var i = 0; i < pathSplit.length; i++) { |
92 for (var i = 0; i < pathSplit.length; i++) { |
83 if (i < 4) { |
93 if (i < 4) { |
84 opts.streamer += pathSplit[i] + "/"; |
94 opts.streamer += pathSplit[i] + "/"; |