AVMutableComposition

Horus-iOS·2022년 6월 19일
0

https://developer.apple.com/documentation/avfoundation/avmutablecomposition

An object that you use to create a new composition from existing assets.

기존 에셋들로부터 새로운 컴포지션을 생성하기 위해 사용하는 객체입니다.

Declaration

class AVMutableComposition : AVComposition

Overview

컴포지션 트랙을 추가, 제거하려면 이 객체를 사용하시기 바랍니다. 또한, 타임 범위를 추가, 제거, 스케일하려면 이 객체를 사용하시기 바랍니다. 재생 및 검사를 위한 수정 가능 컴포지션의 수정 불가능한 스냅샷을 만들 수 있습니다. 아래처럼 구현합니다.

let mutableComposition = 
    <#a mutable composition you want to inspect or play in its current state #>

let composition = mutableComposition.copy() as! AVComposition

// Create a player to inspect and play the composition.
let playerItem = AVPlayerItem(asset: composition)

0개의 댓글