-
Bug
-
Resolution: Won't Fix
-
Major
-
None
I have a script that does web actions in a web application after opening a chrome browser. I used ScreenCap library to record the script execution. When opening the logs in the machine where the script has executed then able to view the video in log and it's getting played. However, when opening the logs in Jenkins after the execution and publishing results using RobotFramework plugin video is not playing.
Blank space is displaying in log.html after opening it in the browser.
Video template with duration zero is displaying while clicking the empty space in the log.html
If I download the results as a zip from Jenkins and open the log.html from the downloads then able to view video and it is playing
karthikeya_raja Hi, this issue is due to Jenkins' CSP settings. By default, they don't really allow anything to be shown. By setting System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "") in your instance's script console, you can disable all CSP settings and the videos will start working. However, this is highly discouraged as explained here. Instead, you should consider setting up a resource root URL, to redirect your Jenkins to display reports without having to compromise your Jenkins security.
If that doesn't work, you can try to relax your Jenkins CSP settings slightly with the help of Content Security Policy reference. I still haven't found the correct premission sets to allow videos to be displayed in Jenkins, but I believe it's based on the media-src permission values.