Skip to content

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

@normtronics

Description

@normtronics

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,
  },
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-groomingHas not been reviewed by codeowners for scope/validationneeds-infoThere isn't enough information. Please add more context

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions