Hello Rahat,
Michael here from IMA SDK Team, allow me to assist you.
Yes, AVPlayerViewController is supported by the SDK and it is expected to work with PiP mode. You may check this guide for Picture-in-picture for reference. Additionally, you can also use our advanced sample apps that is integrated with PiP mode and let us know should your issue still persist there.
Regards,
|
||||||
-There is one problem that still exists with PIP for us
In the app when the user enters PIP we dismiss the View controller holding the player etc but we don't deallocate it.. we save it so we can restore it when the user ends PIP
When a midroll starts it will play the mid roll in the PIP window but then it takes really really long for the content to start playing again.
I modified the Advanced Example a bit to show you the problem(attached the VideoViewController.m file). Our integration is with AVPlayerViewController and we see the same problem.
To see the problem, play the AdRules option, after preroll plays go into PIP, hit the Tags button. The problem will be in the PIP window after the midroll is done
Thank you very much
Hello Rahat,
Thanks for your response.
We are supposed to check if we are in PIP before calling [adsManager start].
- To clarify, you need to ensure that you only call [adsManager start] when your video is in standard playback mode as ads cannot be started in PiP
From what I am seeing if I am in PIP and don't call [adManager start] the ads still play in the PIP window. Is this a bug?
- I am uncertain of this behavior because as far as I know if you did not call [adManager start] then Ad playback would not start.
If it did work as I thought it would - like not playing the ad how would things work when I don't call [adsManager start] in PIP - will the content start playing basically skipping ads?
- From my understanding this should be the expected behavior in relation to the previous question.
Would you be able to share with us the modified sample app itself so we can test on our end? It will also be appreciated if you can share screen recording of the behavior that better illustrates the issue and the step by step procedure to reproduce it.
If the file(s) you are looking to share are less than 25mb in total you can attach them to this case on your next reply. If you are having trouble attaching your file to this case or if your file(s) are larger than 25mb, you can share your files with me by performing the following steps:
1. Navigate to
2. Fill out all fields, and attach your file(s).
3. Please reply back on this thread when you have uploaded your file(s). Please do not share this link.
Regards,
Hello Rahat,
I have tested using this advance sample app without any modification and could not see what you are reporting. Does this occur in specific devices only? If so kindly provide the device details.
As previously mentioned, it would be best if you can share with us the screen recording of the behavior you are encountering for faster progression of the investigation showing the steps to reproduce the behavior so we can replicate the issue exactly how it should be done.
Regards,
Hello Rahat,
Thank you for providing the requested details. From what I saw in the video, it should be the expected behavior. The [adsManager start] is already called at the beginning of the content, hence playing the pre-roll. It will then continue to play the mid-roll and post-roll if there is, depends on the configuration of the requested ad tag. It is just you cannot start the whole thing (starting adsManager) on a PiP mode as indicated here.
Hope this makes it clear. Let us know should you have further questions.
Regards,
Hello Rahat,
In the event that you only have post-roll on your ad request, you can still request the ad and call the adsManager start beforehand, and then you may switch to PiP mode. The ads will be loaded but the content would start first and the post-roll ad will play right after the content finishes.
Regards,