Pauses playback of the current item.
SDKs
- iOS 4.0+
- macOS 10.7+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 6.0+
Framework
- AVFoundation
Declaration
func pause()
Discussion
Calling this method is the same as setting the rate
to 0
.
Pauses playback of the current item.
SDKs
Framework
func pause()
Calling this method is the same as setting the rate
to 0
.
func play()
Begins playback of the current item.
var rate: Float
The current playback rate.
var action At Item End: AVPlayer .Action At Item End
The action to perform when the current player item has finished playing.
enum AVPlayer .Action At Item End
The actions a player should take when it finishes playing.
func replace Current Item(with: AVPlayer Item?)
Replaces the current player item with a new player item.
var prevents Display Sleep During Video Playback: Bool
A Boolean value that indicates whether video playback prevents display and device sleep.