{ "id": "64052", "key": "TIMOB-3420", "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": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2012-05-22T20:56:56.000+0000", "created": "2011-04-15T03:44:54.000+0000", "priority": { "name": "Trivial", "id": "5" }, "labels": [], "versions": [ { "id": "11233", "name": "Release 1.6.0", "archived": true, "released": true, "releaseDate": "2011-02-23" } ], "issuelinks": [], "assignee": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-09T23:00:29.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": "{html}
Problem
\r\nIf a window containing a videoplayer is on a window that is\r\nclosed before the video loads, the video will still play even if it\r\nis stopped, released and/or removed.
\r\nTest Code
\r\nPaste at the bottom of default app.js
\r\n// TESTING VIDEO PLAYER\r\nvar openVideo = function () {\r\n var win3 = Ti.UI.createWindow();\r\n var videoPlayer = Ti.Media.createVideoPlayer({\r\n url: 'http://clips.vorwaerts-gmbh.de/VfE_html5.mp4',\r\n //autoplay:false\r\n });\r\n \r\n tab1.open(win3);\r\n win3.add(videoPlayer);\r\n \r\n videoPlayer.addEventListener('loadstate',function(e){\r\n Ti.API.info(e.loadState);\r\n //if(e.loadState == 1){videoPlayer.autoplay = true;}\r\n });\r\n \r\n win3.addEventListener('close', function () {\r\n Ti.API.info('Window Closed');\r\n videoPlayer.stop();\r\n videoPlayer.release();\r\n win3.remove(videoPlayer);\r\n });\r\n \r\n};\r\n\r\nwin1.addEventListener('click', function () {\r\n openVideo();\r\n});
\r\n
\r\nAs a work around, you can set autoplay to false and then turn it\r\non when the loadstate is 1.
\r\nTicket Reference
\r\n