@flashphoner/websdk 2.0.215 → 2.0.218

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10851,717 +10851,926 @@ exports['WSPlayer'] = WSPlayer;
10851
10851
  * @see Session
10852
10852
  */
10853
10853
 
10854
- var sessionStatus = {};
10855
- /**
10856
- * Fires when {@link Session} ws socket opens.
10857
- * @event CONNECTED
10858
- * @memberof Flashphoner.constants.SESSION_STATUS
10859
- */
10854
+ var SESSION_STATUS = Object.freeze({
10855
+ /**
10856
+ * Fires when {@link Session} ws socket opens.
10857
+ * @event CONNECTED
10858
+ * @memberof Flashphoner.constants.SESSION_STATUS
10859
+ */
10860
+ CONNECTED: 'CONNECTED',
10860
10861
 
10861
- define(sessionStatus, 'CONNECTED', 'CONNECTED');
10862
- /**
10863
- * Fires when {@link Session} receives connect ack from REST App.
10864
- * @event ESTABLISHED
10865
- * @memberof Flashphoner.constants.SESSION_STATUS
10866
- */
10862
+ /**
10863
+ * Fires when {@link Session} receives connect ack from REST App.
10864
+ * @event ESTABLISHED
10865
+ * @memberof Flashphoner.constants.SESSION_STATUS
10866
+ */
10867
+ ESTABLISHED: 'ESTABLISHED',
10867
10868
 
10868
- define(sessionStatus, 'ESTABLISHED', 'ESTABLISHED');
10869
- /**
10870
- * Fires when {@link Session} disconnects.
10871
- * @event DISCONNECTED
10872
- * @memberof Flashphoner.constants.SESSION_STATUS
10873
- */
10869
+ /**
10870
+ * Fires when {@link Session} disconnects.
10871
+ * @event DISCONNECTED
10872
+ * @memberof Flashphoner.constants.SESSION_STATUS
10873
+ */
10874
+ DISCONNECTED: 'DISCONNECTED',
10874
10875
 
10875
- define(sessionStatus, 'DISCONNECTED', 'DISCONNECTED');
10876
- /**
10877
- * Fires if {@link Session} call of rest method error.
10878
- * @event WARN
10879
- * @memberof Flashphoner.constants.SESSION_STATUS
10880
- */
10876
+ /**
10877
+ * Fires if {@link Session} call of rest method error.
10878
+ * @event WARN
10879
+ * @memberof Flashphoner.constants.SESSION_STATUS
10880
+ */
10881
+ WARN: 'WARN',
10881
10882
 
10882
- define(sessionStatus, 'WARN', 'WARN');
10883
- /**
10884
- * Fires if {@link Session} connection failed.
10885
- * Some of the reasons can be network connection failed, REST App failed
10886
- * @event FAILED
10887
- * @memberof Flashphoner.constants.SESSION_STATUS
10888
- */
10883
+ /**
10884
+ * Fires if {@link Session} connection failed.
10885
+ * Some of the reasons can be network connection failed, REST App failed
10886
+ * @event FAILED
10887
+ * @memberof Flashphoner.constants.SESSION_STATUS
10888
+ */
10889
+ FAILED: 'FAILED',
10889
10890
 
10890
- define(sessionStatus, 'FAILED', 'FAILED');
10891
- /**
10892
- * Fires wneh {@link Session} receives debug event
10893
- * @event DEBUG
10894
- * @memberof Flashphoner.constants.SESSION_STATUS
10895
- */
10891
+ /**
10892
+ * Fires wneh {@link Session} receives debug event
10893
+ * @event DEBUG
10894
+ * @memberof Flashphoner.constants.SESSION_STATUS
10895
+ */
10896
+ DEBUG: 'DEBUG',
10896
10897
 
10897
- define(sessionStatus, 'DEBUG', 'DEBUG');
10898
- /**
10899
- * Fires when {@link Session} receives custom REST App message.
10900
- *
10901
- * @event APP_DATA
10902
- * @memberof Flashphoner.constants.SESSION_STATUS
10903
- */
10898
+ /**
10899
+ * Fires when {@link Session} receives custom REST App message.
10900
+ *
10901
+ * @event APP_DATA
10902
+ * @memberof Flashphoner.constants.SESSION_STATUS
10903
+ */
10904
+ APP_DATA: 'APP_DATA',
10904
10905
 
10905
- define(sessionStatus, 'APP_DATA', 'APP_DATA');
10906
- /**
10907
- * Fires when {@link Session} receives status of sendData operation.
10908
- *
10909
- * @event SEND_DATA_STATUS
10910
- * @memberof Flashphoner.constants.SESSION_STATUS
10911
- */
10906
+ /**
10907
+ * Fires when {@link Session} receives status of sendData operation.
10908
+ *
10909
+ * @event SEND_DATA_STATUS
10910
+ * @memberof Flashphoner.constants.SESSION_STATUS
10911
+ */
10912
+ SEND_DATA_STATUS: 'SEND_DATA_STATUS',
10912
10913
 
10913
- define(sessionStatus, 'SEND_DATA_STATUS', 'SEND_DATA_STATUS'); //State of newly created Session
10914
+ /**
10915
+ * State of newly created {@link Session}.
10916
+ *
10917
+ * @event PENDING
10918
+ * @memberof Flashphoner.constants.SESSION_STATUS
10919
+ */
10920
+ PENDING: 'PENDING',
10914
10921
 
10915
- define(sessionStatus, 'PENDING', 'PENDING');
10916
- /**
10917
- * Fires when {@link Session} registers as sip client.
10918
- *
10919
- * @event APP_DATA
10920
- * @memberof Flashphoner.constants.SESSION_STATUS
10921
- */
10922
+ /**
10923
+ * Fires when {@link Session} registers as sip client.
10924
+ *
10925
+ * @event REGISTERED
10926
+ * @memberof Flashphoner.constants.SESSION_STATUS
10927
+ */
10928
+ REGISTERED: 'REGISTERED',
10922
10929
 
10923
- define(sessionStatus, 'REGISTERED', 'REGISTERED');
10924
- /**
10925
- * Fires when {@link Session} unregisters as sip client.
10926
- *
10927
- * @event APP_DATA
10928
- * @memberof Flashphoner.constants.SESSION_STATUS
10929
- */
10930
+ /**
10931
+ * Fires when {@link Session} unregisters as sip client.
10932
+ *
10933
+ * @event UNREGISTERED
10934
+ * @memberof Flashphoner.constants.SESSION_STATUS
10935
+ */
10936
+ UNREGISTERED: 'UNREGISTERED',
10930
10937
 
10931
- define(sessionStatus, 'UNREGISTERED', 'UNREGISTERED');
10932
- define(sessionStatus, 'INCOMING_CALL', 'INCOMING_CALL');
10938
+ /**
10939
+ * Fires when {@link Session} receives an incoming call.
10940
+ *
10941
+ * @event INCOMING_CALL
10942
+ * @memberof Flashphoner.constants.SESSION_STATUS
10943
+ */
10944
+ INCOMING_CALL: 'INCOMING_CALL'
10945
+ });
10933
10946
  /**
10934
10947
  * @namespace Flashphoner.constants.STREAM_STATUS
10935
10948
  * @see Stream
10936
10949
  */
10937
10950
 
10938
- var streamStatus = {}; //State of newly created Stream
10939
-
10940
- define(streamStatus, 'NEW', 'NEW'); //State between publish/play and server response
10951
+ var STREAM_STATUS = Object.freeze({
10952
+ /**
10953
+ * State of newly created {@link Stream}.
10954
+ *
10955
+ * @event NEW
10956
+ * @memberof Flashphoner.constants.STREAM_STATUS
10957
+ */
10958
+ NEW: 'NEW',
10941
10959
 
10942
- define(streamStatus, 'PENDING', 'PENDING');
10943
- /**
10944
- * Fires when {@link Stream} starts publishing.
10945
- * @event PUBLISHING
10946
- * @memberof Flashphoner.constants.STREAM_STATUS
10947
- */
10960
+ /**
10961
+ * State before {@link Stream} publishing/playing.
10962
+ *
10963
+ * @event PENDING
10964
+ * @memberof Flashphoner.constants.STREAM_STATUS
10965
+ */
10966
+ PENDING: 'PENDING',
10948
10967
 
10949
- define(streamStatus, 'PUBLISHING', 'PUBLISHING');
10950
- /**
10951
- * Fires when {@link Stream} starts playing.
10952
- * @event PLAYING
10953
- * @memberof Flashphoner.constants.STREAM_STATUS
10954
- */
10968
+ /**
10969
+ * Fires when {@link Stream} starts publishing.
10970
+ * @event PUBLISHING
10971
+ * @memberof Flashphoner.constants.STREAM_STATUS
10972
+ */
10973
+ PUBLISHING: 'PUBLISHING',
10955
10974
 
10956
- define(streamStatus, 'PLAYING', 'PLAYING');
10957
- /**
10958
- * Fires if {@link Stream} paused.
10959
- * @event PAUSED
10960
- * @memberof Flashphoner.constants.STREAM_STATUS
10961
- */
10975
+ /**
10976
+ * Fires when {@link Stream} starts playing.
10977
+ * @event PLAYING
10978
+ * @memberof Flashphoner.constants.STREAM_STATUS
10979
+ */
10980
+ PLAYING: 'PLAYING',
10962
10981
 
10963
- define(streamStatus, 'PAUSED', 'PAUSED');
10964
- /**
10965
- * Fires if {@link Stream} was unpublished.
10966
- * @event UNPUBLISHING
10967
- * @memberof Flashphoner.constants.STREAM_STATUS
10968
- */
10982
+ /**
10983
+ * Fires if {@link Stream} paused.
10984
+ * @event PAUSED
10985
+ * @memberof Flashphoner.constants.STREAM_STATUS
10986
+ */
10987
+ PAUSED: 'PAUSED',
10969
10988
 
10970
- define(streamStatus, 'UNPUBLISHED', 'UNPUBLISHED');
10971
- /**
10972
- * Fires if {@link Stream} was stopped.
10973
- * @event STOPPED
10974
- * @memberof Flashphoner.constants.STREAM_STATUS
10975
- */
10989
+ /**
10990
+ * Fires if {@link Stream} was unpublished.
10991
+ * @event UNPUBLISHED
10992
+ * @memberof Flashphoner.constants.STREAM_STATUS
10993
+ */
10994
+ UNPUBLISHED: 'UNPUBLISHED',
10976
10995
 
10977
- define(streamStatus, 'STOPPED', 'STOPPED');
10978
- /**
10979
- * Fires if {@link Stream} failed.
10980
- * @event FAILED
10981
- * @memberof Flashphoner.constants.STREAM_STATUS
10982
- */
10996
+ /**
10997
+ * Fires if playing {@link Stream} was stopped.
10998
+ * @event STOPPED
10999
+ * @memberof Flashphoner.constants.STREAM_STATUS
11000
+ */
11001
+ STOPPED: 'STOPPED',
10983
11002
 
10984
- define(streamStatus, 'FAILED', 'FAILED');
10985
- /**
10986
- * Fires if {@link Stream} playback problem.
10987
- * @event PLAYBACK_PROBLEM
10988
- * @memberof Flashphoner.constants.STREAM_STATUS
10989
- */
11003
+ /**
11004
+ * Fires if {@link Stream} failed.
11005
+ * @event FAILED
11006
+ * @memberof Flashphoner.constants.STREAM_STATUS
11007
+ */
11008
+ FAILED: 'FAILED',
10990
11009
 
10991
- define(streamStatus, 'PLAYBACK_PROBLEM', 'PLAYBACK_PROBLEM');
10992
- /**
10993
- * Fires if {@link Stream} resize.
10994
- * @event RESIZE
10995
- * @memberof Flashphoner.constants.STREAM_STATUS
10996
- */
11010
+ /**
11011
+ * Fires if {@link Stream} playback problem.
11012
+ * @event PLAYBACK_PROBLEM
11013
+ * @memberof Flashphoner.constants.STREAM_STATUS
11014
+ */
11015
+ PLAYBACK_PROBLEM: 'PLAYBACK_PROBLEM',
10997
11016
 
10998
- define(streamStatus, 'RESIZE', 'RESIZE');
10999
- /**
11000
- * Fires when {@link Stream} snapshot becomes available.
11001
- * Snapshot is base64 encoded png available through {@link Stream.getInfo}
11002
- * @event SNAPSHOT_COMPLETE
11003
- * @memberof Flashphoner.constants.STREAM_STATUS
11004
- */
11017
+ /**
11018
+ * Fires if playing {@link Stream} picture resizing.
11019
+ * @event RESIZE
11020
+ * @memberof Flashphoner.constants.STREAM_STATUS
11021
+ */
11022
+ RESIZE: 'RESIZE',
11005
11023
 
11006
- define(streamStatus, 'SNAPSHOT_COMPLETE', 'SNAPSHOT_COMPLETE');
11007
- /**
11008
- * Fires on subscribe {@link Stream} if bitrate is higher than available network bandwidth.
11009
- * @event NOT_ENOUGH_BANDWIDTH
11010
- * @memberof Flashphoner.constants.NOT_ENOUGH_BANDWIDTH
11011
- */
11024
+ /**
11025
+ * Fires when {@link Stream} snapshot becomes available.
11026
+ * Snapshot is base64 encoded png available through {@link Stream.getInfo}
11027
+ * @event SNAPSHOT_COMPLETE
11028
+ * @memberof Flashphoner.constants.STREAM_STATUS
11029
+ */
11030
+ SNAPSHOT_COMPLETE: 'SNAPSHOT_COMPLETE',
11012
11031
 
11013
- define(streamStatus, 'NOT_ENOUGH_BANDWIDTH', 'NOT_ENOUGH_BANDWIDTH');
11032
+ /**
11033
+ * Fires on playing {@link Stream} if bitrate is higher than available network bandwidth.
11034
+ * @event NOT_ENOUGH_BANDWIDTH
11035
+ * @memberof Flashphoner.constants.NOT_ENOUGH_BANDWIDTH
11036
+ */
11037
+ NOT_ENOUGH_BANDWIDTH: 'NOT_ENOUGH_BANDWIDTH'
11038
+ });
11014
11039
  /**
11015
11040
  * @namespace Flashphoner.constants.CALL_STATUS
11016
11041
  * @see Call
11017
11042
  */
11018
11043
 
11019
- var callStatus = {}; //State of newly created Call
11020
-
11021
- define(callStatus, 'NEW', 'NEW');
11022
- define(callStatus, 'RING', 'RING');
11023
- define(callStatus, 'RING_MEDIA', 'RING_MEDIA');
11024
- define(callStatus, 'HOLD', 'HOLD');
11025
- define(callStatus, 'ESTABLISHED', 'ESTABLISHED');
11026
- define(callStatus, 'FINISH', 'FINISH');
11027
- define(callStatus, 'BUSY', 'BUSY');
11028
- define(callStatus, 'SESSION_PROGRESS', 'SESSION_PROGRESS');
11029
- define(callStatus, 'FAILED', 'FAILED');
11030
- define(callStatus, 'PENDING', 'PENDING');
11031
- define(callStatus, 'TRYING', 'TRYING');
11044
+ var CALL_STATUS = Object.freeze({
11045
+ /**
11046
+ * State of newly created {@link Call}
11047
+ * @event NEW
11048
+ * @memberof Flashphoner.constants.CALL_STATUS
11049
+ */
11050
+ NEW: 'NEW',
11051
+
11052
+ /**
11053
+ * The server is ringing to the callee
11054
+ * @event RING
11055
+ * @memberof Flashphoner.constants.CALL_STATUS
11056
+ */
11057
+ RING: 'RING',
11058
+ RING_MEDIA: 'RING_MEDIA',
11059
+
11060
+ /**
11061
+ * The {@link Call} was put on hold
11062
+ * @event HOLD
11063
+ * @memberof Flashphoner.constants.CALL_STATUS
11064
+ */
11065
+ HOLD: 'HOLD',
11066
+
11067
+ /**
11068
+ * The {@link Call} is established
11069
+ * @event ESTABLISHED
11070
+ * @memberof Flashphoner.constants.CALL_STATUS
11071
+ */
11072
+ ESTABLISHED: 'ESTABLISHED',
11073
+
11074
+ /**
11075
+ * The {@link Call} is finished
11076
+ * @event FINISH
11077
+ * @memberof Flashphoner.constants.CALL_STATUS
11078
+ */
11079
+ FINISH: 'FINISH',
11080
+
11081
+ /**
11082
+ * Callee is busy
11083
+ * @event BUSY
11084
+ * @memberof Flashphoner.constants.CALL_STATUS
11085
+ */
11086
+ BUSY: 'BUSY',
11087
+
11088
+ /**
11089
+ * SIP session is in progress
11090
+ * @event SESSION_PROGRESS
11091
+ * @memberof Flashphoner.constants.CALL_STATUS
11092
+ */
11093
+ SESSION_PROGRESS: 'SESSION_PROGRESS',
11094
+
11095
+ /**
11096
+ * The {@link Call} is failed
11097
+ * @event FAILED
11098
+ * @memberof Flashphoner.constants.CALL_STATUS
11099
+ */
11100
+ FAILED: 'FAILED',
11101
+
11102
+ /**
11103
+ * The {@link Call} state before ringing
11104
+ * @event PENDING
11105
+ * @memberof Flashphoner.constants.CALL_STATUS
11106
+ */
11107
+ PENDING: 'PENDING',
11108
+
11109
+ /**
11110
+ * The server trying to establish {@link Call}
11111
+ * @event TRYING
11112
+ * @memberof Flashphoner.constants.CALL_STATUS
11113
+ */
11114
+ TRYING: 'TRYING'
11115
+ });
11032
11116
  /**
11033
11117
  * @namespace Flashphoner.constants.STREAM_STATUS_INFO
11034
11118
  * @see Stream
11035
11119
  */
11036
11120
 
11037
- var streamStatusInfo = {};
11038
- /**
11039
- * Indicates general error during ICE negotiation. Usually occurs if client is behind some exotic nat/firewall.
11040
- * @event FAILED_BY_ICE_ERROR
11041
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11042
- */
11043
-
11044
- define(streamStatusInfo, 'FAILED_BY_ICE_ERROR', 'Failed by ICE error');
11045
- /**
11046
- * Timeout has been reached during ICE establishment.
11047
- * @event FAILED_BY_ICE_TIMEOUT
11048
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11049
- */
11121
+ var STREAM_STATUS_INFO = Object.freeze({
11122
+ /**
11123
+ * Indicates general error during ICE negotiation. Usually occurs if client is behind some exotic nat/firewall.
11124
+ * @event FAILED_BY_ICE_ERROR
11125
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11126
+ */
11127
+ FAILED_BY_ICE_ERROR: 'Failed by ICE error',
11050
11128
 
11051
- define(streamStatusInfo, 'FAILED_BY_ICE_TIMEOUT', 'Failed by ICE timeout');
11052
- /**
11053
- * ICE refresh failed on session.
11054
- * @event FAILED_BY_KEEP_ALIVE
11055
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11056
- */
11129
+ /**
11130
+ * Timeout has been reached during ICE establishment.
11131
+ * @event FAILED_BY_ICE_TIMEOUT
11132
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11133
+ */
11134
+ FAILED_BY_ICE_TIMEOUT: 'Failed by ICE timeout',
11057
11135
 
11058
- define(streamStatusInfo, 'FAILED_BY_KEEP_ALIVE', 'Failed by ICE keep alive');
11059
- /**
11060
- * DTLS has wrong fingerprint.
11061
- * @event FAILED_BY_DTLS_FINGERPRINT_ERROR
11062
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11063
- */
11136
+ /**
11137
+ * ICE refresh failed on session.
11138
+ * @event FAILED_BY_KEEP_ALIVE
11139
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11140
+ */
11141
+ FAILED_BY_KEEP_ALIVE: 'Failed by ICE keep alive',
11064
11142
 
11065
- define(streamStatusInfo, 'FAILED_BY_DTLS_FINGERPRINT_ERROR', 'Failed by DTLS fingerprint error');
11066
- /**
11067
- * Client did not send DTLS packets or packets were lost/corrupted during transmission.
11068
- * @event FAILED_BY_DTLS_ERROR
11069
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11070
- */
11143
+ /**
11144
+ * DTLS has wrong fingerprint.
11145
+ * @event FAILED_BY_DTLS_FINGERPRINT_ERROR
11146
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11147
+ */
11148
+ FAILED_BY_DTLS_FINGERPRINT_ERROR: 'Failed by DTLS fingerprint error',
11071
11149
 
11072
- define(streamStatusInfo, 'FAILED_BY_DTLS_ERROR', 'Failed by DTLS error');
11073
- /**
11074
- * Indicates general HLS packetizer error, can occur during initialization or packetization (wrong input or out of disk space).
11075
- * @event FAILED_BY_HLS_WRITER_ERROR
11076
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11077
- */
11150
+ /**
11151
+ * Client did not send DTLS packets or packets were lost/corrupted during transmission.
11152
+ * @event FAILED_BY_DTLS_ERROR
11153
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11154
+ */
11155
+ FAILED_BY_DTLS_ERROR: 'Failed by DTLS error',
11078
11156
 
11079
- define(streamStatusInfo, 'FAILED_BY_HLS_WRITER_ERROR', 'Failed by HLS writer error');
11080
- /**
11081
- * Indicates general RTMP republishing error, can occur during initialization or rtmp packetization.
11082
- * @event FAILED_BY_RTMP_WRITER_ERROR
11083
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11084
- */
11157
+ /**
11158
+ * Indicates general HLS packetizer error, can occur during initialization or packetization (wrong input or out of disk space).
11159
+ * @event FAILED_BY_HLS_WRITER_ERROR
11160
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11161
+ */
11162
+ FAILED_BY_HLS_WRITER_ERROR: 'Failed by HLS writer error',
11085
11163
 
11086
- define(streamStatusInfo, 'FAILED_BY_RTMP_WRITER_ERROR', 'Failed by RTMP writer error');
11087
- /**
11088
- * RTP session failed by RTP activity timer.
11089
- * @event FAILED_BY_RTP_ACTIVITY
11090
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11091
- */
11164
+ /**
11165
+ * Indicates general RTMP republishing error, can occur during initialization or rtmp packetization.
11166
+ * @event FAILED_BY_RTMP_WRITER_ERROR
11167
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11168
+ */
11169
+ FAILED_BY_RTMP_WRITER_ERROR: 'Failed by RTMP writer error',
11092
11170
 
11093
- define(streamStatusInfo, 'FAILED_BY_RTP_ACTIVITY', 'Failed by RTP activity');
11094
- /**
11095
- * Related session was disconnected.
11096
- * @event STOPPED_BY_SESSION_DISCONNECT
11097
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11098
- */
11171
+ /**
11172
+ * RTP session failed by RTP activity timer.
11173
+ * @event FAILED_BY_RTP_ACTIVITY
11174
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11175
+ */
11176
+ FAILED_BY_RTP_ACTIVITY: 'Failed by RTP activity',
11099
11177
 
11100
- define(streamStatusInfo, 'STOPPED_BY_SESSION_DISCONNECT', 'Stopped by session disconnect');
11101
- /**
11102
- * Stream was stopped by rest terminate request.
11103
- * @event STOPPED_BY_REST_TERMINATE
11104
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11105
- */
11178
+ /**
11179
+ * Related session was disconnected.
11180
+ * @event STOPPED_BY_SESSION_DISCONNECT
11181
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11182
+ */
11183
+ STOPPED_BY_SESSION_DISCONNECT: 'Stopped by session disconnect',
11106
11184
 
11107
- define(streamStatusInfo, 'STOPPED_BY_REST_TERMINATE', 'Stopped by rest /terminate');
11108
- /**
11109
- * Related publisher stopped its stream or lost connection.
11110
- * @event STOPPED_BY_PUBLISHER_STOP
11111
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11112
- */
11185
+ /**
11186
+ * Stream was stopped by rest terminate request.
11187
+ * @event STOPPED_BY_REST_TERMINATE
11188
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11189
+ */
11190
+ STOPPED_BY_REST_TERMINATE: 'Stopped by rest /terminate',
11113
11191
 
11114
- define(streamStatusInfo, 'STOPPED_BY_PUBLISHER_STOP', 'Stopped by publisher stop');
11115
- /**
11116
- * Stop the media session by user after call was finished or unpublish stream.
11117
- * @event STOPPED_BY_USER
11118
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11119
- */
11192
+ /**
11193
+ * Related publisher stopped its stream or lost connection.
11194
+ * @event STOPPED_BY_PUBLISHER_STOP
11195
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11196
+ */
11197
+ STOPPED_BY_PUBLISHER_STOP: 'Stopped by publisher stop',
11120
11198
 
11121
- define(streamStatusInfo, 'STOPPED_BY_USER', 'Stopped by user');
11122
- /**
11123
- * Error occurred on the stream.
11124
- * @event FAILED_BY_ERROR
11125
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11126
- */
11199
+ /**
11200
+ * Stop the media session by user after call was finished or unpublish stream.
11201
+ * @event STOPPED_BY_USER
11202
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11203
+ */
11204
+ STOPPED_BY_USER: 'Stopped by user',
11127
11205
 
11128
- define(streamStatusInfo, 'FAILED_BY_ERROR', 'Failed by error');
11129
- /**
11130
- * Indicates that error occurred during media session creation. This might be SDP parsing error, all ports are busy, wrong session related config etc.
11131
- * @event FAILED_TO_ADD_STREAM_TO_PROXY
11132
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11133
- */
11206
+ /**
11207
+ * Error occurred on the stream.
11208
+ * @event FAILED_BY_ERROR
11209
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11210
+ */
11211
+ FAILED_BY_ERROR: 'Failed by error',
11134
11212
 
11135
- define(streamStatusInfo, 'FAILED_TO_ADD_STREAM_TO_PROXY', 'Failed to add stream to proxy');
11136
- /**
11137
- * Stopped shapshot distributor.
11138
- * @event DISTRIBUTOR_STOPPED
11139
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11140
- */
11213
+ /**
11214
+ * Indicates that error occurred during media session creation. This might be SDP parsing error, all ports are busy, wrong session related config etc.
11215
+ * @event FAILED_TO_ADD_STREAM_TO_PROXY
11216
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11217
+ */
11218
+ FAILED_TO_ADD_STREAM_TO_PROXY: 'Failed to add stream to proxy',
11141
11219
 
11142
- define(streamStatusInfo, 'DISTRIBUTOR_STOPPED', 'Distributor stopped');
11143
- /**
11144
- * Publish stream is not ready, try again later.
11145
- * @event PUBLISH_STREAM_IS_NOT_READY
11146
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11147
- */
11220
+ /**
11221
+ * Stopped shapshot distributor.
11222
+ * @event DISTRIBUTOR_STOPPED
11223
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11224
+ */
11225
+ DISTRIBUTOR_STOPPED: 'Distributor stopped',
11148
11226
 
11149
- define(streamStatusInfo, 'PUBLISH_STREAM_IS_NOT_READY', 'Publish stream is not ready');
11150
- /**
11151
- * Stream with this name is not found, check the correct of the name.
11152
- * @event STREAM_NOT_FOUND
11153
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11154
- */
11227
+ /**
11228
+ * Publish stream is not ready, try again later.
11229
+ * @event PUBLISH_STREAM_IS_NOT_READY
11230
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11231
+ */
11232
+ PUBLISH_STREAM_IS_NOT_READY: 'Publish stream is not ready',
11155
11233
 
11156
- define(streamStatusInfo, 'STREAM_NOT_FOUND', 'Stream not found');
11157
- /**
11158
- * Server already has a publish stream with the same name, try using different one.
11159
- * @event STREAM_NAME_ALREADY_IN_USE
11160
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11161
- */
11234
+ /**
11235
+ * Stream with this name is not found, check the correct of the name.
11236
+ * @event STREAM_NOT_FOUND
11237
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11238
+ */
11239
+ STREAM_NOT_FOUND: 'Stream not found',
11162
11240
 
11163
- define(streamStatusInfo, 'STREAM_NAME_ALREADY_IN_USE', 'Stream name is already in use');
11164
- /**
11165
- * Error indicates that stream object received by server has empty mediaSessionId field.
11166
- * @event MEDIASESSION_ID_NULL
11167
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11168
- */
11241
+ /**
11242
+ * Server already has a publish stream with the same name, try using different one.
11243
+ * @event STREAM_NAME_ALREADY_IN_USE
11244
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11245
+ */
11246
+ STREAM_NAME_ALREADY_IN_USE: 'Stream name is already in use',
11169
11247
 
11170
- define(streamStatusInfo, 'MEDIASESSION_ID_NULL', 'MediaSessionId is null');
11171
- /**
11172
- * Published or subscribed sessions used this MediaSessionId.
11173
- * @event MEDIASESSION_ID_ALREADY_IN_USE
11174
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11175
- */
11248
+ /**
11249
+ * Error indicates that stream object received by server has empty mediaSessionId field.
11250
+ * @event MEDIASESSION_ID_NULL
11251
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11252
+ */
11253
+ MEDIASESSION_ID_NULL: 'MediaSessionId is null',
11176
11254
 
11177
- define(streamStatusInfo, 'MEDIASESSION_ID_ALREADY_IN_USE', 'MediaSessionId is already in use');
11178
- /**
11179
- * Session is not initialized or terminated on play ordinary stream.
11180
- * @event SESSION_NOT_READY
11181
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11182
- */
11255
+ /**
11256
+ * Published or subscribed sessions used this MediaSessionId.
11257
+ * @event MEDIASESSION_ID_ALREADY_IN_USE
11258
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11259
+ */
11260
+ MEDIASESSION_ID_ALREADY_IN_USE: 'MediaSessionId is already in use',
11183
11261
 
11184
- define(streamStatusInfo, 'SESSION_NOT_READY', 'Session not ready');
11185
- /**
11186
- * Actual session does not exist.
11187
- * @event SESSION_DOES_NOT_EXIST
11188
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11189
- */
11262
+ /**
11263
+ * Session is not initialized or terminated on play ordinary stream.
11264
+ * @event SESSION_NOT_READY
11265
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11266
+ */
11267
+ SESSION_NOT_READY: 'Session not ready',
11190
11268
 
11191
- define(streamStatusInfo, 'SESSION_DOES_NOT_EXIST', 'Session does not exist');
11192
- /**
11193
- * RTSP has wrong format on play stream, check correct of the RTSP url.
11194
- * @event RTSP_HAS_WRONG_FORMAT
11195
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11196
- */
11269
+ /**
11270
+ * Actual session does not exist.
11271
+ * @event SESSION_DOES_NOT_EXIST
11272
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11273
+ */
11274
+ SESSION_DOES_NOT_EXIST: 'Session does not exist',
11197
11275
 
11198
- define(streamStatusInfo, 'RTSP_HAS_WRONG_FORMAT', 'Rtsp has wrong format');
11199
- /**
11200
- * Failed to play vod stream, this format is not supported.
11201
- * @event FILE_HAS_WRONG_FORMAT
11202
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11203
- */
11276
+ /**
11277
+ * RTSP has wrong format on play stream, check the RTSP url validity.
11278
+ * @event RTSP_HAS_WRONG_FORMAT
11279
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11280
+ */
11281
+ RTSP_HAS_WRONG_FORMAT: 'Rtsp has wrong format',
11204
11282
 
11205
- define(streamStatusInfo, 'FILE_HAS_WRONG_FORMAT', 'File has wrong format');
11206
- /**
11207
- * Failed to connect to rtsp stream.
11208
- * @event FAILED_TO_CONNECT_TO_RTSP_STREAM
11209
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11210
- */
11283
+ /**
11284
+ * Failed to play vod stream, this format is not supported.
11285
+ * @event FILE_HAS_WRONG_FORMAT
11286
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11287
+ */
11288
+ FILE_HAS_WRONG_FORMAT: 'File has wrong format',
11211
11289
 
11212
- define(streamStatusInfo, 'FAILED_TO_CONNECT_TO_RTSP_STREAM', 'Failed to connect to rtsp stream');
11213
- /**
11214
- * Rtsp stream is not found, agent received "404-Not Found".
11215
- * @event RTSP_STREAM_NOT_FOUND
11216
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11217
- */
11290
+ /**
11291
+ * Failed to connect to rtsp stream.
11292
+ * @event FAILED_TO_CONNECT_TO_RTSP_STREAM
11293
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11294
+ */
11295
+ FAILED_TO_CONNECT_TO_RTSP_STREAM: 'Failed to connect to rtsp stream',
11218
11296
 
11219
- define(streamStatusInfo, 'RTSP_STREAM_NOT_FOUND', 'Rtsp stream not found');
11220
- /**
11221
- * On shutdown RTSP agent.
11222
- * @event RTSPAGENT_SHUTDOWN
11223
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11224
- */
11297
+ /**
11298
+ * Rtsp stream is not found, agent received "404-Not Found".
11299
+ * @event RTSP_STREAM_NOT_FOUND
11300
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11301
+ */
11302
+ RTSP_STREAM_NOT_FOUND: 'Rtsp stream not found',
11225
11303
 
11226
- define(streamStatusInfo, 'RTSPAGENT_SHUTDOWN', 'RtspAgent shutdown');
11227
- /**
11228
- * Stream failed
11229
- * @event STREAM_FAILED
11230
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11231
- */
11304
+ /**
11305
+ * On shutdown RTSP agent.
11306
+ * @event RTSPAGENT_SHUTDOWN
11307
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11308
+ */
11309
+ RTSPAGENT_SHUTDOWN: 'RtspAgent shutdown',
11232
11310
 
11233
- define(streamStatusInfo, 'STREAM_FAILED', 'Stream failed');
11234
- /**
11235
- * No common codecs on setup track, did not found corresponding trackId->mediaPort.
11236
- * @event NO_COMMON_CODECS
11237
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11238
- */
11311
+ /**
11312
+ * Stream failed
11313
+ * @event STREAM_FAILED
11314
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11315
+ */
11316
+ STREAM_FAILED: 'Stream failed',
11239
11317
 
11240
- define(streamStatusInfo, 'NO_COMMON_CODECS', 'No common codecs');
11241
- /**
11242
- * Bad referenced rtsp link, check for correct, example: rtsp://user:b@d_password@127.0.0.1/stream.
11243
- * @event BAD_URI
11244
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11245
- */
11318
+ /**
11319
+ * No common codecs on setup track, did not found corresponding trackId->mediaPort.
11320
+ * @event NO_COMMON_CODECS
11321
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11322
+ */
11323
+ NO_COMMON_CODECS: 'No common codecs',
11246
11324
 
11247
- define(streamStatusInfo, 'BAD_URI', 'Bad URI');
11248
- /**
11249
- * General VOD error, indicates that Exception occurred while reading/processing media file.
11250
- * @event GOT_EXCEPTION_WHILE_STREAMING_FILE
11251
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11252
- */
11325
+ /**
11326
+ * Bad referenced rtsp link, check for correct, example: rtsp://user:b@d_password@127.0.0.1/stream.
11327
+ * @event BAD_URI
11328
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11329
+ */
11330
+ BAD_URI: 'Bad URI',
11253
11331
 
11254
- define(streamStatusInfo, 'GOT_EXCEPTION_WHILE_STREAMING_FILE', 'Got exception while streaming file');
11255
- /**
11256
- * Requested stream shutdown.
11257
- * @event REQUESTED_STREAM_SHUTDOWN
11258
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11259
- */
11332
+ /**
11333
+ * General VOD error, indicates that Exception occurred while reading/processing media file.
11334
+ * @event GOT_EXCEPTION_WHILE_STREAMING_FILE
11335
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11336
+ */
11337
+ GOT_EXCEPTION_WHILE_STREAMING_FILE: 'Got exception while streaming file',
11260
11338
 
11261
- define(streamStatusInfo, 'REQUESTED_STREAM_SHUTDOWN', 'Requested stream shutdown');
11262
- /**
11263
- * Failed to create movie, file can not be read.
11264
- * @event FAILED_TO_READ_FILE
11265
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11266
- */
11339
+ /**
11340
+ * Requested stream shutdown.
11341
+ * @event REQUESTED_STREAM_SHUTDOWN
11342
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11343
+ */
11344
+ REQUESTED_STREAM_SHUTDOWN: 'Requested stream shutdown',
11267
11345
 
11268
- define(streamStatusInfo, 'FAILED_TO_READ_FILE', 'Failed to read file');
11269
- /**
11270
- * File does not exist, check filename.
11271
- * @event FILE_NOT_FOUND
11272
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11273
- */
11346
+ /**
11347
+ * Failed to create movie, file can not be read.
11348
+ * @event FAILED_TO_READ_FILE
11349
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11350
+ */
11351
+ FAILED_TO_READ_FILE: 'Failed to read file',
11274
11352
 
11275
- define(streamStatusInfo, 'FILE_NOT_FOUND', 'File not found');
11276
- /**
11277
- * Server failed to establish websocket connection with origin server.
11278
- * @event FAILED_TO_CONNECT_TO_ORIGIN_STREAM
11279
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11280
- */
11353
+ /**
11354
+ * File does not exist, check filename.
11355
+ * @event FILE_NOT_FOUND
11356
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11357
+ */
11358
+ FILE_NOT_FOUND: 'File not found',
11281
11359
 
11282
- define(streamStatusInfo, 'FAILED_TO_CONNECT_TO_ORIGIN_STREAM', 'Failed to connect to origin stream');
11283
- /**
11284
- * CDN stream not found.
11285
- * @event CDN_STREAM_NOT_FOUND
11286
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11287
- */
11360
+ /**
11361
+ * Server failed to establish websocket connection with origin server.
11362
+ * @event FAILED_TO_CONNECT_TO_ORIGIN_STREAM
11363
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11364
+ */
11365
+ FAILED_TO_CONNECT_TO_ORIGIN_STREAM: 'Failed to connect to origin stream',
11288
11366
 
11289
- define(streamStatusInfo, 'CDN_STREAM_NOT_FOUND', 'CDN stream not found');
11290
- /**
11291
- * Indicates that provided URL protocol in stream name is invalid.
11292
- * Valid: vod://file.mp4
11293
- * Invalid: dov://file.mp4
11294
- * @event FAILED_TO_GET_AGENT_STORAGE
11295
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11296
- */
11367
+ /**
11368
+ * CDN stream not found.
11369
+ * @event CDN_STREAM_NOT_FOUND
11370
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11371
+ */
11372
+ CDN_STREAM_NOT_FOUND: 'CDN stream not found',
11297
11373
 
11298
- define(streamStatusInfo, 'FAILED_TO_GET_AGENT_STORAGE', 'Failed to get agent storage');
11299
- /**
11300
- * Shutdown agent servicing origin stream.
11301
- * @event AGENT_SERVICING_ORIGIN_STREAM_IS_SHUTTING_DOWN
11302
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11303
- */
11374
+ /**
11375
+ * Indicates that provided URL protocol in stream name is invalid.
11376
+ * Valid: vod://file.mp4
11377
+ * Invalid: dov://file.mp4
11378
+ * @event FAILED_TO_GET_AGENT_STORAGE
11379
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11380
+ */
11381
+ FAILED_TO_GET_AGENT_STORAGE: 'Failed to get agent storage',
11304
11382
 
11305
- define(streamStatusInfo, 'AGENT_SERVICING_ORIGIN_STREAM_IS_SHUTTING_DOWN', 'Agent servicing origin stream is shutting down');
11306
- /**
11307
- * Terminated by keep-alive on walk through subscribers.
11308
- * @event TERMINATED_BY_KEEP_ALIVE
11309
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11310
- */
11383
+ /**
11384
+ * Shutdown agent servicing origin stream.
11385
+ * @event AGENT_SERVICING_ORIGIN_STREAM_IS_SHUTTING_DOWN
11386
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11387
+ */
11388
+ AGENT_SERVICING_ORIGIN_STREAM_IS_SHUTTING_DOWN: 'Agent servicing origin stream is shutting down',
11311
11389
 
11312
- define(streamStatusInfo, 'TERMINATED_BY_KEEP_ALIVE', 'Terminated by keep-alive');
11313
- /**
11314
- * Transcoding required, but disabled in settings
11315
- * @event TRANSCODING_REQUIRED_BUT_DISABLED
11316
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11317
- */
11390
+ /**
11391
+ * Terminated by keep-alive on walk through subscribers.
11392
+ * @event TERMINATED_BY_KEEP_ALIVE
11393
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11394
+ */
11395
+ TERMINATED_BY_KEEP_ALIVE: 'Terminated by keep-alive',
11318
11396
 
11319
- define(streamStatusInfo, 'TRANSCODING_REQUIRED_BUT_DISABLED', 'Transcoding required, but disabled');
11320
- /**
11321
- * Access restricted by access list
11322
- * @event RESTRICTED_ACCESS
11323
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11324
- */
11397
+ /**
11398
+ * Transcoding required, but disabled in server settings
11399
+ * @event TRANSCODING_REQUIRED_BUT_DISABLED
11400
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11401
+ */
11402
+ TRANSCODING_REQUIRED_BUT_DISABLED: 'Transcoding required, but disabled',
11325
11403
 
11326
- define(streamStatusInfo, 'RESTRICTED_ACCESS', 'Restricted access');
11327
- /**
11328
- * No available transcoders for stream
11329
- * @event RESTRICTED_ACCESS
11330
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11331
- */
11404
+ /**
11405
+ * Access restricted by access list
11406
+ * @event RESTRICTED_ACCESS
11407
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11408
+ */
11409
+ RESTRICTED_ACCESS: 'Restricted access',
11332
11410
 
11333
- define(streamStatusInfo, 'NO_AVAILABLE_TRANSCODERS', 'No available transcoders');
11411
+ /**
11412
+ * No available transcoders for stream
11413
+ * @event NO_AVAILABLE_TRANSCODERS
11414
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
11415
+ */
11416
+ NO_AVAILABLE_TRANSCODERS: 'No available transcoders'
11417
+ });
11334
11418
  /**
11335
11419
  * @namespace Flashphoner.constants.CALL_STATUS_INFO
11336
11420
  * @see Call
11337
11421
  */
11338
11422
 
11339
- var callStatusInfo = {};
11340
- /**
11341
- * Normal call hangup.
11342
- * @event NORMAL_CALL_CLEARING
11343
- * @memberof Flashphoner.constants.CALL_STATUS_INFO
11344
- */
11345
-
11346
- define(callStatusInfo, 'NORMAL_CALL_CLEARING', 'Normal call clearing');
11347
- /**
11348
- * Error occurred on session creation.
11349
- * @event FAILED_BY_SESSION_CREATION
11350
- * @memberof Flashphoner.constants.CALL_STATUS_INFO
11351
- */
11423
+ var CALL_STATUS_INFO = Object.freeze({
11424
+ /**
11425
+ * Normal call hangup.
11426
+ * @event NORMAL_CALL_CLEARING
11427
+ * @memberof Flashphoner.constants.CALL_STATUS_INFO
11428
+ */
11429
+ NORMAL_CALL_CLEARING: 'Normal call clearing',
11352
11430
 
11353
- define(callStatusInfo, 'FAILED_BY_SESSION_CREATION', 'Failed by session creation');
11354
- /**
11355
- * Failed by error during ICE establishment.
11356
- * @event FAILED_BY_ICE_ERROR
11357
- * @memberof Flashphoner.constants.CALL_STATUS_INFO
11358
- */
11431
+ /**
11432
+ * Error occurred while creating a session
11433
+ * @event FAILED_BY_SESSION_CREATION
11434
+ * @memberof Flashphoner.constants.CALL_STATUS_INFO
11435
+ */
11436
+ FAILED_BY_SESSION_CREATION: 'Failed by session creation',
11359
11437
 
11360
- define(callStatusInfo, 'FAILED_BY_ICE_ERROR', 'Failed by ICE error');
11361
- /**
11362
- * RTP session failed by RTP activity timer.
11363
- * @event FAILED_BY_RTP_ACTIVITY
11364
- * @memberof Flashphoner.constants.CALL_STATUS_INFO
11365
- */
11438
+ /**
11439
+ * Failed by error during ICE establishment.
11440
+ * @event FAILED_BY_ICE_ERROR
11441
+ * @memberof Flashphoner.constants.CALL_STATUS_INFO
11442
+ */
11443
+ FAILED_BY_ICE_ERROR: 'Failed by ICE error',
11366
11444
 
11367
- define(callStatusInfo, 'FAILED_BY_RTP_ACTIVITY', 'Failed by RTP activity');
11368
- /**
11369
- * FF writer was failed on RTMP.
11370
- * @event FAILED_BY_RTMP_WRITER_ERROR
11371
- * @memberof Flashphoner.constants.CALL_STATUS_INFO
11372
- */
11445
+ /**
11446
+ * RTP session failed by RTP activity timer.
11447
+ * @event FAILED_BY_RTP_ACTIVITY
11448
+ * @memberof Flashphoner.constants.CALL_STATUS_INFO
11449
+ */
11450
+ FAILED_BY_RTP_ACTIVITY: 'Failed by RTP activity',
11373
11451
 
11374
- define(callStatusInfo, 'FAILED_BY_RTMP_WRITER_ERROR', 'Failed by RTMP writer error');
11375
- /**
11376
- * DTLS wrong fingerprint.
11377
- * @event FAILED_BY_DTLS_FINGERPRINT_ERROR
11378
- * @memberof Flashphoner.constants.CALL_STATUS_INFO
11379
- */
11452
+ /**
11453
+ * FF writer was failed on RTMP.
11454
+ * @event FAILED_BY_RTMP_WRITER_ERROR
11455
+ * @memberof Flashphoner.constants.CALL_STATUS_INFO
11456
+ */
11457
+ FAILED_BY_RTMP_WRITER_ERROR: 'Failed by RTMP writer error',
11380
11458
 
11381
- define(callStatusInfo, 'FAILED_BY_DTLS_FINGERPRINT_ERROR', 'Failed by DTLS fingerprint error');
11382
- /**
11383
- * No common codecs in sdp
11384
- * @event NO_COMMON_CODECS
11385
- * @memberof Flashphoner.constants.CALL_STATUS_INFO
11386
- */
11459
+ /**
11460
+ * DTLS wrong fingerprint.
11461
+ * @event FAILED_BY_DTLS_FINGERPRINT_ERROR
11462
+ * @memberof Flashphoner.constants.CALL_STATUS_INFO
11463
+ */
11464
+ FAILED_BY_DTLS_FINGERPRINT_ERROR: 'Failed by DTLS fingerprint error',
11387
11465
 
11388
- define(callStatusInfo, 'NO_COMMON_CODECS', 'No common codecs');
11389
- /**
11390
- * Client did not send DTLS packets or packets were lost/corrupted during transmission.
11391
- * @event FAILED_BY_DTLS_ERROR
11392
- * @memberof Flashphoner.constants.CALL_STATUS_INFO
11393
- */
11466
+ /**
11467
+ * No common codecs in sdp
11468
+ * @event NO_COMMON_CODECS
11469
+ * @memberof Flashphoner.constants.CALL_STATUS_INFO
11470
+ */
11471
+ NO_COMMON_CODECS: 'No common codecs',
11394
11472
 
11395
- define(callStatusInfo, 'FAILED_BY_DTLS_ERROR', 'Failed by DTLS error');
11396
- /**
11397
- * Error occurred during call
11398
- * @event FAILED_BY_ERROR
11399
- * @memberof Flashphoner.constants.CALL_STATUS_INFO
11400
- */
11473
+ /**
11474
+ * Client did not send DTLS packets or packets were lost/corrupted during transmission.
11475
+ * @event FAILED_BY_DTLS_ERROR
11476
+ * @memberof Flashphoner.constants.CALL_STATUS_INFO
11477
+ */
11478
+ FAILED_BY_DTLS_ERROR: 'Failed by DTLS error',
11401
11479
 
11402
- define(callStatusInfo, 'FAILED_BY_ERROR', 'Failed by error');
11403
- /**
11404
- * Call failed by request timeout
11405
- * @event FAILED_BY_REQUEST_TIMEOUT
11406
- * @memberof Flashphoner.constants.CALL_STATUS_INFO
11407
- */
11480
+ /**
11481
+ * Error occurred during the call
11482
+ * @event FAILED_BY_ERROR
11483
+ * @memberof Flashphoner.constants.CALL_STATUS_INFO
11484
+ */
11485
+ FAILED_BY_ERROR: 'Failed by error',
11408
11486
 
11409
- define(callStatusInfo, 'FAILED_BY_REQUEST_TIMEOUT', 'Failed by request timeout');
11410
- /**
11411
- * Transcoding required, but disabled in settings
11412
- * @event TRANSCODING_REQUIRED_BUT_DISABLED
11413
- * @memberof Flashphoner.constants.CALL_STATUS_INFO
11414
- */
11487
+ /**
11488
+ * Call failed by request timeout
11489
+ * @event FAILED_BY_REQUEST_TIMEOUT
11490
+ * @memberof Flashphoner.constants.CALL_STATUS_INFO
11491
+ */
11492
+ FAILED_BY_REQUEST_TIMEOUT: 'Failed by request timeout',
11415
11493
 
11416
- define(callStatusInfo, 'TRANSCODING_REQUIRED_BUT_DISABLED', 'Transcoding required, but disabled');
11494
+ /**
11495
+ * Transcoding required, but disabled in settings
11496
+ * @event TRANSCODING_REQUIRED_BUT_DISABLED
11497
+ * @memberof Flashphoner.constants.CALL_STATUS_INFO
11498
+ */
11499
+ TRANSCODING_REQUIRED_BUT_DISABLED: 'Transcoding required, but disabled'
11500
+ });
11417
11501
  /**
11418
11502
  * @namespace Flashphoner.constants.ERROR_INFO
11419
11503
  */
