{ "id": "165476", "key": "TIMOB-24347", "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": "17608", "name": "Release 6.1.0", "archived": false, "released": true, "releaseDate": "2017-05-26" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-03-03T15:30:16.000+0000", "created": "2017-01-25T19:30:51.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [ "qe-6.1.0" ], "versions": [ { "id": "16980", "description": "New V8", "name": "Release 6.0.0", "archived": false, "released": true, "releaseDate": "2016-11-15" }, { "id": "17608", "name": "Release 6.1.0", "archived": false, "released": true, "releaseDate": "2017-05-26" } ], "issuelinks": [], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-09T19:46:59.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": "h5. Issue Description \r\n\r\nCustomer want to get some thumbnails from a video in android using the function Titanium.Media.VideoPlayer.requestThumbnailImagesAtTimes, but it seems not being working with local videos.\r\n\r\nUsing this function with a remote video, it works just fine, trying with a local video on android and call this function and it just doesn't work.\r\n\r\nh5.Steps to Reproduce \r\n# Create a new Alloy Project \r\n# Replace the index.js code for the next\r\n{code:js}\r\nvar videoPlayer = null,\r\n videoUri = null;\r\n\r\n//ThumbSelector is a slider with values from 0 to selected video length\r\n$.thumbSelector.addEventListener(\"change\", function(e) {\r\n if (videoPlayer && e.value > 0) {\r\n videoPlayer.requestThumbnailImagesAtTimes([e.value], Titanium.Media.VIDEO_TIME_OPTION_CLOSEST_SYNC, function(thumbCallback) {\r\n $.thumb.image = thumbCallback.image;\r\n });\r\n }\r\n});\r\n\r\nfunction durationavailable(e) {\r\n $.thumbSelector.max = Math.floor(e.duration / 1000);\r\n $.thumbSelector.show();\r\n};\r\n\r\nfunction openVideo() {\r\n var intent = Ti.Android.createIntent({\r\n action: Ti.Android.ACTION_PICK,\r\n type: \"video/*\"\r\n });\r\n intent.addCategory(Ti.Android.CATEGORY_DEFAULT);\r\n $.index.getActivity().startActivityForResult(intent, function(e) {\r\n if (e.error) {\r\n Ti.UI.createAlertDialog({\r\n title: \"Error\",\r\n message: \"Loading error...\"\r\n }).show();\r\n } else {\r\n if (e.resultCode === Titanium.Android.RESULT_OK) {\r\n var videoUri = e.intent.data;\r\n\r\n var closePlayerBtn = Ti.UI.createButton({\r\n title: \"Close\",\r\n height: 40,\r\n width: 100,\r\n top: 15\r\n });\r\n // videoUri = source.nativePath;\r\n videoPlayer = Titanium.Media.createVideoPlayer({\r\n url: videoUri,\r\n\r\n scalingMode: Titanium.Media.VIDEO_SCALING_ASPECT_FIT,\r\n fullscreen: false,\r\n autoplay: true\r\n });\r\n videoPlayer.addEventListener(\"durationavailable\", durationavailable);\r\n\r\n videoPlayer.add(closePlayerBtn);\r\n\r\n closePlayerBtn.addEventListener(\"click\", function() {\r\n videoPlayer.hide();\r\n videoPlayer.release();\r\n videoPlayer = null;\r\n });\r\n $.vwPlayerWrapper.add(videoPlayer);\r\n } else {\r\n Ti.UI.createAlertDialog({\r\n title: \"Error\",\r\n message: \"Loading error...\"\r\n }).show();\r\n };\r\n };\r\n });\r\n};\r\n\r\n$.index.open();\r\n{code}\r\n# replace the index.xml code to the next\r\n{code:xml}\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{code}\r\n# Run\r\n# Load local video\r\n# Try to get the image\r\n\r\nFacts:\r\n- This is not working with any local video on Android\r\n- This work fine on iOS. \r\n- By 'local video' we mean videos picked from the video gallery of the device\r\n", "attachment": [ { "id": "61547", "filename": "test.png", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-02-10T15:59:16.000+0000", "size": 405771, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: Get image frames at times out of local video ", "creator": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "SDK 6.0.0GA, 6.0.1GA \r\nAndroid 5 , Android 6 \r\n", "closedSprints": [ { "id": 847, "state": "closed", "name": "2017 Sprint 05 SDK", "startDate": "2017-02-26T17:39:21.095Z", "endDate": "2017-03-12T17:39:00.000Z", "completeDate": "2017-03-12T19:14:38.838Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "406807", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/titanium_mobile/pull/8830", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-02-10T16:00:21.000+0000", "updated": "2017-02-10T16:00:21.000+0000" }, { "id": "408422", "author": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Guys when the review is finished? ", "updateAuthor": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-03-02T19:16:16.000+0000", "updated": "2017-03-02T19:16:16.000+0000" }, { "id": "410396", "author": { "name": "jlongton", "key": "jlongton", "displayName": "Josh Longton", "active": true, "timeZone": "Europe/London" }, "body": "\r\n\r\n{noformat}\r\nMac OS Version : 10.12.3\r\nAppc CLI : 6.1.0\r\nAppc NPM : 4.2.9-1\r\nNode : v4.6.0\r\nDevice: Nexus 5x(6.0.1) Pixel XL(7.1.1)\r\nEmulator: (6.0), (4.4.2)\r\n{noformat}\r\n\r\nUsing above env passed FR. After merge, the changes are present in SDK {{6.1.0.v20170307133328}}.\r\n\r\n*Closing*", "updateAuthor": { "name": "jlongton", "key": "jlongton", "displayName": "Josh Longton", "active": true, "timeZone": "Europe/London" }, "created": "2017-03-09T19:46:35.000+0000", "updated": "2017-03-09T19:46:35.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }