AVURLAsset cannot load with remote file
Posted
by
Quentin
on Stack Overflow
See other posts from Stack Overflow
or by Quentin
Published on 2011-02-08T15:22:42Z
Indexed on
2011/02/08
15:25 UTC
Read the original article
Hit count: 653
Hi,
I have a problem using AVURLAsset.
NSString * const kContentURL = @
"http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8";
...
NSURL *contentURL = [NSURL URLWithString:kContentURL];
AVURLAsset *asset = [AVURLAsset URLAssetWithURL:contentURL
options:nil];
[asset loadValuesAsynchronouslyForKeys:[NSArray arrayWithObject:tracksKey]
completionHandler:^{
...
NSError *error = nil;
AVKeyValueStatus status = [asset statusOfValueForKey:tracksKey
error:&error];
...
}
In the completion block, the status is AVKeyValueStatusFailed and the error message is "Cannot Open". All exemples I have seen, use a local file, so maybe there is a problem using a remote file...
Regards, Quentin
© Stack Overflow or respective owner