PlaybackConfig
Written by
Updated at November 5, 2026
public struct PlaybackConfig
Playback configuration
Contents
This page displays:
Description
Provided when setting the source via the set(source:config:) method of a YaPlayer object. Defines the initial behavior of the player.
Properties
|
Name |
Type |
Description |
|
|
|
Automatically start playback after loading the source. |
|
|
|
Start playback without sound. |
|
|
|
Position from which playback starts. |
|
|
|
Default configuration: playback from the beginning, not muted, no automatic start. |
Initializers
public init(autoplay: Bool, isMuted: Bool, startPosition: Time = .zero)
Creates a playback configuration.
Examples
let config = PlaybackConfig(autoplay: true, isMuted: false, startPosition: Time(sec: 30))
player.set(source: endpoint, config: config)