I have a wkWebView where I display a video. How can I automatically switch to the next screen after the video ends?
Asked
Active
Viewed 72 times
1
-
Check out this document if you're interested in using Javascript in your project: https://stackoverflow.com/questions/9459711/detecting-uiwebview-finish-to-play-youtube-video-on-ipad – Miguel Tepale May 06 '20 at 17:40
1 Answers
2
It doesn't look like WKWebView has any call back methods to notify when a video has completed. The only suggestions I can provide is if the video lives locally in the app, you can use AVFoundation and take advantage of their call back methods. Other users have also mentioned using Javascript to detect when an online video has finished.

Miguel Tepale
- 289
- 5
- 15