{ "id": "89381", "key": "TIMOB-8493", "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": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "13406", "description": "Sprint 2012-10 API", "name": "Sprint 2012-10 API", "archived": true, "released": true, "releaseDate": "2012-05-20" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-05-14T13:55:57.000+0000", "created": "2012-04-02T15:51:21.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "SupportTeam", "api", "module_media", "qe-testadded" ], "versions": [ { "id": "13070", "description": "Release 1.8 Service Pack 2", "name": "Release 1.8.2", "archived": true, "released": true, "releaseDate": "2012-02-29" } ], "issuelinks": [ { "id": "18719", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "92623", "key": "TIMOB-9331", "fields": { "summary": "iOS: Videos in a ScrollableView stop working when moving back and forth in the views", "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": "Medium", "id": "3" }, "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": "2012-07-12T15:33:40.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. Problem description\r\nWhen a video player is in each scrollableView view, orientation changes from portrait to landscape might cause the video to stop playing and disappear.\r\n\r\nh2. Steps to reproduce\r\n{code:lang=javascript|name=app.js}\r\nvar win1 = Titanium.UI.createWindow({ \r\n backgroundColor:'white'\r\n});\r\n\r\nvar videoParams = {\r\n mediaControlStyle: Titanium.Media.VIDEO_CONTROL_EMBEDDED,\r\n scalingMode: Ti.Media.VIDEO_SCALING_ASPECT_FIT,\r\n height: '72%'\r\n};\r\n\r\nvar videoViews = [];\r\n\r\nfor(var i=0; i<7; i++){\r\n videoViews.push(Ti.Media.createVideoPlayer(videoParams));\r\n}\r\n\r\nvar scrollableView = Ti.UI.createScrollableView({\r\n views: videoViews,\r\n showPagingControl: true\r\n});\r\n\r\nscrollableView.addEventListener('scroll', function(e){\r\n videoViews[e.currentPage].url = 'movie.mp4';\r\n});\r\n\r\nwin1.add(scrollableView);\r\n\r\nwin1.open();\r\n{code}\r\n\r\n- Create a scrollableView with a video in each view (used the movie.mp4 video taken also from KitchenSink).\r\n- Open the app and scroll to the last view.\r\nResult: video is displayed\r\n- Rotate the screen\r\nResult: video stops and is not displayed anymore\r\n\r\n- Change the number of views from 7 to 5 or set a cacheSize bigger than the stack\r\nResult: video works as expected also when rotated\r\n\r\nh2. Additional notes\r\nCustomer ticket link: http://support-admin.appcelerator.com/display/APP-992365", "attachment": [], "flagged": false, "summary": "iOS: displaying issues with videos in a scrollableView", "creator": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "TiSDK tested: 1.8.2\r\niOS 5 ", "comment": { "comments": [ { "id": "193801", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Probably due to the fact the views are removed and re-added during orientation change", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-05-04T14:26:35.000+0000", "updated": "2012-05-04T14:26:35.000+0000" }, { "id": "194256", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Pull pending https://github.com/appcelerator/titanium_mobile/pull/2156", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-05-09T09:45:29.000+0000", "updated": "2012-05-09T09:45:29.000+0000" }, { "id": "194534", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "It's a number of things, although I found that videos do glitch out if you have more than one onscreen. (Note that in Apple's own native implementation, you can have more than one videoplayer active at a time.) I'm going to check to see if this is a fully native issue, or if there is something that can be done in Titanium.", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-11T10:33:50.000+0000", "updated": "2012-05-11T10:33:50.000+0000" }, { "id": "194546", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Above test code will not work as only one movie player can be active at a time. Use this code to test instead.\r\n{code}\r\nvar win1 = Titanium.UI.createWindow({ \r\n backgroundColor:'white',\r\n orientationModes:[Ti.UI.PORTRAIT,Ti.UI.LANDSCAPE_LEFT,Ti.UI.LANDSCAPE_RIGHT]\r\n});\r\n \r\nvar videoParams = {\r\n mediaControlStyle: Titanium.Media.VIDEO_CONTROL_EMBEDDED,\r\n scalingMode: Ti.Media.VIDEO_SCALING_ASPECT_FIT,\r\n height: '72%'\r\n};\r\n \r\nvar videoViews = [];\r\n\r\nvar curVideo = null;\r\n \r\nfor(var i=0; i<20; i++){\r\n videoViews.push(Ti.Media.createVideoPlayer(videoParams));\r\n}\r\n \r\nvar scrollableView = Ti.UI.createScrollableView({\r\n views: videoViews,\r\n showPagingControl: true\r\n});\r\n \r\nscrollableView.addEventListener('scroll', function(e){\r\n\tif (curVideo)\r\n\t{\r\n\t\tif (curVideo == videoViews[e.currentPage])\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcurVideo.stop();\r\n\t}\r\n\tcurVideo = videoViews[e.currentPage];\r\n\tcurVideo.url = 'movie.mp4';\r\n\tcurVideo.play();\r\n});\r\n \r\nwin1.add(scrollableView);\r\n \r\nwin1.open();\r\n{code}", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-05-11T10:58:28.000+0000", "updated": "2012-05-11T10:58:28.000+0000" }, { "id": "194702", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Pull request merged. The developer may have to modify his JS file to resemble the final test in order to compensate for iOS not allowing more than one video player at a time.", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-14T13:55:57.000+0000", "updated": "2012-05-14T13:55:57.000+0000" }, { "id": "200402", "author": { "name": "tsmolich", "key": "tsmolich", "displayName": "Tamila Smolich", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with:\r\nTitanium Studio, build: 2.1.0.201206251749\r\nTitanium SDK: 2.1.0.v20120626104306\r\nDevice: iPad 3rd gen (5.1.1)\r\n\r\nFirst view is blank, and 7th view is covered with black blank window after device rotation. I used Vishal's code for testing, but changed number of views from 20 to 7.", "updateAuthor": { "name": "tsmolich", "key": "tsmolich", "displayName": "Tamila Smolich", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-26T14:47:28.000+0000", "updated": "2012-06-26T14:47:28.000+0000" }, { "id": "200434", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Use this updated test code. The whole view management can be done much better through the newly introduced 'scrollEnd' event\r\n{code}\r\nvar win1 = Titanium.UI.createWindow({ \r\n backgroundColor:'white',\r\n orientationModes:[Ti.UI.PORTRAIT,Ti.UI.LANDSCAPE_LEFT,Ti.UI.LANDSCAPE_RIGHT]\r\n});\r\n \r\nvar videoParams = {\r\n mediaControlStyle: Titanium.Media.VIDEO_CONTROL_EMBEDDED,\r\n scalingMode: Ti.Media.VIDEO_SCALING_ASPECT_FIT,\r\n height: '72%'\r\n};\r\n \r\nvar videoViews = [];\r\n \r\nvar curVideo = null;\r\n \r\nfor(var i=0; i<7; i++){\r\n videoViews.push(Ti.Media.createVideoPlayer(videoParams));\r\n}\r\n \r\nvar scrollableView = Ti.UI.createScrollableView({\r\n views: videoViews,\r\n showPagingControl: true\r\n});\r\n \r\nscrollableView.addEventListener('scrollEnd', function(e){\r\n if (curVideo)\r\n {\r\n if (curVideo == videoViews[e.currentPage])\r\n {\r\n return;\r\n }\r\n curVideo.stop();\r\n curVideo.url = null;\r\n }\r\n curVideo = videoViews[e.currentPage];\r\n curVideo.url = 'movie.mp4';\r\n curVideo.play();\r\n});\r\n \r\nwin1.add(scrollableView);\r\n\r\nwin1.addEventListener('open',function(e){\r\n\tcurVideo = videoViews[scrollableView.currentPage];\r\n curVideo.url = 'movie.mp4';\r\n curVideo.play();\r\n})\r\n \r\nwin1.open();\r\n{code}", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-06-26T15:57:46.000+0000", "updated": "2012-06-26T15:57:46.000+0000" }, { "id": "200670", "author": { "name": "tsmolich", "key": "tsmolich", "displayName": "Tamila Smolich", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing as fixed. Tested and verified with:\r\nTitanium Studio, build: 2.1.0.201206251749\r\nTitanium SDK: 2.1.0.v20120627121617\r\nDevice: iPad 3rd gen (5.1.1)", "updateAuthor": { "name": "tsmolich", "key": "tsmolich", "displayName": "Tamila Smolich", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-27T14:43:44.000+0000", "updated": "2012-06-27T14:43:44.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }