Skip to content
This repository was archived by the owner on Nov 19, 2020. It is now read-only.
This repository was archived by the owner on Nov 19, 2020. It is now read-only.

Subscriber doesn't re-connect to stream if subscriber connects, disconnects and reconnects. #113

@jonathanwmaddison

Description

@jonathanwmaddison

I have a pretty basic tokbox set up, and I'm having two issues with the Subscriber component:
screen shot 2018-04-12 at 11 35 43 am

Issue 1: I noticed that onSubscribeStop is never fired when the subscriber I'm testing with ends their connection to the stream. I can still detect the end of the subscriber feed by using this:

    OpenTok.on(OpenTok.events.ON_SESSION_STREAM_DESTROYED, () => {
      this.setState({ subscriberStarted: false });
    });

Issue 2: If the Subscriber disconnects from the sessions and then rejoins, onSubscribeStart isn't triggered and I never receive that subscribers video/audio feed again. I'm not seeing any console errors in my debugger. It's almost as if the Subscriber has become bricked/unable to be used after a disconnection event.

I solved this problem in an extremely hacky/ugly way by re-rendering a 'fresh' Subscriber component any time I received that ON_SESSION_STREM_DESTROYED event.

Is there something I am missing with how the Subscriber works?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions