{ "id": "82391", "key": "TIMOB-6938", "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": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2017-07-27T17:36:47.000+0000", "created": "2011-11-06T14:43:13.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [ { "id": "12570", "name": "Release 1.7.5", "archived": true, "released": true, "releaseDate": "2011-11-02" } ], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-07-27T17:36:47.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": "h2. Expected Behavior\r\nThe application is restricted to starting in Portrait mode. When the user clicks a button, the video player will play an external video ( amazon s3 bucket file ) in landscape window mode. The video file is a .m4v and is formatted for landscape dimension already. The \"complete\" eventListener is attached to the video Player in the new window. When adding and \"complete\" event listener on the VideoPlayer, I should be able to run a window.close() and the root window will now be visible. \r\n\r\nh2. Actual Behavior\r\nThe window will not close when the Done button is hit by user or the video play back ends. Both conditions that are captured by the complete eventListener on the video player.\r\n\r\nWhen playing the video in portrait mode, the window will close. So I have narrowed it down to being in landscape mode only.\r\n\r\nh2. Test Case\r\n\r\n{code:title=app.js}\r\nTitanium.UI.setBackgroundColor('#000');\r\n// create Window\r\nvar win = Ti.UI.createWindow({});\r\n\t\r\n\tvar button = Ti.UI.createButton({\r\n\t\ttitle: 'View Landscape Fullscreen Video',\r\n\t\twidth: 250,\r\n\t\theight: 60\r\n\t});\r\n\tbutton.addEventListener('click', function(e){\r\n\t\t\r\n\t\tvar _win = Ti.UI.createWindow({\r\n\t\t\turl: 'video-player.js'\r\n\t\t});\r\n\t\t\r\n\t\t_win.open({animated:true});\r\n\t\t\r\n\t});\r\n\t\r\nwin.add(button);\r\nwin.open();\r\n{code}\r\n\r\n\r\n{code:title=video-player.js}\r\nvar _win = Titanium.UI.currentWindow;\r\n\r\nTitanium.UI.orientation = Ti.UI.LANDSCAPE_RIGHT;\r\n _win.orientationModes = [Ti.UI.LANSCAPE_RIGHT];\r\n \r\nvar activeMovie = Titanium.Media.createVideoPlayer({\r\n\tcontentURL: 'https://iwwmg.s3.amazonaws.com/trailer-drake.m4v', //ks-movie.mp4\r\n\tbackgroundColor:'#000',\r\n\tfullscreen: true,\r\n\tautoplay: true,\r\n\theight:320,\r\n\twidth: 420,\r\n\tmovieControlMode:Titanium.Media.VIDEO_CONTROL_FULLSCREEN,\r\n\tscalingMode:Titanium.Media.VIDEO_SCALING_MODE_FILL\r\n});\t\t\r\n\r\nactiveMovie.addEventListener('complete',function(e){\r\n\tif ( Titanium.Media.VIDEO_FINISH_REASON_USER_EXITED ) {\r\n\t\t_win.close();\r\n\t\tTi.UI.orientation = Ti.UI.PORTRAIT;\r\n\t\tTi.API.error('VIDEO_FINISH_REASON_USER_EXITED: Action was clicked');\r\n\t} else if ( Titanium.Media.VIDEO_FINISH_REASON_PLAYBACK_ENDED ) {\r\n\t\t_win.close();\t\r\n\t\tTi.UI.orientation = Ti.UI.PORTRAIT;\r\n\t\tTi.API.error('VIDEO_FINISH_REASON_PLAYBACK_ENDED: Action was clicked');\r\n\t}\t\t\t\t\t\r\n});\r\n\t\t\t\t\r\n_win.add(activeMovie);\t\r\n{code}\r\n\r\n\r\n", "attachment": [], "flagged": false, "summary": "iOS: Media - VideoPlayer fullscreen landscape video will not close window on complete event", "creator": { "name": "jamspain", "key": "jamspain", "displayName": "Jamil Hassan Spain", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jamspain", "key": "jamspain", "displayName": "Jamil Hassan Spain", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "* Titanium 1.7.5\r\n* Xcode 4.2 (4C199)\r\n* Mac OS X Leopard 10.6.8\r\n* Titanium Studio - build: 1.0.6.201110251616\r\n", "comment": { "comments": [ { "id": "171707", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Jamil\r\n\r\nThank you for raising this. If true, it looks to be a serious problem. In order for me to escalate it to our developers, though, the ticket needs to include all the information described in the [JIRA Ticket Checklist|http://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report#HowtoSubmitaBugReport-JIRATicketChecklist], not least a test case (see [Creating a Test Case|http://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report#HowtoSubmitaBugReport-CreatingaTestCase]).\r\n\r\nAs each ticket should only contain one bug, would you create a different ticket for the following? This will also need to include a test case.\r\n\r\n{code}\r\nThere is also an issue with the following Video constants not being registering in iOS5. Here are the two that I have found issues with from testing:\r\n\r\nVIDEO_FINISH_REASON_PLAYBACK_ENDED\r\nVIDEO_FINISH_REASON_USER_EXITED\r\n\r\nHere is a link to the pdf of the iOS documentation with references to the aforementioned related constants around Page 22-23: [MPMoviePlayerController_Class.pdf|http://developer.apple.com/library/ios/DOCUMENTATION/MediaPlayer/Reference/MPMoviePlayerController_Class/MPMoviePlayerController_Class.pdf]\r\n\r\nThey are also additional options to Airplay media as well ( properties page 10-11 ) that may have future implications. \r\n{code}\r\n\r\nThank you for your help", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-11-06T17:00:33.000+0000", "updated": "2011-11-06T17:00:33.000+0000" }, { "id": "177674", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Perfect ticket, Jamil - thank you! :)", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-12-29T18:24:50.000+0000", "updated": "2011-12-29T18:24:50.000+0000" }, { "id": "181830", "author": { "name": "dcharper", "key": "dcharper", "displayName": "Darren Harper", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi all, \r\n\r\nI know this is an ongoing bug but I found a workaround for this issue. My app is always defaulted to Portrait view except when viewing a video, in which case it is set to Landscape Left. I discovered this bug when I tried to apply the win.close(); function to the event listener which listens for the video completing.\r\n\r\nThe workaround for this is to set the orientation of the window back to Portrait in the event listener function (see code below). I haven't tested this on anything other than Titanium SDK 1.8.0.1 using the iPhone emulator on iOS SDK 5.0 so I can't say it works for other SDK versions.\r\n\r\nHere is the code for the event listener, where win2 is the currentWindow and activeMovie is the variable that runs Titanium.Media.createVideoPlayer\r\n\r\nactiveMovie.addEventListener('complete', function (e) {\r\n\t\twin2.close();\r\n Ti.UI.currentWindow.orientationModes = [Titanium.UI.PORTRAIT];\r\n });\r\n\r\nI hope this helps someone out as it took me a while to figure out the problem.", "updateAuthor": { "name": "dcharper", "key": "dcharper", "displayName": "Darren Harper", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-02-05T18:20:12.000+0000", "updated": "2012-02-05T18:20:12.000+0000" }, { "id": "181947", "author": { "name": "nderzhak", "key": "nderzhak", "displayName": "Nikolai Derzhak", "active": true, "timeZone": "America/Phoenix" }, "body": "This issue latest notification was not sent due to JIRA mail setting. Fixed now. Please check the issue for latests changes.", "updateAuthor": { "name": "nderzhak", "key": "nderzhak", "displayName": "Nikolai Derzhak", "active": true, "timeZone": "America/Phoenix" }, "created": "2012-02-06T06:35:39.000+0000", "updated": "2012-02-06T06:35:39.000+0000" }, { "id": "424972", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing due to inactivity. If this issue still exists, please raise a new ticket.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-07-27T17:36:47.000+0000", "updated": "2017-07-27T17:36:47.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }