bits
This commit is contained in:
parent
34703fbb86
commit
8493a4eb3c
7 changed files with 71 additions and 16 deletions
31
opus.html
31
opus.html
|
|
@ -6,11 +6,25 @@
|
|||
</head>
|
||||
<body>
|
||||
<h1>HLS WebM test with codec</h1>
|
||||
<p>The video will try to load an HLS containing VP9-in-MP4 and fallback variants, with Opus audio:</p>
|
||||
|
||||
<p>The video will try to load an HLS containing VP9-in-MP4 and fallback variants, with Opus audio marked as mp4a.ad:</p>
|
||||
<video id=hls1 controls width=640 height=360>
|
||||
<source type=application/vnd.apple.mpegurl src=av-opus-mp4.m3u8>
|
||||
</video>
|
||||
<p id=err></p>
|
||||
|
||||
<p>The video will try to load an HLS containing VP9-in-MP4 and fallback variants, with Opus audio marked as opus:</p>
|
||||
<video id=hls2 controls width=640 height=360>
|
||||
<source type=application/vnd.apple.mpegurl src=av-opusb-mp4.m3u8>
|
||||
</video>
|
||||
<p id=err2></p>
|
||||
|
||||
<p>The video will try to load an HLS containing VP9-in-MP4 and fallback variants, with Opus audio marked as Opus:</p>
|
||||
<video id=hls3 controls width=640 height=360>
|
||||
<source type=application/vnd.apple.mpegurl src=av-opusc-mp4.m3u8>
|
||||
</video>
|
||||
<p id=err3></p>
|
||||
|
||||
<script>
|
||||
let codes = {
|
||||
[MediaError.MEDIA_ERR_ABORTED]: 'MEDIA_ERR_ABORTED',
|
||||
|
|
@ -18,11 +32,16 @@
|
|||
[MediaError.MEDIA_ERR_DECODE]: 'MEDIA_ERR_DECODE',
|
||||
[MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED]: 'MEDIA_ERR_SRC_NOT_SUPPORTED',
|
||||
};
|
||||
hls1.addEventListener('error', function() {
|
||||
let {code, message} = this.error;
|
||||
let codeName = codes[code];
|
||||
err.textContent = `${code} ${codeName}: ${message}`;
|
||||
});
|
||||
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);
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue