bits
This commit is contained in:
parent
8493a4eb3c
commit
48b98f8cfb
60 changed files with 2719 additions and 0 deletions
62
audio.html
Normal file
62
audio.html
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset=utf-8>
|
||||
<title>HLS WebM test with codec</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>HLS WebM test with codec</h1>
|
||||
|
||||
<p>AAC in MP4</p>
|
||||
<video id=hls1 controls width=640 height=360>
|
||||
<source type=application/vnd.apple.mpegurl src=av-aac-mp4.m3u8>
|
||||
</video>
|
||||
<p id=err1></p>
|
||||
|
||||
<p>ALAC in MP4</p>
|
||||
<video id=hls2 controls width=640 height=360>
|
||||
<source type=application/vnd.apple.mpegurl src=av-alac-mp4.m3u8>
|
||||
</video>
|
||||
<p id=err2></p>
|
||||
|
||||
<p>FLAC in MP4</p>
|
||||
<video id=hls3 controls width=640 height=360>
|
||||
<source type=application/vnd.apple.mpegurl src=av-flac-mp4.m3u8>
|
||||
</video>
|
||||
<p id=err3></p>
|
||||
|
||||
<p>MP3 stream</p>
|
||||
<video id=hls4 controls width=640 height=360>
|
||||
<source type=application/vnd.apple.mpegurl src=av-mp3-mp4.m3u8>
|
||||
</video>
|
||||
<p id=err4></p>
|
||||
|
||||
<p>Opus in MP4</p>
|
||||
<video id=hls5 controls width=640 height=360>
|
||||
<source type=application/vnd.apple.mpegurl src=av-opus-mp4.m3u8>
|
||||
</video>
|
||||
<p id=err5></p>
|
||||
|
||||
<script>
|
||||
let codes = {
|
||||
[MediaError.MEDIA_ERR_ABORTED]: 'MEDIA_ERR_ABORTED',
|
||||
[MediaError.MEDIA_ERR_NETWORK]: 'MEDIA_ERR_NETWORK',
|
||||
[MediaError.MEDIA_ERR_DECODE]: 'MEDIA_ERR_DECODE',
|
||||
[MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED]: 'MEDIA_ERR_SRC_NOT_SUPPORTED',
|
||||
};
|
||||
function errify(hls, err) {
|
||||
hls.addEventListener('error', function() {
|
||||
let {code, message} = this.error;
|
||||
let codeName = codes[code];
|
||||
err.textContent = `${code} ${codeName}: ${message}`;
|
||||
});
|
||||
}
|
||||
errify(hls1, err1);
|
||||
errify(hls2, err2);
|
||||
errify(hls3, err3);
|
||||
errify(hls4, err4);
|
||||
errify(hls5, err5);
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue