代码之家  ›  专栏  ›  技术社区  ›  Andiih

以编程方式访问iPhone视频的方向

  •  1
  • Andiih  · 技术社区  · 16 年前

    1 回复  |  直到 7 年前
        1
  •  1
  •   Adam    15 年前

    比如:

    NSURL *url = // url to the video returned by the picker
    AVAssetTrack *videoTrack = [[url tracksWithMediaType:AVMediaTypeVideo] objectAtIndex:0];
    videoTrack.preferredTransform; // CGAffineTransform that tells you whether the video is rotated from original orientation
    videoTrack.naturalSize; // CGSize that tells you the current dimensions of the video
    
    推荐文章