Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.