DVAssetLoaderDelegate icon indicating copy to clipboard operation
DVAssetLoaderDelegate copied to clipboard

How to fetch video where url doesn't have extension?

Open niralishaha25 opened this issue 4 years ago • 1 comments

niralishaha25 avatar Jul 31 '20 13:07 niralishaha25

You can configure the "AVURLAssetOutOfBandMIMETypeKey" option in the AVURLAsset initializer with the mimeType you're expecting. For example:

Swift let asset = AVURLAsset(url: remoteURL, options: ["AVURLAssetOutOfBandMIMETypeKey": "video/mp4"])

Objective-C AVURLAsset *asset = [[AVURLAsset alloc] initWithURL:url options:@{@"AVURLAssetOutOfBandMIMETypeKey": @"video/mp4"}];

You can initialize the lib DVURLAsset the same way. This worked for me.

arthuroli29 avatar Jan 31 '24 14:01 arthuroli29