iOS video restarts from beginning after mid-roll

514 views
Skip to first unread message

James McGill

unread,
May 3, 2021, 5:32:51 AM5/3/21
to Interactive Media Ads SDK
Description: After mid-roll completes the video content seeks back to the beginning
Xcode: v12.5
Device: iPhone 11
iOS: v14.4.2
iOS IMA SDK (Objective-C): 3.13.0 and 3.14.1

This is reproducible out-of-the-box in the AdvancedExample (Objective-C) with SDK 3.13.0. The AdvancedExample app is broken with SDK 3.14.1 but I can also reproduce it on SDK 3.14.1 in our product code.

Steps to reproduce:
1) Change Podfile in AdvancedExample (Objective-C) to use v3.13.0
2) Build and run the AdvancedExample
3) Select either 'AdSense' or 'AdRules' from the menu
4) Watch video until the Mid-roll ads completes
5) Observe that the video seeks back to time 00:00:00 and continues playing from there.

Observations:
1) Strangely this is reproducible only with certain video content. Here it is reproducible only with the BipBop video stream. In my own tests, I tried with different content and it was highly dependant on the video stream used.
2) This issue was introduced when I changed to using the PictureInPicture API. Specifically when creating an IMAAdsRequest, the initWithAdTagUrl function now takes a reference to AVPlayer directly. If I restore that one line in my code to the older api, which just takes a IMAContentPlayhead delegate then this problem goes away.

This was as far as I could go with debugging it, I hope it helps.

Kind Regards,
James

IMA SDK

unread,
May 3, 2021, 3:13:32 PM5/3/21
to ima...@googlegroups.com
Hi James, 

Thank you for reporting this I was able to replicate what you saw. Can you try on our latest SDK version 3.14.3?

Regards,

Google Logo
Aryeh Baker
IMA SDK Team
 


ref:_00D1U1174p._5004Q2GJPxN:ref

James McGill

unread,
May 4, 2021, 4:48:46 AM5/4/21
to Interactive Media Ads SDK
Hi Aryeh,

I just checked with the new release (v 3.14.3) and I could still reproduce the issue.

Kind Regards,
James

IMA SDK

unread,
May 4, 2021, 6:15:51 AM5/4/21
to ima...@googlegroups.com

Hi James,

 

I work with Aryeh.

 

I wasn't able to reproduce this issue on my end, if possible can you please provide a screen recording of this issue?

Regards,

Google Logo
Michael Angelo Legaspi
IMA SDK Team
 


ref:_00D1U1174p._5004Q2GJPxN:ref

James McGill

unread,
May 4, 2021, 7:52:50 AM5/4/21
to Interactive Media Ads SDK
Hi Michael,

Thanks for taking a look into this.

Please find the attached video.
As mentioned, the AdvancedExample doesn't work at the moment with 3.14.x, so this was using 3.13.0. However the behaviour is identical on both newer 3.14.x versions, if using the exact same content as this.

Can I ask which version of the SDK you used when you tried? Are you able to run the latest version with the AdvancedExample?

Kind Regards,
James

IMA-midroll.webm

IMA SDK

unread,
May 4, 2021, 9:03:38 AM5/4/21
to ima...@googlegroups.com
Hi James,

Thank you for the video and your testing. I brought up with my team your observations concerning the midroll and bip bop content and the non working Advanced Example and we will get back to you as soon as possible.

Regards,

Google Logo
Aryeh Baker
IMA SDK Team
 


ref:_00D1U1174p._5004Q2GJPxN:ref

IMA SDK

unread,
Jun 16, 2021, 12:11:24 PM6/16/21
to ima...@googlegroups.com
Hi James,

My team gave me good news, the Advanced example will be fixed in the next release, you may monitor our release page for an update. 

Regarding the restart from the beginning after midroll, my team has found that the issue has been fixed. Please get back to us if it still persists.

Regards,

Google Logo
Aryeh Baker
IMA SDK Team
 


ref:_00D1U1174p._5004Q2GJPxN:ref

James McGill

unread,
Jun 16, 2021, 12:21:38 PM6/16/21
to Interactive Media Ads SDK
That's great!
Thanks for the feedback Aryeh, I will keep an eye out for the next release.

Kind Regards,
James

Charles MacDuff

unread,
Sep 2, 2021, 10:22:16 AM9/2/21
to Interactive Media Ads SDK
This is still a problem on 3.14.4 . Is there any progress on this issue?

I started another thread here but I was curious if you had found an alternative James?

Charles

James McGill

unread,
Sep 2, 2021, 10:38:01 AM9/2/21
to Interactive Media Ads SDK
Hi Charles,

No sorry, I haven't had a chance to test 3.14.4 yet. 
James.

IMA SDK

unread,
Sep 2, 2021, 12:12:55 PM9/2/21
to charle...@hotmail.com, ima...@googlegroups.com
Hi Charles,

Thank you for reaching out to us with your concern. I was able to see the other thread and wanted to respond to you here. I was able to see the video but from what I can tell everything seemed ok. I saw the preroll start and stop, I saw the midroll start and stop. Beyond that there was nothing else that we saw that indicated any issue. If you can give us more details of what you are seeing or the issue that has you concerned we will happily look more into this for you. At the same time if you can share with us via the "Reply to author" button with a simple sample that shows this behavior. As well as any steps that replicate it. We will look into it.

Regards,
Google Logo
William Pescherine
IMA SDK Team
 


ref:_00D1U1174p._5004Q2GJPxN:ref

James McGill

unread,
Sep 2, 2021, 1:14:32 PM9/2/21
to Interactive Media Ads SDK

Hi,

I've just checked the latest version of the AdvancedExample which is using v3.13.4 now and I still could reproduce the issue there.
That is, when playing the 'AdRules' stream the video will reset to position 00:00:00 after the mid-roll ads complete.

Kind Regards,
James

Charles MacDuff

unread,
Sep 2, 2021, 1:25:13 PM9/2/21
to Interactive Media Ads SDK
Hello,

As James says there is still clearly a problem when an .m3u8 file is used for the content. 
The mid-rolls starts and ends, but the content is always resumed at the beginning. (position 00:00:00)

As you can see in the video attached to this message, the mid-roll starts when the content gets to 15 seconds (around 00:27 into the screen capture). We expected the content to resume at 15 seconds when the ad is finished but it jumps to the beginning.

Charles
RPReplay_Final1630557393_2.mp4

IMA SDK

unread,
Sep 3, 2021, 1:17:06 AM9/3/21
to charle...@hotmail.com, ima...@googlegroups.com
Hi Charles,

Could you please share what are the details of the simulator that you're using?

Regards,
Google Logo
Teejay Wennie Pimentel
IMA SDK Team
 


ref:_00D1U1174p._5004Q2GJPxN:ref

Charles MacDuff

unread,
Sep 3, 2021, 9:03:55 AM9/3/21
to Interactive Media Ads SDK
I'm using a real iOS device.

Device: iPhone 11 pro
OS: iOS 14.7.1
GoogleAds-IMA-iOS-SDK: 3.14.4

James McGill

unread,
Sep 3, 2021, 11:59:03 AM9/3/21
to IMA SDK, charle...@hotmail.com, ima...@googlegroups.com
Hi,
For info, my test I did yesterday was on the same physical device (not a simulator) as the original report I made, but the versions have now been updated.

So it is now:
Xcode: v12.5.1
Device: iPhone 11
iOS: v14.7.1
iOS IMA SDK (Objective-C):  3.14.4
Vanilla AdvancedExample without any changes

Hope that helps,
James

James McGill  |  Software Engineer

james....@castlabs.com

castLabs

castlabs.com  |  @castlabs  |  LinkedIn

castLabs GmbH, Wilhelmine-Gemberg-Weg 5-7, 10179 Berlin, Germany | Managing Directors: Michael Stattmann, Martin Tews | Amtsgericht Berlin-Charlottenburg HRB 101555 B



