[TIMOB-27366] iOS: Video player not getting closed in iOS version 10.x.x and below
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | None |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2019-09-25T17:28:58.000+0000 |
Affected Version/s | Release 8.1.0 |
Fix Version/s | n/a |
Components | iOS |
Labels | engSchedule |
Reporter | Fazlul Haque |
Assignee | Vijay Singh |
Created | 2019-08-29T19:00:08.000+0000 |
Updated | 2019-09-26T18:13:49.000+0000 |
Description
Hello,
Video player is not getting closed in iOS version 10.x.x and below but on iOS version 12 or above it's working fine.
*Test Environment:*
Appcelerator Command-Line Interface, version 7.1.0
Operating System
Name = Mac OS X
Version = 10.14.5
Architecture = 64bit
# CPUs = 4
Memory = 8589934592
Node.js
Node.js Version = 8.9.1
npm Version = 5.5.1
Titanium CLI
CLI Version = 5.2.1
Titanium SDK
SDK Version = 8.1.0.GA
iOS device: iPhone 6plus(12.4), iPod 5G(9.3.3), iPhone OS 10.3.3
*Test code:*
app.js
var win = Ti.UI.createWindow({
backgroundColor : 'red'
});
var label2 = Ti.UI.createLabel({
color : 'blue',
text : 'Play Video',
width : 300,
height : 200
});
label2.addEventListener('click', function(e) {
//alert('hi')
require('playvid').playvideo();
});
win.add(label2);
win.open();
playvid.js
exports.playvideo = function() {
var url = "https://storage.googleapis.com/onfvideo/Dialogue%202019/2%20compress%2006-04-2019/012%20S%20Shantakumari/Intro%20Dr%20S%20Shanthakumari.mp4";
var vidWin = Titanium.UI.createWindow({
title : 'Video View Demo',
backgroundColor : '#000000',
// top : (require('main').checkiPhoneX) ? '40dp' : require('main').isiOS7Plus() ? '20dp' : '0dp',
orientationModes : [Titanium.UI.LANDSCAPE_LEFT, Titanium.UI.LANDSCAPE_RIGHT, Titanium.UI.PORTRAIT, Titanium.UI.UPSIDE_PORTRAIT]
});
vidWin.open();
var videoPlayer = Titanium.Media.createVideoPlayer({
//top : (require('main').checkiPhoneX) ? '45dp' : require('main').isiOS7Plus() ? '32dp' : '0dp',
//bottom : (require('main').checkiPhoneX) ? '32dp' : '0dp',
url : url,
autoplay : true,
fullscreen : true,
backgroundColor : '#000000',
height : Ti.UI.FILL,
width : Ti.UI.FILL,
//initialPlaybackTime : timemili,
mediaControlStyle : Titanium.Media.VIDEO_CONTROL_DEFAULT,
scalingMode : Titanium.Media.VIDEO_SCALING_ASPECT_FIT
});
videoPlayer.addEventListener('complete', function(e) {
if (vidWin !== null) {
vidWin.close();
vidWin = null;
}
});
vidWin.add(videoPlayer);
};
*Steps to reproduce the issue:*
1. Run the project on iOS 10.x.x enable device
2. Click on the red window video play button.
3. Opened the video player window and it's paying the video
4. Make it full Screen and wait until complete the video
5. It's not returning to the Red window on iOS 10.x.x device(Check Screenshot).
But it's working fine on iOS 12 or above device.
Thanks
Attachments
File | Date | Size |
---|---|---|
iPod 5G.PNG | 2019-08-29T18:59:42.000+0000 | 19796 |
iPod Device.mp4 | 2019-08-30T05:32:43.000+0000 | 3948519 |
onference.mp4 | 2019-08-30T11:32:06.000+0000 | 540687 |
[~fhaque] Can we get some more information as to iPhone model? I am unable to reproduce with 8.1.0.GA SDK on a iOS 10.3 device (iPhone 5) or in the emulator iPhone 6, 6Plus, etc.. running 10.3 . Full screen video returns to red screen upon completion. Operating System Name = Mac OS X Version = 10.14.5 Architecture = 64bit # CPUs = 12 Memory = 17179869184 Node.js Node.js Version = 8.9.1 npm Version = 5.5.1 Titanium CLI CLI Version = 5.2.1 Titanium SDK SDK Version = 8.1.0.GA
Cannot reproduce, however, the workaround provided by Vijay was confirmed by the user to work for them.