src/js/init.js
branchpopcorn-port
changeset 822 45083178c1d2
parent 816 e97e22801146
child 827 1dc2f85c3b89
equal deleted inserted replaced
821:49013af6d50b 822:45083178c1d2
    74                as a streamer is of the form rtmp://domain/path/ and the media is
    74                as a streamer is of the form rtmp://domain/path/ and the media is
    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.get_aliased(IriSP.__jsonMetadata["medias"][0], ["href","url"]);
    80             
    80             
    81             /* files can either use href or url to refer to the stream */
    81             if (fullPath === null) {
    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.");
    82               console.log("no url or href field defined in the metadata.");
    88             }
    83             }
    89             
    84             
    90             var pathSplit = fullPath.split('/');
    85             var pathSplit = fullPath.split('/');
    91             
    86