--
You received this message because you are subscribed to a topic in the Google Groups "Interactive Media Ads SDK" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ima-sdk/kg8sq1y5dLI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ima-sdk+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ima-sdk/YNsJH000000000000000000000000000000000000000000000QYUEOE00RdoFi3sSQU2WhnkmKS2rkA%40sfdc.net.

IMA SDK

unread,
Sep 3, 2021, 5:04:37 PM9/3/21
to charle...@hotmail.com, ima...@googlegroups.com
Hi,

Thank you for the additional input. I was rewatching the video that you have sent and see what you are talking about. We would ask if you can share via the "Reply to Author" button with the sample that is in the video so that we can look to see why that is happening.

Charles MacDuff

unread,
Sep 7, 2021, 1:32:28 PM9/7/21
to Interactive Media Ads SDK
Hello,

As we have already said, it is easy to reproduce the bug with the official Google AdvancedExample available on Github. ( https://github.com/googleads/googleads-ima-ios/tree/master/Swift/AdvancedExample )
If for some reason you can't download it yourself here is the zip file.

Charles
googleads_ima_sdk_ios_swift_advanced_example.zip

IMA SDK

unread,
Sep 7, 2021, 11:13:23 PM9/7/21
to charle...@hotmail.com, ima...@googlegroups.com

Hi Charles,

 

Thank you for your response. I have raised this issue again to the rest of the team. We will provide more information once we have the result of the investigation.

Regards,

Google Logo
Michael Angelo Legaspi
IMA SDK Team
 


ref:_00D1U1174p._5004Q2GJPxN:ref

Charles MacDuff

unread,
Sep 13, 2021, 5:07:17 PM9/13/21
to Interactive Media Ads SDK
Hi Michael,

Any news regarding this problem? 

Charles

IMA SDK

unread,
Sep 13, 2021, 11:49:57 PM9/13/21
to charle...@hotmail.com, ima...@googlegroups.com

Hi Charles,

 

Our team have replicated the issue and there is currently ongoing investigation regarding this. We will get back to you as soon as we have the result of the investigation.

Regards,

Andy Larochelle

unread,
Sep 23, 2021, 2:11:18 PM9/23/21
to Interactive Media Ads SDK
Hi,

Any news regarding this? We're having the same problem and this will eventually be quite a big blocker on our side.

tobiaslie...@tv2.no

unread,
Sep 23, 2021, 4:05:43 PM9/23/21
to Interactive Media Ads SDK
Just wanted to add that this bug applies to tvOS as well. 

IMA SDK: 4.4.2
tvOS: 14.7 & 15.0
Apple TV 4 & 4K (1. and 2. gen)

Hoping that a fix is right around the corner.

IMA SDK

unread,
Sep 23, 2021, 11:57:53 PM9/23/21
to tobiaslie...@tv2.no, ima...@googlegroups.com

Hi all,

 

Thank you for reaching out to us.

 

I'm afraid the team haven't given any feedbacks yet that we can share to you. But rest assured that our team is already working on this issue. I will also add the information you shared with us. We will get back to you the soonest possible.

Regards,

Jeremy Blaker

unread,
Dec 8, 2021, 10:01:12 AM12/8/21
to Interactive Media Ads SDK
I am seeing a similar issue in the AdvancedSample app. However what I am seeing is that after a midroll plays when picture-in-picture is active the content does not resume after the mid-roll. The content resumes fine after the pre-roll ad.

  1. Launch the "AdvacnedExample" app
  2. Select "VMAP Pods"
  3. Wait for playback to begin and then put the app in the background
  4. Observe the pre-roll ad playing in the pip window
  5. Observe main content playing up to midroll
  6. Midroll plays and content does not resume
Sometimes if you wait long enough the midroll restarts and plays again.

IMA SDK

unread,
Dec 9, 2021, 4:17:21 AM12/9/21
to jbl...@brightcove.com, ima...@googlegroups.com

Hello Jeremy,

 

Thank you for providing additional information.

 

I just want to inform you all that our team have replicated the same behavior on iOS and tvOS. However, there are no final results of the investigation yet as to what causes the issue. That said, I have followed up on the internal ticket we have raise for this and we will provide more information once we received sufficient information from our team.

Regards,

tobiaslie...@tv2.no

unread,
Jan 19, 2022, 8:43:29 AM1/19/22
to Interactive Media Ads SDK
Hi again.

Any news regarding this issue? Or any suggestions for workarounds?
Our customers have been affected by this for a long time now, and are getting very restless, so a fix would be highly appreciated.

Regards,
Tobias

IMA SDK

unread,
Jan 20, 2022, 1:17:21 AM1/20/22
to tobiaslie...@tv2.no, ima...@googlegroups.com

Hello Tobias,

 

Thanks for getting back to us.

 

I'm afraid that there is no recent update that we can share to you as of the moment. But allow me to follow up on the investigation thread with sense of urgency and importance on your behalf. I will provide an update here once I have received sufficient information from our team. Your patience is much appreciated.

Regards,

Andy Larochelle

unread,
Aug 16, 2022, 12:43:34 PM8/16/22
to Interactive Media Ads SDK
Hi,

Any update on this?

IMA SDK

unread,
Aug 16, 2022, 1:56:17 PM8/16/22
to alaro...@mirego.com, ima...@googlegroups.com
Hi Andy,

At this point there is still nothing actionable, but we will get back to you as soon as possible. I relayed your request to my team.

Regards,

Google Logo
Aryeh
IMA SDK Team
 


ref:_00D1U1174p._5004Q2GJPxN:ref

IMA SDK

unread,
Aug 22, 2022, 1:27:00 PM8/22/22
to ima...@googlegroups.com, alaro...@mirego.com
Hi everyone,

Regarding the Advanced sample working out of the box we have a fix. In our samples, we used to recommend performing ad requests as a part of the viewDidLoad() method. Unfortunately, at the time of load the view hierarchy isn't consistently populated, leading to this error message.

The solution is to move your ad request to the viewDidAppear() method, as seen in our Advanced Sample's repository. Please note that because we destroy and recreate this view between videos, our sample can safely include a flag to prevent multiple requests if viewDidAppear() is called repeatedly on the same view. The head of the repository has this fix while the official release needs the workaround. 

Please let us know if switching to making your requests from the viewDidAppear() method resolves your issues.

Regarding the issue mid-rolls starts and ends, but the content is always resumed at the beginning we are still working on it and will get back to you as soon as possible.

pineapplevine1

unread,
Oct 4, 2022, 3:16:13 AM10/4/22
to Interactive Media Ads SDK
Hello,

I find this issue still there on my Advanced Sample project that adRequest is on viewDidAppear() method.

Environment
 -IMASDK iOS 3.16.3 latest
 -iPad mini (iPadOS 15.0.2)
 -Xcode 13.4.1
 -AD: VMAP mid-roll every 10 seconds for 1:40

Regards.

2022年8月23日火曜日 2:27:00 UTC+9 imasdk:

IMA SDK

unread,
Oct 5, 2022, 5:53:54 AM10/5/22
to pineapp...@gmail.com, ima...@googlegroups.com

Hello pineapplevine1,

 

Michael here and I work along with Teejay.

 

As mentioned on the other forum thread you recently opened with us, I would suggest to continue our communication here. On that note, I see that you have more details to share with us that is quite large for this thread. That said, kindly send it privately via the upload form process below:

 

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

https://docs.google.com/forms/d/e/1FAIpQLSfkAiXMeYP-fw1W3Z-tT9uwmATEKO5X6S-th0gR2ezdKaaqfg/viewform?usp=pp_url&entry.400550049=IMA+SDK&entry.460850823=5004Q00002GJPxNQAX&entry.80707362=00065218

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.

Should you opt to directly send it to this thread, kindly send it privately via "Reply To Author" button.

Regards,

Google Logo
Michael Angelo
IMA SDK Team
 


ref:_00D1U1174p._5004Q2GJPxN:ref

pineapplevine1

unread,
Oct 17, 2022, 10:37:47 PM10/17/22
to Interactive Media Ads SDK
Hello  Michael.

Sorry for the late reply.
I uploaded a sample application and a reproduction video. I would be grateful if you would confirm it.

Regards.
2022年10月5日水曜日 18:53:54 UTC+9 imasdk:

IMA SDK

unread,
Oct 18, 2022, 4:30:54 AM10/18/22
to pineapp...@gmail.com, ima...@googlegroups.com

Hello,

 

Thank you for your response. Confirming that we have received the sample app and screen recording you have sent to us. We have shared this to the rest of our team as additional information to the current investigation. We will notify you on this thread the soonest we have more information to share.

Regards,
 

IMA SDK

unread,
Jun 27, 2023, 4:33:52 PM6/27/23
to pineapp...@gmail.com, ima...@googlegroups.com

Hi All,

I hope you're doing well.

I just want to circle back on this issue with regard to the video restarts, can you confirm if you still encountering this behavior in the latest SDK version (https://developers.google.com/interactive-media-ads/docs/sdks/ios/client-side/download)? Asking this as there are many updates that have been made from the previous v3.13.0 and v3.16.3 where this reported behavior is reproducible. If you haven't yet used the latest version, we would suggest you try the latest version. 

This message is in relation to case "ref:_00D1U1174p._5004Q2GJPxN:ref"

Thanks,
 
Google Logo IMA SDK Team


Jeremy Blaker

unread,
Jul 10, 2023, 11:11:35 AM7/10/23
to Interactive Media Ads SDK
Thanks for the update.

From a view tests I've done it does look like the video will correctly resume after a mid-roll however I am still seeing another issue where sometimes the ad does not always complete. It will play around six of ten seconds and then end early, when this happens sometimes the content does not start afterwards. 

IMA SDK

unread,
Jul 10, 2023, 4:23:54 PM7/10/23
to jbl...@brightcove.com, ima...@googlegroups.com
Hello Jeremy,

Thank you for responding back. Can you confirm if what you mean is that you are encountering now an entirely new behavior in the latest version of the SDK (https://developers.google.com/interactive-media-ads/docs/sdks/ios/client-side/download)? If that is the case, we recommend opening up a new thread with full details of the new behavior for better tracking of issues.

Jeremy Blaker

unread,
Jul 10, 2023, 4:32:50 PM7/10/23
to Interactive Media Ads SDK
It's not new behavior, no, we also encountered this in 3.18.1 and it is still present in 3.19.1. 

IMA SDK

unread,
Jul 11, 2023, 1:42:20 PM7/11/23
to jbl...@brightcove.com, ima...@googlegroups.com
Hello Jeremy,

Thank you for responding back to us.

For clarification, the original posted issue on this thread is with regards to content starts over after midroll ads. However, in your last response, you mentioned that it does look like the video will correctly resume after a midroll ads but you are encountering another issue which is you are seeing sometimes the ad does not always complete. This is the reason we are asking for you to create another thread for this issue for better tracking of concerns. When opening a new thread,  kindly include sample apps where the issue is reproducible, screen recording and steps to replicate the behavior to expedite process of investigation.

Jeremy Blaker

unread,
Jul 11, 2023, 2:58:43 PM7/11/23
to Interactive Media Ads SDK

IMA SDK

unread,
Jul 11, 2023, 4:54:29 PM7/11/23
to jbl...@brightcove.com, ima...@googlegroups.com
Hello Jeremy,

Thank you for responding back to us and following the process. We have responded on the new thread you created and we highly recommend continuing our communication there if you have further inquiries to us.
Reply all
Reply to author
Forward
0 new messages