11420
11504
 
11421
- var errorInfo = {};
11422
- /**
11423
- * Error if none of MediaProviders available
11424
- * @event NONE_OF_MEDIAPROVIDERS_AVAILABLE
11425
- * @memberof Flashphoner.constants.ERROR_INFO
11426
- */
11505
+ var ERROR_INFO = Object.freeze({
11506
+ /**
11507
+ * Error if none of MediaProviders available
11508
+ * @event NONE_OF_MEDIAPROVIDERS_AVAILABLE
11509
+ * @memberof Flashphoner.constants.ERROR_INFO
11510
+ */
11511
+ NONE_OF_MEDIAPROVIDERS_AVAILABLE: 'None of MediaProviders available',
11427
11512
 
11428
- define(errorInfo, 'NONE_OF_MEDIAPROVIDERS_AVAILABLE', 'None of MediaProviders available');
11429
- /**
11430
- * Error if none of preferred MediaProviders available
11431
- * @event NONE_OF_PREFERRED_MEDIAPROVIDERS_AVAILABLE
11432
- * @memberof Flashphoner.constants.ERROR_INFO
11433
- */
11513
+ /**
11514
+ * Error if none of preferred MediaProviders available
11515
+ * @event NONE_OF_PREFERRED_MEDIAPROVIDERS_AVAILABLE
11516
+ * @memberof Flashphoner.constants.ERROR_INFO
11517
+ */
11518
+ NONE_OF_PREFERRED_MEDIAPROVIDERS_AVAILABLE: 'None of preferred MediaProviders available',
11434
11519
 
11435
- define(errorInfo, 'NONE_OF_PREFERRED_MEDIAPROVIDERS_AVAILABLE', 'None of preferred MediaProviders available');
11436
- /**
11437
- * Error if API is not initialized
11438
- * @event FLASHPHONER_API_NOT_INITIALIZED
11439
- * @memberof Flashphoner.constants.ERROR_INFO
11440
- */
11520
+ /**
11521
+ * Error if API is not initialized
11522
+ * @event FLASHPHONER_API_NOT_INITIALIZED
11523
+ * @memberof Flashphoner.constants.ERROR_INFO
11524
+ */
11525
+ FLASHPHONER_API_NOT_INITIALIZED: 'Flashphoner API is not initialized',
11441
11526
 
11442
- define(errorInfo, 'FLASHPHONER_API_NOT_INITIALIZED', 'Flashphoner API is not initialized');
11443
- /**
11444
- * Error if options.urlServer is not specified
11445
- * @event OPTIONS_URLSERVER_MUST_BE_PROVIDED
11446
- * @memberof Flashphoner.constants.ERROR_INFO
11447
- */
11527
+ /**
11528
+ * Error if options.urlServer is not specified
11529
+ * @event OPTIONS_URLSERVER_MUST_BE_PROVIDED
11530
+ * @memberof Flashphoner.constants.ERROR_INFO
11531
+ */
11532
+ OPTIONS_URLSERVER_MUST_BE_PROVIDED: 'options.urlServer must be provided',
11448
11533
 
11449
- define(errorInfo, 'OPTIONS_URLSERVER_MUST_BE_PROVIDED', 'options.urlServer must be provided');
11450
- /**
11451
- * Error if session state is not REGISTERED
11452
- * @event INVALID_SESSION_STATE
11453
- * @memberof Flashphoner.constants.ERROR_INFO
11454
- */
11534
+ /**
11535
+ * Error if session state is not valid
11536
+ * @event INVALID_SESSION_STATE
11537
+ * @memberof Flashphoner.constants.ERROR_INFO
11538
+ */
11539
+ INVALID_SESSION_STATE: 'Invalid session state',
11455
11540
 
11456
- define(errorInfo, 'INVALID_SESSION_STATE', 'Invalid session state');
11457
- /**
11458
- * Error if no options provided
11459
- * @event OPTIONS_MUST_BE_PROVIDED
11460
- * @memberof Flashphoner.constants.ERROR_INFO
11461
- */
11541
+ /**
11542
+ * Error if no options provided
11543
+ * @event OPTIONS_MUST_BE_PROVIDED
11544
+ * @memberof Flashphoner.constants.ERROR_INFO
11545
+ */
11546
+ OPTIONS_MUST_BE_PROVIDED: 'options must be provided',
11462
11547
 
11463
- define(errorInfo, 'OPTIONS_MUST_BE_PROVIDED', 'options must be provided');
11464
- /**
11465
- * Error if call status is not {@link Flashphoner.constants.CALL_STATUS.NEW}
11466
- * @event INVALID_CALL_STATE
11467
- * @memberof Flashphoner.constants.ERROR_INFO
11468
- */
11548
+ /**
11549
+ * Error if call status is not {@link Flashphoner.constants.CALL_STATUS.NEW}
11550
+ * @event INVALID_CALL_STATE
11551
+ * @memberof Flashphoner.constants.ERROR_INFO
11552
+ */
11553
+ INVALID_CALL_STATE: 'Invalid call state',
11469
11554
 
11470
- define(errorInfo, 'INVALID_CALL_STATE', 'Invalid call state');
11471
- /**
11472
- * Error if event is not specified
11473
- * @event EVENT_CANT_BE_NULL
11474
- * @memberof Flashphoner.constants.ERROR_INFO
11475
- */
11555
+ /**
11556
+ * Error if event is not specified
11557
+ * @event EVENT_CANT_BE_NULL
11558
+ * @memberof Flashphoner.constants.ERROR_INFO
11559
+ */
11560
+ EVENT_CANT_BE_NULL: 'Event can\'t be null',
11561
+
11562
+ /**
11563
+ * Error if callback is not a valid function
11564
+ * @event CALLBACK_NEEDS_TO_BE_A_VALID_FUNCTION
11565
+ * @memberof Flashphoner.constants.ERROR_INFO
11566
+ */
11567
+ CALLBACK_NEEDS_TO_BE_A_VALID_FUNCTION: 'Callback needs to be a valid function',
11568
+
11569
+ /**
11570
+ * Error if options.name is not specified
11571
+ * @event OPTIONS_NAME_MUST_BE_PROVIDED
11572
+ * @memberof Flashphoner.constants.ERROR_INFO
11573
+ */
11574
+ OPTIONS_NAME_MUST_BE_PROVIDED: 'options.name must be provided',
11575
+
11576
+ /**
11577
+ * Error if number of cams is less than 2 or camera is already used by other application
11578
+ * @event CAN_NOT_SWITCH_CAM
11579
+ * @memberOf Flashphoner.constants.ERROR_INFO
11580
+ */
11581
+ CAN_NOT_SWITCH_CAM: 'Number of cams is less than 2 or camera is already used by other application',
11582
+
11583
+ /**
11584
+ * Error if number of mics is less than 2 or microphone is already used by other application
11585
+ * @event CAN_NOT_SWITCH_MIC
11586
+ * @memberOf Flashphoner.constants.ERROR_INFO
11587
+ */
11588
+ CAN_NOT_SWITCH_MIC: 'Number of mics is less than 2 or microphone is already used by other application',
11476
11589
 
11477
- define(errorInfo, 'EVENT_CANT_BE_NULL', 'Event can\'t be null');
11590
+ /**
11591
+ * Local browser error detected
11592
+ * @event LOCAL_ERROR
11593
+ * @memberOf Flashphoner.constants.ERROR_INFO
11594
+ */
11595
+ LOCAL_ERROR: 'Local error'
11596
+ });
11478
11597
  /**
11479
- * Error if callback is not a valid function
11480
- * @event CALLBACK_NEEDS_TO_BE_A_VALID_FUNCTION
11481
- * @memberof Flashphoner.constants.ERROR_INFO
11598
+ * Local media devices type
11599
+ * @namespace Flashphoner.constants.MEDIA_DEVICE_KIND
11482
11600
  */
