kind: "moon.LabeledTextItem",
spotlight: true,
bindings: [
- {from: ".model.number", to: ".label", transform: function(n) { return "Episode " + n; }},
- {from: ".model.title", to: ".text"}
+ {from: ".model.longTitle", to: ".label"},
+ {from: ".model.description", to: ".text"}
]
});
kind: "moon.Panel",
smallHeader: true,
published: {
- collection: null
+ show: null
},
components: [
{name: "episodeList", kind: "moon.DataList", components: [
]}
],
bindings: [
- {from: ".collection", to: ".$.episodeList.collection"}
+ {from: ".show.episodes", to: ".$.episodeList.collection",
+ transform: function(v) { return new EpisodeCollection(v); }},
+ {from: ".show.name", to: ".title"},
+ {from: ".show.description", to: ".titleBelow"},
+ {from: ".show.thumbURL", to: ".headerBackgroundSrc"}
],
playEpisode: function(inSender, inEvent) {
- this.bubble('onPlayEpisode', this.collection.at(inEvent.index));
+ this.bubble('onPlayEpisode', {
+ show: this.show,
+ episode: this.$.episodeList.collection.at(inEvent.index)
+ });
}
});
{name: "showListing", kind: "nettv.ShowListing"}
]},
{name: "player", kind: "moon.VideoPlayer", classes: "enyo-fit", showing: false,
- shakeAndWake: true, components: [
+ shakeAndWake: true, infoComponents: [
+ {kind: "moon.VideoInfoBackground", components: [
+ {name: "infoHeader", kind: "moon.VideoInfoHeader"}
+ ]}
+ ], components: [
{kind: "moon.IconButton", icon: "closex", ontap: "closePlayer", small: false}
]}
],
showEpisodes: function(inSender, inEvent) {
this.$.navigationPanels.popPanels(1);
this.$.navigationPanels.pushPanel({name: "episodeListing", kind: "nettv.EpisodeListing"}, {
- title: inEvent.get('name'),
- titleBelow: inEvent.get('description'),
- collection: new enyo.Collection(inEvent.get('episodes')),
- headerBackgroundSrc: inEvent.get('thumbURL')
+ show: inEvent
});
},
playEpisode: function(inSender, inEvent) {
this.$.player.show();
- this.$.player.set('src', nettv.Util.addBase(inEvent.get('file')));
+ this.$.player.set('src', inEvent.episode.get('fileURL'));
+ this.$.infoHeader.set('title', inEvent.show.get('name'));
+ this.$.infoHeader.set('subTitle', inEvent.episode.get('longTitle'));
+ this.$.infoHeader.set('description', inEvent.episode.get('description'));
this.$.player.play();
},
closePlayer: function(inSender, inEvent) {