chaimPaneth / react-native-jw-media-player

React-Native Android/iOS bridge for JWPlayer SDK (https://www.jwplayer.com/)
MIT License
193 stars 92 forks source link

Ads not working neither show any error. #302

Open zeeshan-shabbir opened 1 year ago

zeeshan-shabbir commented 1 year ago

hi,

Ads not running on video.I tried every possible solution but not worked.

` // Rest of the code goes here

const playlistItem = { title: 'Track', description: 'My beautiful track', startTime: 0, autostart: false, repeat: false, advertising:{ adVmap:"https://pubads.g.doubleclick.net/gampad/adsiu=/21775744923/external/vmap_ad_samples&sz=640x480&cust_params=sample_ar%3Dpremidpost&ciu_szs=300x250&gdfp_req=1&ad_rule=1&output=vmap&unviewed_position_start=1&env=vp&impl=s&cmsid=496&vid=short_onecue&correlator=", adSchedule:[{tag: 'https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/vmap_ad_samples&sz=640x480&cust_params=sample_ar%3Dpremidpost&ciu_szs=300x250&gdfp_req=1&ad_rule=1&output=vmap&unviewed_position_start=1&env=vp&impl=s&cmsid=496&vid=short_onecue&correlator=', offset: 'pre'}],

  adClient:"ima"
},  
// playlist:
displayDescription: true,
displayTitle: true,
file: "https://content.jwplatform.com/videos/******.mp4",
image: 'https://res.cloudinary.com/techon/image/upload/v1684847047/thumbnails/hh3yjhvbny9s3kagcb0p.jpg',

}

<JWPlayer ref={JWPlayerRef} style={styles.player} config={config} // config={{ advertising:{adClient}}} onSetupPlayerError={(error)=>console.error(error)} onPlayerError={(error)=>console.error(error)}

` video is working fine but ads not running.

platform:android envoirment:

"react-native-jw-media-player": "^0.2.35",
"react": "^18.2.0",
"react-native": "0.71.7",

.

looking for help.

chaimPaneth commented 8 months ago

Hi @zeeshan-shabbir

What version of the library are you running, I'm asking as I've made a lot of changes to the ads functionality in the latest versions