Skip to content

Commit

Permalink
Properly fix absolute path in inline video player
Browse files Browse the repository at this point in the history
  • Loading branch information
OKaluza committed Nov 18, 2024
1 parent c00e703 commit 3ced473
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lavavu/lavavu.py
Original file line number Diff line number Diff line change
Expand Up @@ -5272,7 +5272,8 @@ def get_fn(filename):
uid = uuid.uuid1()

#Embed player
display(Video(url=os.path.relpath(filename), html_attributes=f"id='{vid}' " + params, **kwargs))
filename = os.path.relpath(filename)
display(Video(url=filename, html_attributes=f"id='{vid}' " + params, **kwargs))

#Add download link
display(HTML(f'<a id="link_{vid}" href="{filename}" download>Download Video</a>'))
Expand Down

0 comments on commit 3ced473

Please sign in to comment.