The purpose of this repository is to test the implementation of navigator.getDisplayMedia
in MS Edge. It contains two different, condensed scenarios relying on the feature,
and allows mocking navigator.getDisplayMedia
with navigator.mediaDevices.getUserMedia
.
- Clone the repository and cd into it
- Install dependencies using
npm install
To compare the result with that of navigator.getUserMedia
, toggle the flag
USE_USER_MEDIA_AS_MEDIA_STREAM
in ./public/local-stream.html:54
or ./public/rtc-stream.js:4
.
npm start
The port of the server can be configured through the PORT
env variable, or by explicitly changing the PORT
constant in ./server.js:15
.
Open https://localhost:8000/local-stream.html
. You will need to confirm the use of self-signed certs. Try clicking "Share Screen".
A video appears in the middle of the screen, reflecting the content of the getDisplayMedia MediaStream
.
A MediaStreamError
(AbortError
) is thrown:
[object MediaStreamError]: { constraintName: null, message, null, name: "AbortError" }
This has been reported in Issue #17357055 on issues.microsoftedge.com.
Open https://localhost:8000/rtc-stream.html
in two different tabs. One of the tabs will be the reciever, and one the transmitter. You will need to confirm the use of self-signed certs. In one of the tabs,try clicking the "Share Screen" button. This is now the transmitting tab.
A video appears in the middle of the tab of the receiving tab, reflecting the content of the getDisplayMedia MediaStream
.
The following error is consistently thrown the following at main.js:134:7 pointing to the start of the line adding the stream to the peerConn
:
{
"description": "Could not complete the operation due to error c004e001.",
"message": "Could not complete the operation due to error c004e001.",
"number": -1073422335,
"stack": "Error: Could not complete the operation due to error c004e001. at Anonymous Function (https://x.x.x.x:8000/public/main.js:134:7)"
}
Same error as in the basic test for these versions (MediaStreamError
- AbortError
).
- Edge allows creating an objectURL for a
MediaStream
- Edge allows assigning an objectURL of a
MediaStream
as thesrc
of an HTMLVideoElement - Edge supports relevant ES6 syntax
- Edge does not treat websites on self-signed certificates differently than authorized certificates, once the user has confirmed entering the site.
- Edge should not treat
MediaStream
ofgetDisplayMedia
differently than that ofgetUserMedia
. So far, I've found this assumption to be false.