onSurfaceReady

var onSurfaceReady: () -> Unit?

Invoked on the GL thread after surface becomes available — the first time when the GL name is initially allocated, and again after a GL context loss when the name is regenerated. The caller must hand surface to its media producer (e.g. MediaPlayer.setSurface(surface)) on each invocation; the previous Surface is no longer valid.