Commit 7361426c authored by Saul Ibarra's avatar Saul Ibarra

Get the stream failure reason from MediaStreamDidEnd

parent 3d7f3467
...@@ -1290,7 +1290,6 @@ class ChatWindow(base_class, ui_class, ColorHelperMixin): ...@@ -1290,7 +1290,6 @@ class ChatWindow(base_class, ui_class, ColorHelperMixin):
session = notification.sender.blink_session.items.chat session = notification.sender.blink_session.items.chat
if session is None: if session is None:
return return
notification.sender._blink_fail_reason = None
#session.chat_widget.add_message(ChatStatus('Connecting...')) # disable it until we can replace it in the DOM -Dan #session.chat_widget.add_message(ChatStatus('Connecting...')) # disable it until we can replace it in the DOM -Dan
def _NH_MediaStreamDidNotInitialize(self, notification): def _NH_MediaStreamDidNotInitialize(self, notification):
...@@ -1315,20 +1314,11 @@ class ChatWindow(base_class, ui_class, ColorHelperMixin): ...@@ -1315,20 +1314,11 @@ class ChatWindow(base_class, ui_class, ColorHelperMixin):
session = notification.sender.blink_session.items.chat session = notification.sender.blink_session.items.chat
if session is None: if session is None:
return return
stream = notification.sender if notification.data.error is not None:
if stream._blink_fail_reason: session.chat_widget.add_message(ChatStatus('Disconnected: %s' % notification.data.error))
session.chat_widget.add_message(ChatStatus('Disconnected: %s' % stream._blink_fail_reason))
else: else:
session.chat_widget.add_message(ChatStatus('Disconnected')) session.chat_widget.add_message(ChatStatus('Disconnected'))
def _NH_MediaStreamDidFail(self, notification):
if notification.sender.type != 'chat':
return
session = notification.sender.blink_session.items.chat
if session is None:
return
notification.sender._blink_fail_reason = notification.data.reason
# signal handlers # signal handlers
# #
def _SH_InfoButtonClicked(self, checked): def _SH_InfoButtonClicked(self, checked):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment