I experienced a flickering white box appearing between the 'poster' image and the initial frame of my 'video'. It seems like you might be facing the same issue with the white flash.
To resolve this problem, I found two solutions:
- Add [#t=0.1] after your video source in this manner:
<video id="myVideo" playsinline loop muted onended="resetVideo()">
<source src="xxxx.mp4#t=0.1" type="video/mp4">
Your browser does not support the video tag.
</video>
Here, 0.1 represents the time in seconds (one-tenth of a second). This action sets the first frame of the video as the placeholder/thumbnail.
- Try using a background-image property. Although changing the background-color may not have worked for you, utilizing a background-image could potentially solve the issue. The effectiveness of this method depends on your specific circumstances. You can implement the background-image property with a URL like this:
background-image: url("first-frame-image.jpg");
Afterward, adjust other background properties to ensure that the background aligns correctly over the video. In my case, I set the following background properties:
background-repeat: no-repeat;
background-size: cover;
background-position: center;
I hope these solutions prove helpful to you!