Hello,
WKWebView does not stop playing videos on iPad on latest SDK. Although its stop playing the video on iPhone. We have tested this issue on the following environment:
Appcelerator Command-Line Interface, version 7.0.6
SDK: 7.4.1.GA
Devices: iPhone 5s(12.0.1), and iPad Simulator
Ti.WKWebView module version: 2.8.3 from [here](
https://github.com/appcelerator-modules/Ti.WKWebView/releases)
*Steps to reproduce the issue:*
1) add the attached app.js code into your project
2) Run it on iOS 12.0 iPad device
3) Click on "click to open videos" button
4) Play the video, once the video is started playing, click on the back button or goto the background by clicking on Home button
5) Video is playing even after closing the window
*Test Code:*
app.js file
var mainWin = Ti.UI.createWindow({
backgroundColor : 'white'
});
var btn = Ti.UI.createButton({
title : 'click to open videos',
color : 'white',
backgroundColor : 'black',
width : "50%",
height : '20%'
});
mainWin.add(btn);
btn.addEventListener('click', function() {
var win = Ti.UI.createWindow({
backgroundColor : 'white'
});
var backBtn = Ti.UI.createButton({
title : 'Back',
color : 'white',
backgroundColor : 'black',
top : 10
});
backBtn.addEventListener('click', function() {
win.close();
});
var WK = require('ti.wkwebview');
var webview = WK.createWebView({
url : 'https://vimeo.com/album/5202279',
top : 50
});
win.add(backBtn);
win.add(webview);
win.open();
});
mainWin.open();
Thanks
While running the video if I press home button it is stopping video in iPhone and iPad both. The problem is happening only when I am clicking back button. In this case it is not stopping video. It looks the problem is from native WKWebview. I'll look in this. With Ti.UI.WebView, this problem is not there.
Hello, Ok. Thanks for your update.
PR - https://github.com/appcelerator-modules/Ti.WKWebView/pull/25
Thanks [~vijaysingh].
[~vijaysingh] approved your PR and merged it. Ready to be released.