# HG changeset patch # User hamidouk # Date 1329476193 -3600 # Node ID e97e228011465f19511d4def1ff9d39798d32e50 # Parent 44d34270541c811467d5020d5e5827a83986e983 use href or url indiscriminately to get the source of the rtmp. diff -r 44d34270541c -r e97e22801146 src/js/init.js --- a/src/js/init.js Fri Feb 17 11:56:02 2012 +0100 +++ b/src/js/init.js Fri Feb 17 11:56:33 2012 +0100 @@ -77,6 +77,16 @@ opts.file = ""; opts.streamer = ""; var fullPath = IriSP.__jsonMetadata["medias"][0]["href"]; + + /* files can either use href or url to refer to the stream */ + if (IriSP.null_or_undefined(fullPath)) { + fullPath = IriSP.__jsonMetadata["medias"][0]["url"]; + } + + if (IriSP.null_or_undefined(fullPath)) { + console.log("no url or href field defined in the metadata."); + } + var pathSplit = fullPath.split('/'); for (var i = 0; i < pathSplit.length; i++) {