pili-engineering / PLShortVideoKit

PLShortVideoKit 是七牛推出的一款适用于 iOS 平台的短视频 SDK,提供了包括美颜、滤镜、水印、断点录制、分段回删、视频编辑、混音特效、视频剪辑、本地转码、视频上传在内的多种功能,支持高度定制以及二次开发。
https://github.com/pili-engineering/PLShortVideoKit
Apache License 2.0
448 stars 122 forks source link

PLSComposeMediaItem.imageDuration 默认值无效 #77

Closed nuomi1 closed 5 years ago

nuomi1 commented 5 years ago

PLShortVideoKit 1.16.1,Swift 4.2,iOS 12.1.4。

文档中 PLSComposeMediaItem.imageDuration 默认值为 3,但是 Swift 调用时不设置会报错。

let medias = NSMutableArray()

photos.forEach { photo in
    let imageItem = PLSComposeMediaItem()
    imageItem.mediaType = .image
    imageItem.image = photo
    // imageItem.imageDuration = 3
    medias.add(imageItem)
}

imageVideoComposer?.mediaArrays = medias
[W] Pili-ShortVideo-ImageVideoComposer Error Domain=PLSImageVideoComposer Code=-1 "can find video track" UserInfo={NSLocalizedDescription=can find video track} -[PLSImageVideoComposer cancelComposing:] PLSImageVideoComposer.m:665
anhaoxiong commented 5 years ago

已经找到问题所在并解决,多谢 @nuomi1 将在下个版本更新中发布更新