How to use video and audio labels and progress bars in H5

How to use video and audio labels and progress bars in H5? This issue may be often seen in our daily study or work. I hope that you can give you a deep harvest through this issue. Below is the reference content brought by Xiaobian, let’s take a look!

Recent projects use HTML5 VIDEO and AUDIO tags to play video and audio files online, but encounter a wonderful problem, the progress bar is invalid after playing on the page,

After the W3C is found The HTML code is not different, then guess if you use the video tab with a static HTML to play the local file schedule will not be used?

I tried it’s really that I can use, and then F12 look at the difference between the network response in the local video and play items. It is found that there is more than one thing in the response, and these things are added to the background code. In the last success!

Response.setHeader (“Cache-Control”, “MAX-AGE = 31536000, Must-Revalidate”); Response.setHeader (“Content-Length” File.Length () + “” “; if (filename.contains)) {response.setContentType (” VIDEO / MPEG4 “);} if (filename.contains (“. mp3 “)) {response .SETCONTENTTYPE (“Audio / MPEG”); Response.setHeader (“Accept-Ranges:”, “Bytes”);}
   Thank you! After reading the above, do you know how to use the video with the audio label and progress bar in H5? I hope that the content of the article will help everyone. If you want to know more about the article content, please pay attention to Tumi Yun Industry News Channel. 
© Copyright Notice
THE END
Just support it if you like
like0
share
comment Grab the couch

Please log in to comment