0 votes

Hi,

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?

Thanks

in Engine by (92 points)
edited by

1 Answer

+1 vote

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.
So:
player.stream.resource_name
or:
player.stream.resource_path

by (3,280 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.