Search code examples
electronhtml5-videochromium

Only certain video files in <video> tag are played on a white screen


Only certain video files in tag are played on a white screen. Other files with the same extension work well. It plays when you convert the file to another extension. (ex. mov -> mp4)

enter image description here

<video controls autoPlay width="100%" height="100%">
 <source src={videoUrl} />
</video>

I think it has something to do with the HEVC codec.

my electron version 18.0.4

  1. Add meta to html

http-equiv="Content-Security-Policy" content="media-src *;">

  1. The video url works well if you do it on Chrome.

Solution

  • I share my solution.

    Just a chromium version problem.

    update v100 -> v110