mirror of
https://github.com/litruv/PNGTuber-Plus.git
synced 2026-07-24 02:26:02 +10:00
18 lines
309 B
GDScript
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()
|