English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Manual de referência HTML

大全 de etiquetas HTML

HTML audio/vídeo

Quando adicionamos esses tags de áudio e vídeo à página, percebemos que não há arquivos de áudio na página e os arquivos de vídeo também não podem ser reproduzidos. Por que isso acontece? Isso acontece porque nos falta alguns elementos de mídia. Abaixo está uma lista de alguns elementos de mídia

HTML audio/Manual de referência do DOM de vídeo

HTML5 O DOM fornece métodos, propriedades e eventos para elementos <audio> e <video>.

esses métodos, propriedades e eventos permitem que você use JavaScript para manipular elementos <audio> e <video>.

HTML audio/métodos de vídeo

métodoDescription
addTextTrack()Para o áudio/Adicionar uma nova faixa de texto ao vídeo.
canPlayType()Detectar se o navegador pode reproduzir o áudio especificado/tipo de vídeo.
load()Recarregar o áudio/elemento de vídeo.
play()Iniciar a reprodução de áudio/video
pause()Pausar a reprodução de áudio atual/video

HTML audio/propriedades de vídeo

propriedadeDescription
audioTracksRetorna um objeto AudioTrackList que representa as faixas de áudio disponíveis.
autoplaySet or return whether to play the audio immediately after loading is complete/video
bufferedReturns the audio/TimeRanges object representing the buffered part of the video.
controllerReturns the audio/The MediaController object representing the current media controller of the video.
controlsSet or return the audio/Whether the video controls are displayed (such as play/(such as pause, etc.).
crossOriginSet or return the audio/The CORS settings of the video.
currentSrcReturns the current audio/The URL of the video.
currentTimeSet or return the audio/The current playback position in the video (in seconds).
defaultMutedSet or return the audio/Whether the video is muted by default.
defaultPlaybackRateSet or return the audio/The default playback speed of the video.
durationReturns the current audio/The length of the video (in seconds).
endedReturns the audio/Whether the video playback has ended.
errorReturns the audio/The MediaError object representing the video error state.
loopSet or return the audio/Whether the video should be replayed at the end.
mediaGroupSet or return the audio/The group to which the video belongs (used to connect multiple audio/The video element).
mutedSet or return the audio/Whether the video is muted.
networkStateReturns the audio/The current network state of the video.
pausedSet or return the audio/Whether the video is paused.
playbackRateSet or return the audio/The playback speed of the video.
playedReturns the audio/TimeRanges object representing the part of the video that has been played.
preloadSet or return the audio/Whether the video should be loaded after the page is loaded.
readyStateReturns the audio/The current ready state of the video.
seekableReturns the audio/TimeRanges object representing the addressable parts of the video.
seekingReturns whether the user is on the audio/Search within the video.
srcSet or return the audio/The current source of the video element.
startDateReturns the Date object representing the current time offset.
textTracksReturns the TextTrackList object representing the available text tracks.
videoTracksReturns the VideoTrackList object representing the available video tracks.
volumeSet or return the audio/The volume of the video.

HTML audio/Video event

EventDescription
abortQuando o áudio/Triggered when the loading of the video is aborted.
canplayTriggered when the browser can start playing audio./do vídeo é acionado.
canplaythroughTriggered when the browser can play without stopping due to buffering.
durationchangeQuando o áudio/Triggered when the duration of the video has changed.
emptiedTriggered when the current playlist is empty.
endedWhen the current playlist ends.
error/Quando no áudio
É acionado quando ocorre um erro durante o carregamento do vídeo.Quando o navegador já carregou o áudio/É acionado quando o frame atual do vídeo é carregado.
loadedmetadataQuando o navegador já carregou o áudio/É acionado quando os metadados do vídeo são carregados.
loadstartÉ acionado quando o navegador começa a procurar o áudio/do vídeo é acionado.
pauseQuando o áudio/É acionado quando o vídeo é pausado.
playQuando o áudio/É acionado quando o vídeo começa ou deixa de pausar.
playingQuando o áudio/É acionado quando o vídeo está pronto após ter sido pausado ou parado por carregamento.
progressÉ acionado quando o navegador está baixando o áudio/do vídeo é acionado.
ratechangeQuando o áudio/É acionado quando a velocidade de reprodução do vídeo é alterada.
seekedÉ acionado quando o usuário já se moveu/Saltar para o áudio/É acionado quando uma nova posição no vídeo é alcançada.
seekingÉ acionado quando o usuário começa a mover/Saltar para o áudio/É acionado quando uma nova posição no vídeo é alcançada.
stalledÉ acionado quando o navegador tenta obter dados de mídia, mas os dados não estão disponíveis.
suspendÉ acionado quando o navegador deliberadamente não obtém dados de mídia.
timeupdateÉ acionado quando a posição de reprodução atual é alterada.
volumechangeÉ acionado quando o volume é alterado.
waitingÉ acionado quando o vídeo pára devido à necessidade de carregar o próximo frame.