Skip to content

Show Message When RTSP is Disconnected or Not Connected #266

@alfian444

Description

@alfian444

How can I display an error message when the RTSP connection cannot be connected or is disconnected, and remove the error message if the connection is successful reconnects and continues streaming

I tried to create code to display an error message like this:

    loadPlayer({
      url: 'ws://' + location.host + '/api/stream',
      canvas: document.getElementById('canvas'),
      onDisconnect: () => {
             $('#error').text('Streaming disconnect');
             $('#error').show();
      }
    });

but I can't remove the #error when rtsp reconnect, because there is no function to know whether the stream reconnected successfully or not

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions