Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 4th, 2012  |  syntax: None  |  size: 1.99 KB  |  hits: 16  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Stopping Google TV template from randomizing Thumbnail IDs
  2. thumb: 'images/thumbs/thumb' + getThumbId() + '.jpg',
  3.        
  4. var gtv = gtv || {
  5.   jq: {}
  6. };
  7.  
  8. /**
  9.  * DataProvider class. Defines a provider for all data (Categories, Images & Videos) shown in the template.
  10.  */
  11. gtv.jq.DataProvider = function() {
  12. };
  13.  
  14. /**
  15.  * Returns all data shown in the template..
  16.  * @return {object} with the following structure:
  17.  *    - categories -> [category1, category2, ..., categoryN].
  18.  *    - category -> {name, videos}.
  19.  *    - videos -> {thumb, title, subtitle, description, sources}
  20.  *    - sources -> [source1, source2, ..., sourceN]
  21.  *    - source -> string with the url | {src, type, codecs}
  22.  */
  23. gtv.jq.DataProvider.prototype.getData = function() {
  24.   var event_videos = [
  25.     {
  26.       sources: ['http://commondatastorage.googleapis.com/gtv_template_assets/IO2010-Keynote-day1.mp4'],
  27.       title: '2010 Day 1 Keynote',
  28.       thumb: 'images/thumbs/thumb01.jpg',
  29.       description: ['With Vic Gundotra'],
  30.       subtitle: 'Moscone Center'
  31.     },
  32.     {
  33.       sources:['http://commondatastorage.googleapis.com/gtv_template_assets/IO2010-Keynote-day2-android.mp4'],
  34.       title: '2010 Day 2 Keynote',
  35.       thumb: 'images/thumbs/thumb02.jpg',
  36.       description: ['Spider - what spider?'],
  37.       subtitle: 'Moscone Center'
  38.     }
  39. ];
  40.  
  41.  var buck_videos = [
  42.     {
  43.       sources:['http://bffmedia.com/trailer_400p.ogg'],
  44.       title: 'Big Buck 400p Video Trailer',
  45.       thumb: 'http://www.bffmedia.com/buck1.png',
  46.       description: ['Common Creative Project Movie'],
  47.       subtitle: 'Smaller Version'
  48.     },
  49.     {
  50.       sources:['http://bffmedia.com/trailer_1080p.ogg'],
  51.       title: 'Big Buck 1080p Video Trailer',
  52.       thumb: 'http://www.bffmedia.com/buck2.png',
  53.       description:['Common Creative Project Movie'],
  54.       subtitle: 'Big Buck is a Rabbit'
  55.     }
  56. ];
  57.  
  58.  
  59.  
  60.  var data = {
  61.     categories: [
  62.     {
  63.       name: 'Dev Events',
  64.       videos: event_videos
  65.     },
  66.     {
  67.       name: 'Big Buck',
  68.       videos: buck_videos
  69.    }
  70.    ]
  71.  };
  72.   return data;
  73. };