This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Pass urls to files you want to play in one compossition, | |
//works with any file recognised as AVAsset and containing audio tracks, | |
//!!only first track in file will be played!! | |
func loadFiles(filesURL: [URL]) async throws -> AVPlayer{ | |
//Initialize Mutable composition | |
let composition: AVMutableComposition = .init() | |
for file in filesURL{ | |
//Add new Composition track for new file |