chaimPaneth / react-native-jw-media-player

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

[iOS] Google IMA ads are playing in background #169

Open bipin-ta opened 2 years ago

bipin-ta commented 2 years ago

I am passing the ad URL like below in the config prop


<JWPlayer
              ref={p => (this.JWPlayer = p)}
              style={styles.player}
              config={{
                license:
                  Platform.OS === 'android'
                    ? 'ANDROID_LICENSE'
                    : 'IOS_LICENSE,
                playlist: [
                  {
                    file: 'https://playertest.longtailvideo.com/adaptive/oceans/oceans.m3u8',
                    image:
                      'https://d3el35u4qe4frz.cloudfront.net/bkaovAYt-480.jpg',
                  },
                ],
                advertising: {
                  adClient: 'ima',
                  adVmap:
                    'https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/ad_rule_samples&ciu_szs=300x250&ad_rule=1&impl=s&gdfp_req=1&env=vp&output=vmap&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ar%3Dpreonly&cmsid=496&vid=short_onecue&correlator=',
                },
              }}
            />

The ad gets played and displayed in android but in iOS, the ad video is not visible. It gets played in the background. Once the ad video completes the actual video starts to play.

Please suggest any solution.

cheynewallace commented 2 years ago

You find a solution to this one at all? We are seeing the same problem

bipin-ta commented 2 years ago

You find a solution to this one at all? We are seeing the same problem

No @cheynewallace, we are still struggling...

chaimPaneth commented 11 months ago

Hi @bipin-ta @cheynewallace

How about the latest version? It's working for me.