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

Add video player options via query string. #2145

Merged
merged 3 commits into from
Aug 7, 2023

Conversation

DanTheMan827
Copy link
Contributor

This adds support for specifying controls, autoplay, muted, and playsinline via query strings.

Example:

?controls=0&muted=0

The default values remain unchanged, but this allows the user to specify them.

@codecov
Copy link

codecov bot commented Aug 3, 2023

Codecov Report

Merging #2145 (20db9e8) into main (a3e5dff) will increase coverage by 0.96%.
The diff coverage is n/a.

❗ Current head 20db9e8 differs from pull request most recent head ad58136. Consider uploading reports for the commit ad58136 to get more accurate results

@@            Coverage Diff             @@
##             main    #2145      +/-   ##
==========================================
+ Coverage   60.87%   61.83%   +0.96%     
==========================================
  Files         117      108       -9     
  Lines       12768    12416     -352     
==========================================
- Hits         7772     7678      -94     
+ Misses       4425     4201     -224     
+ Partials      571      537      -34     

see 43 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@aler9
Copy link
Member

aler9 commented Aug 3, 2023

Hello, this is another good idea that improves the flexibility of web clients without touching the configuration or adding complexity to the UI. I need to check this for XSS and the i'll merge it.

@DanTheMan827
Copy link
Contributor Author

@aler9 I've also noticed that on occasion, the WebRTC player will freeze, and need to be paused and resumed to get it back to normal.

adding this code somewhere should fix it, but I don't know how you'd want to handle it.

setInterval(() => {
    if (video.paused) {
        console.log("Video paused, resuming.");
        video.pause();
        video.play();
    }
}, restartPause);

@aler9
Copy link
Member

aler9 commented Aug 7, 2023

Tested and merged, thanks!

@aler9 aler9 merged commit 36e6089 into bluenviron:main Aug 7, 2023
5 of 6 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Feb 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants