{ "id": "100396", "key": "TIMOB-13131", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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": "2017-06-15T18:55:21.000+0000", "created": "2012-09-04T10:18:44.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [ { "id": "14164", "description": "Release 3.0.2", "name": "Release 3.0.2", "archived": true, "released": true, "releaseDate": "2013-02-19" } ], "issuelinks": [], "assignee": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-06-15T18:55:21.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": "It is not possible to specify files on internal storage for Android like it is for iOS. This can easily be fixed as below. Then just initialise the movie player with URL just like on iOS as:\r\n\r\n{code}\r\nurl = Ti.Filesystem.getFile(Titanium.Filesystem.applicationDataDirectory, \"movie.mp4\").nativePath;\t\t\t\t\t\r\n{code}\r\n\r\nhttps://github.com/appcelerator/titanium_mobile/blob/3_0_X/android/modules/media/src/java/android/widget/TiVideoView8.java\r\n\r\nLine 422-424\r\n\r\n{code}\r\n\t\t\t} else {\r\n\t\t\t\tsetDataSource();\r\n\t\t\t}\r\n{code}\r\n\r\nshould be replaced with:\r\n\r\n{code}\r\n\t\t\telse if(mUri.toString().startsWith((\"file://\"))) {\t\t\t\t\r\n\t\t\t\t// Loading from internal storage using file desc for media player to be able to read\r\n\t\t\t\tFileInputStream fis = new FileInputStream(mUri.toString().substring(\"file://\".length()));\r\n\t\t\t\tmMediaPlayer.setDataSource(fis.getFD());\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tsetDataSource();\r\n\t\t\t}\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: Ti.Media.VideoPlayer not able to play files from internal storage", "creator": { "name": "jdlundin", "key": "jdlundin", "displayName": "Johan Lundin", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jdlundin", "key": "jdlundin", "displayName": "Johan Lundin", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Android", "comment": { "comments": [ { "id": "422093", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket due to time passed and lack of progress in the past few years. Any problems, please file a new ticket.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-06-15T18:55:21.000+0000", "updated": "2017-06-15T18:55:21.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }