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

Embedded content flickering and autoplay #685

Open
holdit opened this issue Dec 19, 2021 · 8 comments
Open

Embedded content flickering and autoplay #685

holdit opened this issue Dec 19, 2021 · 8 comments
Labels

Comments

@holdit
Copy link

holdit commented Dec 19, 2021

I've been testing Piped with extensions like Privacy Redirect and Piped Redirects. Overall it works well enough for my needs and instances are more stable than Invidious ones (good job and thanks to everyone involved with development!).

I'm having two issues with embedded content though. Sometimes videos start playing automatically. It's a bit random... videos might start playing the first time I open the page and not autoplay if I reload the page. Sometimes it never autoplays. Sometimes it always autoplays. I've tried disabling autoplay on Piped's website, but it doesn't fix this problem.

The second problem is this "flickering":

iframe.mp4

This is happening on both Chromium-based browsers I use (Brave and Ungoogled Chromium) on MacOS. I haven't tested on Firefox as sadly it doesn't seem to be very optimised for this platform.

Neither problem happens when using Invidious or YouTube's website.

@FireMasterK
Copy link
Member

Can you provide an example website where it flickers?

@FireMasterK FireMasterK added the P1 label Dec 20, 2021
@holdit
Copy link
Author

holdit commented Dec 20, 2021

It happens on many sites. For example, scroll down until the video on this page:

https://arstechnica.com/science/2021/12/mary-queen-of-scots-sealed-her-final-missive-with-an-intricate-spiral-letterlock/

It's already flickering when I reach it. It stops if I start the video and move the mouse away. It starts again if the mouse is on top of the iframe or if playing stops.

arstechnica.mp4

I also had it happening on old.reddit.com, although for some reason this time it wasn't flickering. There's a margin on the right/bottom side of the video though:

reddit.mp4

@holdit
Copy link
Author

holdit commented Dec 20, 2021

While looking at the examples I posted above, I noticed that the problem seems to be caused by the custom scroll bar you're using. The "margins" on the reddit example? They're actually scrolling bars.

Disabling the CSS rules for the scrolling bars fixes the flickering problem:

scrollbar.mp4

These are the CSS I've disabled:

Screenshot 2021-12-20 at 11 10 40

I don't know if this happens on other operating systems as macOS seems to handle scrolling bars a bit differently than, say, Windows.

Sometimes I can still scroll inside the iframe, so it seems that something isn't adjusting to the available space.

On a sidenote, pages for embedded content could be optimised. Take this page as an example: https://piped.kavin.rocks/embed/U3lGlmRPMKw

333 requests and 2.3 MB transferred (the video starts preloading). That's a lot for something that may or may not be played. Preloading especially... not sure if it's should be done as bandwidth will always be a problem for instances and some of these preloads are wasted.

For the same video, the YouTube embedded page makes 25 requests and transfers 816 kB (no video preloading) with an adblocker ON. And their player is heavier than the one used by Piped.

Maybe a lot of this could be loaded after the user clicks to play?

@holdit
Copy link
Author

holdit commented Dec 21, 2021

Some (all?) vertical videos also don't adapt to the available vertical space.

Eg, YT video on this page: https://petapixel.com/2020/05/15/the-oneplus-8-pros-infrared-camera-can-see-through-plastic-and-more/

YouTube:
Screenshot 2021-12-21 at 22 54 41

Piped (before playing):
Screenshot 2021-12-21 at 22 55 00

Piped (playing):

vertical.mp4

@fmartingr
Copy link

In my case, videos autoplay in both the site and embeds no matter the preference I set on my account. (It happens for me at piped.kavin.rocks).

@ghost
Copy link

ghost commented Feb 19, 2022

In my case, videos autoplay in both the site and embeds no matter the preference I set on my account. (It happens for me at piped.kavin.rocks).

You should allow cross-site cookies for Piped. So, it applies settings from ther.

@fmartingr
Copy link

You should allow cross-site cookies for Piped. So, it applies settings from ther.

Oh, that may be for embeds! But even if that's the case, the autoplay setting should work on the site, right?

@ghost
Copy link

ghost commented Feb 20, 2022

Oh, that may be for embeds! But even if that's the case, the autoplay setting should work on the site, right?

Piped disabled autoplay on embeds. See here : #576

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

No branches or pull requests

3 participants