首页新闻招聘找找看知识库
  • 浏览:7 2020-05-22 16:09 来自 甘林梦

        AVAsset *asset = [AVAssetassetWithURL:[NSURLfileURLWithPath:videoPath]];

        NSArray *tracks = [asset tracksWithMediaType:AVMediaTypeVideo];

        //

        BOOL hasVideoTrack = [tracks count] > 0;

        if (hasVideoTrack) {

            NSLog(@"是视频");

        }else{

            NSLog(@"不是视频");

        }

登录后才能评论,请先登录注册