# HG changeset patch # User hamidouk # Date 1326704168 -3600 # Node ID 557cefc119e985c08661cbe736b2a6832ac01a14 # Parent af6e9560593426f5920944d682cdf57ca07fa4c9 updated player version. diff -r af6e95605934 -r 557cefc119e9 src/ldt/ldt/static/ldt/js/LdtPlayer-release.js --- a/src/ldt/ldt/static/ldt/js/LdtPlayer-release.js Fri Jan 13 16:24:16 2012 +0100 +++ b/src/ldt/ldt/static/ldt/js/LdtPlayer-release.js Mon Jan 16 09:56:08 2012 +0100 @@ -1984,19 +1984,18 @@ opts.streamer = ""; var fullPath = IriSP.__jsonMetadata["medias"][0]["href"]; var pathSplit = fullPath.split('/'); - console.log(pathSplit); for (var i = 0; i < pathSplit.length; i++) { if (i < 4) { opts.streamer += pathSplit[i] + "/"; } else { opts.file += pathSplit[i]; + /* omit the last slash if we're on the last element */ if (i < pathSplit.length - 1) opts.file += "/"; } } - - console.log(opts.file); + } else { /* other providers type, video for instance - pass everything as is */ @@ -4585,7 +4584,15 @@ /** return the id of the ligne de temps named "Chapitrage" */ IriSP.JSONSerializer.prototype.getChapitrage = function() { - return this.getId("Chapitrage"); + var val = this.getId("Chapitrage"); + if (typeof(val) === "undefined") + val = this.getId("Chapter"); + if (typeof(val) === "undefined") + val = this.getId("Chapit"); + if (typeof(val) === "undefined") + val = this.getId("Chap"); + + return val; }; /** return the id of the ligne de temps named "Tweets" */ @@ -4605,5 +4612,13 @@ /** return the id of the ligne de temps named "Contributions" */ IriSP.JSONSerializer.prototype.getContributions = function() { - return this.getId("Contributions"); + var val = this.getId("Contribution"); + if (typeof(val) === "undefined") + val = this.getId("Particip"); + if (typeof(val) === "undefined") + val = this.getId("Contr"); + if (typeof(val) === "undefined") + val = this.getId("Publ"); + + return val; }; \ No newline at end of file