Skip to content

Commit

Permalink
Fixed #212
Browse files Browse the repository at this point in the history
  • Loading branch information
tilltue committed Sep 9, 2019
1 parent 07f7a0c commit 6fa617f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion TLPhotoPicker/Classes/TLAssetsCollection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public struct TLPHAsset {
}

public func photoSize(options: PHImageRequestOptions? = nil ,completion: @escaping ((Int)->Void), livePhotoVideoSize: Bool = false) {
guard let phAsset = self.phAsset, self.type == .photo else { completion(-1); return }
guard let phAsset = self.phAsset, self.type == .photo || self.type == .livePhoto else { completion(-1); return }
var resource: PHAssetResource? = nil
if phAsset.mediaSubtypes.contains(.photoLive) == true, livePhotoVideoSize {
resource = PHAssetResource.assetResources(for: phAsset).filter { $0.type == .pairedVideo }.first
Expand Down

0 comments on commit 6fa617f

Please sign in to comment.