Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transport connection state changed to Failed #83

Open
IVLabs-1 opened this issue Oct 18, 2023 · 11 comments
Open

Transport connection state changed to Failed #83

IVLabs-1 opened this issue Oct 18, 2023 · 11 comments

Comments

@IVLabs-1
Copy link

Hi @un-hongly,

I am aslo new to webrtc and mediasoup. I have also followed the same tutorial on youtube as yours from Amir Eshaq and I am also developing the app on flutter. I have used your code from link issue, it is working fine for producer but camera is not rendering remote video. Can you help me to solve this issue?

@oyboyb
Copy link

oyboyb commented Oct 23, 2023

I have this issue too . I cant not see remote video.

@un-hongly
Copy link

Hi @un-hongly,

I am aslo new to webrtc and mediasoup. I have also followed the same tutorial on youtube as yours from Amir Eshaq and I am also developing the app on flutter. I have used your code from link issue, it is working fine for producer but camera is not rendering remote video. Can you help me to solve this issue?

Hello, Have you resolved it yet?

  1. Are you sure your producer produce your video successfully? (On server, Add debug log to see your producer scores)
  2. When create a router, what is your listenIps config?

@oyboyb
Copy link

oyboyb commented Oct 23, 2023

  1. I soure has producer
  2. " listenIps " ? It is mean websocket url ??

image

@un-hongly
Copy link

  1. I soure has producer
  2. " listenIps " ? It is mean websocket url ??

image

Check your server code
router.createWebRtcTransport({ listenIps: [ // what you put here? ] })

@un-hongly
Copy link

Seem you have problem with your transport configuration on server side.

router.createWebRtcTransport(
  ...
  listenIps: [{ ip: '0.0.0.0', announcedIp: // your computer ip address  }]
);

@oyboyb
Copy link

oyboyb commented Oct 23, 2023

image
image

midea-com component below
`


<script setup lang='ts'> import { ref, watch } from 'vue' const prop = defineProps(['videoTrack', 'audioTrack', 'audio', 'webcam']) const audioElemRef = ref() const videoElemRef = ref() const _setTracks = (audioTrack, videoTrack) => { const audioElem = audioElemRef.value as HTMLAudioElement const videoElem = videoElemRef.value as HTMLVideoElement if (audioTrack) { if (!audioElem) return console.error(`audioElem: `, audioElem); const stream = new MediaStream; stream.addTrack(audioTrack); audioElem.srcObject = stream; audioElem.play() .catch((error) => console.warn('audioElem.play() failed:%o', error)); // this._runHark(stream); } else { // audioElem.srcObject = null; } if (videoTrack) { const stream = new MediaStream; stream.addTrack(videoTrack); videoElem.srcObject = stream; // videoElem.oncanplay = () => this.setState({ videoCanPlay: true }); videoElem.onplay = () => { // this.setState({ videoElemPaused: false }); audioElem.play() .catch((error) => console.warn('audioElem.play() failed:%o', error)); }; // videoElem.onpause = () => this.setState({ videoElemPaused: true }); videoElem.play().then(data => { console.log(12, stream) }) .catch((error) => console.warn('videoElem.play() failed:%o', error)); // this._startVideoResolution(); // if (faceDetection) // this._startFaceDetection(); } else { // videoElem.srcObject = null; } } watch(() => [prop.audioTrack, prop.videoTrack], ([newAudio, newVideo], [oldAudio, oldVideo]) => { // console.error(prop.videoTrack, prop.audioTrack, newVideo) _setTracks(prop.audioTrack, prop.videoTrack) }) </script> <style lang='scss' scoped> audio, input, video { width: 100%; position: relative; z-index: 1; &.no::after { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 11; content: ''; background-image: url(../assets/percky.jpg); background-repeat: repeat; background-size: initial; background-position: center; } } </style>`

The server code has not been touched much, but for the official mediasoup demo, it can run normally。
They have always suspected me of having a problem with my code, and I am the first to argue this point.

@oyboyb
Copy link

oyboyb commented Oct 23, 2023

Sorry , GitHub doesn't play as well as you guys. The code pasted on is too bad 。

@oyboyb
Copy link

oyboyb commented Oct 23, 2023

code of media-com component.
The logic in the setTracks method was copied from the media soup demo.
image

@un-hongly
Copy link

MediaStream

Please show me your mediasoup backend code. are you running mediasoup demo as your backend?

@oyboyb
Copy link

oyboyb commented Oct 24, 2023 via email

@oyboyb
Copy link

oyboyb commented Oct 24, 2023

@un-hongly
capture_20231024092248173

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants