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

The poster file gets downloaded several times #1531

Closed
tobireif opened this issue Aug 12, 2019 · 13 comments
Closed

The poster file gets downloaded several times #1531

tobireif opened this issue Aug 12, 2019 · 13 comments

Comments

@tobireif
Copy link

The poster file gets downloaded three times.

Here's a screenshot (Chrome):

screenshot

I had found the ticket #1355 "Poster is loaded twice", but in this case here it gets downloaded three times.

The page is password-protected, but I can answer any questions regarding my Plyr setup.

Here's the code:

HTML:

<video playsinline="playsinline" muted="muted"
  poster="images/video_cover.png">
  <source src="the_video.mp4" type="video/mp4"/>
</video>

JS:

function initPlayer() {
  var player = new Plyr("video", {
    iconUrl: "../../vendor/plyr/plyr.svg",
    controls: ["play-large", "play", "progress", "current-time"],
    blankVideo: "../../vendor/plyr/blank.mp4",
    fullscreen: {enabled: false},
    hideControls: false,
    storage: {enabled: false}
  });
}

window.addEventListener("load", initPlayer);

It would be great if the poster file would get downloaded only once, max twice, but not three times and one after the other (see the screenshot).

@tobireif
Copy link
Author

Perhaps Plyr could detect whether it already got loaded, and in that case not download it again?

@tobireif
Copy link
Author

It would be great if the poster file would get downloaded only once.

@danDanV1
Copy link

danDanV1 commented Sep 27, 2019

I am seeing this three times as well. Twice from plyr and once from the dom. This is for a hosted video.

I wonder what is the benefit of the progressive enhancement to have the poster set as a DIV in addition to on the video element? Is the use-case mostly for youtube, vimeo, etc?

@tobireif
Copy link
Author

... and could there be an option for disabling anything that causes the additional downloads? (I also have a hosted video scenario.)

@tobireif
Copy link
Author

It would be great if this could get fixed.

@sampotts
Copy link
Owner

sampotts commented Feb 9, 2020

This should be fixed in v3.5.7 but report back if not 👍

@sampotts sampotts closed this as completed Feb 9, 2020
@tobireif tobireif changed the title The poster file gets downloaded three times The poster file gets downloaded several times Feb 10, 2020
@tobireif
Copy link
Author

I tried v3.5.7, but there were two issues:

The poster file gets downloaded two times. That's better than three times (thanks!), but one time would be better. Please re-open this ticket - it should stay open until the poster file gets downloaded only once.

The other issue: The player at https://tobireif.com/posts/layout_fun_with_css_grid/ gets destroyed.

Before:

screenshot_before

With v3.5.7:

screenshot_after

It would be really great if you could ensure that updates don't break things 😀

The release notes contain this text: "This update contains CSS changes." I'd rather be able to update Plyr without having to dig through all the CSS changes and adapt my CSS.

Also reported at #1680 .

@sampotts
Copy link
Owner

It gets loaded once for me on https://plyr.io/ - anyone else seeing issues? If they are then I'll re-open the issue. Feel free to dig into the code to take a look.

image

@tobireif
Copy link
Author

Chrome screenshot of https://tobireif.com/posts/layout_fun_with_css_grid/ :

screenshot

Chrome screenshot of https://plyr.io/ :

screenshot_2

@tobireif
Copy link
Author

Firefox downloads it just once. I'll report the Chrome issue.

@sampotts
Copy link
Owner

It may be something else. I’ll check Chrome.

@sampotts sampotts reopened this Feb 10, 2020
@tobireif
Copy link
Author

If you find anything (eg a Plyr fix for the issue observed in Chrome), please also post the info at https://bugs.chromium.org/p/chromium/issues/detail?id=1050569 , so that they can close their ticket if it is/was a Plyr-issue and not a Chrome-issue.

@tobireif
Copy link
Author

At https://bugs.chromium.org/p/chromium/issues/detail?id=1050569 they requested a network log capture ( https://www.chromium.org/for-testers/providing-network-details ), and then wrote "That log only shows it being downloaded once".

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