![]() ![]() You need to host your casts on a local or external HTTP server. TL DR: you can't load local cast files within local HTML files because of CORS. But then you're just risking yourself and that's also just a cheap hack. Try whichever one you're comfortable with.Īnother "solution" is to disable CORS in your browser. If you're familiar with Python then simplehttpserver would also do. If you're familiar with Node/JavaScript, then http-server would do. If you're familiar with Python then simplehttpserver would also do. which HTTP server you choose is on you, there are many many really simple servers made in every programming language possible. The solution would be to use an HTTP server to host your cast files, so you could reference them directly by their full server path, like Or you could just use an external URL for a cast file, providing the external website has no CORS enabled. You could fix that by removing the starting / from every src/ href and the player would load, but then you'd run into problems with CORS when the script tries to load your cast file. If you open your browser console, you'll see that it gives an error trying to find the files in all your src/ href tags. The command would look something like asciinema rec -c './mydemoscript.sh' myrecording. Latest asciinema release can be easily installed with pipx or pip.The main problem is that you're trying to run a script that uses XMLHttpRequest as a local HTML file in your browser. Specifically, Ill be using asciinema for the recording with the -c flag (see here ), and demo-magic.sh for the automated typing, since it supports waiting for commands to finish executing (or not) and custom wait times on top of that. ![]() The HTML snippet below assumes theyre in the web servers root directory. ![]() cast file of your recording to your sites assets. First, add, asciinema-player.css and the. ![]() You only need and asciinema-player.css files. For example, the gif can be uploaded to websites such as Medium which donât support embedding script tag. Download latest version of the player bundle from releases page.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |