Videoplayer.js: Show poster frame until video is played

  • It would be fantastic to display the posterframe for a video that is not set up to autoplay. This could be used to intuitively indicate to a user that the hotspot is clickable/playable.

  • Isn't that exactly how posterurl works?


    Hi Piotr,

    I don't think so. From the docs: "This is the url to an image (typical a screenshot of the first video frame) that should be shown until the video is loaded and ready to play."

    I want the poster image to remain displayed until the user clicks the video to play. Currently, the poster image disappears as soon as the video is ready to play as described in the docs.In the case where the browser cannot autostart the video, the poster image is removed as soon as the video is loaded and either a) a black box is displayed or b) nothing is displayed.

    Thus, I'm suggesting it would be nice if the poster image remains UNTIL the user clicks the video to play it.

  • Do you mean something like a jpg overlay over a video-layer?

    Maybe something like this?

  • Hi,

    normally the poster should be displayed until the browser serves the first video frame - but unfortunately the browsers are not always reporting their video state correctly. Sometimes there is indeed a black-frame for a short time (I think mostly on iOS and also depending on the video itself).

    Just displaying the poster until clicked is unfortunately not enough, that could still cause black frames for a short time when the video starts to play.
    But improving the current behavior is already on my list. One idea is to render the video into a small buffer and analyze its actual pixels and check if they are all empty or black... (although this can be problematic when video actually starts with a black image ;-))

    Best regards,

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!