2014 snapchat source code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
453 B

  1. //
  2. // NSURL+NSURL_Asset.m
  3. // Snapchat
  4. //
  5. // Created by Michel Loenngren on 4/30/17.
  6. // Copyright © 2017 Snapchat, Inc. All rights reserved.
  7. //
  8. #import "NSURL+Asset.h"
  9. #import <SCBase/SCMacros.h>
  10. @import AVFoundation;
  11. @implementation NSURL (Asset)
  12. - (void)reloadAssetKeys
  13. {
  14. AVAsset *videoAsset = [AVAsset assetWithURL:self];
  15. [videoAsset loadValuesAsynchronouslyForKeys:@[ @keypath(videoAsset.duration) ] completionHandler:nil];
  16. }
  17. @end