Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ASK] How to properly set Google IMA in the JWPlayer config #116

Open
normtronics opened this issue Jan 17, 2025 · 1 comment
Open

[ASK] How to properly set Google IMA in the JWPlayer config #116

normtronics opened this issue Jan 17, 2025 · 1 comment
Labels
needs-grooming Has not been reviewed by codeowners for scope/validation needs-info There isn't enough information. Please add more context

Comments

@normtronics
Copy link

What isn't clear?
Currently I am working on getting google IMA to work properly in the player. In order for the player to pick up the right client, we have to set the forceLegacyConfig to true in the JWConfig. Is there a way to get google IMA to work without having to force use the legacy config?

When I don't use the forceLegacyConfig the ad play callback just returns this:

DEBUG [handleAdPlay]:  {"client": null, "target": 2323, "type": null}

With the forceLegacyConfig set to true I see:

 DEBUG [handleAdPlay]:  {"client": "googima_sdks", "message": "onAdEvent", "type": 8}
 DEBUG [handleAdPlay]:  {"message": "onAdEvent", "reason": "external", "type": 6}
 DEBUG  [handleAdPlay]:  {"client": "googima_sdks", "message": "onAdEvent", "type": 0}

I would like to not use the legacy config if possible.

Here is an example config we are passing to the player:

let jwPlayerConfig = {
  advertising: {
    adClient: 'ima',
    adSchedule: [] // needed on android, without it android crashes 
  },
  autostart,
  forceLegacyConfig: true, // Would love to not have to use this 
  license: jwPlayerKey,
  playlist,
  styling: {
    colors: {
      timeslider: {
        progress: 'cf0000',
        thumb: 'cf0000',
      },
    },
    displayTitle: false,
    displayDescription: false,
  },
};
@normtronics normtronics added the needs-grooming Has not been reviewed by codeowners for scope/validation label Jan 17, 2025
@Jmilham21
Copy link
Collaborator

@normtronics are you getting ad playback when not using forceLegacyConfig? I think the issue is probably related to the way we are parsing the adEvent callback, unless you aren't able to run ads using something like the example in SingleExample.js in our Example app.

@Jmilham21 Jmilham21 added the needs-info There isn't enough information. Please add more context label Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-grooming Has not been reviewed by codeowners for scope/validation needs-info There isn't enough information. Please add more context
Projects
None yet
Development

No branches or pull requests

2 participants