11483
11601
 
11484
- define(errorInfo, 'CALLBACK_NEEDS_TO_BE_A_VALID_FUNCTION', 'Callback needs to be a valid function');
11602
+ var MEDIA_DEVICE_KIND = Object.freeze({
11603
+ /**
11604
+ * List local media output devices
11605
+ * @see Flashphoner.getMediaDevices
11606
+ * @memberOf Flashphoner.constants.MEDIA_DEVICE_KIND
11607
+ */
11608
+ OUTPUT: 'output',
11609
+
11610
+ /**
11611
+ * List local media input devices
11612
+ * @see Flashphoner.getMediaDevices
11613
+ * @memberOf Flashphoner.constants.MEDIA_DEVICE_KIND
11614
+ */
11615
+ INPUT: 'input',
11616
+
11617
+ /**
11618
+ * List local media devices
11619
+ * @see Flashphoner.getMediaDevices
11620
+ * @memberOf Flashphoner.constants.MEDIA_DEVICE_KIND
11621
+ */
11622
+ ALL: 'all'
11623
+ });
11485
11624
  /**
11486
- * Error if session state is not ESTABLISHED
11487
- * @event INVALID_SESSION_STATE
11488
- * @memberof Flashphoner.constants.ERROR_INFO
11625
+ * WebRTC transport type
11626
+ * @namespace Flashphoner.constants.TRANSPORT_TYPE
11489
11627
  */
11490
11628
 
11491
- define(errorInfo, 'INVALID_SESSION_STATE', 'Invalid session state');
11629
+ var TRANSPORT_TYPE = Object.freeze({
11630
+ /**
11631
+ * WebRTC RTP traffic goes over UDP (default)
11632
+ * @see Stream
11633
+ * @memberOf Flashphoner.constants.TRANSPORT_TYPE
11634
+ */
11635
+ UDP: 'UDP',
11636
+
11637
+ /**
11638
+ * WebRTC RTP traffic goes over TCP
11639
+ * @see Stream
11640
+ * @memberOf Flashphoner.constants.TRANSPORT_TYPE
11641
+ */
11642
+ TCP: 'TCP'
11643
+ });
11492
11644
  /**
11493
- * Error if options.name is not specified
11494
- * @event OPTIONS_NAME_MUST_BE_PROVIDED
11495
- * @memberof Flashphoner.constants.ERROR_INFO
11645
+ * WebRTC connection quality type
11646
+ * @namespace Flashphoner.constants.CONNECTION_QUALITY
11496
11647
  */
11497
11648
 
11498
- define(errorInfo, 'OPTIONS_NAME_MUST_BE_PROVIDED', 'options.name must be provided');
11649
+ var CONNECTION_QUALITY = Object.freeze({
11650
+ /**
11651
+ * Channel bandwidth is perfect
11652
+ * @see Stream
11653
+ * @memberOf Flashphoner.constants.CONNECTION_QUALITY
11654
+ */
11655
+ PERFECT: 'PERFECT',
11656
+
11657
+ /**
11658
+ * Channel bandwidth is good
11659
+ * @see Stream
11660
+ * @memberOf Flashphoner.constants.CONNECTION_QUALITY
11661
+ */
11662
+ GOOD: 'GOOD',
11663
+
11664
+ /**
11665
+ * Channel bandwidth is bad
11666
+ * @see Stream
11667
+ * @memberOf Flashphoner.constants.CONNECTION_QUALITY
11668
+ */
11669
+ BAD: 'BAD',
11670
+
11671
+ /**
11672
+ * Channel bandwidth is unknown (initial state)
11673
+ * @see Stream
11674
+ * @memberOf Flashphoner.constants.CONNECTION_QUALITY
11675
+ */
11676
+ UNKNOWN: 'UNKNOWN',
11677
+
11678
+ /**
11679
+ * Channel bandwidth is updating
11680
+ * @see Stream
11681
+ * @memberOf Flashphoner.constants.CONNECTION_QUALITY
11682
+ */
11683
+ UPDATE: 'UPDATE'
11684
+ });
11499
11685
  /**
11500
- * Error if number of cams is less than 2 or already used custom stream
11501
- * @event CAN_NOT_SWITCH_CAM
11502
- * @memberOf Flashphoner.constants.ERROR_INFO
11686
+ * Websocket signaling stream event
11687
+ * @see Stream
11688
+ * @memberOf Flashphoner.constants
11503
11689
  */
