Why does VideoPlayer method get_stream_name() return null ?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By marcorexo


I have a VideoPlayer node in a scene with an associated .ogv file stream setup in the inspector. Pressing the ‘play the project’ arrow button runs the scene and video but the player.get_stream_name() method returns null.

Checking the return type using typeof(player.get_stream_name()) returns 4 - don’t know what this is:

func _ready():
	var player = get_node("VideoPlayer")
	print("playing? ", player.is_playing()) # outputs "playing: True"
	print("stream: ", player.get_stream_name()) #outputs "stream: " 

… so print("stream: ", player.get_stream_name()) statement returns: "stream: " and no filename.

Can you help please?


:bust_in_silhouette: Reply From: wombatstampede

No idea why this is so (you could open a ticket for this, might be an error).

But you could use the streams resource_name instead.