jalmasi / vrspace

VRSpace: Multiuser Virtual Reality Engine
Apache License 2.0
174 stars 79 forks source link

video , screen issue #8

Closed leeminju531 closed 2 years ago

leeminju531 commented 2 years ago

Thanks for sharing your good repo.

I followed Quickstart. and have some troubles.

  1. I chose Avators as video, and It's working on local browser. but, each browser can't see each other. it's working on case of avators chosen male,female characters. simplescreenrecorder-2022-03-11_21 09 54

  2. I can't share screen. simplescreenrecorder-2022-03-11_21 27 56

here is my terminal log when screen blink.

2022-03-11 21:36:25.762 DEBUG 22899 --- [nio-8080-exec-5] org.vrspace.server.core.SessionManager   : Request: ClientRequest(super=VREvent(object={}, changes={}, timestamp=2022-03-11T12:36:25.762308, className=null, id=null, source=null, client=null, payload={"command":{"Add":{"objects":[{"VRObject":{"properties":{"screenName":"teacher","clientId":6},"active":true}}]}}}), command=Add(objects=[VRObject(super=Entity(id=null), children=null, world=null, position=null, rotation=null, scale=null, permanent=null, temporary=null, active=true, mesh=null, script=null, animation=null, properties={screenName=teacher, clientId=6}, streamId=null, listeners=null)]))
2022-03-11 21:36:25.824 DEBUG 22899 --- [nio-8080-exec-5] org.vrspace.server.core.Scene            : Client 6 offered 14 inRange:true visible:true contains:false
2022-03-11 21:36:25.824 DEBUG 22899 --- [nio-8080-exec-5] org.vrspace.server.core.Scene            : Scene for 6 adding 1
2022-03-11 21:36:25.824 DEBUG 22899 --- [nio-8080-exec-5] org.vrspace.server.obj.Client            : ID(className=Client, id=6) Received {"Add":{"objects":[{"VRObject":{"id":14,"position":{"x":-4.144786063284204,"y":0.00884998818039856,"z":6.52922587326561},"temporary":true,"active":true,"properties":{"screenName":"teacher","clientId":6}}}]}}
2022-03-11 21:36:25.824 DEBUG 22899 --- [nio-8080-exec-5] org.vrspace.server.obj.Client            : ID(className=Client, id=6) Received {"response":[{"VRObject":14}]}
2022-03-11 21:36:25.853 DEBUG 22899 --- [nio-8080-exec-4] org.vrspace.server.core.SessionManager   : Request: ClientRequest(super=VREvent(object={}, changes={}, timestamp=2022-03-11T12:36:25.852904, className=null, id=null, source=null, client=null, payload={"command":{"Remove":{"objects":[{"VRObject":14}]}}}), command=Remove(objects=[{VRObject=14}], iterator=null))
2022-03-11 21:36:25.878 DEBUG 22899 --- [nio-8080-exec-4] org.vrspace.server.core.WriteBack        : Wrote 0 in 1 ms
2022-03-11 21:36:25.878 DEBUG 22899 --- [nio-8080-exec-4] o.v.server.core.VRObjectRepository       : Deleting position Point:18 of VRObject 14
2022-03-11 21:36:25.881 DEBUG 22899 --- [nio-8080-exec-4] o.v.server.core.VRObjectRepository       : Deleted VRObject 14
2022-03-11 21:36:25.882 DEBUG 22899 --- [nio-8080-exec-4] org.vrspace.server.core.Scene            : Scene for 6 removing 1
2022-03-11 21:36:25.882 DEBUG 22899 --- [nio-8080-exec-4] org.vrspace.server.obj.Client            : ID(className=Client, id=6) Received {"Remove":{"objects":[{"VRObject":14}]}}
2022-03-11 21:36:26.700 DEBUG 22899 --- [nio-8080-exec-8] org.vrspace.server.core.SessionManager   : Request: ClientRequest(super=VREvent(object={}, changes={}, timestamp=2022-03-11T12:36:26.699888, className=null, id=null, source=null, client=null, payload={"command":{"Add":{"objects":[{"VRObject":{"properties":{"screenName":"teacher","clientId":6},"active":true}}]}}}), command=Add(objects=[VRObject(super=Entity(id=null), children=null, world=null, position=null, rotation=null, scale=null, permanent=null, temporary=null, active=true, mesh=null, script=null, animation=null, properties={screenName=teacher, clientId=6}, streamId=null, listeners=null)]))
2022-03-11 21:36:26.761 DEBUG 22899 --- [nio-8080-exec-8] org.vrspace.server.core.Scene            : Client 6 offered 19 inRange:true visible:true contains:false
2022-03-11 21:36:26.761 DEBUG 22899 --- [nio-8080-exec-8] org.vrspace.server.core.Scene            : Scene for 6 adding 1
2022-03-11 21:36:26.761 DEBUG 22899 --- [nio-8080-exec-8] org.vrspace.server.obj.Client            : ID(className=Client, id=6) Received {"Add":{"objects":[{"VRObject":{"id":19,"position":{"x":-4.144786063284204,"y":0.00884998818039856,"z":6.52922587326561},"temporary":true,"active":true,"properties":{"screenName":"teacher","clientId":6}}}]}}
2022-03-11 21:36:26.761 DEBUG 22899 --- [nio-8080-exec-8] org.vrspace.server.obj.Client            : ID(className=Client, id=6) Received {"response":[{"VRObject":19}]}
2022-03-11 21:36:26.798 DEBUG 22899 --- [nio-8080-exec-1] org.vrspace.server.core.SessionManager   : Request: ClientRequest(super=VREvent(object={}, changes={}, timestamp=2022-03-11T12:36:26.797902, className=null, id=null, source=null, client=null, payload={"command":{"Remove":{"objects":[{"VRObject":19}]}}}), command=Remove(objects=[{VRObject=19}], iterator=null))
2022-03-11 21:36:26.832 DEBUG 22899 --- [nio-8080-exec-1] org.vrspace.server.core.WriteBack        : Wrote 0 in 1 ms
2022-03-11 21:36:26.832 DEBUG 22899 --- [nio-8080-exec-1] o.v.server.core.VRObjectRepository       : Deleting position Point:8 of VRObject 19
2022-03-11 21:36:26.837 DEBUG 22899 --- [nio-8080-exec-1] o.v.server.core.VRObjectRepository       : Deleted VRObject 19
2022-03-11 21:36:26.838 DEBUG 22899 --- [nio-8080-exec-1] org.vrspace.server.core.Scene            : Scene for 6 removing 1
2022-03-11 21:36:26.838 DEBUG 22899 --- [nio-8080-exec-1] org.vrspace.server.obj.Client            : ID(className=Client, id=6) Received {"Remove":{"objects":[{"VRObject":19}]}}
2022-03-11 21:36:27.519 DEBUG 22899 --- [nio-8080-exec-3] org.vrspace.server.core.SessionManager   : Request: ClientRequest(super=VREvent(object={}, changes={}, timestamp=2022-03-11T12:36:27.519124, className=null, id=null, source=null, client=null, payload={"command":{"Add":{"objects":[{"VRObject":{"properties":{"screenName":"teacher","clientId":6},"active":true}}]}}}), command=Add(objects=[VRObject(super=Entity(id=null), children=null, world=null, position=null, rotation=null, scale=null, permanent=null, temporary=null, active=true, mesh=null, script=null, animation=null, properties={screenName=teacher, clientId=6}, streamId=null, listeners=null)]))
2022-03-11 21:36:27.572 DEBUG 22899 --- [nio-8080-exec-3] org.vrspace.server.core.Scene            : Client 6 offered 9 inRange:true visible:true contains:false
2022-03-11 21:36:27.573 DEBUG 22899 --- [nio-8080-exec-3] org.vrspace.server.core.Scene            : Scene for 6 adding 1
2022-03-11 21:36:27.573 DEBUG 22899 --- [nio-8080-exec-3] org.vrspace.server.obj.Client            : ID(className=Client, id=6) Received {"Add":{"objects":[{"VRObject":{"id":9,"position":{"x":-4.144786063284204,"y":0.00884998818039856,"z":6.52922587326561},"temporary":true,"active":true,"properties":{"screenName":"teacher","clientId":6}}}]}}
2022-03-11 21:36:27.573 DEBUG 22899 --- [nio-8080-exec-3] org.vrspace.server.obj.Client            : ID(className=Client, id=6) Received {"response":[{"VRObject":9}]}
2022-03-11 21:36:27.600 DEBUG 22899 --- [nio-8080-exec-6] org.vrspace.server.core.SessionManager   : Request: ClientRequest(super=VREvent(object={}, changes={}, timestamp=2022-03-11T12:36:27.600555, className=null, id=null, source=null, client=null, payload={"command":{"Remove":{"objects":[{"VRObject":9}]}}}), command=Remove(objects=[{VRObject=9}], iterator=null))
2022-03-11 21:36:27.633 DEBUG 22899 --- [nio-8080-exec-6] org.vrspace.server.core.WriteBack        : Wrote 0 in 1 ms
2022-03-11 21:36:27.633 DEBUG 22899 --- [nio-8080-exec-6] o.v.server.core.VRObjectRepository       : Deleting position Point:10 of VRObject 9
2022-03-11 21:36:27.637 DEBUG 22899 --- [nio-8080-exec-6] o.v.server.core.VRObjectRepository       : Deleted VRObject 9
2022-03-11 21:36:27.637 DEBUG 22899 --- [nio-8080-exec-6] org.vrspace.server.core.Scene            : Scene for 6 removing 1
2022-03-11 21:36:27.637 DEBUG 22899 --- [nio-8080-exec-6] org.vrspace.server.obj.Client            : ID(className=Client, id=6) Received {"Remove":{"objects":[{"VRObject":9}]}}

thanks you in advance !

jalmasi commented 2 years ago

Hi,

video and audio streaming - including screen sharing - is implemented around OpenVidu. Did you follow https://redmine.vrspace.org/projects/vrspace-org/wiki#Docker-and-OpenVidu ?

leeminju531 commented 2 years ago

No i don't. I'll try it soon. Thank you for your help.

Karan-3108 commented 2 years ago

Hey, I tried the tutorial, the select a screen to share pops up, I select any window and it closes, my system shows that I am sharing my screen but there is not display shared or visible in the classroom, here's everything else I tried-

1) I checked your youtube video where you specified that the openvidu server and the vrspace need to run together, so I put them together. 2) Checked wether the microphone is active or not. 3) Hosted it on a live server but still didn't work.

I attached the openvidu logs, because they show the incoming request for the session.

2022-08-06 07:32:15,082 DEBG 'openvidu-server' stdout output:
[WARN] 2022-08-06 07:32:15,081 [https-jsse-nio-0.0.0.0-4443-exec-5] io.openvidu.server.rest.SessionRestController - Session classroom is already created

2022-08-06 07:32:15,089 DEBG 'openvidu-server' stdout output:
[INFO] 2022-08-06 07:32:15,089 [https-jsse-nio-0.0.0.0-4443-exec-7] io.openvidu.server.rest.SessionRestController - REST API: GET /openvidu/api/sessions/classroom

2022-08-06 07:32:15,098 DEBG 'openvidu-server' stdout output:
[INFO] 2022-08-06 07:32:15,097 [https-jsse-nio-0.0.0.0-4443-exec-8] io.openvidu.server.rest.SessionRestController - REST API: POST /openvidu/api/sessions/classroom/connection {session=classroom, type=WEBRTC, data=148, record=null, role=PUBLISHER, kurentoOptions=null, customIceServers=[], rtspUri=null, adaptativeBitrate=null, onlyPlayWithSubscribers=null, networkCache=null}

2022-08-06 07:32:15,099 DEBG 'openvidu-server' stdout output:
[INFO] 2022-08-06 07:32:15,099 [https-jsse-nio-0.0.0.0-4443-exec-8] io.openvidu.server.rest.SessionRestController - Generated token wss://localhost:4443?sessionId=classroom&token=tok_MC9K4bjHTDb1ntUh

2022-08-06 07:33:10,777 DEBG 'kms' stdout output:
0:11:00.423233300     9 0x7f9d6c002380 INFO    KurentoWebSocketTransport WebSocketTransport.cpp:346:keepAliveSessions: Keep-Alive for session 'f7d8f9dd-4a0a-49b3-8269-15c28e37433b'

And also the teminal logs for the event along with the video snippet.

