Home>Article>Web Front-end> Detailed explanation of new multimedia tags in HTML5

Detailed explanation of new multimedia tags in HTML5

藏色散人
藏色散人 forward
2022-08-05 16:10:50 3077browse

This article will introduce to you the commonly used multimedia tags in HTML and the new multimedia tags in HTML5. I hope it will be helpful to friends in need!

New multimedia tags in HTML5

1: Video39000f942b2545a5315c57fa3276f220

Currently the 39000f942b2545a5315c57fa3276f220 element supports three video formats: try to use MP4 format

Browser MP4 WebM Ogg
IE YES NO NO
Chrome YES YES YES
Firefox YES Starting from Firefox21 version Linux system starting from Firefox 30 YES YES
Safari YES NO NO
Opera YES Starting from Opera25 version YES YES

Video39000f942b2545a5315c57fa3276f220——Common attributes

##autoplay autoplay The video is ready to play automatically (Google browser needs to add muted to solve the autoplay problem) controls controls Show playback controls to the user ##width height loop src poster muted ##2: Audio
Attribute value Description
pixels(pixels) Set player width
pixels(pixels) Play Device height
loop loop
url Video url address
imageurl Load the waiting picture
muted Mute playback
b97864c2e0ef2353a16c4d64c7734e92

Browser MP3 Wav Ogg IE 9 YES NO NO Chrome 6 YES YES YES Firefox 3.6 YES YES YES Safari 5 YES YES NO YES Google Chrome disables automatic playback of audio and video
##Opera 10
YES YES
    HTML5音频标签

Properties Value ##autoplay autoplay Autoplay controls controls Show playback controls to user loop loop Loop play src url Video url address muted muted MUTE PLAY Multimedia tag summary
Description

The audio tag and video tag are basically used in the same wayBrowser support is different

    Google Chrome disables the automatic playback of audio and video
  • We can add the muted attribute to the video tag to mute the video, but the audio cannot (can be solved through JavaScript)
  • The video tag is the key point. We often set up automatic playback, and control control and looping are not applicable. And set the size attribute
  • [Related recommendations:
  • css video tutorial
  • ]

The above is the detailed content of Detailed explanation of new multimedia tags in HTML5. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:jianshu.com. If there is any infringement, please contact admin@php.cn delete