Skip to content

Commit

Permalink
来自aby的提交:Image Assert无法生成视频的提交。
Browse files Browse the repository at this point in the history
  • Loading branch information
AbySwifter committed Jul 3, 2019
1 parent e1bd951 commit dd651be
Show file tree
Hide file tree
Showing 8 changed files with 151 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.idea/
.DS_Store
Binary file added Cabbage/Sources/.DS_Store
Binary file not shown.
3 changes: 3 additions & 0 deletions Cabbage/Sources/Track/Resource/Resource.swift
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ open class Resource: NSObject, NSCopying, ResourceTrackInfoProvider {

private static let emptyAsset: AVAsset? = {
let bundle = Bundle(for: ImageResource.self)
if let videoURL = bundle.url(forResource: "black_empty", withExtension: "mp4") {
return AVAsset(url: videoURL)
}
if let bundleURL = bundle.resourceURL?.appendingPathComponent("Cabbage.bundle") {
let resourceBundle = Bundle.init(url: bundleURL)
if let videoURL = resourceBundle?.url(forResource: "black_empty", withExtension: "mp4") {
Expand Down
Binary file not shown.

Large diffs are not rendered by default.

Binary file not shown.

Large diffs are not rendered by default.

Binary file not shown.

0 comments on commit dd651be

Please sign in to comment.