Object/embed/video, how do they monitor the end of video playback when they refer to the video? How to change the video cover at the end of playback

We want to display a fixed image at the end of a video playback. The referenced url is the video address stored on the server. Which one is appropriate? The video tag has events about the end of playback. How to change the video cover at the end of playback? I have tried to write a hidden image by default. When the video playback ends or pauses, the picture is displayed, but the image is always pressed under the video control, and z-index is not allowed. How to solve this problem, so that the video is paused and the screenshot at the end of the video also stays here by default?

clipboard.png

Nov.03,2021

< vedio onended= "myFunction ()" > add this attribute


HTML Audio/Video DOM ended event

< hr >

Update:

set poster , and then listen for the playback end event

video.addEventListener('ended',function(){
    video.load();     
},false);

for z-index to take effect, you must have a positioning attribute. Put video and cover images under a relative-positioned div container, video and cover images using absolute, and then z-index.

  • Font underside in span

    write the end text in a span and find that the font is offset downward relative to the space where the span is located. I only use the line-height setting to center the span relative to the parent, but the font inside is still offset downward relative t...

    Mar.21,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1c2af6f-33a24.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1c2af6f-33a24.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?