godot-proposals
godot-proposals copied to clipboard
Implement streaming from an URL in VideoPlayer
Previously an issue and was scheduled for a milestone: https://github.com/godotengine/godot/issues/26127
Describe the project you are working on: Group game play with live streaming of host.
Describe the problem or limitation you are having in your project: Videoplayer can only play local files. It cannot directly play videos from a url.
Describe the feature / enhancement and how it helps to overcome the problem or limitation: By being able to connect to a video stream (rather than play a file) I can stream a video.
Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
videoPlayer.set_stream(https://example.com/livevid.mpd)
videoPlayer.play()
If this enhancement will not be used often, can it be worked around with a few lines of script?: There is no workaround for streaming video from a url.
Is there a reason why this should be core and not an add-on in the asset library?: To quote @hpvb
This should be added to the VideoPlayer class, after that GDNative will also get it. I suggest this gets implemented using Godot's internal HTTP client to ensure that we use the same certificates etc for https streams.
@hbina showed interest on working on the feature.