11504
11690
 
11505
- define(errorInfo, 'CAN_NOT_SWITCH_CAM', 'Number of cams is less than 2 or already used custom stream');
11691
+ var STREAM_EVENT = 'STREAM_EVENT';
11506
11692
  /**
11507
- * Error if number of mics is less than 2 or already used custom stream
11508
- * @event CAN_NOT_SWITCH_MIC
11509
- * @memberOf Flashphoner.constants.ERROR_INFO
11693
+ * Websocket signaling stream event type
11694
+ * @namespace Flashphoner.constants.STREAM_EVENT_TYPE
11510
11695
  */
11511
11696
 
11512
- define(errorInfo, 'CAN_NOT_SWITCH_MIC', 'Number of mics is less than 2 or already used custom stream');
11697
+ var STREAM_EVENT_TYPE = Object.freeze({
11698
+ /**
11699
+ * Stream audio is muted
11700
+ * @see Stream
11701
+ * @memberOf Flashphoner.constants.STREAM_EVENT_TYPE
11702
+ */
11703
+ AUDIO_MUTED: 'audioMuted',
11704
+
11705
+ /**
11706
+ * Stream audio is unmuted
11707
+ * @see Stream
11708
+ * @memberOf Flashphoner.constants.STREAM_EVENT_TYPE
11709
+ */
11710
+ AUDIO_UNMUTED: 'audioUnmuted',
11711
+
11712
+ /**
11713
+ * Stream video is muted
11714
+ * @see Stream
11715
+ * @memberOf Flashphoner.constants.STREAM_EVENT_TYPE
11716
+ */
11717
+ VIDEO_MUTED: 'videoMuted',
11718
+
11719
+ /**
11720
+ * Stream videoo is unmuted
11721
+ * @see Stream
11722
+ * @memberOf Flashphoner.constants.STREAM_EVENT_TYPE
11723
+ */
11724
+ VIDEO_UNMUTED: 'videoUnmuted',
11725
+
11726
+ /**
11727
+ * Data bound to the stream are received
11728
+ * @see Stream
11729
+ * @memberOf Flashphoner.constants.STREAM_EVENT_TYPE
11730
+ */
11731
+ DATA: 'data'
11732
+ });
11513
11733
  /**
11514
- * Error if recived local error
11515
- * @event CAN_NOT_SWITCH_MIC
11516
- * @memberOf Flashphoner.constants.ERROR_INFO
11734
+ * WebRTC video content hint type
11735
+ * @namespace Flashphoner.constants.CONTENT_HINT_TYPE
11517
11736
  */
11518
11737
 
11519
- define(errorInfo, 'LOCAL_ERROR', 'Local error');
11520
- var mediaDeviceKind = {};
11521
- define(mediaDeviceKind, 'OUTPUT', 'output');
11522
- define(mediaDeviceKind, 'INPUT', 'input');
11523
- define(mediaDeviceKind, 'ALL', 'all');
11524
- var transportType = {};
11525
- define(transportType, 'UDP', 'UDP');
11526
- define(transportType, 'TCP', 'TCP');
11527
- var connectionQuality = {};
11528
- define(connectionQuality, 'PERFECT', 'PERFECT');
11529
- define(connectionQuality, 'GOOD', 'GOOD');
11530
- define(connectionQuality, 'BAD', 'BAD');
11531
- define(connectionQuality, 'UNKNOWN', 'UNKNOWN');
11532
- define(connectionQuality, 'UPDATE', 'UPDATE');
11533
- var streamEventType = {};
11534
- define(streamEventType, 'AUDIO_MUTED', 'audioMuted');
11535
- define(streamEventType, 'AUDIO_UNMUTED', 'audioUnmuted');
11536
- define(streamEventType, 'VIDEO_MUTED', 'videoMuted');
11537
- define(streamEventType, 'VIDEO_UNMUTED', 'videoUnmuted');
11538
- define(streamEventType, 'DATA', 'data');
11539
- var contentHintType = {};
11540
- define(contentHintType, 'MOTION', 'motion');
11541
- define(contentHintType, 'DETAIL', 'detail');
11542
- define(contentHintType, 'TEXT', 'text');
11543
- var constants = {};
11544
- define(constants, 'SESSION_STATUS', sessionStatus);
11545
- define(constants, 'STREAM_EVENT_TYPE', streamEventType);
11546
- define(constants, 'STREAM_EVENT', 'STREAM_EVENT');
11547
- define(constants, 'STREAM_STATUS', streamStatus);
11548
- define(constants, 'CALL_STATUS', callStatus);
11549
- define(constants, 'STREAM_STATUS_INFO', streamStatusInfo);
11550
- define(constants, 'CALL_STATUS_INFO', callStatusInfo);
11551
- define(constants, 'ERROR_INFO', errorInfo);
11552
- define(constants, 'MEDIA_DEVICE_KIND', mediaDeviceKind);
11553
- define(constants, 'TRANSPORT_TYPE', transportType);
11554
- define(constants, 'CONNECTION_QUALITY', connectionQuality);
11555
- define(constants, 'CONTENT_HINT_TYPE', contentHintType); //define helper
11556
-
11557
- function define(obj, name, value) {
11558
- Object.defineProperty(obj, name, {
11559
- value: value,
11560
- enumerable: true
11561
- });
11562
- }
11738
+ var CONTENT_HINT_TYPE = Object.freeze({
11739
+ /**
11740
+ * Video content is motion (webcam case): keep FPS, resolution and bitrate may change
11741
+ * @see Stream
11742
+ * @memberOf Flashphoner.constants.CONTENT_HINT_TYPE
11743
+ */
11744
+ MOTION: 'motion',
11745
+
11746
+ /**
11747
+ * Video content is detail (sreen sharing case): keep resolution, bitrate may change, FPS may drop
11748
+ * @see Stream
11749
+ * @memberOf Flashphoner.constants.CONTENT_HINT_TYPE
11750
+ */
11751
+ DETAIL: 'detail',
11563
11752
 
11564
- module.exports = constants;
11753
+ /**
11754
+ * Video content is text (sreen sharing case): keep resolution and bitrate, FPS may drop
11755
+ * @see Stream
11756
+ * @memberOf Flashphoner.constants.CONTENT_HINT_TYPE
11757
+ */
11758
+ TEXT: 'text'
11759
+ });
11760
+ module.exports = {
11761
+ SESSION_STATUS: SESSION_STATUS,
11762
+ STREAM_STATUS: STREAM_STATUS,
11763
+ CALL_STATUS: CALL_STATUS,
11764
+ STREAM_STATUS_INFO: STREAM_STATUS_INFO,
11765
+ CALL_STATUS_INFO: CALL_STATUS_INFO,
11766
+ ERROR_INFO: ERROR_INFO,
11767
+ MEDIA_DEVICE_KIND: MEDIA_DEVICE_KIND,
11768
+ TRANSPORT_TYPE: TRANSPORT_TYPE,
11769
+ CONNECTION_QUALITY: CONNECTION_QUALITY,
11770
+ STREAM_EVENT: STREAM_EVENT,
11771
+ STREAM_EVENT_TYPE: STREAM_EVENT_TYPE,
11772
+ CONTENT_HINT_TYPE: CONTENT_HINT_TYPE
11773
+ };
11565
11774
 
11566
11775
  },{}],42:[function(require,module,exports){
11567
11776
  'use strict';
@@ -12834,7 +13043,7 @@ var createSession = function createSession(options) {
12834
13043
  mediaProviders: Object.keys(MediaProvider),
12835
13044
  keepAlive: keepAlive,
12836
13045
  authToken: authToken,
12837
- clientVersion: "2.0.215",
13046
+ clientVersion: "2.0.218",
12838
13047
  clientOSVersion: window.navigator.appVersion,
12839
13048
  clientBrowserVersion: window.navigator.userAgent,
12840
13049
  msePacketizationVersion: 2,
@@ -16147,6 +16356,9 @@ var Browser = {
16147
16356
  },
16148
16357
  isAndroidFirefox: function isAndroidFirefox() {
16149
16358
  return this.isAndroid() && /Firefox/i.test(navigator.userAgent);
16359
+ },
16360
+ isChromiumEdge: function isChromiumEdge() {
16361
+ return /Chrome/i.test(navigator.userAgent) && /Edg/i.test(navigator.userAgent);
16150
16362
  }
16151
16363
  };
16152
16364
  var SDP = {