{ "id": "65929", "key": "TIMOB-4300", "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": [], "resolution": { "id": "6", "description": "", "name": "Hold" }, "resolutiondate": "2017-03-20T22:17:32.000+0000", "created": "2011-05-31T15:30:26.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "api" ], "versions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" } ], "issuelinks": [], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-20T22:17:36.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": "This is in reference to a bug that was marked as resolved in my opinion incorrectly: TIMOB-2768 \r\n\r\nStephen Tramer is indeed correct that showing the statusbar upon a video launch is correct behaviour, and Apple indeed make a valid argument. \r\n\r\nBut however.\r\n\r\nUpon pressing DONE, the statusbar DOES NOT hide again, and is VISIBLE OVER the navbar, a bug. And Apple have confirmed this and are rejecting apps because of this bug.\r\n\r\nSo who is right here? Stephen Tramer or Apple? In my opinion this is a bug in Appcelerator that the statusbar is visible AFTER the video has been CLOSED (using the DONE button) or has finished playing. \r\n\r\nThe original thread is as follows:\r\n\r\nIn tiapp.xml, setting the status bar hidden, hides the status bar as expected. But when a movie is played using 'createVideoPlayer' the status bar appears and cannot be hidden again. This is from a Help Desk ticket:\r\nhttp://developer.appcelerator.com/helpdesk/view/63571\r\n\r\nHere is a sample code: http://pastie.org/private/qvp8jfkqm2jgi33qvurniq\r\n\r\n", "attachment": [], "flagged": false, "summary": "iOS: status bar appears when video is played", "creator": { "name": "iantearle", "key": "iantearle", "displayName": "Ian Tearle", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "kclark", "key": "kclark", "displayName": "Kincy Clark", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "iOS 5\r\nTi SDK 2.1.0", "comment": { "comments": [ { "id": "208455", "author": { "name": "benlebt", "key": "benlebt", "displayName": "Ben S.", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Very critical issue to me, as well. Will this be fixed anytime, soon?", "updateAuthor": { "name": "benlebt", "key": "benlebt", "displayName": "Ben S.", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-19T08:27:38.000+0000", "updated": "2012-07-19T08:27:38.000+0000" }, { "id": "208637", "author": { "name": "benlebt", "key": "benlebt", "displayName": "Ben S.", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Here is my test code, showing the bug from a different use case:\r\n\r\nhttp://pastie.org/private/cqqctj6px18sczgwoskeoa\r\n\r\n\r\nTested with TI SDK 2.1.0 / iOS SDK 5.1, iPhone and iPad simulator", "updateAuthor": { "name": "benlebt", "key": "benlebt", "displayName": "Ben S.", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-20T01:29:25.000+0000", "updated": "2012-07-20T01:29:25.000+0000" }, { "id": "211239", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "We rely on the MoviePlayer notifications to restore the statusBar to original state when the VideoPlayer enters and exits fullscreen.\r\n\r\nHowever it seems that with the controlStyle set to fullScreen the corresponding fullscreen notifications are never fired.\r\n(Have verified this with both Titanium and native apps). So this is definitely not a Titanium SDK issue.\r\n\r\nThe JS workaround is pretty simple. \r\n\r\nAdd an event listener for the complete event and hide the status bar as part of that event.\r\n\r\nSample Code attached\r\n{code}\r\nvar win = Ti.UI.createWindow({backgroundColor:'#ccc', navBarHidden:true, fullscreen:true});\r\n\r\nvar playMovieButton = Ti.UI.createButton({title:\"Play\", width:200, height:200});\r\n\r\nplayMovieButton.addEventListener(\"click\", function(e) {\r\n\t\r\n\tvar sbStatus = Ti.UI.iPhone.statusBarHidden;\r\n\tvar activeMovie = Titanium.Media.createVideoPlayer({\r\n\t\tcontentURL:'movie.mp4',\r\n\t backgroundColor:'#111',\r\n\t mediaControlStyle:Titanium.Media.VIDEO_CONTROL_FULLSCREEN,\r\n\t scalingMode:Titanium.Media.VIDEO_SCALING_ASPECT_FIT \r\n\t});\r\n\t\r\n\t//Add custom property\r\n\tactiveMovie.statusBarHidden = sbStatus;\r\n\twin.add(activeMovie);\r\n\t\r\n\tactiveMovie.addEventListener('complete',function(e){\r\n\t \twin.remove(e.source);\r\n\t \t\r\n\t \tif(e.source.statusBarHidden){\r\n\t \t\tTi.UI.iPhone.hideStatusBar()\r\n\t \t}\r\n\t \telse {\r\n\t \t\tTi.UI.iPhone.showStatusBar()\r\n\t \t}\r\n\t \te.source = null;\r\n\t});\r\n});\r\n \r\nwin.add(playMovieButton);\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-08-02T12:40:47.000+0000", "updated": "2012-08-02T12:40:47.000+0000" }, { "id": "211241", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Marking ticket as HOLD. Looks like an apple bug. JS workaround provided in ticket.", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-08-02T12:42:37.000+0000", "updated": "2012-08-02T12:42:37.000+0000" }, { "id": "211242", "author": { "name": "benlebt", "key": "benlebt", "displayName": "Ben S.", "active": true, "timeZone": "America/Los_Angeles" }, "body": "In my app, the status bar then re-appeared again, even though I've manually hidden it. But will try it again with your workaround.", "updateAuthor": { "name": "benlebt", "key": "benlebt", "displayName": "Ben S.", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-02T12:45:23.000+0000", "updated": "2012-08-02T13:01:11.000+0000" }, { "id": "414073", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket due to time passed.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-20T22:16:55.000+0000", "updated": "2017-03-20T22:17:22.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }