Record animation to mp4 with WGLMakie

I have a )I think) very simple problem, that I have tried to find a solution for for a long time today. I always run into the same error message no matter what.

I am in a Pluto notebook and I am using WGLMakie for plots. Pluto says I am on WGLMakie v0.10.14. Now, in some of my old codes (with GLMakie) I figured out (also a longish steep learning curve) how to record something with record

But If I do a Pluto cell with

begin
	using WGLMakie
	t = 0:0.01:1
	print(length(t))
	x = Observable(sin.(2π .* t))
	fig, ax, plt = plot(t,x)
	record(fig, "test.mp4", 1:50, framerate = 10) do i
        x[] = sin.( 2π .* 1/i .* t)
    end
end

I can do also the tips from this old thread but the only thing I get is

MethodError: no method matching wait_for_ready(::Nothing)
The function `wait_for_ready` exists, but no method is defined for this combination of argument types.

even when including the yield. Is there any easy way to record an animation as mp4 with WGLMakie?

Try putting the record into another Pluto cell. Let the plot render before you try to record it.

Just moving the record to a next cell at least changes the error message and sounds a bit like I miss some understanding of how observables work :wink:

So with

begin
	using WGLMakie
	t = 0:0.01:1
	print(length(t))
	x = Observable(sin.(2π .* t))
	fig, ax, plt = plot(t,x)
end

and a separate cell for

record(fig, "test.mp4", 1:50, framerate = 10) do i
     x[] = sin.( 2π .* 1/i .* t)
end

yields

BoundsError: attempt to access 600×450 Array{RGB{N0f8},2} with eltype ColorTypes.RGB{FixedPointNumbers.N0f8} at index [1:1200, 1:900]

edit: With GLMakie with works perfectly find, though.

edit2: Ah that error was maybe just a file that did not exist. If I now provide a file that does exist (i.e. that I can write to) I get the same error as in the original post.