{ "id": "107101", "key": "TIMOB-12156", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "15400", "description": "2013 Sprint 08 API", "name": "2013 Sprint 08 API", "archived": true, "released": true, "releaseDate": "2013-04-22" }, { "id": "15106", "description": "2013 Sprint 08", "name": "2013 Sprint 08", "archived": true, "released": true, "releaseDate": "2013-04-22" } ], "resolution": { "id": "6", "description": "", "name": "Hold" }, "resolutiondate": "2017-03-21T21:15:15.000+0000", "created": "2012-12-27T02:40:54.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "ios6", "videoplayer" ], "versions": [ { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "issuelinks": [ { "id": "27816", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "102391", "key": "TIMOB-11212", "fields": { "summary": "iOS: VideoPlayer goes into a loading mode at the end of the video when created in a two window app", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-21T21:15:20.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "Modal window with a video player inside it does not close properly and leaves a black screen on completion of video. It happens only on iOS6. On iOS5, works as expected. Window closes properly and returns to the root window.\r\nRun the below code to see the behavior.\r\n{code}\r\nvar rootwin = Ti.UI.createWindow({\r\n backgroundColor : 'red',\r\n navBarHidden : true,\r\n top : 0,\r\n left : 0,\r\n right : 0,\r\n bottom : 0\r\n});\r\n\r\nvar button = Ti.UI.createButton({\r\n title : 'Play Video',\r\n width : '250dp',\r\n height : '50dp'\r\n});\r\nbutton.addEventListener('click', function(e){\r\n var win = Ti.UI.createWindow({\r\n navBarHidden : true,\r\n backgroundColor : '#ffffff',\r\n exitOnClose : true,\r\n top : 0,\r\n left : 0,\r\n right : 0,\r\n bottom : 0,\r\n orientationModes:[Ti.UI.PORTRAIT,Ti.UI.LANDSCAPE_LEFT,Ti.UI.LANDSCAPE_RIGHT],\r\n modal : true // comment this line to see proper behavior\r\n });\r\n \r\n var videoPlayer = Titanium.Media.createVideoPlayer({\r\n repeatMode : Ti.Media.VIDEO_REPEAT_MODE_NONE,\r\n url : 'http://monactifry-tevolys.seb-cms-qual.bearstech.com/videos/9789.mp4',\r\n backgroundColor : 'black',\r\n mediaControlStyle : Titanium.Media.VIDEO_CONTROL_DEFAULT,\r\n scalingMode : Titanium.Media.VIDEO_SCALING_ASPECT_FIT,\r\n fullscreen : true,\r\n autoplay : true\r\n });\r\n \r\n function onComplete() {\r\n videoPlayer.stop();\r\n win.close();\r\n }\r\n \r\n function onFullScreen(e) {\r\n if (e.entering == 0) {\r\n videoPlayer.stop();\r\n win.close(); \r\n }\r\n }\r\n \r\n videoPlayer.addEventListener('complete', onComplete);\r\n \r\n videoPlayer.addEventListener('fullscreen', onFullScreen);\r\n \r\n win.add(videoPlayer);\r\n\r\n \r\n win.open();\r\n});\r\nrootwin.add(button);\r\n\r\nrootwin.open();\r\n\r\n{code}\r\nNote: Opening just a modal window( without video player ) from root window works fine and expected.", "attachment": [], "flagged": false, "summary": "iOS: In iOS6, Modal Window with video player in it leaves a black screen on close", "creator": { "name": "anagesh", "key": "anagesh", "displayName": "Anirudh Nagesh", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "anagesh", "key": "anagesh", "displayName": "Anirudh Nagesh", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Ti SDK 3.0.GA and iOS6", "comment": { "comments": [ { "id": "232585", "author": { "name": "coolone3000", "key": "coolone3000", "displayName": "Chris Carranza", "active": true, "timeZone": "America/Chicago" }, "body": "I've been having this same problem but didn't know it had anything to do with a videoplayer being inside the window. My problem has the exact same behavior yet is a bit different. It only happens when i open a modal window from a tableview, then return to a previous view in the navigationgroup, when i return to the window with the tableview, its appears as if the click on the table is trying to open the Modal window twice. This may or may not be directly related to this error, but it only happens when changing to SDK 3.0.0.GA, if i take the exact same code and run it with 2.1.4.GA it works just fine.\r\n\r\n{code:title=Bar.java|borderStyle=solid}\r\n[INFO] : \b\b \bopen\r\n[INFO] : \b\b \bopen\r\n[DEBUG] : \b\b \bNew scheme: \r\n[DEBUG] : \b\b \b2012-12-27 13:48:18.025 App[58687:c07] *** Assertion failure in -[UIWindowController transition:fromViewController:toViewController:target:didEndSelector:], /SourceCache/UIKit_Sim/UIKit-2372/UIWindowController.m:211\r\n[ERROR] : \b\b \bScript Error = Attempting to begin a modal transition from to while a transition is already in progress. Wait for viewDidAppear/viewDidDisappear to know the current transition has completed at JobCallsView.js (line 268).\r\n[WARN] : \b\b \bing: Attempt to present on while a presentation is in progress!\r\n{code} ", "updateAuthor": { "name": "coolone3000", "key": "coolone3000", "displayName": "Chris Carranza", "active": true, "timeZone": "America/Chicago" }, "created": "2012-12-27T19:56:57.000+0000", "updated": "2012-12-27T19:56:57.000+0000" }, { "id": "239151", "author": { "name": "coolone3000", "key": "coolone3000", "displayName": "Chris Carranza", "active": true, "timeZone": "America/Chicago" }, "body": "Nothing on this yet?", "updateAuthor": { "name": "coolone3000", "key": "coolone3000", "displayName": "Chris Carranza", "active": true, "timeZone": "America/Chicago" }, "created": "2013-02-20T22:59:27.000+0000", "updated": "2013-02-20T22:59:27.000+0000" }, { "id": "242101", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified occurs with:\r\nSDK: 3.0.2.GA\r\nSDK: 3.1.0.v20130312161655\r\nTitanium Studio, build: 3.0.2.201302191606 \r\n\r\nThe \"onComplete\" function is executed, but the win.close(); event doesn't have any effect. \r\n\r\nAdditional note: If you tap the screen during play and hit the \"done\" button, you get this in the log:\r\n[WARN] : \b\b \b ing: Attempt to dismiss from view controller while a presentation or dismiss is in progress!\r\n\r\nAlso, the onFullscreen function was not called during my test, even when tapping the \"fullscreen\" button, even though the video already is in fullscreen.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-13T22:29:19.000+0000", "updated": "2013-03-13T22:34:28.000+0000" }, { "id": "247654", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "The blank screen on complete on iOS6 has been reported in TIMOB-11212 and a workaround has been provided.\nHowever using that workaround will still not work in this case since you are trying to close the window while it is dismissing its presented fullscreen video player\n\nUsing this code will solve the issue and work consistently across various iOS versions.\n{code}\nvar rootwin = Ti.UI.createWindow({\n backgroundColor : 'red',\n navBarHidden : true,\n top : 0,\n left : 0,\n right : 0,\n bottom : 0\n});\n \nvar button = Ti.UI.createButton({\n title : 'Play Video',\n width : '250dp',\n height : '50dp'\n});\nbutton.addEventListener('click', function(e){\n var win = Ti.UI.createWindow({\n navBarHidden : true,\n backgroundColor : '#ffffff',\n exitOnClose : true,\n top : 0,\n left : 0,\n right : 0,\n bottom : 0,\n orientationModes:[Ti.UI.PORTRAIT,Ti.UI.LANDSCAPE_LEFT,Ti.UI.LANDSCAPE_RIGHT],\n modal : true // comment this line to see proper behavior\n });\n \n var videoPlayer = Titanium.Media.createVideoPlayer({\n repeatMode : Ti.Media.VIDEO_REPEAT_MODE_NONE,\n url : 'http://monactifry-tevolys.seb-cms-qual.bearstech.com/videos/9789.mp4',\n backgroundColor : 'black',\n mediaControlStyle : Titanium.Media.VIDEO_CONTROL_DEFAULT,\n scalingMode : Titanium.Media.VIDEO_SCALING_ASPECT_FIT,\n fullscreen : false,\n autoplay : true\n });\n \n function onComplete() {\n Ti.API.info('COMPLETE')\n videoPlayer.fullscreen = false;\n }\n \n function onFullScreen(e) {\n if (e.entering == 0) {\n videoPlayer.stop();\n delay = e.duration*1000;\n Ti.API.info('FULLSCREEN '+delay)\n //Since this is a modal window have to wait for fullscreen controller to dismiss before closing the window\n setTimeout(function(){win.close()},delay);\n }\n }\n \n videoPlayer.addEventListener('complete', onComplete);\n \n videoPlayer.addEventListener('fullscreen', onFullScreen);\n\n var fsset = false;\n videoPlayer.addEventListener('loadstate',function(e){\n if(e.loadState = Ti.Media.VIDEO_LOAD_STATE_PLAYTHROUGH_OK && fsset == false) {\n Ti.API.info('FS TRUE');\n fsset = true;\n setTimeout(function(){videoPlayer.fullscreen = true;},300);\n }\n })\n \n win.add(videoPlayer);\n \n \n win.open();\n});\nrootwin.add(button);\n \nrootwin.open();\n{code}", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-04-15T22:42:04.000+0000", "updated": "2013-04-15T22:42:04.000+0000" }, { "id": "247656", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Going to resolve this as HOLD. This should be revisited on iOS 4.X deprecation. \r\nJS workaround in ticket", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-04-15T22:46:06.000+0000", "updated": "2013-04-15T22:46:06.000+0000" }, { "id": "414426", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket due to the time that has passed since it was filed and iOS 4 has been deprecated. ", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-21T21:14:29.000+0000", "updated": "2017-03-21T21:15:05.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }