This project is to show a HTML5 video bug in WKWebView.
Steps to reproduce:
- Run a server that will serve the index.html. For example, use serve:
npx serve .
- Run iPhone 12 Pro simulator.
- Open iOS Safari, then go to
http://<ip-address>:<port>
. Replace ip-address and port with the address and port shown by serve. - You should see "Hello world". The video should be hidden because of the CSS media query. This is the expected behaviour.
- Now open the the TestWKWebView.xcodeproj in TestWKWebView directory.
- Replace the URL in WebviewController.swift with the ip address and port as shown by serve.
- Build and run the project.
- Tap the button in the app. When the web page is loaded, the video is auto played in full screen. This is a bug.