@@ -7,10 +7,13 @@ import * as clientUtils from './client';
7
7
8
8
const Modernizr = window . suggestv . Modernizr ;
9
9
const CLIENT = clientUtils . getClient ( ) ;
10
+ const ENV = String ( process . env . NODE_ENV ) ;
11
+ const API_URL = process . env . NODE_ENV === 'production' ? 'https://api.suggestv.io/semantics' : 'https://uat.suggestv.io/semantics' ;
12
+ const ANALYTICS_URL = process . env . NODE_ENV === 'production' ? 'https://analytics.suggestv.io/track' : 'https://test.suggestv.io/analytics/track' ;
10
13
11
14
class App extends React . Component {
12
15
static getVideos ( url , client ) {
13
- const endpoint = `https://api.suggestv.io/semantics ?url=${ url } &client=${ client } ` ;
16
+ const endpoint = `${ API_URL } ?url=${ url } &client=${ client } ` ;
14
17
15
18
return fetch ( endpoint , {
16
19
method : 'GET' ,
@@ -53,6 +56,8 @@ class App extends React.Component {
53
56
if ( CLIENT === 'sovrnus' ) return cb ( null , 'http://ap.lijit.com/www/delivery/vst.php?zoneid=463506' ) ;
54
57
if ( CLIENT === 'hitc' ) return cb ( null , 'https://ad.360yield.com/advast?p=1034241&w=4&h=3' ) ;
55
58
if ( CLIENT === 'clickon' ) return cb ( null , `https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/14188402/CLICKON/preroll&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&url=${ url } &description_url=${ url } &correlator=${ Date . now ( ) } ` ) ;
59
+ if ( CLIENT === 'global-radio' ) return cb ( null , 'http://adserver.adtech.de/?advideo/3.0/646.1/6441115/0/0/cc=2;vidAS=pre_roll;cors=yes;VidRT=VAST;VidRTV=3.0' ) ;
60
+ if ( CLIENT === 'nigella' ) return cb ( null , 'https://ads.stickyadstv.com/www/delivery/swfIndex.php?reqType=AdsSetup&protocolVersion=2.0&zoneId=1016097' ) ;
56
61
if ( CLIENT === 'telegraph' && tmgAdsBuildAd ) {
57
62
return App . getPlaylistAdTag ( tmgAdsBuildAd ( 'advert_body_vid' , '' , '' , '' ) . fetchUrl ( ) , cb ) ;
58
63
}
@@ -195,7 +200,7 @@ class App extends React.Component {
195
200
postAnalytics ( player ) {
196
201
if ( player . playlist . currentItem ( ) === - 1 ) { return ; }
197
202
198
- fetch ( 'https://analytics.suggestv.io/track' , {
203
+ fetch ( ANALYTICS_URL , {
199
204
method : 'POST' ,
200
205
headers : {
201
206
Accept : 'application/json' ,
0 commit comments