| 129 | } |
| 130 | |
| 131 | void 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 | |
| 142 | float VideoPlayer::GetDuration() const |
| 143 | { |
nothing calls this directly
no test coverage detected