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

Adding tracks with Codecs does not work #5

mxro opened this issue Jul 27, 2019 · 0 comments


Copy link

commented Jul 27, 2019

I've tried running the demo and documented the steps I followed here

It shows both the local and remote track when either clicking [Add normal track] or [Add simulcast track]. However, when trying to add a track with VP8 or H264, the following exception is thrown and only the local stream is rendered:

Uncaught (in promise) TypeError: Cannot read property 'getType' of undefined
    at PeerConnectionClient.renegotiate (medooze-media-server-client.js:2455)

renegotiate | @ | medooze-media-server-client.js:2455
-- | -- | --
  | async function (async) |   |  
  | renegotiate | @ | medooze-media-server-client.js:2403
  | PeerConnectionClient.pc.onnegotiationneeded | @ | medooze-media-server-client.js:2249

Seems to work fine when manually skipping the logic for overriding the codecs. But I don't have sufficient understanding of this to know if this is safe to do or not.

                //For all transceivers
		for (const transceiver of this.pc.getTransceivers())
			//If we have to override the codec
			if (transceiver.codecs && transceiver.mid)
				//Get local media
				const localMedia = this.localInfo.getMediaById(transceiver.mid);
				//Get remote capabilities
				const capabilities = null; // this.remote.capabilities[localMedia.getType()];
				//If got none
				if (!capabilities)

I'm running this on Chrome and Ububtu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.