Hello,
How can I record the video along with the screen, knowings that each has its own session.
Thank you
Hello,
How can I record the video along with the screen, knowings that each has its own session.
Thank you
Using COMPOSED recording, you can record all the participants in the same media session.
Using INDIVIDUAL recording, every audio+video is recorded in its own file.
Thank for your quick answer. However, I read in your forum that if I want to share the screen, I absolutely need two sessions. Is it really mandatory ? Is there an alternative to do it in one session ?
Thank you
If you want to share your screen alongside with the camera, a participant has to create two OpenVidu clients to simulate two “participants”.
You need a “fake” participant to share the camera. But all participants must be joined to the same session.
Thank-you for your prompt response.
Here are the steps I have followed, however when I share the screen, it only stay on my local pc
As for the spectators, the camera works but the screen is the only problem.
You need to initialize another session to be able to publish your screen.
screenSession = OVScreen.initSession();
screenSession.publish(screenPublisher);
I agree with you but to record a video, it only accept one session.
Is there a solution ?
The screenSession is a workaround to allow publish your screen and your camera at the same time. This session won’t subcribe to anyone, it only will emit the screen.
You will have to use the main session for recording.
The record function when I give it the main session, it only records the camera and not the screen.
Here’s the function that I did :
Recording recording = this.openVidu.startRecording(sessionId, properties);
Are you publishing the screen on the session correctly?
Can you open a new incognito browser tab, join into the session and check if you are able to see the camera and screen videos from this new tab?
Yes all is fine. I can the screen and camera from my pc and I can the session as subscriber from another pc. I can watch everything correctly, screen and camera
Are you followed these instructions?
I have followed your instructions but nothing works.
I launched 2 sessions, one for the camera, the second one for the Screen. The live works but the recording of the video, it only takes on session.
How do I record for 2 sessions ?
If you are properly publishing the camera and the screen to the same session and you record that specific session, both camera and screen will be recorded. I don’t know what have you exactly implemented, but if btoh are not recorded, then it means both are not published to the same session.
Here’s the thing, I asked your colleagues and they told me that I should use another session to publish the screen. Here’s the responds of your colleagues
I have no idea what to do and my goal is to share the screen and video on one session, so that the system can allow to record the screen and the video.
Thank for your consideration.
You don’t have to use a different session. Do you understand the concept of Session? A Session is a virtual space, a room, where users can publish video and receive video from other users connected TO THE SAME SESSION. If you publish to different sessions, of course they won’t be able to see each other.
You have to simulate 2 different users for the SAME SESSION in the same client in order for that client to be able to publish webcam and screen at the same time. You have to generate 2 different tokens for the same user and call twice Session.connect and Session.publish in the same JS code.
When my colleagues are talking about two different sessions, they are referring to 2 different Session objects in the client side, as you must call OpenVidu.initSession twice in order to simulate the 2 users. But the token used to connect to both Session objects will belong to the same session inside openvidu-server.
Thank you, the solution worked well. Your services are on point, I still require your help for another issue.
There are 2 roles publisher and subscribe. When I launch my live, the video of my camera is created in my local navigator. Also when the subscriber enter the room to watch, sometimes it works and sometimes it doesn’t work. but when I search the console of the navigator, I found the balise is added, what I do is, refresh the page several times, then the video works.
How can I solve this problem ?
Thank you, the solution worked well. Your services are on point, I still require your help for another issue.
There are 2 roles publisher and subscribe. When I launch my live, the video of my camera is created in my local navigator. Also when the subscriber enter the room to watch, sometimes it works and sometimes it doesn’t work. but when I search the console of the navigator, I found the balise video
is added, what I do is, refresh the page several times, then the video works.
How can I solve this problem ?
There are 2 things that might be happening if sometimes certain subscriber is able to receive a remote video and sometimes not: if the JS code is not asking for camera or mic permissions, sometimes you will need a user gesture to play the video feed. Chrome has been evolving towards a more restrictive behaviour in terms of autoplaying media streams. It works with an unknown trust algorithm, so being able to autoplay without a user gesture depends on the trust level that Chrome assings for certain web page for each specific user. Again, this will only affect if the user is only receiving remote video (that has an audio stream, by the way).
It can also mean that some ports are not opened in yur deployment. WebRTC needs all of these ports opened in the server. If that is not fully respected, it is possible that some negotiations don’t end well.