Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26490] iOS: WKWebView does not stop playing videos on iPad

GitHub Issuen/a
TypeBug
PriorityNone
StatusResolved
ResolutionFixed
Resolution Date2018-11-02T10:05:08.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterFazlul Haque
AssigneeVijay Singh
Created2018-10-26T15:32:08.000+0000
Updated2018-11-05T13:31:39.000+0000

Description

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

Attachments

FileDateSize
ScreenRecording_11-01-2018_1-04-04_PM.MP42018-11-01T09:35:14.000+00008196282

Comments

  1. Vijay Singh 2018-10-29

    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.
  2. Rakhi Mitro 2018-10-31

    Hello, Ok. Thanks for your update.
  3. Vijay Singh 2018-11-01

    PR - https://github.com/appcelerator-modules/Ti.WKWebView/pull/25
  4. Rakhi Mitro 2018-11-01

    Thanks [~vijaysingh].
  5. Jan Vennemann 2018-11-02

    [~vijaysingh] approved your PR and merged it. Ready to be released.

JSON Source