objective c - AVURLAsset loadValuesAsynchronouslyForKeys: completionHandler: never fires on device -
I'm using the next snippet to load, values are synchronously, so loading = no fire ever No. And I have the same problem with the AVAssetExportSession export. Simultaneously This is not all just working on the device. Please, help! My brain is melting. Here's the code I use: I do not use any options or anything of that nature. I'm sure you saw an example of Apple's documentation:
NSDictionary * options = [Object with NSDictionary dictionary: [NSNumber Number Witbools: Yes] Key: AVURLASETPreferPreciseDurationAndTimingKey]; AVURLAsset * asset = [AVURLASET URLServerValid URL: URL options: options]; NSArray * key = [NSArray arrayWithObjects: @ "duration", @ "track", zero]; __block Bull loading = yes; [Asset Load ValueExcinronusForcases: Keys Whole Handler: ^ (Zero) {Loading = No; }]; While (loading) [[NSRunLoop currentRunLoop] Run-upDate: [[NSDate date] dateByAddingTimeInterval: 0.5]];
NSDRAEL * URL = [NSUr file URLTHath Path: [[NSBindal Mainbundal] PathForreresource: @ "Intro" type type: @ "M4V"]]; Self.asset = [[AVURLAsset alloc] initWithURL: url option: zero]; NSString * tracksKey = @ "tracks"; [Self.asset loadValuesAsynchronouslyForKeys: [NSArray arrayWithObject: tracksKey] completionHandler: ^ {// Other code for AVPlayer here}};
Comments
Post a Comment