Closed alex-barstow closed 6 years ago
Is this problem introduced in a recent version of iOS? If not, what caused this problem to appear only recently?
Updated the rollup version to 0.50 because an apparent issue in 0.41.6 was causing the Travis build to fail
QA Passed. No regressions found.
Problem
When the snapshot restores the content source following ad playback, the
currentTime
is not able to be set in iOS, causing the content to restart from the beginning following midrolls. Even withpreload="auto"
, Safari loads only the video metadata, so we do not get acontentcanplay
player event and setting thecurrentTime
fails to seek the content.Possible, albeit hacky solution
player.load()
does not seem to make the content seekable in iOS. We still only get acontentloadedmetadata
event, and setting thecurrentTime
still fails. So far, the only way I have been able to override Safari's default preloading behavior is to addautoplay
to the video element before changing the source. This way, we do get acontentcanplay
event and the content is seekable by the time we try to update thecurrentTime
.autoplay
is then removed after the content starts playing.Note:
This feels far from the ideal solution, but so far it's the only way I've been able to force Safari to load the content enough that we can seek. I am hoping others might have some better ideas (paging @incompl and @gkatsev). At the very least I wanted to start a conversation about how best to address this problem.