Last active
October 24, 2018 13:54
-
-
Save dagingaa/bd616aa0b846938ae0613d14d1ed1705 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ('mediaCapabilities' in navigator && 'encodingInfo' in navigator.mediaCapabilities) { | |
const videoFileConfiguration = { | |
type : 'record', | |
video : { | |
contentType: "video/webm;codecs=vp8", | |
width: 1920, | |
height: 1080, | |
bitrate: 2500000, | |
framerate: 30, | |
} | |
}; | |
navigator.mediaCapabilities.encodingInfo(videoFileConfiguration).then(result => { | |
console.log('This configuration is ' + | |
(result.supported ? '' : 'not ') + 'supported, ' + | |
(result.smooth ? '' : 'not ') + 'smooth, and ' + | |
(result.powerEfficient ? '' : 'not ') + 'power efficient.') | |
}) | |
.catch((e) => { | |
console.log("encodingInfo error: " + e) | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment