A macOS-only object that displays the video content from a player object along with system-supplied playback controls.
- macOS 10.9+
The player view supports a variety of different controls styles, ranging from no controls to controls matching the look of QuickTime Player. This makes it easy for you to tailor the presentation to best match your use of the player view. Regardless of the selected controls style, the player view always supports a standard set of keyboard shortcuts to control playback:
The spacebar plays and pauses playback.
The right and left arrow keys step frame-by-frame through the video.
The J key rewinds. You can press it multiple times to cycle through rewind speeds.
The K key stops playback.
The L key fast-forwards. You can press it multiple times to cycle through fast-forward speeds.
In addition to providing the core playback interface for your media applications,
AVPlayer also makes it simple to add trimming capabilities to your player. Invoking the player view’s
begin method presents a trimming interface like that of QuickTime Player making it simple to trim the media to the desired time range.