--- a/cms/app-client/app/components/player-component.js Wed Aug 24 09:46:03 2016 +0200
+++ b/cms/app-client/app/components/player-component.js Wed Aug 24 15:01:54 2016 +0200
@@ -3,9 +3,8 @@
export default Ember.Component.extend({
classNames: ['player-component'],
- classNameBindings: ['video:video', 'reduce:reduce'],
+ classNameBindings: ['video:video'],
video: Ember.computed.alias('player.model.video'),
- reduce: Ember.computed.alias('player.reduce'),
player: Ember.inject.service(),
popcorn: null,
@@ -52,7 +51,7 @@
},
didInsertElement: function() {
- this.set('popcorn', Popcorn('#popcorn-audio'));
+ this.set('popcorn', new Popcorn('#popcorn-audio'));
this.get('popcorn').on('loadeddata', Ember.run.bind(this, this.get('onUpdate')));
this.get('popcorn').on('timeupdate', Ember.run.bind(this, this.get('onUpdate')));
--- a/cms/app-client/app/serializers/transcript.js Wed Aug 24 09:46:03 2016 +0200
+++ b/cms/app-client/app/serializers/transcript.js Wed Aug 24 15:01:54 2016 +0200
@@ -51,7 +51,7 @@
annotations.push(object);
}
if(!translationISO && annotation['content']['data']['transl']) {
- translationISO = annotation['content']['data']['transl']['@language'];
+ translationISO = annotation['content']['data']['transl']['@language'];
}
});
@@ -72,8 +72,8 @@
annotations = types;
}
+ var sections = [];
if(payload['lists'].length) {
- var sections = [];
var lists = [];
payload['lists'].forEach(function(list) {
var topic = topics['content']['data'].find(topic => topic.id === list['meta']['corpus:topic']['id-ref']);
@@ -85,7 +85,6 @@
lists.push(annotations.filter(annotation => annotation['begin'] >= list['meta']['corpus:begin'] && annotation['end'] <= list['meta']['corpus:end']));
});
annotations = lists;
- console.log(sections);
} else {
annotations = [annotations];
}
@@ -101,7 +100,7 @@
}
};
- if(sections) {
+ if(sections.length) {
response.data.attributes.sections = sections;
}
@@ -113,7 +112,7 @@
var translation = payload['meta']['dc:title'].find(function(title) { return title['@language'] === translationISO; });
if(translation) {
response.data.attributes.title.translation = translation['@value'];
- }
+ }
} else {
response.data.attributes.title.original = payload['meta']['dc:title']['@value'];
}