HTML5 audio and video processing and HTML5 audio and video processing
* Audio/Video Processing
* Video Processing
* Basic Content
* Use Flash technology to process video content in HTML pages
* Audio, animation, and web games
* Features
* Native browser is not supported (ActiveX components must be installed in IE)
* Poor performance (cannot be used too much)
* Smart mobile terminals do not support Flash technology
* Fate
* Adobe, the parent company of Flash, publicly announced its waiver
* Currently the best choice for replacing Flash technology-HTML5
* Almost all browsers support <video> elements in native mode.
* Higher performance
* Excellent support for smart mobile terminals
* How to Implement Video Processing
* <Video> element
* If the current browser does not support <video> Elements
* Write the prompt content in the <video> element.
* Attributes
* Src-introduce the video file path
* Autoplay-Automatic Video Playback
* Use the <source> element
<Video>
<Source src = "A Video Format"/>
<Source src = "A Video Format"/>
<Source src = "A Video Format"/>
</Video>
* <Video> supported video formats
* MP4 format-currently popular
* OGG format-mostly used for mobile terminals
* WebM format-currently only supports ultra-HD format
* HTML pages support ultra-HD format (HTML5)
* Launched by Google
* Attributes of <video> Elements
* Src-introduce the video file path
* Autoplay-Automatic Video Playback
* Controls-Control Panel provided
* Loop-Indicates loop playback.
* Poster-set the image displayed before playback
* Width and height-set the width and height of the video to be displayed.
* Preload-preload
* Auto-(default) auto load
* None-do not load
* Metadata-only load basic video information (excluding video)
* Advanced content
* Method
* Play ()-play a video
* Pause ()-pause a video
* Load ()-load the video
* CanPlayType ()-determines whether the current browser supports the specified video format
* Events
* Play-triggered when the video is played
* Pause-triggered when the video is paused
* Ended-triggered when the video ends
* Error-triggered when a video error occurs
* Canplay-if you can play the video, you can play the video without considering the overall situation.
* Canplaythrough-you can play a video as long as the video can be played.
* Progress-indicates the video loading progress
* Attribute-used for determining
* Paused-Indicates whether to pause the current video.
* A Boolean value is returned. "true" indicates that the video is paused. "false" indicates that the video is played.
* Ended-indicates whether the current video has been played.
* Return a Boolean value. true indicates completion.
* Duration-indicates the duration of the current video.
* CurrentTime-indicates the position of the current video.
* Audio processing
* <Audio> element
* First-only one audio format is supported
<Audio src = "audio file path"> </audio>
* Method 2-multiple audio formats are introduced simultaneously
<Audio>
<Source src = "audio format"/>
<Source src = "audio format"/>
<Source src = "audio format"/>
</Audio>
* The <audio> element supports the audio format.
* MP3-currently the most popular
* OGG
* WAV