Open TheBozzz34 opened 1 year ago
Bug Attempting to use the asciinema player in both Chrome and Firefox results in a properties of null error, or a type error.
To Reproduce
Expected behavior Player plays recording when play button is clicked
Screenshots Chrome: Firefox:
Versions:
Additional context I have added CSP headers to both my html and NGINX config
The html:
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Security-Policy" content="default-src 'self' http: https: ws: wss: data: blob: 'unsafe-inline' 'unsafe-eval' 'wasm-unsafe-eval'"> <link rel="stylesheet" type="text/css" href="asciinema-player.css" /> </head> <body> <div id="player"></div> <script src="asciinema-player.min.js"></script> <script> AsciinemaPlayer.create( 'neofetch.cast', document.getElementById('player'), { cols: 203, rows: 62 } ); </script> </body> </html>
NGINX header:
add_header Content-Security-Policy "script-src 'self' 'unsafe-inline' 'wasm-unsafe-eval';";
I guess Windows CSP is blocking the embedded WASM instantiation. I don't have Windows system at hand so can't test this unfortunately.
Bug Attempting to use the asciinema player in both Chrome and Firefox results in a properties of null error, or a type error.
To Reproduce
Expected behavior Player plays recording when play button is clicked
Screenshots Chrome: Firefox:
Versions:
Additional context I have added CSP headers to both my html and NGINX config
The html:
NGINX header:
add_header Content-Security-Policy "script-src 'self' 'unsafe-inline' 'wasm-unsafe-eval';";