Redisplay Poster on Video Player

Hi

URL is www.btmv.rest

I am using the new video player in Cornerstone. All seems to be working fine. However, once the video has played, the element will just go to black. What code is necessary to redisplay the poster after the video has stopped?

Thanks so much

Craig

Hello Craig,

Thanks for writing in! I have checked your site and the video is not playing.

This is because you are using the wrong video file format. Please download Handbrake (http://handbrake.fr) and convert your video in *.mp4, *.ogv and *.webm. These are the only video file extensions that is cross browser compatible. For more, please check this out:
https://developer.mozilla.org/en-US/docs/Web/HTML/Supported_media_formats

Hope this helps. Please let us know how it goes.

Hi

Thanks for your feedback. I have adjusted the video to .mp4.

It would be a big help if you could please check again and let me know what code I need to insert (and where to place it) such that the poster is redisplayed after the video has played.

Thanks again

Craig

Hi there,

I don’t think it’s possible with current Wordpress MediaElementJS library (the video player). But maybe you can just disable the rewind of option so it will stop on the first frame of the video. Please add this to your global custom javascript.

jQuery('video').bind('ended', function () { 
    this.currentTime = 0;
} );

But since your first frame is black space, then when the video ends it will display black frame. Please change the value of currentTime to the frame you wish to display when it ends.

Please note that this is just a snippet which you can enhance or change, but we can’t provide further customization with that code.

Thanks!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.