{ "id": "99526", "key": "TIMOB-10526", "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": "15273", "description": "2013 Sprint 05 API", "name": "2013 Sprint 05 API", "archived": true, "released": true, "releaseDate": "2013-03-11" }, { "id": "14815", "description": "2013 Sprint 05", "name": "2013 Sprint 05", "archived": true, "released": true, "releaseDate": "2013-03-11" } ], "resolution": { "id": "6", "description": "", "name": "Hold" }, "resolutiondate": "2013-03-07T00:16:17.000+0000", "created": "2012-08-21T11:18:33.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "SupportTeam", "api" ], "versions": [ { "id": "13572", "description": "Release 2.1.1", "name": "Release 2.1.1", "archived": true, "released": true, "releaseDate": "2012-07-31" } ], "issuelinks": [ { "id": "26190", "type": { "id": "10011", "name": "Includes", "inward": "is included by", "outward": "includes" }, "inwardIssue": { "id": "105162", "key": "TIMOB-11810", "fields": { "summary": "Ti API: Address common WebView deficiencies", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "6", "description": "gh.issue.epic.desc", "name": "Epic", "subtask": false } } } } ], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2013-03-27T22:56:28.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "When you create a video in a webview with object tag (HTML5), the video doesn't automatically stop when the window/app is closed.\r\nh4. Repo Steps\r\n1. Run the below code in app.js\r\n2. Click back button and you can still hear the video playing in the background.\r\n{code}\r\n(function() {\r\n var window = Titanium.UI.createWindow({\r\n left : Titanium.Platform.displayCaps.platformWidth,\r\n backgroundColor : '#787878',\r\n navBarHidden : true,\r\n opacity : 0.0,\r\n layout : 'absolute'\r\n });\r\n var webView = Titanium.UI.createWebView({\r\n top : 0,\r\n scalesPageToFit : true,\r\n left : 0,\r\n width :'100%',\r\n showScrollbars : false,\r\n willHandleTouches : false,\r\n disableBounce: false,\r\n pluginState: Titanium.UI.Android.WEBVIEW_PLUGINS_ON\r\n });\r\n var html = \r\n '' + \r\n '' +\r\n '' +\r\n '' + \r\n '' +\r\n '

Video 1

'+\r\n ''+\r\n\r\n\r\n ''+\r\n '' +\r\n '' +\r\n '' +\r\n '' +\r\n '' +\r\n '' +\r\n '' +\r\n '' +\r\n '' +\r\n '' +\r\n\r\n '' +\r\n\r\n\r\n '' + \r\n '';\r\n webView.html = html;\r\n window.add(webView);\r\n window.addEventListener('close',function(){\r\n Ti.API.info('window closing');\r\n});\r\n window.open();\r\n})();\r\n\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: Video created with object tag inside a webview does not automatically stop when the window/app is closed", "creator": { "name": "nsharma", "key": "nsharma", "displayName": "Nikhil Sharma", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "nsharma", "key": "nsharma", "displayName": "Nikhil Sharma", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "android 2.3.3\r\nHTC Sensation\r\nTi SDK 2.1.1", "comment": { "comments": [ { "id": "236554", "author": { "name": "vivekr", "key": "vivekr", "displayName": "Vivekr", "active": true, "timeZone": "America/Los_Angeles" }, "body": "in progress", "updateAuthor": { "name": "vivekr", "key": "vivekr", "displayName": "Vivekr", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-01-30T05:24:34.000+0000", "updated": "2013-01-30T05:24:34.000+0000" }, { "id": "241067", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "The only workaround I have found is to change the page in the webview before closing the window. The problem and the workaround are all over the web.\nSomething like this\n{code}\n window.addEventListener('androidback',function(){\n Ti.API.info('GOT ANDROID BACK');\n webView.url = \"data://\";\n setTimeout(function(){window.close()},250);\n })\n{code}\nGoing to mark this ticket as HOLD because we should ideally fix it in code.\n\nHowever triage of this bug has exposed a bunch ", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-03-07T00:16:04.000+0000", "updated": "2013-03-07T00:16:04.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }