[TIMOB-6888] iOS: Need to support MIME type 'application/mp4' when saving video
| GitHub Issue | n/a | 
|---|---|
| Type | Bug | 
| Priority | Low | 
| Status | Closed | 
| Resolution | Duplicate | 
| Resolution Date | 2012-02-10T10:45:43.000+0000 | 
| Affected Version/s | Release 1.8.0.1 | 
| Fix Version/s | n/a | 
| Components | iOS | 
| Labels | n/a | 
| Reporter | Stephen Tramer | 
| Assignee | Neeraj Gupta | 
| Created | 2011-12-27T11:02:51.000+0000 | 
| Updated | 2017-03-09T21:35:45.000+0000 | 
Description
	It appears that sometimes services return valid MPEG-4 video with the MPEG-7-only MIME type (application/mp4 instead of video/mp4), probably when the data is MPEG-47.
Sample code:
var mp4_path = 'http://www.mp4point.com/downloads/f4f0ea5981b3.mp4'
download_xhr = Ti.Network.createHTTPClient();
download_xhr.onload = function() {
	Ti.API.info('lets save the file');
	Titanium.Media.saveToPhotoGallery(this.responseData, {
		success: function(e) {
			Ti.API.info("SUCCESS!");
		},
		error: function(e) {
			Ti.API.info("GALLERY ERROR: "+e.error);
		}
	});
};
download_xhr.onerror = function() {
	Logger.log ('[gallery_test:downloadMessage] onerror');
	return;
};
download_xhr.open ('GET', mp4_path);
download_xhr.send();
Dupe of TIMOB-6915.
Closing ticket as duplicate.