search

Home  >  Q&A  >  body text

javascript - There is a problem when JS sets the currentTime of the Video object. IE, Edge, and Firefox can all set it, but chrom...

As shown in the picture, I set up an event that jumps to the video playback position as long as it is clicked. It can jump perfectly in other browsers, but it is different in the Chrom browser. Every time the event is triggered, it does not care about the current video. When it reaches that position, it jumps directly to the first frame of the video and plays it again. Why is this?

为情所困为情所困2779 days ago547

reply all(2)I'll reply

  • 滿天的星座

    滿天的星座2017-05-16 13:38:27

    Write it in canplaythrought to ensure that the video resources have been loaded

    reply
    0
  • 漂亮男人

    漂亮男人2017-05-16 13:38:27

    If you are using webstorm for debugging, it is recommended that you do not open it directly in webstorm. I have encountered the same situation before, and later found that it is normal to open it directly as a file, but problems will occur when using webstorm.

    reply
    0
  • Cancelreply