File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed
Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change 2626 , audioPlayer = Buildfire . services . media . audioPlayer ;
2727 WidgetMedia . loadingVideo = false ;
2828
29+ var _data = {
30+ "content" : {
31+ "carouselImages" : [ ] ,
32+ "description" : "" ,
33+ "rssUrl" : "http://rss.cnn.com/rss/cnn_topstories.rss"
34+ } ,
35+ "design" : {
36+ "itemListLayout" : 'List_Layout_1' ,
37+ "itemDetailsLayout" : 'Feed_Layout_1' ,
38+ "itemListBgImage" : "" ,
39+ "itemDetailsBgImage" : ""
40+ }
41+ } ;
42+
2943 /**
3044 * WidgetMedia.slider used to show the slider on now-playing page
3145 * @type {*|jQuery|HTMLElement }
329343 var init = function ( ) {
330344 var success = function ( result ) {
331345 $rootScope . showFeed = false ;
332- WidgetMedia . data = result . data ;
346+ if ( Object . keys ( result . data ) . length > 0 )
347+ WidgetMedia . data = result . data ;
348+ else
349+ WidgetMedia . data = _data ;
350+
333351 if ( WidgetMedia . data . design ) {
334352 $rootScope . backgroundImage = WidgetMedia . data . design . itemListBgImage ;
335353 $rootScope . backgroundImageItem = WidgetMedia . data . design . itemDetailsBgImage ;
You can’t perform that action at this time.
0 commit comments