How to streaming mp4 artifact on Jenkins build page
For an MP4 file located in our build artifacts I was able to enable the video by adding media-src 'self';
in addition to the default CSP options.
Testing the change
System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "sandbox; default-src 'none'; img-src 'self'; style-src 'self'; media-src 'self';")
To apply the change at startup
java -Dhudson.model.DirectoryBrowserSupport.CSP="sandbox; default-src 'none'; img-src 'self'; style-src 'self'; media-src 'self';" -jar jenkins.war
For more information about the Jenkins Content Security Policy, see the Jenkins Docs.
I solved this problem by removing security option.For example,
System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "default-src 'self'; style-src 'self' 'unsafe-inline';")
You can refer to Jenkins Content Security Policy