Skip to content

Commit 7e1ba8c

Browse files
authored
Merge branch 'gh-pages' into multiple-scp
2 parents fa718e5 + 2b86c32 commit 7e1ba8c

File tree

5 files changed

+25
-11
lines changed

5 files changed

+25
-11
lines changed

.github/workflows/interop-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
matrix:
1212
browserA: [chrome, firefox]
1313
browserB: [firefox, chrome]
14-
bver: ['unstable']
14+
bver: [unstable]
1515
steps:
1616
- uses: actions/checkout@v4
1717
- uses: actions/setup-node@v4

src/content/getusermedia/gum/js/main.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,9 @@ function handleSuccess(stream) {
2424

2525
function handleError(error) {
2626
if (error.name === 'OverconstrainedError') {
27-
const v = constraints.video;
28-
errorMsg(`The resolution ${v.width.exact}x${v.height.exact} px is not supported by your device.`);
27+
errorMsg(`OverconstrainedError: The constraints could not be satisfied by the available devices. Constraints: ${JSON.stringify(constraints)}`);
2928
} else if (error.name === 'NotAllowedError') {
30-
errorMsg('Permissions have not been granted to use your camera and ' +
29+
errorMsg('NotAllowedError: Permissions have not been granted to use your camera and ' +
3130
'microphone, you need to allow the page access to your devices in ' +
3231
'order for the demo to work.');
3332
}

src/content/peerconnection/dtmf/js/main.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,9 @@ function dtmfOnToneChange(tone) {
173173
}
174174

175175
function sendTones(tones) {
176-
if (dtmfSender && dtmfSender.canInsertDTMF) {
176+
// firefox doesn't implement canInsertDTMF, so assume it's always available
177+
// Ref: https://bugzilla.mozilla.org/show_bug.cgi?id=1623193
178+
if (dtmfSender && (typeof (dtmfSender.canInsertDTMF) === 'undefined' || dtmfSender.canInsertDTMF)) {
177179
const duration = durationInput.value;
178180
const gap = gapInput.value;
179181
console.log('Tones, duration, gap: ', tones, duration, gap);
@@ -193,4 +195,4 @@ function addDialPadHandlers() {
193195
}
194196
}
195197

196-
main();
198+
main();

test/download-browsers.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
const {buildDriver} = require('./webdriver');
22
// Download the browser(s).
33
async function download() {
4-
if (process.env.browserA && process.env.browserB) {
5-
(await buildDriver(process.env.browserA)).quit();
6-
(await buildDriver(process.env.browserB)).quit();
4+
if (process.env.BROWSER_A && process.env.BROWSER_B) {
5+
(await buildDriver(process.env.BROWSER_A)).quit();
6+
(await buildDriver(process.env.BROWSER_B)).quit();
77
} else {
88
(await buildDriver()).quit();
99
}

test/webdriver.js

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,23 @@ if (os.platform() === 'win32') {
3535
process.env.PATH += ':node_modules/.bin';
3636
}
3737

38+
function mapVersion(browser, version) {
39+
const versionMap = {
40+
chrome: {
41+
unstable: 'dev',
42+
},
43+
firefox: {
44+
unstable: 'nightly',
45+
}
46+
};
47+
return (versionMap[browser] || {})[version] || version;
48+
}
49+
3850
async function buildDriver(browser = process.env.BROWSER || 'chrome', options = {version: process.env.BVER}) {
51+
const version = mapVersion(options.version);
3952
const platform = puppeteerBrowsers.detectBrowserPlatform();
4053

41-
const buildId = await download(browser, options.version || 'stable',
54+
const buildId = await download(browser, version || 'stable',
4255
cacheDir, platform);
4356

4457
// Chrome options.
@@ -88,7 +101,7 @@ async function buildDriver(browser = process.env.BROWSER || 'chrome', options =
88101

89102
// Safari options.
90103
const safariOptions = new safari.Options();
91-
safariOptions.setTechnologyPreview(options.version === 'unstable');
104+
safariOptions.setTechnologyPreview(version === 'unstable');
92105

93106
// Firefox options.
94107
const firefoxOptions = new firefox.Options();

0 commit comments

Comments
 (0)