Handling Orientation Changes in IMA Player
I'm encountering difficulty managing orientation changes in the IMA player. My application has separate layouts for portrait and landscape modes. Integrating orientation checks in the configuration changes isn't viable due to the layout discrepancies. While this setup functions smoothly with the ExoPlayer, I'm unsure how to approach it with the IMA player. Any insights or guidance on handling this situation would be appreciated.
Hello @Anas-mirza912 ,
Have you tried using the ExoPlayer-IMA extension, so ExoPlayer can handle the orientation changes?
If that does not work for your use-case, can you provide precise steps to reproduce the issue using the IMA sample apps?
Thank you, Jackson IMA SDK team
Hello @Kiro705
In the basic sample, removing the orientation config changes check in the AndroidManifest file causes the ad to start reloading, which I understand is expected behavior. However, I'm facing an issue because I use different layouts for portrait and landscape modes. Restricting the recreation of the fragment isn't feasible in my case. Therefore, I'm seeking guidance on how to resume ad playback when the adView is destroyed and recreated during orientation changes. We previously used the ExoPlayer extension but no longer do. Any advice on how to tackle this would be greatly appreciated
Hello @Anas-mirza912 ,
If the layout change requires you to destroy the adView, I do not think IMA supports a way to resume playback of the same add in a different adView. If you would like to raise this as a feature request, I would recommend reaching out on the IMA technical forum to do so. I see you may have already opened this thread. You can reply there to request support for this feature.
I would also recommend including a sample app that clearly highlights the feature gap for your use-case.
Thank you, Jackson IMA SDK team