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

Fix html5 playback #31

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Fix html5 playback #31

wants to merge 1 commit into from

Conversation

halfwit
Copy link
Member

@halfwit halfwit commented Sep 20, 2024

Don't use a leading path for http inputs

Comment on lines +53 to +54
if(preg_match("/^https?/", $input))
return "<video $attributes><source src='{$input}'></video>";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like this solution as it could result in video files being embedded from remote hosts. I think if a URL is detected you should use parse_url to extract the path

Copy link

@mozai mozai Nov 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Video files from remote hosts" is a feature not a bug; we want to use CDNs to host the video files, not just serve the video files from the sync instance ie. clients start their session with theatre.wetfish.net, but video files are served from a geolocated loadbalancing cache cdn.wetfish.net .
But there should be a better way than writing an if-exception-then. (new URL($input, $session_baseurl)).href ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mozai this is for the wiki. This has nothing to do with the sync project

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

Successfully merging this pull request may close these issues.

3 participants