{ "id": "81816", "key": "TIMOB-6747", "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": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2012-02-10T00:16:54.000+0000", "created": "2011-10-21T10:24:01.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-02-10T00:16:59.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": "h3. Description\r\nWorked in previous SDKs, but now if you put a YouTube webview in a tableview row then click to start the video, then rotate the device the video stops & closes. This same behavior works fine if the webview is added directly to the window (like the KitchenSink).\r\n\r\nh3. Q&A Question\r\n[Community Q&A question|http://developer.appcelerator.com/question/127163/ios-youtube-in-tableview-row-orientation-change-stops-video]\r\n\r\nh3. Usecase\r\n[Usecase Example|https://gist.github.com/1304527]\r\n\r\n_Included below for convenience_\r\n\r\nNote: Must run on device to see YouTube\r\n{code:title=app.js|borderStyle=solid}\r\nTi.UI.setBackgroundColor('#000');\r\n\r\nvar testTableView = true;\r\nvar youTubeID = 'GJ98Oezr_l4';\r\n\r\nvar win = Ti.UI.createWindow({\r\n title: 'Window',\r\n backgroundColor: '#fff',\r\n orientationModes: [Ti.UI.PORTRAIT, Ti.UI.LANDSCAPE_LEFT, Ti.UI.LANDSCAPE_RIGHT]\r\n});\r\n\r\nif (Ti.Platform.model == 'Simulator') {\r\n win.add(Ti.UI.createLabel({\r\n text: 'Must run on device\\nto see YouTube',\r\n font: {\r\n fontSize: 20,\r\n fontFamily: 'Helvetica Neue'\r\n },\r\n textAlign: 'center',\r\n width: 'auto'\r\n }));\r\n}\r\nelse {\r\n var videoHtml = '
';\r\n videoHtml += '';\r\n \r\n var wvYoutube = Ti.UI.createWebView({\r\n width: 100,\r\n height: 70,\r\n html: videoHtml,\r\n scalesPageToFit: true\r\n });\r\n \r\n if (!testTableView) {\r\n win.add(Ti.UI.createLabel({\r\n text: 'Click to play,\\nthen rotate device,\\nit works!',\r\n font: {\r\n fontSize: 20,\r\n fontFamily: 'Helvetica Neue'\r\n },\r\n top: 2,\r\n height: 80,\r\n textAlign: 'center',\r\n width: 'auto'\r\n }));\r\n \r\n win.add(wvYoutube);\r\n }\r\n else {\r\n var data = [];\r\n \r\n var rowLabel = Ti.UI.createTableViewRow({\r\n height: 105\r\n });\r\n rowLabel.add(Ti.UI.createLabel({\r\n text: 'Click to play,\\nthen rotate device,\\nit stops and often\\ndisappears!',\r\n font: {\r\n fontSize: 20,\r\n fontFamily: 'Helvetica Neue'\r\n },\r\n top: 2,\r\n height: 105,\r\n textAlign: 'center',\r\n width: 'auto'\r\n }));\r\n\t\tdata.push(rowLabel);\r\n \r\n var rowYoutube = Ti.UI.createTableViewRow({\r\n height: 100,\r\n className: 'VideoRow'\r\n });\r\n rowYoutube.add(wvYoutube);\r\n data.push(rowYoutube);\r\n \r\n var tvYoutube = Ti.UI.createTableView({\r\n backgroundColor: 'white',\r\n rowBackgroundColor: 'transparent',\r\n separatorColor: '#e1e1e1',\r\n data: data\r\n });\r\n \r\n win.add(tvYoutube);\r\n }\r\n}\r\n\r\nwin.open();\r\n{code} ", "attachment": [], "flagged": false, "summary": "iOS: Youtube in tableview row, orientation change stops video", "creator": { "name": "mjreagle", "key": "mjreagle", "displayName": "Mike Robinson", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "mjreagle", "key": "mjreagle", "displayName": "Mike Robinson", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "iOS, tested on 4.3.3 & 5\r\nSDK 1.7.3 & 1.8.0 continuous\r\nTested w/ iPad 2, iPhone 4S", "comment": { "comments": [ { "id": "172674", "author": { "name": "mjreagle", "key": "mjreagle", "displayName": "Mike Robinson", "active": true, "timeZone": "America/Los_Angeles" }, "body": "It looks like this has since been fixed, but I am unable to close it.", "updateAuthor": { "name": "mjreagle", "key": "mjreagle", "displayName": "Mike Robinson", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-11-14T21:57:35.000+0000", "updated": "2011-11-14T21:57:35.000+0000" }, { "id": "174203", "author": { "name": "mjreagle", "key": "mjreagle", "displayName": "Mike Robinson", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This issue has reappeared in the master branch. So it still needs fixing.", "updateAuthor": { "name": "mjreagle", "key": "mjreagle", "displayName": "Mike Robinson", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-11-29T12:21:43.000+0000", "updated": "2011-11-29T12:21:43.000+0000" }, { "id": "178586", "author": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Unable to reproduce. Tested on 4.3.5, 5.0.1 iPhones with 1.7.5, 1.8.0, 1.8.0.1, 1.9.0 SDKs", "updateAuthor": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-01-09T16:00:47.000+0000", "updated": "2012-01-09T16:00:47.000+0000" }, { "id": "178595", "author": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Mike: Please let us know if this issue persists. Provide exact steps to reproduce this problem if you can reproduce it with the latest build.", "updateAuthor": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-01-09T17:07:04.000+0000", "updated": "2012-01-09T17:07:04.000+0000" }, { "id": "179262", "author": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "body": "We cannot reproduce this issue with the latest builds.", "updateAuthor": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-01-13T15:12:03.000+0000", "updated": "2012-01-13T15:12:03.000+0000" }, { "id": "180181", "author": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "body": "please re-open if you can reproduce.", "updateAuthor": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-01-23T11:02:55.000+0000", "updated": "2012-01-23T11:02:55.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }