No_stream_playing_event

Hi.

I’m using OpenVidu, creating with the RPC protocol.
I use REST API to get session information and to connect to it.
I Join the room - RPC protocol
I publish the video - RPC protocol

But on the room (using the demos.openvidu.io), there’s no video, when i dig into the logs, i find this error:


hasBeenPrevented: false
message: “StreamManager of Stream str_CAM_KQ40_con_IlpmDzRPk6 (Subscriber) did not trigger “streamPlaying” event in 4000 ms”
name: “NO_STREAM_PLAYING_EVENT”
origin: Proxy {userHandlerArrowHandler: WeakMap, ee: EventEmitter, videos: Array(1), lazyLaunchVideoElementCreatedEvent: false, stream: Proxy, …}
target: Proxy {userHandlerArrowHandler: WeakMap, ee: EventEmitter, streamManagers: Array(2), remoteStreamsCreated: Map(1), remoteConnections: Map(1), …}
type: “exception”

Any idea?

Regards

See documentation of this exception: ExceptionEventName | OpenVidu Browser - v2.20.0

Well, according to the documentation:
“But the lack of the event can be caused by multiple reasons…”
Any idea how can i drill down and find the reason?

The negotiation with the media server is not correct… for that reason there is no media in the browser.

Why don’t you use the official openvidu-browser?

If you can not use it, use browser developers tools to inspect what are the messages exchanged between browser and server and try to replicate them.

Regards

How would that work with Unity? Use a browser inside unity?
Really didn’t get the point.
Using the developer tools, the error is the one i reported

It is possible that you miss some message exchanged between client and server.

If you look to messages exchanged between a browser using openvidu-browser and openvidu server you can verify if your own implementation is exchanging the same messages.

In any case, to make OpenVidu work with Unity you can take a look to this community project: GitHub - raggnic/WebRTCPlayground

Best regards

Hi @micael.gallego

The messages i exchange are:

  • Ping
  • Join Room
  • OnIceCandidate
  • PublishVideo.

Am i missing any message?

Regards

Of course. You will not receive any video if you don’t subscribe to the video…
https://docs.openvidu.io/en/stable/developing/rpc/#receivevideofrom

Yes, but receiving is not the problem (yet), the problem is publishing.

So: PC 1 - WebBrowser | PC 2 - Unity

The current flow.

  • In PC 1 i create a session on demos.openvidu.oi (openvidu call) with the name TEST
  • In PC 2 i join that session and create a connection with OpenVidu REST API.
  • In PC 2 i start a websocket connection and:
    – Start the PING message
    – Attach the ICECandidate event from WebRTC to the Message OnIceCandidate
    – Join room - (which i’m able to do because in PC1 i see a thumbnail of a new user)
    – PublishVideo - here is where it fails. In PC 1 i’m able to see that the user image goes from a thumbnail to a video size slot, but the image is all black, no video is passing.

If the video of the Publisher is blank, then the problem is not in the server side.
The Publisher’s video that the owner sees is by default the local one. The stream provided by the webcam. Not the remote one, sent by OpenVidu from other endpoint.
I would check the camera access in the application, if I were you.

@pabloFuente Thank you for the input.

I have camera access, in the application i can see the video from the camera stream.
I attach that stream to a VideoStreamTrack. Which i then add as track to the peerconnection.

Like i said in the starting of the post i get an error: NO_STREAM_PLAYING_EVENT
StreamManager of Stream str_CAM_KQ40_con_IlpmDzRPk6 (Subscriber) did not trigger “streamPlaying” event in 4000 ms.

I ask again any idea what causes this or how can i debug it?

Are you trying to implement an OpenVidu client in Unity, right?

Have you tested the code I shared with you?

Right I am.
The code/project you shared throws the error
{“id”:4,“error”:{“code”:-1,“message”:“java.lang.NullPointerException:null” …

On the PublishVideo message callback

It seems it is based on and old version of the protocol and some now mandatory params are missing.

Ok, let’s back again to your original issues. I recommend you to connect a browser and inspect the messages exchanged between browser and OpenVidu Server and check if the messages you exchange between Unity app and OpenVidu server are the same.

Regards

From the begining then.

I recrorded all the messages going to OpenVidu
And i looked at the Openvidu server logs and i get errors when joining and when publish the video.
Files Filebin | x2zjeaf6vhdbrmxt

New link with logs

Hi @Striiki ,
How have you solved this issue? I have the same error and I don’t understand why my stream is not playing.