Skip to content

mid reuse will cause the new track state ended in Chrome #1343

@cedricfung

Description

@cedricfung

Your environment.

  • Version: v3 master
  • Browser: Chrome 84 on Ubuntu

What did you do?

With kraken.fm (https://vec.io/posts/deploy-a-group-audio-conferencing-service), A and B in the room, if A leaves and joins again, there will be no audio wave for A on B's Chrome. If A leaves and C joins, there will also no audio wave for C on B's chrome.

However, A and C's audio could be heard by B, then I inspected the MediaStreamTrack, and found its state is 'ended'.

It may be that the mid reuse causes Chrome to treat the tracks ended?

What did you expect?

What happened?

Related code flow

  1. A Chrome publish to pion
  2. B Chrome publish to pion
  3. Pion publish all streams to B
  4. A leave
  5. Pion RemoveTrack(oldA) and publish to B
  6. B Chrome get onmute and onended event for the old A track
  7. A join
  8. Pion AddTrack(newA) and publish to B
  9. B Chrome get ontrack but readyState: "ended"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions