Skip to content

"Unsubscribe Track" Functionality for Screen Sharing #23

Closed
@heisenburgger

Description

Hi, thank you for developing this SFU. I am currently building an application where users can watch a single user's screen share. Additionally, users should have the option to opt out of watching the stream if they are not interested.

Scenario:

  1. User "A" shares their screen.
  2. User "B" watches the stream (works fine).
  3. User "B" decides to stop watching the stream. At this point, I need a method like unsubscribe to stop receiving User "A"'s stream.
  4. Later, User "B" should be able to resume watching User "A"'s stream if they choose to.

I would like to know how to implement the "unsubscribe track" functionality to achieve this behavior. Specifically, I need guidance or an example on how to:

  • Unsubscribe from a specific track (in this case, User "A"'s screen share).
  • Resubscribe to the same track later if needed.

Any documentation, code snippets, or pointers would be greatly appreciated. Thank you!

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions