File tree Expand file tree Collapse file tree 1 file changed +15
-8
lines changed Expand file tree Collapse file tree 1 file changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -711,21 +711,28 @@ <h3 class="col text-muted">
711
711
handleImageData ( data ) ;
712
712
}
713
713
else {
714
- var notificationEvent = JSON . parse ( data ) ;
715
- if ( notificationEvent != null && typeof ( notificationEvent ) == "object" )
716
- {
717
- var eventType = notificationEvent . eventType ;
718
- if ( eventType == "UPDATE_AUDIO_LEVEL" ) {
719
- //
720
- console . debug ( "Update audio level from server(max:0, min:127): " + notificationEvent . audioLevel ) ;
714
+ var notificationEvent ;
715
+ try {
716
+ notificationEvent = JSON . parse ( data ) ;
717
+ if ( notificationEvent != null && typeof ( notificationEvent ) == "object" )
718
+ {
719
+ var eventType = notificationEvent . eventType ;
720
+ if ( eventType == "UPDATE_AUDIO_LEVEL" ) {
721
+ //
722
+ console . debug ( "Update audio level from server(max:0, min:127): " + notificationEvent . audioLevel ) ;
723
+ }
724
+ else {
725
+ $ ( "#all-messages" ) . append ( "Received: " + data + "<br>" ) ;
726
+ }
721
727
}
722
728
else {
723
729
$ ( "#all-messages" ) . append ( "Received: " + data + "<br>" ) ;
724
730
}
725
731
}
726
- else {
732
+ catch ( exception ) {
727
733
$ ( "#all-messages" ) . append ( "Received: " + data + "<br>" ) ;
728
734
}
735
+
729
736
}
730
737
}
731
738
else if ( info == "bitrateMeasurement" ) {
You can’t perform that action at this time.
0 commit comments