Add test page to check for proprietary codecs
This commit is contained in:
parent
c8951d0d4d
commit
5b4f715d2e
1 changed files with 40 additions and 0 deletions
|
@ -45,6 +45,46 @@ Chrome/Node API changes.
|
||||||
- 64-bit Linux
|
- 64-bit Linux
|
||||||
- ARM Linux
|
- ARM Linux
|
||||||
|
|
||||||
|
## Verify ffmpeg builds
|
||||||
|
|
||||||
|
Electron ships with a version of `ffmpeg` that includes proprietary codecs by
|
||||||
|
default. A version without these codecs is built and distributed with each
|
||||||
|
release as well. Each Chrome upgrade should verify that switching this version is
|
||||||
|
still supported.
|
||||||
|
|
||||||
|
You can verify Electron's support for multiple `ffmpeg` builds by loading the
|
||||||
|
following page. It should work with the default `ffmpeg` library distributed
|
||||||
|
with Electron and not work with the `ffmpeg` library built without proprietary
|
||||||
|
codecs.
|
||||||
|
|
||||||
|
```html
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Proprietary Codec Check</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<p>Checking if Electron is using proprietary codecs by loading video from http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4</p>
|
||||||
|
<p id="outcome"></p>
|
||||||
|
<video style="display:none" src="http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4" autoplay></video>
|
||||||
|
<script>
|
||||||
|
const video = document.querySelector('video')
|
||||||
|
video.addEventListener('error', ({target}) => {
|
||||||
|
if (target.error.code === target.error.MEDIA_ERR_SRC_NOT_SUPPORTED) {
|
||||||
|
document.querySelector('#outcome').textContent = 'Not using proprietary codecs, video emitted source not supported error event.'
|
||||||
|
} else {
|
||||||
|
document.querySelector('#outcome').textContent = `Unexpected error: ${target.error.code}`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
video.addEventListener('playing', () => {
|
||||||
|
document.querySelector('#outcome').textContent = 'Using proprietary codecs, video started playing.'
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
```
|
||||||
|
|
||||||
## Links
|
## Links
|
||||||
|
|
||||||
- [Chrome Release Schedule](https://www.chromium.org/developers/calendar)
|
- [Chrome Release Schedule](https://www.chromium.org/developers/calendar)
|
||||||
|
|
Loading…
Reference in a new issue