{ "id": "147262", "key": "TIMOB-18858", "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": null, "resolutiondate": null, "created": "2015-04-24T19:45:04.000+0000", "priority": null, "labels": [ "android-5", "videoplayer" ], "versions": [], "issuelinks": [ { "id": "47766", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "147582", "key": "TIMOB-18913", "fields": { "summary": "Android: VideoPlayer is not playing mp4 videos anymore on Android L/Lollipop/5", "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": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": null, "updated": "2018-02-28T19:55:31.000+0000", "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" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "The 'complete' event does not seem to fire from the VideoPlayer closes, nor does the click handler for the \"Exit Video\" button I added fire when I hit \"Exit Video\", but the VideoPlayer does close. Using the \"back\" button on the device itself to close the video player does not cause 'complete' to fire either.\r\n\r\nI have some code similar to the following:\r\n\r\n{code:js}\r\nfunction openPlayer(e) {\r\n var videoPlayer = Ti.Media.createVideoPlayer({\r\n url: \"/demo.mp4\",\r\n mediaControlStyle: Titanium.Media.VIDEO_CONTROL_FULLSCREEN,\r\n scalingMode: Ti.Media.VIDEO_SCALING_ASPECT_FIT,\r\n fullscreen: true,\r\n autoplay: true\r\n });\r\n \r\n var closeButton = Ti.UI.createButton({\r\n title: \"Exit Video\",\r\n top: \"0dp\",\r\n height: \"40dp\",\r\n left: \"10dp\",\r\n right: \"10dp\"\r\n });\r\n \r\n closeButton.addEventListener('click', function() {\r\n videoPlayer.hide();\r\n videoPlayer.release();\r\n videoPlayer = null;\r\n });\r\n \r\n videoPlayer.add(closeButton);\r\n \r\n videoPlayer.addEventListener('load', function(player) {\r\n console.log(\"loaded\");\r\n });\r\n \r\n videoPlayer.addEventListener('keypressed', function(e) {\r\n console.log(\"keypressed\");\r\n });\r\n videoPlayer.addEventListener('complete', function(player) {\r\n console.log(\"DONE\");\r\n });\r\n videoPlayer.addEventListener('playing', function(player) {\r\n console.log(\"playing\");\r\n });\r\n videoPlayer.addEventListener('error', function(player) {\r\n console.log(\"error\");\r\n });\r\n}\r\n \r\nfunction onClick(e) {\r\n openPlayer(null);\r\n}\r\n$.btn_open.addEventListener(\"click\", onClick);\r\n$.index.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: Videoplayer events do not work well on Android lollipop", "creator": { "name": "willwh", "key": "willwh", "displayName": "William Hetherington", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "willwh", "key": "willwh", "displayName": "William Hetherington", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "testing with nexus 5, running stock android 5.1\r\nTitanium SDK 3.5.1.GA", "comment": { "comments": [ { "id": "350690", "author": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "body": "Not working on a Nexus 4 (5.1) with 3.5.1 GA and 3.5.2.v20150313152423\r\n\r\nAccording to this file:\r\nhttps://github.com/appcelerator/titanium_mobile/blob/master/android/modules/media/src/java/ti/modules/titanium/media/VideoPlayerProxy.java#L714\r\nit should fire if it was playing and the activity gets destroyed. But it doesn't seem to fire on android", "updateAuthor": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-04-24T19:50:02.000+0000", "updated": "2015-04-24T19:50:02.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }