mirror of
https://github.com/litruv/PNGTuber-Plus.git
synced 2026-07-24 02:26:02 +10:00
14 lines
529 B
GDScript
14 lines
529 B
GDScript
extends NDIFinder
|
|
|
|
@onready var player: VideoStreamPlayer = $"../VideoStreamPlayer"
|
|
|
|
func _on_sources_changed() -> void:
|
|
player.stream = get_sources().pop_front()
|
|
player.play()
|
|
|
|
func _on_sources_found(found_sources: Array[VideoStreamNDI]) -> void:
|
|
print("NDI sources found: ", found_sources.map(func (source: VideoStreamNDI): return source.get_name()))
|
|
|
|
func _on_sources_gone(gone_sources: Array[VideoStreamNDI]) -> void:
|
|
print("NDI sources gone: ", gone_sources.map(func (source: VideoStreamNDI): return source.get_name()))
|