{ "id": "83816", "key": "TIMOB-6667", "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": "12090", "description": "", "name": "Sprint 2011-50", "archived": true, "released": true, "releaseDate": "2011-12-19" }, { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" }, { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-12-27T11:00:07.000+0000", "created": "2011-12-14T14:00:50.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "module_media", "parity", "qe-testadded" ], "versions": [ { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" } ], "issuelinks": [ { "id": "14385", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "84328", "key": "TIMOB-6915", "fields": { "summary": "iOS: Mimetype information is inadequate / misleading", "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": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "14379", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "84282", "key": "TIMOB-6888", "fields": { "summary": "iOS: Need to support MIME type 'application/mp4' when saving video", "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": "Low", "id": "4" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "25852", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "109735", "key": "TIMOB-12739", "fields": { "summary": "iOS: Media - mp4 file is not recognized as a valid mime type", "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": "Low", "id": "4" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-02-14T20:37:13.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": "h4. Expected Behavior\r\nDownload a video from a remote server, and save it to the Photo gallery, then exit the app and open the Photo Gallery, the video should be there.\r\n\r\nh4. Actual Behavior\r\nDownload a video from a remote server, pass the this.response to a \"save to Photo Gallery\" statement, there no errors on the process, apparently the video has been saved to the photo gallery, exit the app, open the photo gallery, there are no video.\r\n\r\nh4. Test Case\r\n{code}\r\n//var mp4_path = 'http://www.eyejot.com/mediabits?t=4&u=davidg&g=0E15E94BE83D150000404089CD&f=3424725A1718F2FFFFCDAE1066'\r\n//var mp4_path = 'http://www.mp4point.com/downloads/f4f0ea5981b3.mp4'\r\nvar mp4_path = 'http://daily3gp.com/vids/747.3gp';\r\n//var mp4_path = 'http://images.developercenter.appcelerator.com.s3.amazonaws.com/support-admin_logo_graphic.png'\r\n\r\ndownload_xhr = Ti.Network.createHTTPClient();\r\n download_xhr.onload = function() {\r\n\tTi.API.info('lets save the file');\r\n\tTitanium.Media.saveToPhotoGallery(this.responseData);\r\n };\r\n\r\n\tdownload_xhr.onerror = function() {\r\n \tLogger.log ('[gallery_test:downloadMessage] onerror');\r\n \treturn;\r\n\t};\r\n\t\r\n\tdownload_xhr.open ('GET', mp4_path);\r\n\t\r\n\tdownload_xhr.send();\r\n}\r\n{code}\r\n\r\nh5. Notes\r\nIf i use a jpeg, instead a video, the jpeg file it's saved and appears into the photo gallery\r\nI use different remote videos to test.", "attachment": [], "flagged": false, "summary": "iOS: Downloaded video from remote server, is not saved into photo gallery", "creator": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "subtasks": [], "reporter": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "environment": "Titanium SDK version: 1.7.5 / 1.8.0.1 \r\nPlatform OS: iOS\r\nPlatform OS Version: 5\r\nDevice Details: simulator / 4.2.1 iPod Touch device \r\nHost Operating System: OSX 10.7.2\r\nTitanium Studio Build 1.0.6.201110251616", "comment": { "comments": [ { "id": "176428", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "NOTE: The downloaded video must be in a format supported by the device. Available media formats on specific devices are available in their spec sheets from Apple.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-17T19:22:11.000+0000", "updated": "2011-12-17T19:22:11.000+0000" }, { "id": "176430", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Updated test:\r\n\r\n{code}\r\n//var mp4_path = 'http://www.eyejot.com/mediabits?t=4&u=davidg&g=0E15E94BE83D150000404089CD&f=3424725A1718F2FFFFCDAE1066'\r\n//var mp4_path = 'http://www.mp4point.com/downloads/f4f0ea5981b3.mp4'\r\nvar mp4_path = 'http://daily3gp.com/vids/747.3gp';\r\n//var mp4_path = 'http://images.developercenter.appcelerator.com.s3.amazonaws.com/support-admin_logo_graphic.png'\r\n\r\ndownload_xhr = Ti.Network.createHTTPClient();\r\n\r\ndownload_xhr.onload = function() {\r\n\tTi.API.info('lets save the file');\r\n\tTitanium.Media.saveToPhotoGallery(this.responseData, {\r\n\t\tsuccess: function(e) {\r\n\t\t\tTi.API.info(\"SUCCESS!\");\r\n\t\t},\r\n\t\terror: function(e) {\r\n\t\t\tTi.API.info(\"GALLERY ERROR: \"+e.error);\r\n\t\t}\r\n\t});\r\n};\r\n\r\ndownload_xhr.onerror = function() {\r\n\tLogger.log ('[gallery_test:downloadMessage] onerror');\r\n\treturn;\r\n};\r\n\r\ndownload_xhr.open ('GET', mp4_path);\r\ndownload_xhr.send();\r\n{code}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-17T19:49:22.000+0000", "updated": "2011-12-17T19:49:22.000+0000" }, { "id": "176432", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Fixed in 1.8 branch, awaiting 1.9 merge before marking resolved.", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-18T00:06:34.000+0000", "updated": "2011-12-18T00:06:34.000+0000" }, { "id": "177122", "author": { "name": "davidgeller", "key": "davidgeller", "displayName": "David Geller", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I tried the latest test case supplied here against the released 1.8.0.1 and did not find accepted behavior. Trying the test against the three MP4 files produced nothing and it appears as if the saveToPhotoGallery is entered but never returns and provides no status information in those cases. It's true that the 3GP example works, but the fact that valid MP4 files, that play normally, don't work suggests there's still a problem. This all worked extremely well in the 1.7.x era.", "updateAuthor": { "name": "davidgeller", "key": "davidgeller", "displayName": "David Geller", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-23T10:08:46.000+0000", "updated": "2011-12-23T10:08:46.000+0000" }, { "id": "177277", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "David -\r\n\r\nYou are probably retrieving content from a website which is using a currently unsupported \"Content-Type\" header for the download. This ticket was for support for video with the MIME type \"video/xxx\".\r\n\r\nIn this case you are probably downloading an \"application/mp4\" mimetype file, which is a type specifically reserved for MPEG-J and MPEG-7 with no video content (see [RFC 4337|http://www.rfc-editor.org/rfc/rfc4337.txt]). Unfortunately it appears that content providers frequently violate the RFC and provide content of this type which includes a video segment.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-27T10:14:47.000+0000", "updated": "2011-12-27T10:14:47.000+0000" }, { "id": "177278", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "We need to add support for MIME type \"application/mp4\" as above, since plenty of services violate the RFC.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-27T10:16:05.000+0000", "updated": "2011-12-27T10:16:05.000+0000" }, { "id": "177281", "author": { "name": "davidgeller", "key": "davidgeller", "displayName": "David Geller", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Stephen, when we try and pull our video from our site we deliver the MIME type video/mp4. Here's the output from retrieving http://www.eyejot.com/mediabits?t=4&u=davidg&g=0E15E94BE83D150000404089CD&f=3424725A1718F2FFFFCDAE1066\r\n\r\nThis was taken directly from Chrome's developer output.\r\n\r\nContent-Disposition:inline; filename=3424725A1718F2FFFFCDAE1066.mp4\r\nContent-Length:5255124\r\nContent-Range:bytes 44-5255167/5346565\r\nContent-Type:video/mp4\r\nDate:Tue, 27 Dec 2011 18:29:47 GMT\r\nEtag:1323544685000\r\nLast-Modified:Sat, 10 Dec 2011 19:18:05 GMT\r\nServer:Apache-Coyote/1.1\r\n\r\nMy concern with this - and Titanium - is you guys keep moving the playing field. There has to be some consistency and willingness to retain backward compatibility. The easiest way it to add new methods that perform whatever new or corrected functionality you desire and leave the old stuff the way it was. This was working properly for 1.7.x and now, sadly, it's not.", "updateAuthor": { "name": "davidgeller", "key": "davidgeller", "displayName": "David Geller", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-27T10:33:41.000+0000", "updated": "2011-12-27T10:33:41.000+0000" }, { "id": "177283", "author": { "name": "davidgeller", "key": "davidgeller", "displayName": "David Geller", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Additionally, even if the MIME types were wrong (which they were not), the saveToPhotoGallery function shouldn't go off into la la land. Right not it doesn't even produce an error if it has a problem.", "updateAuthor": { "name": "davidgeller", "key": "davidgeller", "displayName": "David Geller", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-27T10:36:27.000+0000", "updated": "2011-12-27T10:36:27.000+0000" }, { "id": "177285", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "David -\r\n\r\nOne of those links in the test did in fact resolve to an application/mp4 mimetype (the one with the .mp4 extension). I assumed that this was your issue.\r\n\r\nUsing the above link, I was in fact able to save to the photo gallery in both 1.9.0 and 1.8.0.1 using the sample code provided.\r\n\r\nWe do in fact fire both error and success messages for save completion, again as above in the test. It is recommended that you use the updated test I added to the ticket in the comments during resolution to confirm the fix.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-27T10:54:25.000+0000", "updated": "2011-12-27T10:54:25.000+0000" }, { "id": "177286", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Going to open a separate ticket for 'application/mp4' support.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-27T11:00:07.000+0000", "updated": "2011-12-27T11:00:07.000+0000" }, { "id": "177289", "author": { "name": "davidgeller", "key": "davidgeller", "displayName": "David Geller", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thanks Stephen. Since we really only care about the functionality working against our own platform, and we appear to be emitting the correct MIME time, I'll update our tests and confirm things are behaving as you suggest. Thank you for your quick replies.", "updateAuthor": { "name": "davidgeller", "key": "davidgeller", "displayName": "David Geller", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-27T11:06:44.000+0000", "updated": "2011-12-27T11:06:44.000+0000" }, { "id": "177486", "author": { "name": "davidgeller", "key": "davidgeller", "displayName": "David Geller", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Stephen - this stuff is still driving me crazy. My use case is to save the HTTP data into a file and THEN save it to the gallery. If I save the stream to a file and then attempt to pass in a TiBlob or TiFilesystemFile for that file the saveToGallery exhibits the same behavior or not working. If I save to a file and ALSO pass the this.responseData to saveToGallery it fails.\r\n\r\nCan you help me understand what's going on? The simple test case of save to the gallery directly from the HTTP call won't work for me and the documented behavior of saveToGallery is supposed to support saving both TiBlob and TiFilesystemFile objects.\r\n\r\nIs there something you can recommend?", "updateAuthor": { "name": "davidgeller", "key": "davidgeller", "displayName": "David Geller", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-28T15:28:39.000+0000", "updated": "2011-12-28T15:28:39.000+0000" }, { "id": "177488", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "David -\r\n\r\nYou should be able to pass in a {{TiFilesystemFile}} but it has to be named appropriately (for mimetype identification, which appears to be fairly restrictive for us and may need to be updated).\r\n\r\nCan you provide me with some sample code, both for the direct-from-HTTP save and the save-from-file? Without a test case that proves this bug isn't resolved, or that there are additional issues, I can't reopen the ticket or create new ones since the tese case I wrote works for me (and the reviewers who accepted the fix).", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-28T15:44:02.000+0000", "updated": "2011-12-28T15:44:02.000+0000" }, { "id": "177493", "author": { "name": "davidgeller", "key": "davidgeller", "displayName": "David Geller", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I didn't quite understand your request for a sample (the without a test case that proves part was confusing). But, I beat my code to death and discovered that if the file is named \"name.mov\" it WILL save to the gallery and if it's \"name.mp4\" it WILL not. Very, very frustrating model - especially since the documentation is practically non-existent. I suspect the TiBlob will work now with the file name changed to .mov. I'll test. I'll post some stuff in the QA group so others can benefit from this painful learning process. :) I do, though, appreciate your help. Can I send you a free redemption code for Eyejot on the iPhone?", "updateAuthor": { "name": "davidgeller", "key": "davidgeller", "displayName": "David Geller", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-28T16:04:13.000+0000", "updated": "2011-12-28T16:04:13.000+0000" }, { "id": "177495", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "David -\r\n\r\nI double-checked the mimetype info and we do not identify \"mp4\" extensions as an appropriate mimetype. I'll be filing a bug to resolve this and link it to this ticket.\r\n\r\nI'm still curious why you can't directly save the blob to the roll, however.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-28T16:11:51.000+0000", "updated": "2011-12-28T16:11:51.000+0000" }, { "id": "179213", "author": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing issue\r\n\r\nTested with Ti Studio 1.0.8.201201101928\r\nTi Mob SDK 1.9.0.v20120111233134\r\nOSX Lion\r\niPhone 4S, iPad 2\r\n\r\nExpected behavior of video download over network, then being saved to photo gallery is shown", "updateAuthor": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-01-13T11:41:07.000+0000", "updated": "2012-01-13T11:41:07.000+0000" } ], "maxResults": 16, "total": 16, "startAt": 0 } } }