How can I stop the Unity Video Player on WebGL from starting each video with a frame of all black?

I’m working on a system to seamlessly reconstruct and play numerous segments of a continuous video stream by playing one segment on the active Video Player while loading the next on the hidden, waiting Video Player—and swapping between them when the active segment is done playing.

Although it’s not necessary to see the code for this, I included it below just in case:

public class VideoController : MonoBehaviour
{
    (SerializeField) private VideoPlayer activePlayer;
    (SerializeField) private VideoPlayer waitingPlayer;
    // The waiting player starts off invisible.

    private Queue<string> _segmentUrls;
    private bool _videoIsPlaying;

    private bool NextSegmentExists => _segmentUrls.Count >= 1;

    private void Awake()
    {
        // Initialize fields.
        _segmentUrls = new Queue<string>();

        // Subscribe to events.
        // VideoPlayer.Prepare() doesn't seem to work in WebGL. The workaround is to call
        // Play() instead and set the players to pause once the track is finished preparing.
        activePlayer.prepareCompleted += source =>
        {
            source.Pause();
        };
        waitingPlayer.prepareCompleted += source =>
        {
            source.Pause();
        };
        
        activePlayer.loopPointReached += SwitchVideoPlayer;
        waitingPlayer.loopPointReached += SwitchVideoPlayer;
    }

    public void EnqueueSegment(string segmentUrl)
    {
        _segmentUrls.Enqueue(segmentUrl);

        if (!_videoIsPlaying)
            StartCoroutine(StartPlayback());
        else if (!waitingPlayer.isPrepared)
            PrepareNextSegmentOnWaitingPlayer();
    }

    private IEnumerator StartPlayback()
    {
        PrepareNextSegmentOnWaitingPlayer();
        
        // Give the Video Player a second to finish preparing the segment for playback.
        yield return new WaitForSeconds(1f);

        SwitchVideoPlayer(lastPlayer: activePlayer);
        _videoIsPlaying = true;
    }

    private void PrepareNextSegmentOnWaitingPlayer()
    {
        var segmentUrl = _segmentUrls.Dequeue();
        waitingPlayer.url = segmentUrl;
        waitingPlayer.Play();
    }

    private void SwitchVideoPlayer(VideoPlayer lastPlayer)
    {
        activePlayer = waitingPlayer;
        TransparencyController.ShowGameObject(activePlayer.gameObject);

        waitingPlayer = lastPlayer;
        TransparencyController.HideGameObject(waitingPlayer.gameObject);
        waitingPlayer.Stop();
        
        if (activePlayer.isPrepared)
            activePlayer.Play();
        else
        {
            activePlayer.Stop();
            _videoIsPlaying = false;
            return;
        }

        if (NextSegmentExists)
            PrepareNextSegmentOnWaitingPlayer();
    }
}

When a Video Player begins playing, the first frame or two is just a black screen. As a result, when a segment finishes playing and it’s time to swap the active and waiting players, there’s a momentary black “blink” on the screen.

Demonstration

Below is a GIF of the issue:

Blinking Demo

Each blink corresponds to swapping Video Players.

(Not to be confused, the video player is showing a recording of a Unity project.)

When a Video Player is done preparing the new segment for playback, I have it advance two frames, so it picks off right where the old segment ended and transitions perfectly smoothly.

This is done by changing the callback for VideoPlayer.prepareCompleted as follows:

activePlayer.prepareCompleted += source =>
{
    source.StepForward();
    source.StepForward();
    source.Pause();
};
waitingPlayer.prepareCompleted += source =>
{
    source.StepForward();
    source.StepForward();
    source.Pause();
};
// Experimentation found that two calls to StepForward() are necessary.

Why It Doesn’t Work

It works on Windows, but testing it on the WebGL build—my primary build target—throws an exception telling me VideoPlayer.StepForward() is not supported on WebGL.

I tried the equivalent of calling StepForward() by setting the current time of the Video Player to a value equal to 2 / framerate, where the “2” stands for two frames.

Why It Doesn’t Work

It works on Windows, and it seems adjusting the time value works on WebGL, too—at least for values equal to or less than 0.5 seconds. However, on WebGL, the black blink persists despite the time-skip.

I tried the same approach as in #2, but by directly adjusting the current frame of the Video Player when preparing the segment for the waiting player.

Why It Doesn’t Work

For the same exact reason as in #2. 😫

Why does the Video Player start off with black frames on WebGL no matter what, and how can I avoid that?