Hello,
I’m trying to test a webphone with K6 experimental browser. Unfortunately, it seems that it does not work. K6 browser return an error (“NotSupportedError”) on function getUserMedia().
Could you tell me if it is a bug or if it is a feature not supported at this time ?
Already checked : https used, microphone authorization in Chrome (I also test with K6 browser argument “auto-accept-camera-and-microphone-capture”).
Here is step to reproduce the error, web page tested :
<html><head><title>My Webphone</title></head>
<body><script>
navigator.mediaDevices.getUserMedia({audio: true, video: false}).catch(function(t) {
console.log("getusermedia failed : ", t);
});
</script></body>
and the K6 script :
import { browser, devices } from 'k6/experimental/browser';
import { check } from 'k6';
export const options = {
httpDebug: 'full',
scenarios: {
webrtc: {
executor: 'shared-iterations',
exec: 'webrtc',
iterations: 1,
options: {
browser: {
type: 'chromium',
} } } }}
export async function webrtc() {
const context = browser.newContext();
const page = context.newPage();
try {
await page.goto("https://<my_webphone_page>", {timeout: 10000});
page.waitForTimeout(10000);
} finally {
page.close();
}
}
When I run the test, I got this error printed by my script :
INFO[0002] "getusermedia failed : " {"code":9,"message":"Not supported","name":"NotSupportedError"} browser_source=console-api source=browser