{ "id": "61681", "key": "TIMOB-1049", "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": "11224", "name": "Release 1.4.0", "archived": true, "released": true, "releaseDate": "2010-07-16" } ], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2011-04-15T02:42:33.000+0000", "created": "2011-04-15T02:42:32.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-02T19:21:25.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}

http://helpdesk.appcelerator.net/tickets/2799

\n

code:

\n
\n\nvar video_full_path = Titanium.Filesystem.resourcesDirectory + '/content/sample_movie.mp4';
\n
\n\n\n
\nvar thumbnail_button = Titanium.UI.createButton({ \ntitle: 'Gen Thumbnail', \ntop: 200, \nheight:32, \nwidth:160 \n});
\n
\n\n\n
\nthumbnail_button.addEventListener ('click', function() \n{ \nvar recent_vid = Titanium.Media.createVideoPlayer({ \ncontentURL: video_full_path \n});
\n
\n\n\n
\nTi.API.info (\"File: \" + video_full_path); \nTi.API.info (\"Duration: \" + recent_vid.duration); \nTi.API.info (\"Generating thumbnail...\"); \nvar thumbnail = recent_vid.thumbnailImageAtTime (2, Titanium.Media.VIDEO_TIME_OPTION_EXACT); \nTi.API.info (\"Done generating thumbnail!\"); \n});
\n
\n\n\n
\nwin.add (thumbnail_button);
\n
\n\n\n
\nvar play_button = Titanium.UI.createButton({ \ntitle: 'Play Video', \ntop: 100, \nheight:32, \nwidth:160 \n});
\n
\n\n\n
\nplay_button.addEventListener ('click', function() \n{ \nvar recent_vid = Titanium.Media.createVideoPlayer({ \ncontentURL: video_full_path \n});
\n
\n\n\n
\nTi.API.info (\"Playing \" + video_full_path); \nTi.API.info (\"Duration: \" + recent_vid.duration);
\n
\n\n\n
\nrecent_vid.play(); \n});
\n
\n\n\n
\nwin.add (play_button);
\n
{html}", "attachment": [], "flagged": false, "summary": "thumbnailImageAtTime does not work for video player", "creator": { "name": "nwright", "key": "nwright", "displayName": "Nolan Wright", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "nwright", "key": "nwright", "displayName": "Nolan Wright", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "124696", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Modified JS that proves this is not the issue:

\n
\nvar win = Ti.UI.createWindow({backgroundColor:'white'});\n\nvar video_full_path = 'movie.mp4';\n\nvar thumbnail_button = Titanium.UI.createButton({ \ntitle: 'Gen Thumbnail', \ntop: 200, \nheight:32, \nwidth:160 \n});\n\nthumbnail_button.addEventListener ('click', function() \n{ \nvar recent_vid = Titanium.Media.createVideoPlayer({ \ncontentURL: video_full_path \n}); \n\nTi.API.info (\"File: \" + video_full_path); \nTi.API.info (\"Duration: \" + recent_vid.duration); \nTi.API.info (\"Generating thumbnail...\"); \nvar thumbnail = recent_vid.thumbnailImageAtTime (2, Titanium.Media.VIDEO_TIME_OPTION_EXACT); \nTi.API.info (\"Done generating thumbnail: \"+thumbnail); \nwin.add(Ti.UI.createImageView({\n    image:thumbnail,\n    bottom:10,\n    height:100,\n    width:100\n}));\n});\n\nwin.add (thumbnail_button);\n\nvar play_button = Titanium.UI.createButton({ \ntitle: 'Play Video', \ntop: 100, \nheight:32, \nwidth:160 \n});\n\nplay_button.addEventListener ('click', function() \n{ \nvar recent_vid = Titanium.Media.createVideoPlayer({ \ncontentURL: video_full_path \n}); \n\nTi.API.info (\"Playing \" + video_full_path); \nTi.API.info (\"Duration: \" + recent_vid.duration);\nwin.add(recent_vid);\nrecent_vid.play(); \n});\n\nwin.add (play_button);\nwin.open();\n
\n

Problem could be the video path, or the movie type not being\nsupported under iPhone.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:42:33.000+0000", "updated": "2011-04-15T02:42:33.000+0000" }, { "id": "124697", "author": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "body": "{html}

(from [a0a0e6883432d1a0745764ac15a49a0045a96d43])\n[#1049 state:invalid] Added thumbnail image to\nPhone -> Play Movie -> Embedded to test #1049 and\nthumbnail generation in general. \nhttp://github.com/appcelerator/titanium_mobile/commit/a0a0e6883432d...

{html}", "updateAuthor": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:42:33.000+0000", "updated": "2011-04-15T02:42:33.000+0000" }, { "id": "124698", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Okay, this was broken in 1.3.0 - it must've been fixed when I\ndid #1044.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:42:33.000+0000", "updated": "2011-04-15T02:42:33.000+0000" }, { "id": "408435", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closed as invalid.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-02T19:21:25.000+0000", "updated": "2017-03-02T19:21:25.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }