{ "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\n

If 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\n

Test Code

\r\n

Paste at the bottom of default app.js

\r\n
\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\n

As a work around, you can set autoplay to false and then turn it\r\non when the loadstate is 1.

\r\n

Ticket Reference

\r\n

http://developer.appcelerator.com/helpdesk/view/76612

{html}", "attachment": [], "flagged": false, "summary": "iOS: Videoplayer closed before loaded still plays", "creator": { "name": "aleard", "key": "aleard", "displayName": "Alan Leard", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "aleard", "key": "aleard", "displayName": "Alan Leard", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "194936", "author": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "body": "Sample code doesn't seem to load the movie on the iOS simulator and I'm unable to open the link. Ticket closed.", "updateAuthor": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "created": "2012-05-15T17:07:12.000+0000", "updated": "2012-05-15T17:07:12.000+0000" }, { "id": "410889", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as invalid.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-09T23:00:29.000+0000", "updated": "2017-03-09T23:00:29.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }