Files
PNGTuber-Plus/addons/godot-ndi/demo/video_stream_player.gd
2025-07-22 09:00:28 +10:00

18 lines
309 B
GDScript

extends VideoStreamPlayer
@export var playlist: Array[VideoStream] = []
func _ready() -> void:
_on_finished()
func _on_finished() -> void:
if playlist.is_empty():
return
var next_idx = playlist.find(stream) + 1
if next_idx >= playlist.size():
next_idx = 0
stream = playlist[next_idx]
play()