Screen Sharing-Electron

mskim

New Member
Hello.

I am trying to develop with 'Electron' using 'Flashphoner Web SDK'. The camera stream works fine but screen sharing doesn't work.
What should I do?

Thank you.
 

Max

Administrator
Staff member
Good day.
Screen sharing may be implemented by two ways: with or without Chrome extension. Electron is probably does not support Chrome extensions, so you have to impelemet screen sharing without extension as described here. Note that there are some limits in this case:
1. Picture resolution is set by source dimensions (screen, windows or browser tab), not by constraints
2. System sound capture only works starting from Crome 74 (hope Electron comes with newer version)
 

mskim

New Member
I already set that up. However, screen sharing doesn't work. Below are a part of the sources I tested for screen sharing with the 'Flashphoner Web SDK'. And result logs.

[source]
constraints = {
audio: {
deviceId: deviceAudio.id
},
video: {
width: 640,
height: 480,
withoutExtension: true,
type: "screen",
frameRate: 30,
}
};

publish(streamId, constraints) {
var publishStream = session.createStream({
name: streamId,
display: localVideo,
cacheLocalResources: true,
constraints: constraints,
mediaConnectionConstraints: mediaConnectionConstraints,
transport: transportInput,
cvoExtension: cvo,
stripCodecs: strippedCodecs,
}).on(STREAM_STATUS.PUBLISHING, function (stream) {
onPublishing(stream);
}).on(STREAM_STATUS.UNPUBLISHED, function () {
onUnpublished();
}).on(STREAM_STATUS.FAILED, function () {
onUnpublished();
});

publishStream.publish();
}

[log]
\src\flashphoner\FPConnector.js:92 #FP connectStatus : ESTABLISHED
\src\connector.js:23 #connectStatus : CONNECTED
\src\flashphoner\flashphoner_client-wcs_api-2.0\flashphoner.js:16686 11:26:36 INFO webrtc - {audio: {…}, video: {…}, sourceId: undefined}audio: {deviceId: "default"}sourceId: undefinedvideo: {withoutExtension: true, mediaSource: undefined, videoWidth: 640, videoHeight: 480}__proto__: Object
\src\flashphoner\flashphoner_client-wcs_api-2.0\flashphoner.js:16686 11:26:38 INFO webrtc - Request for audio stream
\src\flashphoner\flashphoner_client-wcs_api-2.0\flashphoner.js:17877 videoRatio === 1.3333333333333333
\src\flashphoner\flashphoner_client-wcs_api-2.0\flashphoner.js:16686 11:26:38 INFO webrtc - Got audio stream, add it to video stream
\src\flashphoner\flashphoner_client-wcs_api-2.0\flashphoner.js:16686 11:26:38 INFO webrtc - FOUND WEBRTC CACHED INSTANCE, id bb0a00b0-e329-11e9-9a86-537ab3ce93f8-LOCAL_CACHED_VIDEO
\src\connector.js:33 #connectStatus : PUBLISHING
 

mskim

New Member
I solved this problem.
I found out that Electron doesn't use a GUI for source dimensions.

1.Picture resolution is set by source dimensions (screen, windows or browser tab), not by constraints

Thank you.
 
Top