Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Self hosted, wrong (fixed) player JS location #26

Open
alperyazar opened this issue Jan 27, 2024 · 7 comments
Open

Self hosted, wrong (fixed) player JS location #26

alperyazar opened this issue Jan 27, 2024 · 7 comments

Comments

@alperyazar
Copy link

Hi,

load = """<script src="../_static/asciinema-player_3.6.3.js"></script>"""

I think, this commit assumes that the position of the page with asciinema directive is fixed to _static directory. This assumption makes many pages broken.

It looks like the previous version is fine:

.css file is included correctly thanks to:

def copy_asset_files(app, exc):

Thanks!

@mike-matera
Copy link
Contributor

I can confirm that 0.4.0 does not display local cast files. Reverting to 0.3.8 fixed the problem.

@divi255
Copy link
Owner

divi255 commented Feb 25, 2024

will look into this. please stay on 0.3 until fixed

@divi255
Copy link
Owner

divi255 commented Mar 8, 2024

fixed both local and remote. sorry guys, was too busy to check the player upgrade commit. it broke completely everything.

0.4.1 works well

@divi255 divi255 closed this as completed Mar 8, 2024
@alperyazar
Copy link
Author

alperyazar commented Apr 25, 2024

@divi255 Thanks for the fix, BUT

I tested the new 0.4.1 version today but for my website the self-hosted player looks broken, no player even shows up. I don't know the exact problem and don't know to debug but reverting back to 0.3.8 solves temporarily.

I have noticed a difference between 0.3.8 and 0.4.1. Both versions embed the cast file in HTML with Base64 which may not be the optimum solution in terms of size but it's fine for me. However, 0.4.1 embed the same Base64 string 3 times, one of just for div id. This potentially increases (unnecessarily ?) the HTML file if the recording is a long file.

0.3.8:

'src="data:application/json;base64,{src}"></asciinema-player>')

0.4.1:

template = """<div id="asciicast-{src}"></div>

@divi255
Copy link
Owner

divi255 commented May 11, 2024

thanks for reporting. can you please upload somewhere an example where the player is broken? It was tested in both self-hosted and embedded mode and I found no problems with that. Maybe I'm missing some variation.

@divi255 divi255 reopened this May 11, 2024
@divi255
Copy link
Owner

divi255 commented May 11, 2024

about div-id, agree, it should be compacted

@divi255
Copy link
Owner

divi255 commented May 11, 2024

div-id fixed in 0.4.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants