#19 利用 iOS SDK 播放音樂、影片及顯示網頁
Published in
Aug 7, 2021
目的:在 playground學習用 iOS SDK 各式型別生成東西,設定它的屬性和呼叫方法。
用 AVPlayer 播音樂
- 使用 AVFoundation、URL、AVPlayer。
- url:代資表源的位置(location of a resource)、網頁的網址,或是 App 裡檔案的路徑。
用 AVPlayerViewController 播影片
- 使用 AVKit、PlaygroundSupport、AVPlayerViewController、PlaygroundPage。
利用 SFSafariViewController 顯示網頁