Home  >  Q&A  >  body text

HTML5中<video>如何用按钮控制切换前后视频文件?

html5中<video>标签中有多个视频资源,如何用<button>控制切换当前视频的前一个或后一个文件。

PHPzPHPz2741 days ago820

reply all(2)I'll reply

  • PHP中文网

    PHP中文网2017-04-17 11:56:07

    There are many methods, such as declaring an array as the video source of the list you want to play, then setting the source on the button, and then playing

    reply
    0
  • 迷茫

    迷茫2017-04-17 11:56:07

    Let multiple video tags be displayed in a row. Only the width of one video will be displayed, and the excess part will be hidden. . Click the current button to let the current video play and the previous video pause

    reply
    0
  • Cancelreply