Skip to content
This repository has been archived by the owner on Aug 25, 2021. It is now read-only.

Add/delete endpoints to/from already interconnected members #53

Open
evdokimovs opened this issue Sep 30, 2019 · 1 comment
Open

Add/delete endpoints to/from already interconnected members #53

evdokimovs opened this issue Sep 30, 2019 · 1 comment
Labels
enhancement Improvement of existing features or bugfix k::api Related to API (application interface)

Comments

@evdokimovs
Copy link
Contributor

Summary

When we trying to create interconnected Endpoints for Members which already interconnected, panic will be throwed with PeerError::WrongState error.

Also if we delete some Endpoint from interconnected Members they Peers will be removed even if some interconnected Endpoints still exists. This is related bug because we can fix it with Event::TracksRemoved. Steps to reproduce for this bug will be in discussion to this issue.

Steps to reproduce

  1. Create room with this spec:
kind: Room
id: pub-sub-video-call
spec:
  pipeline:
    caller:
      kind: Member
      credentials: test
      spec:
        pipeline:
          publish:
            kind: WebRtcPublishEndpoint
            spec:
              p2p: Always
    responder:
      kind: Member
      credentials: test
      spec:
        pipeline:
          play:
            kind: WebRtcPlayEndpoint
            spec:
              src: "local://pub-sub-video-call/caller/publish"
  1. Start call for responder and caller
  2. Add WebRtcPublishEndpoint to responder:
id: publish
kind: WebRtcPublishEndpoint
spec:
  p2p: Always
  1. Add WebRtcPlayEndpoint to caller:
id: play
kind: WebRtcPlayEndpoint
spec:
  src: "local://pub-sub-video-call/responder/publish"

What is the current bug behavior?

Panic with PeerError::WrongState error should be thrown.

What is the expected correct behavior?

New MediaTrack should be applied to the caller and responder.

Relevant logs and/or screenshots

This panic you may find in medea::signalling::room::Room::connect_endpoints.

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: PeerError(WrongState(PeerId(1), "New", "Stable"))', src/libcore/result.rs:1084:5

Possible fixes

Implementation of Event::TracksApplied and Event::TracksRemoved should fix this bug.

@evdokimovs evdokimovs added the bug Something isn't working label Sep 30, 2019
@evdokimovs evdokimovs self-assigned this Sep 30, 2019
@alexlapa alexlapa added enhancement Improvement of existing features or bugfix k::api Related to API (application interface) and removed bug Something isn't working labels Sep 30, 2019
@alexlapa alexlapa assigned alexlapa and unassigned evdokimovs Sep 30, 2019
@evdokimovs
Copy link
Contributor Author

Steps to reproduce for deleting Endpoint from already interconnected Members

  1. Create Room with this spec:
kind: Room
id: pub-pub-video-call
spec:
  pipeline:
    caller:
      kind: Member
      credentials: test
      spec:
        pipeline:
          publish:
            kind: WebRtcPublishEndpoint
            spec:
              p2p: Always
          play-responder:
            kind: WebRtcPlayEndpoint
            spec:
              src: "local://pub-pub-video-call/responder/publish"
    responder:
      kind: Member
      credentials: test
      spec:
        pipeline:
          publish:
            kind: WebRtcPublishEndpoint
            spec:
              p2p: Always
          play-caller:
            kind: WebRtcPlayEndpoint
            spec:
              src: "local://pub-pub-video-call/caller/publish"
  1. Connect caller and responder
  2. Delete local://pub-pub-video-call/caller/play-responder endpoint

What is the current bug behavior?

Peers between caller and responder will be deleted.

What is the expected correct behavior?

Only some MediaTracks should be deleted from Peers with Event::TracksRemoved.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Improvement of existing features or bugfix k::api Related to API (application interface)
Projects
None yet
Development

No branches or pull requests

2 participants