Home > front end >  How to use js to control in the h5 video playback automatically
How to use js to control in the h5 video playback automatically

Time:12-07

Hope to realize automatic switch section, play the selected video

CodePudding user response:

Add the autoplay attribute to video video tags: & lt; Video the autoplay controls> Or & lt; Video the autoplay="the autoplay controls"="controls" & gt;

CodePudding user response:

Js dynamic setting of video attributes to use?

CodePudding user response:

refer to the second floor qq_16945933 response:
use js dynamically set properties for video?



Directly on the video element and attribute

CodePudding user response:

Enter the page doesn't automatically play for the first time, click the automatic playback, and switching different chapters need automatic playback, are on the page, not refresh the page to switch,

CodePudding user response:

Browser block automatically broadcast, the default browser intercept in the open web audio/video will be see as advertisement interception, must have a manual trigger the focus of the page to automatically play, such as clicking on a web page,

CodePudding user response:


Video element added muted the autoplay two attributes can be achieved automatically, muted is mute properties, it automatically broadcast voice is no sound,
https://www.jianshu.com/p/caf9f159cf87 can see the first article

CodePudding user response:

Automatically broadcast is not supported in mobile terminal, the autoplay is invalid,
  • Related