AirenSoft / OvenPlayer

OvenPlayer is JavaScript-based LLHLS and WebRTC Player for OvenMediaEngine.
https://OvenMediaEngine.com/ovenplayer
MIT License
498 stars 124 forks source link

Return of "400" from websocket on WebRTC call. #393

Closed mooncatventures-group closed 5 months ago

mooncatventures-group commented 8 months ago

I get expected results until I receive command=notification as "rendition changed" and then I get a 400 return code. I admit I have no idea what this message means I've attached the log.

I am developing an IOS Swift Client to play back the WebRTC stream, so far I have managed to navigate this pretty well.

https://airensoft.gitbook.io/ovenmediaengine/streaming/webrtc-publishing

I also came across this post

https://stackoverflow.com/questions/63199132/nativescript-webrtc-tnsrtc-cannot-get-remotestream-video

I implemented "A"

"To avoid this situation, OvenPlayer duplicates the candidate from OME and references the WebRTC signal address to replace the candidate's private IP address with the public IP address. And then OvenPlayer also adds duplicated candidates to the peer connection too" ( in the log I redacted my public Id for security)"

Changing server.xml didn't seem to work, the web player it broke the ovenplayer web player

Could you please explain what the error I am getting means, for now, I am not sending the candidates in the answer, I suppose that could be my problem. But I can't find any documentation that explains most of this, The below code is mirrored from your test tool.

<var answerDict = [String: Any]() var offerObject = [String:Any]() offerObject = ["type":"answer", "sdp": omeSdp] answerDict = [COMMAND: "answer", "id": id, "peerId": 0, "sdp": offerObject, "candidates": [], "iceServers": []] self.delegate?.sendMessage(answerDict)>

output.txt

getroot commented 7 months ago

It might be helpful to look at Chrome's developer tools. From your error log, you can see that you are sending the wrong id value. When responding, you must continue to use the ID value received from the server.

image

SangwonOh commented 5 months ago

We are closing the issue due to a long period of inactivity. If further discussion is needed, please reopen the issue.