GIF 8-6-2022 1-34-44 PM

2022-08-06 13:39:27.298 DEBUG 24075 --- [nio-8443-exec-3] o.vrspace.server.core.SessionManager   : Request: ClientRequest(super=VREvent(object={}, changes={}, timestamp=2022-08-06T08:09:27.298562400, className=null, id=null, source=null, client=null, payload={"command":{"Add":{"objects":[{"VRObject":{"properties":{"screenName":"teacher","clientId":154},"active":true}}]}}}), command=Add(objects=[VRObject(super=Entity(id=null), children=null, world=null, position=null, rotation=null, scale=null, permanent=null, temporary=null, active=true, mesh=null, script=null, animation=null, properties={screenName=teacher, clientId=154}, streamId=null, listeners=null)]))
2022-08-06 13:39:27.380 DEBUG 24075 --- [nio-8443-exec-3] org.vrspace.server.core.Scene          : Client 154 offered 160 inRange:true visible:true contains:false
2022-08-06 13:39:27.380 DEBUG 24075 --- [nio-8443-exec-3] org.vrspace.server.core.Scene          : Scene for 154 adding 1
2022-08-06 13:39:27.381 DEBUG 24075 --- [nio-8443-exec-3] org.vrspace.server.obj.Client          : ID(className=Client, id=154) Received {"Add":{"objects":[{"VRObject":{"id":160,"position":{"x":-0.5596744713180704,"y":0.00884998818039856,"z":6.609210164089947},"temporary":true,"active":true,"properties":{"screenName":"teacher","clientId":154}}}]}}
2022-08-06 13:39:27.381 DEBUG 24075 --- [nio-8443-exec-3] org.vrspace.server.obj.Client          : ID(className=Client, id=154) Received {"response":[{"VRObject":160}]}
2022-08-06 13:39:31.993 DEBUG 24075 --- [nio-8443-exec-1] o.vrspace.server.core.SessionManager   : Request: ClientRequest(super=VREvent(object={}, changes={}, timestamp=2022-08-06T08:09:31.993162400, className=null, id=null, source=null, client=null, payload={"command":{"Remove":{"objects":[{"VRObject":160}]}}}), command=Remove(objects=[{VRObject=160}], iterator=null))
2022-08-06 13:39:32.036 DEBUG 24075 --- [nio-8443-exec-1] org.vrspace.server.core.WriteBack      : Wrote 0 in 0 ms
2022-08-06 13:39:32.036 DEBUG 24075 --- [nio-8443-exec-1] o.v.server.core.VRObjectRepository       : Deleting position Point:161 of VRObject 160
2022-08-06 13:39:32.043 DEBUG 24075 --- [nio-8443-exec-1] o.v.server.core.VRObjectRepository       : Deleted VRObject 160

Any help that you can offer would be great, it's quite urgent.

Hi,

video and audio streaming - including screen sharing - is implemented around OpenVidu. Did you follow https://redmine.vrspace.org/projects/vrspace-org/wiki#Docker-and-OpenVidu ?

jalmasi commented 2 years ago

Hi, so everything looks fine. The error must be on the client side, and that's the one thing you did not send - javascript console :) So turn it on, e.g. ctrl+shift+I, and see any errors there. I suspect you'll see an error related to wss. This is likely due to openvidu ssl cert - that's another one that is self-signed and you need to accept it. Basically just go to https://your_ip:4443/ confirm you understand the risks.

Karan-3108 commented 2 years ago

Thank you so much for the quick reply @jalmasi, I checked the js console and the problem lay with my openvidu version, I was running v2.22.0 while the system dependencies and the congruent files were looking for v2.17.0, reverted the version bump and it worked perfectly.

jalmasi commented 2 years ago

Good to know, thanks for info.