- Stopping Google TV template from randomizing Thumbnail IDs
- thumb: 'images/thumbs/thumb' + getThumbId() + '.jpg',
- var gtv = gtv || {
- jq: {}
- };
- /**
- * DataProvider class. Defines a provider for all data (Categories, Images & Videos) shown in the template.
- */
- gtv.jq.DataProvider = function() {
- };
- /**
- * Returns all data shown in the template..
- * @return {object} with the following structure:
- * - categories -> [category1, category2, ..., categoryN].
- * - category -> {name, videos}.
- * - videos -> {thumb, title, subtitle, description, sources}
- * - sources -> [source1, source2, ..., sourceN]
- * - source -> string with the url | {src, type, codecs}
- */
- gtv.jq.DataProvider.prototype.getData = function() {
- var event_videos = [
- {
- sources: ['http://commondatastorage.googleapis.com/gtv_template_assets/IO2010-Keynote-day1.mp4'],
- title: '2010 Day 1 Keynote',
- thumb: 'images/thumbs/thumb01.jpg',
- description: ['With Vic Gundotra'],
- subtitle: 'Moscone Center'
- },
- {
- sources:['http://commondatastorage.googleapis.com/gtv_template_assets/IO2010-Keynote-day2-android.mp4'],
- title: '2010 Day 2 Keynote',
- thumb: 'images/thumbs/thumb02.jpg',
- description: ['Spider - what spider?'],
- subtitle: 'Moscone Center'
- }
- ];
- var buck_videos = [
- {
- sources:['http://bffmedia.com/trailer_400p.ogg'],
- title: 'Big Buck 400p Video Trailer',
- thumb: 'http://www.bffmedia.com/buck1.png',
- description: ['Common Creative Project Movie'],
- subtitle: 'Smaller Version'
- },
- {
- sources:['http://bffmedia.com/trailer_1080p.ogg'],
- title: 'Big Buck 1080p Video Trailer',
- thumb: 'http://www.bffmedia.com/buck2.png',
- description:['Common Creative Project Movie'],
- subtitle: 'Big Buck is a Rabbit'
- }
- ];
- var data = {
- categories: [
- {
- name: 'Dev Events',
- videos: event_videos
- },
- {
- name: 'Big Buck',
- videos: buck_videos
- }
- ]
- };
- return data;
- };