--- a/src/js/widgets/polemicWidget.js Tue Feb 21 17:26:51 2012 +0100
+++ b/src/js/widgets/polemicWidget.js Wed Feb 29 18:13:14 2012 +0100
@@ -51,7 +51,7 @@
var lineSize = this.width; // timeline pixel width
var nbrframes = lineSize/frameSize; // frame numbers
var numberOfTweet = 0; // number of tweet overide later
- var duration = +this._serializer.currentMedia().meta["dc:duration"]; // timescale width
+ var duration = this._serializer.getDuration(); // timescale width
var frameLength = lineSize / frameSize; // frame timescale
var timeline;
var colors = new Array("","#1D973D","#C5A62D","#CE0A15","#036AAE","#585858");
@@ -171,9 +171,10 @@
&& typeof(item.meta["id-ref"]) !== "undefined"
&& item.meta["id-ref"] === view_type) {
- var MyTJson = {};
- if (typeof(item.meta['dc:source']) !== "undefined") {
- var MyTJson = JSON.parse(item.meta['dc:source']['content']);
+ var MyTJson = {},
+ _source = IriSP.get_aliased(item.meta, ['dc:source', 'source']);
+ if (_source !== null) {
+ var MyTJson = JSON.parse(_source['content']);
}
if (item.content['polemics'] != undefined
@@ -381,7 +382,7 @@
IriSP.PolemicWidget.prototype.sliderUpdater = function() {
var time = +this._Popcorn.currentTime();
- var duration = +this._serializer.currentMedia().meta["dc:duration"];
+ var duration = this._serializer.getDuration();
this.paperSlider.attr("width", time * (this.width / (duration / 1000)));