Yandex Cloud
Documentation
PresentationContact UsTry it for free
© 2026 Direct Cursus Technology L.L.C.
Yandex Cloud Video
    • Overview
    • Control
      • Overview
        • Getting started
          • Environment
          • PictureInPictureController
          • VideoSurface
          • YaPlayer
            • PlayerError
            • Configuration
            • ClientUserId
            • ContentIdEndpoint
            • From
            • PlaybackConfig
            • PlaybackSpeed
            • PlayerStatus
            • QuasiEndpoint
            • Time
            • VideoType
    • Browser autoplay policy
  • Access management
  • Pricing policy
  • Audit Trails events
  • Release notes
  • Troubleshooting

In this article:

  • Contents
  • Description
  • Protocol match
  • Properties
  • Initializers
  • Methods
  • Examples
  1. Video Player
  2. SDK
  3. iOS
  4. CloudVideoPlayer
  5. Data types
  6. Time

Time

Written by
Yandex Cloud
Updated at November 5, 2026
View as Markdown
  • Contents
  • Description
  • Protocol match
  • Properties
  • Initializers
  • Methods
  • Examples
public struct Time

Timestamp within a media stream.

ContentsContents

This page displays:

  • Properties
  • Initializers
  • Methods

DescriptionDescription

Used to set playback position, duration representation, and buffering ranges. Supports arithmetic operations and comparisons.

Protocol matchProtocol match

The structure matches the AdditiveArithmetic and Comparable protocols.

PropertiesProperties

Name

Type

Description

timeInterval

TimeInterval

Value in seconds in TimeInterval format.

zero

Time

Zero time position.

InitializersInitializers

public init(sec time: TimeInterval)

Creates a timestamp from a value in seconds.

Parameters:

  • time: Time in seconds.

public init(ms time: Int64)

Creates a timestamp from a value in milliseconds.

Parameters:

  • time: Time in milliseconds.

MethodsMethods

public static func - (lhs: Time, rhs: Time) -> Time

Deducts one time value from another.


public static func + (lhs: Time, rhs: Time) -> Time

Sums two time values.

ExamplesExamples

let startTime = Time(sec: 30)
let offset = Time(ms: 500)
let result = startTime + offset

await player.seek(to: startTime)

Was the article helpful?

Previous
QuasiEndpoint
Next
VideoType
© 2026 Direct Cursus Technology L.L.C.