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

Video Poster not showing after upgrade to 3.5.10 #1763

Closed
mksasi opened this issue Apr 6, 2020 · 5 comments
Closed

Video Poster not showing after upgrade to 3.5.10 #1763

mksasi opened this issue Apr 6, 2020 · 5 comments

Comments

@mksasi
Copy link

mksasi commented Apr 6, 2020

The poster image on the player is not getting displayed after we upgraded the player to 3.5.10. Its working fine when we downgrade to 3.5.6. On the updated version, we just see black (blank) screen and not the poster image.

@Hotcooler
Copy link

Hotcooler commented Apr 6, 2020

Same here, some context updating from 3.5.6 bundled with wplyr wordpress addon (with some other libs also updated there).
It seems like poster div does not generate.
in 3.5.6 this is present inside plyr__video-wrapper
<div class="plyr__poster" style="background-image: url("URL-to-pic.jpg");"></div>
in 3.5.10 it is missing.

@sampotts
Copy link
Owner

sampotts commented Apr 6, 2020

As a result of this issue I reverted back to using the HTML5 poster image as-is rather than using a custom container for it. This prevented the multiple downloads (even though it should be cached, so shouldn't be an issue really). However, it has the downside of meaning that the poster image only shows on initial load. If the currentTime is changed or the video has been played, the poster image will no longer show. I'm not sure if a clean solution that retains progressive enhancement and prevents the multiple downloads. Of course, open to PRs as always 👍

@mksasi
Copy link
Author

mksasi commented Apr 7, 2020

Thanks @sampotts I would suggest that we can live with download of poster twice (as you said it would be rendered from cache locally) but not displaying of poster image would be a considerable issue. Currently in our scenario, the video is not played but its meta-data is getting loaded so that the poster image is lost immediately after loading. Another fix could be to show poster image unless the video is played irrespective of its meta-data preload.

@sampotts
Copy link
Owner

sampotts commented Apr 7, 2020

The poster does display though. You can see it on https://plyr.io. Other than using the custom element, we have no control over when the poster image shows. It's behavior controlled by the browsers; which is basically hide it as soon as currentTime is past 0 or the video has been played. It's a bit naff but that's it.

@mksasi
Copy link
Author

mksasi commented Apr 7, 2020

Thanks @sampotts The poster issue is bothering when we attach HLS stream to the player and from the example that you have provided at https://codepen.io/pen?template=oyLKQb, this does not show the poster. When I change the plyr version to 3.5.8 it works. Would appreciate your help on this.

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

No branches or pull requests

3 participants