22. Seek to a position in the clip
The embedded player exposes stream_position in seconds. This example requests a seek to half a second:
extends "res://scripts/runtime/script_base.gd"func run(_context: Dictionary = {}) -> Variant:
var player := GetGUIElementProperty(
"video_lab", "briefing_video", "video_player", null
) as VideoStreamPlayer
if player == null or player.stream == null:
return false
player.stream_position = 0.5
return trueThe sample Theora and MP4 clips accepted the 0.5-second seek test in this build. Seeking still depends on the stream implementation and the file. Check the actual frame, position and behavior on the target platform.
1. Play the clip, pause it and note the current frame.
2. Run the seek script, using a position inside the known clip duration.
3. Check the displayed frame and the player’s reported position.
4. Resume and confirm that playback continues from the intended point.
Use seconds, not frame numbers or a percentage. Stay within the clip’s duration and test backward as well as forward seeking before building a scrubber around it.
The general Seek Video action is for the movie manager’s player. It does not select briefing_video inside this GUI. Use this wrapper when you intend to control this particular embedded element.
