native.newVideo(): table index is nil


I’m trying to play remote video: (Solar2D Documentation — API Reference | Libraries | native | newVideo)

My solar2d is newest, (2024.3703) my system is Linux Mint 19.3

I get error:

ERROR: Runtime error
/root/parts/solar2d/src/platform/resources/init.lua:988: table index is nil
stack traceback:
	/root/parts/solar2d/src/platform/resources/init.lua:988: in function 'newVideo'
	/home/michal/Documents/Solar2D Projects/AppTV/main.lua:9: in main chunk

Theres code: (error means 1’st line [newVideo()])

local video = native.newVideo( display.contentCenterX, display.contentCenterY, 640, 360 )
local function videoListener( event )
    print( "Event phase: " .. event.phase )
    if event.errorCode then
        native.showAlert( "Error!", event.errorMessage, { "OK" } )
-- Load a remote video
video:load( "", media.RemoteSource )
-- Add video event listener 
video:addEventListener( "video", videoListener )
-- Play video

What can it be? What shall I do?


In Gotchas, it says “Windows isn’t supported”. My guess is Linux is also not supported. That should explain the error you get on the first line where the API is called.