MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / SetTime

Method SetTime

Source/Engine/Video/VideoPlayer.cpp:131–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131void VideoPlayer::SetTime(float time)
132{
133 if (_state == States::Stopped || _player.Backend == nullptr)
134 return;
135 TimeSpan timeSpan = TimeSpan::FromSeconds(time);
136 timeSpan.Ticks = Math::Max<int64>(timeSpan.Ticks, 0);
137 if (_player.Duration.Ticks > 0)
138 timeSpan.Ticks = Math::Min<int64>(timeSpan.Ticks, _player.Duration.Ticks);
139 _player.Backend->Player_Seek(_player, timeSpan);
140}
141
142float VideoPlayer::GetDuration() const
143{

Callers

nothing calls this directly

Calls 1

Player_SeekMethod · 0.45

Tested by

no test coverage detected