I want to know how to put a second video after the first video ends
How to add a second video
tamirroz12 you can do that with using the cod!
https://docs.godotengine.org/en/stable/classes/class_videostreamplayer.html#signals
The player has signal finished(), once video finished that signal fires.. you need to catch it like a bullet, and then set new stream and do it all over again
Please explain to me so I understand, I can't.
- Edited
Do you know how to use signals in Godot?
Assuming you have nodes VideoStreamPlayer1 and VideoStreamPlayer2 with the two streams loaded, add this to the script attached to their parent node:
@onready video1: VideoStreamPlayer = $VideoStreamPlayer1
@onready video2: VideoStreamPlayer = $VideoStreamPlayer2
func _ready() -> void:
video1.finished.connect(_on_video1_finished)
func _on_video1_finished() -> void:
video2.play()
This assumes that video1.play()
is called somewhere in that script.
- Edited
DaveTheCoder This is my first time using Godot