During ad playback (googima preroll), playerInstance.getState() returns "buffering" instead of "playing" / "paused" when in HTML5 mode. The method works as expected with the same preroll tag if the player is in Flash mode.
Is this a known issue and is there any workaround to get getState() working consistently between modes?
I spoke with our Engineers regarding this and they have told me that the .getState() API call is technically supposed to be for the content only, and not for ads. They also said that the fact that its working in Flash is probably because of the way Flash is rendering the media file in the ad tag.
To do what you want to do, you can probably use .on(“adTime”). Using it will return the following items:
tag (String): The ad tag that is currently playing.
position (String): The current playback position in the ad creative.
duration (Number): The total duration of the ad creative.
sequence (Number): Returns the sequence number the ad is a part of.
Please let me know if you need any more help or have any other questions.
This question has received the maximum number of answers.