@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.
@@ -8831,717 +8831,926 @@ exports['WSPlayer'] = WSPlayer;
8831
8831
  * @see Session
8832
8832
  */
8833
8833
 
8834
- var sessionStatus = {};
8835
- /**
8836
- * Fires when {@link Session} ws socket opens.
8837
- * @event CONNECTED
8838
- * @memberof Flashphoner.constants.SESSION_STATUS
8839
- */
8834
+ var SESSION_STATUS = Object.freeze({
8835
+ /**
8836
+ * Fires when {@link Session} ws socket opens.
8837
+ * @event CONNECTED
8838
+ * @memberof Flashphoner.constants.SESSION_STATUS
8839
+ */
8840
+ CONNECTED: 'CONNECTED',
8840
8841
 
8841
- define(sessionStatus, 'CONNECTED', 'CONNECTED');
8842
- /**
8843
- * Fires when {@link Session} receives connect ack from REST App.
8844
- * @event ESTABLISHED
8845
- * @memberof Flashphoner.constants.SESSION_STATUS
8846
- */
8842
+ /**
8843
+ * Fires when {@link Session} receives connect ack from REST App.
8844
+ * @event ESTABLISHED
8845
+ * @memberof Flashphoner.constants.SESSION_STATUS
8846
+ */
8847
+ ESTABLISHED: 'ESTABLISHED',
8847
8848
 
8848
- define(sessionStatus, 'ESTABLISHED', 'ESTABLISHED');
8849
- /**
8850
- * Fires when {@link Session} disconnects.
8851
- * @event DISCONNECTED
8852
- * @memberof Flashphoner.constants.SESSION_STATUS
8853
- */
8849
+ /**
8850
+ * Fires when {@link Session} disconnects.
8851
+ * @event DISCONNECTED
8852
+ * @memberof Flashphoner.constants.SESSION_STATUS
8853
+ */
8854
+ DISCONNECTED: 'DISCONNECTED',
8854
8855
 
8855
- define(sessionStatus, 'DISCONNECTED', 'DISCONNECTED');
8856
- /**
8857
- * Fires if {@link Session} call of rest method error.
8858
- * @event WARN
8859
- * @memberof Flashphoner.constants.SESSION_STATUS
8860
- */
8856
+ /**
8857
+ * Fires if {@link Session} call of rest method error.
8858
+ * @event WARN
8859
+ * @memberof Flashphoner.constants.SESSION_STATUS
8860
+ */
8861
+ WARN: 'WARN',
8861
8862
 
8862
- define(sessionStatus, 'WARN', 'WARN');
8863
- /**
8864
- * Fires if {@link Session} connection failed.
8865
- * Some of the reasons can be network connection failed, REST App failed
8866
- * @event FAILED
8867
- * @memberof Flashphoner.constants.SESSION_STATUS
8868
- */
8863
+ /**
8864
+ * Fires if {@link Session} connection failed.
8865
+ * Some of the reasons can be network connection failed, REST App failed
8866
+ * @event FAILED
8867
+ * @memberof Flashphoner.constants.SESSION_STATUS
8868
+ */
8869
+ FAILED: 'FAILED',
8869
8870
 
8870
- define(sessionStatus, 'FAILED', 'FAILED');
8871
- /**
8872
- * Fires wneh {@link Session} receives debug event
8873
- * @event DEBUG
8874
- * @memberof Flashphoner.constants.SESSION_STATUS
8875
- */
8871
+ /**
8872
+ * Fires wneh {@link Session} receives debug event
8873
+ * @event DEBUG
8874
+ * @memberof Flashphoner.constants.SESSION_STATUS
8875
+ */
8876
+ DEBUG: 'DEBUG',
8876
8877
 
8877
- define(sessionStatus, 'DEBUG', 'DEBUG');
8878
- /**
8879
- * Fires when {@link Session} receives custom REST App message.
8880
- *
8881
- * @event APP_DATA
8882
- * @memberof Flashphoner.constants.SESSION_STATUS
8883
- */
8878
+ /**
8879
+ * Fires when {@link Session} receives custom REST App message.
8880
+ *
8881
+ * @event APP_DATA
8882
+ * @memberof Flashphoner.constants.SESSION_STATUS
8883
+ */
8884
+ APP_DATA: 'APP_DATA',
8884
8885
 
8885
- define(sessionStatus, 'APP_DATA', 'APP_DATA');
8886
- /**
8887
- * Fires when {@link Session} receives status of sendData operation.
8888
- *
8889
- * @event SEND_DATA_STATUS
8890
- * @memberof Flashphoner.constants.SESSION_STATUS
8891
- */
8886
+ /**
8887
+ * Fires when {@link Session} receives status of sendData operation.
8888
+ *
8889
+ * @event SEND_DATA_STATUS
8890
+ * @memberof Flashphoner.constants.SESSION_STATUS
8891
+ */
8892
+ SEND_DATA_STATUS: 'SEND_DATA_STATUS',
8892
8893
 
8893
- define(sessionStatus, 'SEND_DATA_STATUS', 'SEND_DATA_STATUS'); //State of newly created Session
8894
+ /**
8895
+ * State of newly created {@link Session}.
8896
+ *
8897
+ * @event PENDING
8898
+ * @memberof Flashphoner.constants.SESSION_STATUS
8899
+ */
8900
+ PENDING: 'PENDING',
8894
8901
 
8895
- define(sessionStatus, 'PENDING', 'PENDING');
8896
- /**
8897
- * Fires when {@link Session} registers as sip client.
8898
- *
8899
- * @event APP_DATA
8900
- * @memberof Flashphoner.constants.SESSION_STATUS
8901
- */
8902
+ /**
8903
+ * Fires when {@link Session} registers as sip client.
8904
+ *
8905
+ * @event REGISTERED
8906
+ * @memberof Flashphoner.constants.SESSION_STATUS
8907
+ */
8908
+ REGISTERED: 'REGISTERED',
8902
8909
 
8903
- define(sessionStatus, 'REGISTERED', 'REGISTERED');
8904
- /**
8905
- * Fires when {@link Session} unregisters as sip client.
8906
- *
8907
- * @event APP_DATA
8908
- * @memberof Flashphoner.constants.SESSION_STATUS
8909
- */
8910
+ /**
8911
+ * Fires when {@link Session} unregisters as sip client.
8912
+ *
8913
+ * @event UNREGISTERED
8914
+ * @memberof Flashphoner.constants.SESSION_STATUS
8915
+ */
8916
+ UNREGISTERED: 'UNREGISTERED',
8910
8917
 
8911
- define(sessionStatus, 'UNREGISTERED', 'UNREGISTERED');
8912
- define(sessionStatus, 'INCOMING_CALL', 'INCOMING_CALL');
8918
+ /**
8919
+ * Fires when {@link Session} receives an incoming call.
8920
+ *
8921
+ * @event INCOMING_CALL
8922
+ * @memberof Flashphoner.constants.SESSION_STATUS
8923
+ */
8924
+ INCOMING_CALL: 'INCOMING_CALL'
8925
+ });
8913
8926
  /**
8914
8927
  * @namespace Flashphoner.constants.STREAM_STATUS
8915
8928
  * @see Stream
8916
8929
  */
8917
8930
 
8918
- var streamStatus = {}; //State of newly created Stream
8919
-
8920
- define(streamStatus, 'NEW', 'NEW'); //State between publish/play and server response
8931
+ var STREAM_STATUS = Object.freeze({
8932
+ /**
8933
+ * State of newly created {@link Stream}.
8934
+ *
8935
+ * @event NEW
8936
+ * @memberof Flashphoner.constants.STREAM_STATUS
8937
+ */
8938
+ NEW: 'NEW',
8921
8939
 
8922
- define(streamStatus, 'PENDING', 'PENDING');
8923
- /**
8924
- * Fires when {@link Stream} starts publishing.
8925
- * @event PUBLISHING
8926
- * @memberof Flashphoner.constants.STREAM_STATUS
8927
- */
8940
+ /**
8941
+ * State before {@link Stream} publishing/playing.
8942
+ *
8943
+ * @event PENDING
8944
+ * @memberof Flashphoner.constants.STREAM_STATUS
8945
+ */
8946
+ PENDING: 'PENDING',
8928
8947
 
8929
- define(streamStatus, 'PUBLISHING', 'PUBLISHING');
8930
- /**
8931
- * Fires when {@link Stream} starts playing.
8932
- * @event PLAYING
8933
- * @memberof Flashphoner.constants.STREAM_STATUS
8934
- */
8948
+ /**
8949
+ * Fires when {@link Stream} starts publishing.
8950
+ * @event PUBLISHING
8951
+ * @memberof Flashphoner.constants.STREAM_STATUS
8952
+ */
8953
+ PUBLISHING: 'PUBLISHING',
8935
8954
 
8936
- define(streamStatus, 'PLAYING', 'PLAYING');
8937
- /**
8938
- * Fires if {@link Stream} paused.
8939
- * @event PAUSED
8940
- * @memberof Flashphoner.constants.STREAM_STATUS
8941
- */
8955
+ /**
8956
+ * Fires when {@link Stream} starts playing.
8957
+ * @event PLAYING
8958
+ * @memberof Flashphoner.constants.STREAM_STATUS
8959
+ */
8960
+ PLAYING: 'PLAYING',
8942
8961
 
8943
- define(streamStatus, 'PAUSED', 'PAUSED');
8944
- /**
8945
- * Fires if {@link Stream} was unpublished.
8946
- * @event UNPUBLISHING
8947
- * @memberof Flashphoner.constants.STREAM_STATUS
8948
- */
8962
+ /**
8963
+ * Fires if {@link Stream} paused.
8964
+ * @event PAUSED
8965
+ * @memberof Flashphoner.constants.STREAM_STATUS
8966
+ */
8967
+ PAUSED: 'PAUSED',
8949
8968
 
8950
- define(streamStatus, 'UNPUBLISHED', 'UNPUBLISHED');
8951
- /**
8952
- * Fires if {@link Stream} was stopped.
8953
- * @event STOPPED
8954
- * @memberof Flashphoner.constants.STREAM_STATUS
8955
- */
8969
+ /**
8970
+ * Fires if {@link Stream} was unpublished.
8971
+ * @event UNPUBLISHED
8972
+ * @memberof Flashphoner.constants.STREAM_STATUS
8973
+ */
8974
+ UNPUBLISHED: 'UNPUBLISHED',
8956
8975
 
8957
- define(streamStatus, 'STOPPED', 'STOPPED');
8958
- /**
8959
- * Fires if {@link Stream} failed.
8960
- * @event FAILED
8961
- * @memberof Flashphoner.constants.STREAM_STATUS
8962
- */
8976
+ /**
8977
+ * Fires if playing {@link Stream} was stopped.
8978
+ * @event STOPPED
8979
+ * @memberof Flashphoner.constants.STREAM_STATUS
8980
+ */
8981
+ STOPPED: 'STOPPED',
8963
8982
 
8964
- define(streamStatus, 'FAILED', 'FAILED');
8965
- /**
8966
- * Fires if {@link Stream} playback problem.
8967
- * @event PLAYBACK_PROBLEM
8968
- * @memberof Flashphoner.constants.STREAM_STATUS
8969
- */
8983
+ /**
8984
+ * Fires if {@link Stream} failed.
8985
+ * @event FAILED
8986
+ * @memberof Flashphoner.constants.STREAM_STATUS
8987
+ */
8988
+ FAILED: 'FAILED',
8970
8989
 
8971
- define(streamStatus, 'PLAYBACK_PROBLEM', 'PLAYBACK_PROBLEM');
8972
- /**
8973
- * Fires if {@link Stream} resize.
8974
- * @event RESIZE
8975
- * @memberof Flashphoner.constants.STREAM_STATUS
8976
- */
8990
+ /**
8991
+ * Fires if {@link Stream} playback problem.
8992
+ * @event PLAYBACK_PROBLEM
8993
+ * @memberof Flashphoner.constants.STREAM_STATUS
8994
+ */
8995
+ PLAYBACK_PROBLEM: 'PLAYBACK_PROBLEM',
8977
8996
 
8978
- define(streamStatus, 'RESIZE', 'RESIZE');
8979
- /**
8980
- * Fires when {@link Stream} snapshot becomes available.
8981
- * Snapshot is base64 encoded png available through {@link Stream.getInfo}
8982
- * @event SNAPSHOT_COMPLETE
8983
- * @memberof Flashphoner.constants.STREAM_STATUS
8984
- */
8997
+ /**
8998
+ * Fires if playing {@link Stream} picture resizing.
8999
+ * @event RESIZE
9000
+ * @memberof Flashphoner.constants.STREAM_STATUS
9001
+ */
9002
+ RESIZE: 'RESIZE',
8985
9003
 
8986
- define(streamStatus, 'SNAPSHOT_COMPLETE', 'SNAPSHOT_COMPLETE');
8987
- /**
8988
- * Fires on subscribe {@link Stream} if bitrate is higher than available network bandwidth.
8989
- * @event NOT_ENOUGH_BANDWIDTH
8990
- * @memberof Flashphoner.constants.NOT_ENOUGH_BANDWIDTH
8991
- */
9004
+ /**
9005
+ * Fires when {@link Stream} snapshot becomes available.
9006
+ * Snapshot is base64 encoded png available through {@link Stream.getInfo}
9007
+ * @event SNAPSHOT_COMPLETE
9008
+ * @memberof Flashphoner.constants.STREAM_STATUS
9009
+ */
9010
+ SNAPSHOT_COMPLETE: 'SNAPSHOT_COMPLETE',
8992
9011
 
8993
- define(streamStatus, 'NOT_ENOUGH_BANDWIDTH', 'NOT_ENOUGH_BANDWIDTH');
9012
+ /**
9013
+ * Fires on playing {@link Stream} if bitrate is higher than available network bandwidth.
9014
+ * @event NOT_ENOUGH_BANDWIDTH
9015
+ * @memberof Flashphoner.constants.NOT_ENOUGH_BANDWIDTH
9016
+ */
9017
+ NOT_ENOUGH_BANDWIDTH: 'NOT_ENOUGH_BANDWIDTH'
9018
+ });
8994
9019
  /**
8995
9020
  * @namespace Flashphoner.constants.CALL_STATUS
8996
9021
  * @see Call
8997
9022
  */
8998
9023
 
8999
- var callStatus = {}; //State of newly created Call
9000
-
9001
- define(callStatus, 'NEW', 'NEW');
9002
- define(callStatus, 'RING', 'RING');
9003
- define(callStatus, 'RING_MEDIA', 'RING_MEDIA');
9004
- define(callStatus, 'HOLD', 'HOLD');
9005
- define(callStatus, 'ESTABLISHED', 'ESTABLISHED');
9006
- define(callStatus, 'FINISH', 'FINISH');
9007
- define(callStatus, 'BUSY', 'BUSY');
9008
- define(callStatus, 'SESSION_PROGRESS', 'SESSION_PROGRESS');
9009
- define(callStatus, 'FAILED', 'FAILED');
9010
- define(callStatus, 'PENDING', 'PENDING');
9011
- define(callStatus, 'TRYING', 'TRYING');
9024
+ var CALL_STATUS = Object.freeze({
9025
+ /**
9026
+ * State of newly created {@link Call}
9027
+ * @event NEW
9028
+ * @memberof Flashphoner.constants.CALL_STATUS
9029
+ */
9030
+ NEW: 'NEW',
9031
+
9032
+ /**
9033
+ * The server is ringing to the callee
9034
+ * @event RING
9035
+ * @memberof Flashphoner.constants.CALL_STATUS
9036
+ */
9037
+ RING: 'RING',
9038
+ RING_MEDIA: 'RING_MEDIA',
9039
+
9040
+ /**
9041
+ * The {@link Call} was put on hold
9042
+ * @event HOLD
9043
+ * @memberof Flashphoner.constants.CALL_STATUS
9044
+ */
9045
+ HOLD: 'HOLD',
9046
+
9047
+ /**
9048
+ * The {@link Call} is established
9049
+ * @event ESTABLISHED
9050
+ * @memberof Flashphoner.constants.CALL_STATUS
9051
+ */
9052
+ ESTABLISHED: 'ESTABLISHED',
9053
+
9054
+ /**
9055
+ * The {@link Call} is finished
9056
+ * @event FINISH
9057
+ * @memberof Flashphoner.constants.CALL_STATUS
9058
+ */
9059
+ FINISH: 'FINISH',
9060
+
9061
+ /**
9062
+ * Callee is busy
9063
+ * @event BUSY
9064
+ * @memberof Flashphoner.constants.CALL_STATUS
9065
+ */
9066
+ BUSY: 'BUSY',
9067
+
9068
+ /**
9069
+ * SIP session is in progress
9070
+ * @event SESSION_PROGRESS
9071
+ * @memberof Flashphoner.constants.CALL_STATUS
9072
+ */
9073
+ SESSION_PROGRESS: 'SESSION_PROGRESS',
9074
+
9075
+ /**
9076
+ * The {@link Call} is failed
9077
+ * @event FAILED
9078
+ * @memberof Flashphoner.constants.CALL_STATUS
9079
+ */
9080
+ FAILED: 'FAILED',
9081
+
9082
+ /**
9083
+ * The {@link Call} state before ringing
9084
+ * @event PENDING
9085
+ * @memberof Flashphoner.constants.CALL_STATUS
9086
+ */
9087
+ PENDING: 'PENDING',
9088
+
9089
+ /**
9090
+ * The server trying to establish {@link Call}
9091
+ * @event TRYING
9092
+ * @memberof Flashphoner.constants.CALL_STATUS
9093
+ */
9094
+ TRYING: 'TRYING'
9095
+ });
9012
9096
  /**
9013
9097
  * @namespace Flashphoner.constants.STREAM_STATUS_INFO
9014
9098
  * @see Stream
9015
9099
  */
9016
9100
 
9017
- var streamStatusInfo = {};
9018
- /**
9019
- * Indicates general error during ICE negotiation. Usually occurs if client is behind some exotic nat/firewall.
9020
- * @event FAILED_BY_ICE_ERROR
9021
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9022
- */
9023
-
9024
- define(streamStatusInfo, 'FAILED_BY_ICE_ERROR', 'Failed by ICE error');
9025
- /**
9026
- * Timeout has been reached during ICE establishment.
9027
- * @event FAILED_BY_ICE_TIMEOUT
9028
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9029
- */
9101
+ var STREAM_STATUS_INFO = Object.freeze({
9102
+ /**
9103
+ * Indicates general error during ICE negotiation. Usually occurs if client is behind some exotic nat/firewall.
9104
+ * @event FAILED_BY_ICE_ERROR
9105
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9106
+ */
9107
+ FAILED_BY_ICE_ERROR: 'Failed by ICE error',
9030
9108
 
9031
- define(streamStatusInfo, 'FAILED_BY_ICE_TIMEOUT', 'Failed by ICE timeout');
9032
- /**
9033
- * ICE refresh failed on session.
9034
- * @event FAILED_BY_KEEP_ALIVE
9035
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9036
- */
9109
+ /**
9110
+ * Timeout has been reached during ICE establishment.
9111
+ * @event FAILED_BY_ICE_TIMEOUT
9112
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9113
+ */
9114
+ FAILED_BY_ICE_TIMEOUT: 'Failed by ICE timeout',
9037
9115
 
9038
- define(streamStatusInfo, 'FAILED_BY_KEEP_ALIVE', 'Failed by ICE keep alive');
9039
- /**
9040
- * DTLS has wrong fingerprint.
9041
- * @event FAILED_BY_DTLS_FINGERPRINT_ERROR
9042
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9043
- */
9116
+ /**
9117
+ * ICE refresh failed on session.
9118
+ * @event FAILED_BY_KEEP_ALIVE
9119
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9120
+ */
9121
+ FAILED_BY_KEEP_ALIVE: 'Failed by ICE keep alive',
9044
9122
 
9045
- define(streamStatusInfo, 'FAILED_BY_DTLS_FINGERPRINT_ERROR', 'Failed by DTLS fingerprint error');
9046
- /**
9047
- * Client did not send DTLS packets or packets were lost/corrupted during transmission.
9048
- * @event FAILED_BY_DTLS_ERROR
9049
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9050
- */
9123
+ /**
9124
+ * DTLS has wrong fingerprint.
9125
+ * @event FAILED_BY_DTLS_FINGERPRINT_ERROR
9126
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9127
+ */
9128
+ FAILED_BY_DTLS_FINGERPRINT_ERROR: 'Failed by DTLS fingerprint error',
9051
9129
 
9052
- define(streamStatusInfo, 'FAILED_BY_DTLS_ERROR', 'Failed by DTLS error');
9053
- /**
9054
- * Indicates general HLS packetizer error, can occur during initialization or packetization (wrong input or out of disk space).
9055
- * @event FAILED_BY_HLS_WRITER_ERROR
9056
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9057
- */
9130
+ /**
9131
+ * Client did not send DTLS packets or packets were lost/corrupted during transmission.
9132
+ * @event FAILED_BY_DTLS_ERROR
9133
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9134
+ */
9135
+ FAILED_BY_DTLS_ERROR: 'Failed by DTLS error',
9058
9136
 
9059
- define(streamStatusInfo, 'FAILED_BY_HLS_WRITER_ERROR', 'Failed by HLS writer error');
9060
- /**
9061
- * Indicates general RTMP republishing error, can occur during initialization or rtmp packetization.
9062
- * @event FAILED_BY_RTMP_WRITER_ERROR
9063
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9064
- */
9137
+ /**
9138
+ * Indicates general HLS packetizer error, can occur during initialization or packetization (wrong input or out of disk space).
9139
+ * @event FAILED_BY_HLS_WRITER_ERROR
9140
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9141
+ */
9142
+ FAILED_BY_HLS_WRITER_ERROR: 'Failed by HLS writer error',
9065
9143
 
9066
- define(streamStatusInfo, 'FAILED_BY_RTMP_WRITER_ERROR', 'Failed by RTMP writer error');
9067
- /**
9068
- * RTP session failed by RTP activity timer.
9069
- * @event FAILED_BY_RTP_ACTIVITY
9070
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9071
- */
9144
+ /**
9145
+ * Indicates general RTMP republishing error, can occur during initialization or rtmp packetization.
9146
+ * @event FAILED_BY_RTMP_WRITER_ERROR
9147
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9148
+ */
9149
+ FAILED_BY_RTMP_WRITER_ERROR: 'Failed by RTMP writer error',
9072
9150
 
9073
- define(streamStatusInfo, 'FAILED_BY_RTP_ACTIVITY', 'Failed by RTP activity');
9074
- /**
9075
- * Related session was disconnected.
9076
- * @event STOPPED_BY_SESSION_DISCONNECT
9077
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9078
- */
9151
+ /**
9152
+ * RTP session failed by RTP activity timer.
9153
+ * @event FAILED_BY_RTP_ACTIVITY
9154
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9155
+ */
9156
+ FAILED_BY_RTP_ACTIVITY: 'Failed by RTP activity',
9079
9157
 
9080
- define(streamStatusInfo, 'STOPPED_BY_SESSION_DISCONNECT', 'Stopped by session disconnect');
9081
- /**
9082
- * Stream was stopped by rest terminate request.
9083
- * @event STOPPED_BY_REST_TERMINATE
9084
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9085
- */
9158
+ /**
9159
+ * Related session was disconnected.
9160
+ * @event STOPPED_BY_SESSION_DISCONNECT
9161
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9162
+ */
9163
+ STOPPED_BY_SESSION_DISCONNECT: 'Stopped by session disconnect',
9086
9164
 
9087
- define(streamStatusInfo, 'STOPPED_BY_REST_TERMINATE', 'Stopped by rest /terminate');
9088
- /**
9089
- * Related publisher stopped its stream or lost connection.
9090
- * @event STOPPED_BY_PUBLISHER_STOP
9091
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9092
- */
9165
+ /**
9166
+ * Stream was stopped by rest terminate request.
9167
+ * @event STOPPED_BY_REST_TERMINATE
9168
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9169
+ */
9170
+ STOPPED_BY_REST_TERMINATE: 'Stopped by rest /terminate',
9093
9171
 
9094
- define(streamStatusInfo, 'STOPPED_BY_PUBLISHER_STOP', 'Stopped by publisher stop');
9095
- /**
9096
- * Stop the media session by user after call was finished or unpublish stream.
9097
- * @event STOPPED_BY_USER
9098
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9099
- */
9172
+ /**
9173
+ * Related publisher stopped its stream or lost connection.
9174
+ * @event STOPPED_BY_PUBLISHER_STOP
9175
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9176
+ */
9177
+ STOPPED_BY_PUBLISHER_STOP: 'Stopped by publisher stop',
9100
9178
 
9101
- define(streamStatusInfo, 'STOPPED_BY_USER', 'Stopped by user');
9102
- /**
9103
- * Error occurred on the stream.
9104
- * @event FAILED_BY_ERROR
9105
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9106
- */
9179
+ /**
9180
+ * Stop the media session by user after call was finished or unpublish stream.
9181
+ * @event STOPPED_BY_USER
9182
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9183
+ */
9184
+ STOPPED_BY_USER: 'Stopped by user',
9107
9185
 
9108
- define(streamStatusInfo, 'FAILED_BY_ERROR', 'Failed by error');
9109
- /**
9110
- * Indicates that error occurred during media session creation. This might be SDP parsing error, all ports are busy, wrong session related config etc.
9111
- * @event FAILED_TO_ADD_STREAM_TO_PROXY
9112
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9113
- */
9186
+ /**
9187
+ * Error occurred on the stream.
9188
+ * @event FAILED_BY_ERROR
9189
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9190
+ */
9191
+ FAILED_BY_ERROR: 'Failed by error',
9114
9192
 
9115
- define(streamStatusInfo, 'FAILED_TO_ADD_STREAM_TO_PROXY', 'Failed to add stream to proxy');
9116
- /**
9117
- * Stopped shapshot distributor.
9118
- * @event DISTRIBUTOR_STOPPED
9119
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9120
- */
9193
+ /**
9194
+ * Indicates that error occurred during media session creation. This might be SDP parsing error, all ports are busy, wrong session related config etc.
9195
+ * @event FAILED_TO_ADD_STREAM_TO_PROXY
9196
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9197
+ */
9198
+ FAILED_TO_ADD_STREAM_TO_PROXY: 'Failed to add stream to proxy',
9121
9199
 
9122
- define(streamStatusInfo, 'DISTRIBUTOR_STOPPED', 'Distributor stopped');
9123
- /**
9124
- * Publish stream is not ready, try again later.
9125
- * @event PUBLISH_STREAM_IS_NOT_READY
9126
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9127
- */
9200
+ /**
9201
+ * Stopped shapshot distributor.
9202
+ * @event DISTRIBUTOR_STOPPED
9203
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9204
+ */
9205
+ DISTRIBUTOR_STOPPED: 'Distributor stopped',
9128
9206
 
9129
- define(streamStatusInfo, 'PUBLISH_STREAM_IS_NOT_READY', 'Publish stream is not ready');
9130
- /**
9131
- * Stream with this name is not found, check the correct of the name.
9132
- * @event STREAM_NOT_FOUND
9133
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9134
- */
9207
+ /**
9208
+ * Publish stream is not ready, try again later.
9209
+ * @event PUBLISH_STREAM_IS_NOT_READY
9210
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9211
+ */
9212
+ PUBLISH_STREAM_IS_NOT_READY: 'Publish stream is not ready',
9135
9213
 
9136
- define(streamStatusInfo, 'STREAM_NOT_FOUND', 'Stream not found');
9137
- /**
9138
- * Server already has a publish stream with the same name, try using different one.
9139
- * @event STREAM_NAME_ALREADY_IN_USE
9140
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9141
- */
9214
+ /**
9215
+ * Stream with this name is not found, check the correct of the name.
9216
+ * @event STREAM_NOT_FOUND
9217
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9218
+ */
9219
+ STREAM_NOT_FOUND: 'Stream not found',
9142
9220
 
9143
- define(streamStatusInfo, 'STREAM_NAME_ALREADY_IN_USE', 'Stream name is already in use');
9144
- /**
9145
- * Error indicates that stream object received by server has empty mediaSessionId field.
9146
- * @event MEDIASESSION_ID_NULL
9147
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9148
- */
9221
+ /**
9222
+ * Server already has a publish stream with the same name, try using different one.
9223
+ * @event STREAM_NAME_ALREADY_IN_USE
9224
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9225
+ */
9226
+ STREAM_NAME_ALREADY_IN_USE: 'Stream name is already in use',
9149
9227
 
9150
- define(streamStatusInfo, 'MEDIASESSION_ID_NULL', 'MediaSessionId is null');
9151
- /**
9152
- * Published or subscribed sessions used this MediaSessionId.
9153
- * @event MEDIASESSION_ID_ALREADY_IN_USE
9154
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9155
- */
9228
+ /**
9229
+ * Error indicates that stream object received by server has empty mediaSessionId field.
9230
+ * @event MEDIASESSION_ID_NULL
9231
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9232
+ */
9233
+ MEDIASESSION_ID_NULL: 'MediaSessionId is null',
9156
9234
 
9157
- define(streamStatusInfo, 'MEDIASESSION_ID_ALREADY_IN_USE', 'MediaSessionId is already in use');
9158
- /**
9159
- * Session is not initialized or terminated on play ordinary stream.
9160
- * @event SESSION_NOT_READY
9161
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9162
- */
9235
+ /**
9236
+ * Published or subscribed sessions used this MediaSessionId.
9237
+ * @event MEDIASESSION_ID_ALREADY_IN_USE
9238
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9239
+ */
9240
+ MEDIASESSION_ID_ALREADY_IN_USE: 'MediaSessionId is already in use',
9163
9241
 
9164
- define(streamStatusInfo, 'SESSION_NOT_READY', 'Session not ready');
9165
- /**
9166
- * Actual session does not exist.
9167
- * @event SESSION_DOES_NOT_EXIST
9168
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9169
- */
9242
+ /**
9243
+ * Session is not initialized or terminated on play ordinary stream.
9244
+ * @event SESSION_NOT_READY
9245
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9246
+ */
9247
+ SESSION_NOT_READY: 'Session not ready',
9170
9248
 
9171
- define(streamStatusInfo, 'SESSION_DOES_NOT_EXIST', 'Session does not exist');
9172
- /**
9173
- * RTSP has wrong format on play stream, check correct of the RTSP url.
9174
- * @event RTSP_HAS_WRONG_FORMAT
9175
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9176
- */
9249
+ /**
9250
+ * Actual session does not exist.
9251
+ * @event SESSION_DOES_NOT_EXIST
9252
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9253
+ */
9254
+ SESSION_DOES_NOT_EXIST: 'Session does not exist',
9177
9255
 
9178
- define(streamStatusInfo, 'RTSP_HAS_WRONG_FORMAT', 'Rtsp has wrong format');
9179
- /**
9180
- * Failed to play vod stream, this format is not supported.
9181
- * @event FILE_HAS_WRONG_FORMAT
9182
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9183
- */
9256
+ /**
9257
+ * RTSP has wrong format on play stream, check the RTSP url validity.
9258
+ * @event RTSP_HAS_WRONG_FORMAT
9259
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9260
+ */
9261
+ RTSP_HAS_WRONG_FORMAT: 'Rtsp has wrong format',
9184
9262
 
9185
- define(streamStatusInfo, 'FILE_HAS_WRONG_FORMAT', 'File has wrong format');
9186
- /**
9187
- * Failed to connect to rtsp stream.
9188
- * @event FAILED_TO_CONNECT_TO_RTSP_STREAM
9189
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9190
- */
9263
+ /**
9264
+ * Failed to play vod stream, this format is not supported.
9265
+ * @event FILE_HAS_WRONG_FORMAT
9266
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9267
+ */
9268
+ FILE_HAS_WRONG_FORMAT: 'File has wrong format',
9191
9269
 
9192
- define(streamStatusInfo, 'FAILED_TO_CONNECT_TO_RTSP_STREAM', 'Failed to connect to rtsp stream');
9193
- /**
9194
- * Rtsp stream is not found, agent received "404-Not Found".
9195
- * @event RTSP_STREAM_NOT_FOUND
9196
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9197
- */
9270
+ /**
9271
+ * Failed to connect to rtsp stream.
9272
+ * @event FAILED_TO_CONNECT_TO_RTSP_STREAM
9273
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9274
+ */
9275
+ FAILED_TO_CONNECT_TO_RTSP_STREAM: 'Failed to connect to rtsp stream',
9198
9276
 
9199
- define(streamStatusInfo, 'RTSP_STREAM_NOT_FOUND', 'Rtsp stream not found');
9200
- /**
9201
- * On shutdown RTSP agent.
9202
- * @event RTSPAGENT_SHUTDOWN
9203
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9204
- */
9277
+ /**
9278
+ * Rtsp stream is not found, agent received "404-Not Found".
9279
+ * @event RTSP_STREAM_NOT_FOUND
9280
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9281
+ */
9282
+ RTSP_STREAM_NOT_FOUND: 'Rtsp stream not found',
9205
9283
 
9206
- define(streamStatusInfo, 'RTSPAGENT_SHUTDOWN', 'RtspAgent shutdown');
9207
- /**
9208
- * Stream failed
9209
- * @event STREAM_FAILED
9210
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9211
- */
9284
+ /**
9285
+ * On shutdown RTSP agent.
9286
+ * @event RTSPAGENT_SHUTDOWN
9287
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9288
+ */
9289
+ RTSPAGENT_SHUTDOWN: 'RtspAgent shutdown',
9212
9290
 
9213
- define(streamStatusInfo, 'STREAM_FAILED', 'Stream failed');
9214
- /**
9215
- * No common codecs on setup track, did not found corresponding trackId->mediaPort.
9216
- * @event NO_COMMON_CODECS
9217
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9218
- */
9291
+ /**
9292
+ * Stream failed
9293
+ * @event STREAM_FAILED
9294
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9295
+ */
9296
+ STREAM_FAILED: 'Stream failed',
9219
9297
 
9220
- define(streamStatusInfo, 'NO_COMMON_CODECS', 'No common codecs');
9221
- /**
9222
- * Bad referenced rtsp link, check for correct, example: rtsp://user:b@d_password@127.0.0.1/stream.
9223
- * @event BAD_URI
9224
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9225
- */
9298
+ /**
9299
+ * No common codecs on setup track, did not found corresponding trackId->mediaPort.
9300
+ * @event NO_COMMON_CODECS
9301
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9302
+ */
9303
+ NO_COMMON_CODECS: 'No common codecs',
9226
9304
 
9227
- define(streamStatusInfo, 'BAD_URI', 'Bad URI');
9228
- /**
9229
- * General VOD error, indicates that Exception occurred while reading/processing media file.
9230
- * @event GOT_EXCEPTION_WHILE_STREAMING_FILE
9231
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9232
- */
9305
+ /**
9306
+ * Bad referenced rtsp link, check for correct, example: rtsp://user:b@d_password@127.0.0.1/stream.
9307
+ * @event BAD_URI
9308
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9309
+ */
9310
+ BAD_URI: 'Bad URI',
9233
9311
 
9234
- define(streamStatusInfo, 'GOT_EXCEPTION_WHILE_STREAMING_FILE', 'Got exception while streaming file');
9235
- /**
9236
- * Requested stream shutdown.
9237
- * @event REQUESTED_STREAM_SHUTDOWN
9238
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9239
- */
9312
+ /**
9313
+ * General VOD error, indicates that Exception occurred while reading/processing media file.
9314
+ * @event GOT_EXCEPTION_WHILE_STREAMING_FILE
9315
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9316
+ */
9317
+ GOT_EXCEPTION_WHILE_STREAMING_FILE: 'Got exception while streaming file',
9240
9318
 
9241
- define(streamStatusInfo, 'REQUESTED_STREAM_SHUTDOWN', 'Requested stream shutdown');
9242
- /**
9243
- * Failed to create movie, file can not be read.
9244
- * @event FAILED_TO_READ_FILE
9245
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9246
- */
9319
+ /**
9320
+ * Requested stream shutdown.
9321
+ * @event REQUESTED_STREAM_SHUTDOWN
9322
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9323
+ */
9324
+ REQUESTED_STREAM_SHUTDOWN: 'Requested stream shutdown',
9247
9325
 
9248
- define(streamStatusInfo, 'FAILED_TO_READ_FILE', 'Failed to read file');
9249
- /**
9250
- * File does not exist, check filename.
9251
- * @event FILE_NOT_FOUND
9252
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9253
- */
9326
+ /**
9327
+ * Failed to create movie, file can not be read.
9328
+ * @event FAILED_TO_READ_FILE
9329
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9330
+ */
9331
+ FAILED_TO_READ_FILE: 'Failed to read file',
9254
9332
 
9255
- define(streamStatusInfo, 'FILE_NOT_FOUND', 'File not found');
9256
- /**
9257
- * Server failed to establish websocket connection with origin server.
9258
- * @event FAILED_TO_CONNECT_TO_ORIGIN_STREAM
9259
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9260
- */
9333
+ /**
9334
+ * File does not exist, check filename.
9335
+ * @event FILE_NOT_FOUND
9336
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9337
+ */
9338
+ FILE_NOT_FOUND: 'File not found',
9261
9339
 
9262
- define(streamStatusInfo, 'FAILED_TO_CONNECT_TO_ORIGIN_STREAM', 'Failed to connect to origin stream');
9263
- /**
9264
- * CDN stream not found.
9265
- * @event CDN_STREAM_NOT_FOUND
9266
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9267
- */
9340
+ /**
9341
+ * Server failed to establish websocket connection with origin server.
9342
+ * @event FAILED_TO_CONNECT_TO_ORIGIN_STREAM
9343
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9344
+ */
9345
+ FAILED_TO_CONNECT_TO_ORIGIN_STREAM: 'Failed to connect to origin stream',
9268
9346
 
9269
- define(streamStatusInfo, 'CDN_STREAM_NOT_FOUND', 'CDN stream not found');
9270
- /**
9271
- * Indicates that provided URL protocol in stream name is invalid.
9272
- * Valid: vod://file.mp4
9273
- * Invalid: dov://file.mp4
9274
- * @event FAILED_TO_GET_AGENT_STORAGE
9275
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9276
- */
9347
+ /**
9348
+ * CDN stream not found.
9349
+ * @event CDN_STREAM_NOT_FOUND
9350
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9351
+ */
9352
+ CDN_STREAM_NOT_FOUND: 'CDN stream not found',
9277
9353
 
9278
- define(streamStatusInfo, 'FAILED_TO_GET_AGENT_STORAGE', 'Failed to get agent storage');
9279
- /**
9280
- * Shutdown agent servicing origin stream.
9281
- * @event AGENT_SERVICING_ORIGIN_STREAM_IS_SHUTTING_DOWN
9282
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9283
- */
9354
+ /**
9355
+ * Indicates that provided URL protocol in stream name is invalid.
9356
+ * Valid: vod://file.mp4
9357
+ * Invalid: dov://file.mp4
9358
+ * @event FAILED_TO_GET_AGENT_STORAGE
9359
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9360
+ */
9361
+ FAILED_TO_GET_AGENT_STORAGE: 'Failed to get agent storage',
9284
9362
 
9285
- define(streamStatusInfo, 'AGENT_SERVICING_ORIGIN_STREAM_IS_SHUTTING_DOWN', 'Agent servicing origin stream is shutting down');
9286
- /**
9287
- * Terminated by keep-alive on walk through subscribers.
9288
- * @event TERMINATED_BY_KEEP_ALIVE
9289
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9290
- */
9363
+ /**
9364
+ * Shutdown agent servicing origin stream.
9365
+ * @event AGENT_SERVICING_ORIGIN_STREAM_IS_SHUTTING_DOWN
9366
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9367
+ */
9368
+ AGENT_SERVICING_ORIGIN_STREAM_IS_SHUTTING_DOWN: 'Agent servicing origin stream is shutting down',
9291
9369
 
9292
- define(streamStatusInfo, 'TERMINATED_BY_KEEP_ALIVE', 'Terminated by keep-alive');
9293
- /**
9294
- * Transcoding required, but disabled in settings
9295
- * @event TRANSCODING_REQUIRED_BUT_DISABLED
9296
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9297
- */
9370
+ /**
9371
+ * Terminated by keep-alive on walk through subscribers.
9372
+ * @event TERMINATED_BY_KEEP_ALIVE
9373
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9374
+ */
9375
+ TERMINATED_BY_KEEP_ALIVE: 'Terminated by keep-alive',
9298
9376
 
9299
- define(streamStatusInfo, 'TRANSCODING_REQUIRED_BUT_DISABLED', 'Transcoding required, but disabled');
9300
- /**
9301
- * Access restricted by access list
9302
- * @event RESTRICTED_ACCESS
9303
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9304
- */
9377
+ /**
9378
+ * Transcoding required, but disabled in server settings
9379
+ * @event TRANSCODING_REQUIRED_BUT_DISABLED
9380
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9381
+ */
9382
+ TRANSCODING_REQUIRED_BUT_DISABLED: 'Transcoding required, but disabled',
9305
9383
 
9306
- define(streamStatusInfo, 'RESTRICTED_ACCESS', 'Restricted access');
9307
- /**
9308
- * No available transcoders for stream
9309
- * @event RESTRICTED_ACCESS
9310
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9311
- */
9384
+ /**
9385
+ * Access restricted by access list
9386
+ * @event RESTRICTED_ACCESS
9387
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9388
+ */
9389
+ RESTRICTED_ACCESS: 'Restricted access',
9312
9390
 
9313
- define(streamStatusInfo, 'NO_AVAILABLE_TRANSCODERS', 'No available transcoders');
9391
+ /**
9392
+ * No available transcoders for stream
9393
+ * @event NO_AVAILABLE_TRANSCODERS
9394
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
9395
+ */
9396
+ NO_AVAILABLE_TRANSCODERS: 'No available transcoders'
9397
+ });
9314
9398
  /**
9315
9399
  * @namespace Flashphoner.constants.CALL_STATUS_INFO
9316
9400
  * @see Call
9317
9401
  */
9318
9402
 
9319
- var callStatusInfo = {};
9320
- /**
9321
- * Normal call hangup.
9322
- * @event NORMAL_CALL_CLEARING
9323
- * @memberof Flashphoner.constants.CALL_STATUS_INFO
9324
- */
9325
-
9326
- define(callStatusInfo, 'NORMAL_CALL_CLEARING', 'Normal call clearing');
9327
- /**
9328
- * Error occurred on session creation.
9329
- * @event FAILED_BY_SESSION_CREATION
9330
- * @memberof Flashphoner.constants.CALL_STATUS_INFO
9331
- */
9403
+ var CALL_STATUS_INFO = Object.freeze({
9404
+ /**
9405
+ * Normal call hangup.
9406
+ * @event NORMAL_CALL_CLEARING
9407
+ * @memberof Flashphoner.constants.CALL_STATUS_INFO
9408
+ */
9409
+ NORMAL_CALL_CLEARING: 'Normal call clearing',
9332
9410
 
9333
- define(callStatusInfo, 'FAILED_BY_SESSION_CREATION', 'Failed by session creation');
9334
- /**
9335
- * Failed by error during ICE establishment.
9336
- * @event FAILED_BY_ICE_ERROR
9337
- * @memberof Flashphoner.constants.CALL_STATUS_INFO
9338
- */
9411
+ /**
9412
+ * Error occurred while creating a session
9413
+ * @event FAILED_BY_SESSION_CREATION
9414
+ * @memberof Flashphoner.constants.CALL_STATUS_INFO
9415
+ */
9416
+ FAILED_BY_SESSION_CREATION: 'Failed by session creation',
9339
9417
 
9340
- define(callStatusInfo, 'FAILED_BY_ICE_ERROR', 'Failed by ICE error');
9341
- /**
9342
- * RTP session failed by RTP activity timer.
9343
- * @event FAILED_BY_RTP_ACTIVITY
9344
- * @memberof Flashphoner.constants.CALL_STATUS_INFO
9345
- */
9418
+ /**
9419
+ * Failed by error during ICE establishment.
9420
+ * @event FAILED_BY_ICE_ERROR
9421
+ * @memberof Flashphoner.constants.CALL_STATUS_INFO
9422
+ */
9423
+ FAILED_BY_ICE_ERROR: 'Failed by ICE error',
9346
9424
 
9347
- define(callStatusInfo, 'FAILED_BY_RTP_ACTIVITY', 'Failed by RTP activity');
9348
- /**
9349
- * FF writer was failed on RTMP.
9350
- * @event FAILED_BY_RTMP_WRITER_ERROR
9351
- * @memberof Flashphoner.constants.CALL_STATUS_INFO
9352
- */
9425
+ /**
9426
+ * RTP session failed by RTP activity timer.
9427
+ * @event FAILED_BY_RTP_ACTIVITY
9428
+ * @memberof Flashphoner.constants.CALL_STATUS_INFO
9429
+ */
9430
+ FAILED_BY_RTP_ACTIVITY: 'Failed by RTP activity',
9353
9431
 
9354
- define(callStatusInfo, 'FAILED_BY_RTMP_WRITER_ERROR', 'Failed by RTMP writer error');
9355
- /**
9356
- * DTLS wrong fingerprint.
9357
- * @event FAILED_BY_DTLS_FINGERPRINT_ERROR
9358
- * @memberof Flashphoner.constants.CALL_STATUS_INFO
9359
- */
9432
+ /**
9433
+ * FF writer was failed on RTMP.
9434
+ * @event FAILED_BY_RTMP_WRITER_ERROR
9435
+ * @memberof Flashphoner.constants.CALL_STATUS_INFO
9436
+ */
9437
+ FAILED_BY_RTMP_WRITER_ERROR: 'Failed by RTMP writer error',
9360
9438
 
9361
- define(callStatusInfo, 'FAILED_BY_DTLS_FINGERPRINT_ERROR', 'Failed by DTLS fingerprint error');
9362
- /**
9363
- * No common codecs in sdp
9364
- * @event NO_COMMON_CODECS
9365
- * @memberof Flashphoner.constants.CALL_STATUS_INFO
9366
- */
9439
+ /**
9440
+ * DTLS wrong fingerprint.
9441
+ * @event FAILED_BY_DTLS_FINGERPRINT_ERROR
9442
+ * @memberof Flashphoner.constants.CALL_STATUS_INFO
9443
+ */
9444
+ FAILED_BY_DTLS_FINGERPRINT_ERROR: 'Failed by DTLS fingerprint error',
9367
9445
 
9368
- define(callStatusInfo, 'NO_COMMON_CODECS', 'No common codecs');
9369
- /**
9370
- * Client did not send DTLS packets or packets were lost/corrupted during transmission.
9371
- * @event FAILED_BY_DTLS_ERROR
9372
- * @memberof Flashphoner.constants.CALL_STATUS_INFO
9373
- */
9446
+ /**
9447
+ * No common codecs in sdp
9448
+ * @event NO_COMMON_CODECS
9449
+ * @memberof Flashphoner.constants.CALL_STATUS_INFO
9450
+ */
9451
+ NO_COMMON_CODECS: 'No common codecs',
9374
9452
 
9375
- define(callStatusInfo, 'FAILED_BY_DTLS_ERROR', 'Failed by DTLS error');
9376
- /**
9377
- * Error occurred during call
9378
- * @event FAILED_BY_ERROR
9379
- * @memberof Flashphoner.constants.CALL_STATUS_INFO
9380
- */
9453
+ /**
9454
+ * Client did not send DTLS packets or packets were lost/corrupted during transmission.
9455
+ * @event FAILED_BY_DTLS_ERROR
9456
+ * @memberof Flashphoner.constants.CALL_STATUS_INFO
9457
+ */
9458
+ FAILED_BY_DTLS_ERROR: 'Failed by DTLS error',
9381
9459
 
9382
- define(callStatusInfo, 'FAILED_BY_ERROR', 'Failed by error');
9383
- /**
9384
- * Call failed by request timeout
9385
- * @event FAILED_BY_REQUEST_TIMEOUT
9386
- * @memberof Flashphoner.constants.CALL_STATUS_INFO
9387
- */
9460
+ /**
9461
+ * Error occurred during the call
9462
+ * @event FAILED_BY_ERROR
9463
+ * @memberof Flashphoner.constants.CALL_STATUS_INFO
9464
+ */
9465
+ FAILED_BY_ERROR: 'Failed by error',
9388
9466
 
9389
- define(callStatusInfo, 'FAILED_BY_REQUEST_TIMEOUT', 'Failed by request timeout');
9390
- /**
9391
- * Transcoding required, but disabled in settings
9392
- * @event TRANSCODING_REQUIRED_BUT_DISABLED
9393
- * @memberof Flashphoner.constants.CALL_STATUS_INFO
9394
- */
9467
+ /**
9468
+ * Call failed by request timeout
9469
+ * @event FAILED_BY_REQUEST_TIMEOUT
9470
+ * @memberof Flashphoner.constants.CALL_STATUS_INFO
9471
+ */
9472
+ FAILED_BY_REQUEST_TIMEOUT: 'Failed by request timeout',
9395
9473
 
9396
- define(callStatusInfo, 'TRANSCODING_REQUIRED_BUT_DISABLED', 'Transcoding required, but disabled');
9474
+ /**
9475
+ * Transcoding required, but disabled in settings
9476
+ * @event TRANSCODING_REQUIRED_BUT_DISABLED
9477
+ * @memberof Flashphoner.constants.CALL_STATUS_INFO
9478
+ */
9479
+ TRANSCODING_REQUIRED_BUT_DISABLED: 'Transcoding required, but disabled'
9480
+ });
9397
9481
  /**
9398
9482
  * @namespace Flashphoner.constants.ERROR_INFO
9399
9483
  */
9400
9484
 
9401
- var errorInfo = {};
9402
- /**
9403
- * Error if none of MediaProviders available
9404
- * @event NONE_OF_MEDIAPROVIDERS_AVAILABLE
9405
- * @memberof Flashphoner.constants.ERROR_INFO
9406
- */
9485
+ var ERROR_INFO = Object.freeze({
9486
+ /**
9487
+ * Error if none of MediaProviders available
9488
+ * @event NONE_OF_MEDIAPROVIDERS_AVAILABLE
9489
+ * @memberof Flashphoner.constants.ERROR_INFO
9490
+ */
9491
+ NONE_OF_MEDIAPROVIDERS_AVAILABLE: 'None of MediaProviders available',
9407
9492
 
9408
- define(errorInfo, 'NONE_OF_MEDIAPROVIDERS_AVAILABLE', 'None of MediaProviders available');
9409
- /**
9410
- * Error if none of preferred MediaProviders available
9411
- * @event NONE_OF_PREFERRED_MEDIAPROVIDERS_AVAILABLE
9412
- * @memberof Flashphoner.constants.ERROR_INFO
9413
- */
9493
+ /**
9494
+ * Error if none of preferred MediaProviders available
9495
+ * @event NONE_OF_PREFERRED_MEDIAPROVIDERS_AVAILABLE
9496
+ * @memberof Flashphoner.constants.ERROR_INFO
9497
+ */
9498
+ NONE_OF_PREFERRED_MEDIAPROVIDERS_AVAILABLE: 'None of preferred MediaProviders available',
9414
9499
 
9415
- define(errorInfo, 'NONE_OF_PREFERRED_MEDIAPROVIDERS_AVAILABLE', 'None of preferred MediaProviders available');
9416
- /**
9417
- * Error if API is not initialized
9418
- * @event FLASHPHONER_API_NOT_INITIALIZED
9419
- * @memberof Flashphoner.constants.ERROR_INFO
9420
- */
9500
+ /**
9501
+ * Error if API is not initialized
9502
+ * @event FLASHPHONER_API_NOT_INITIALIZED
9503
+ * @memberof Flashphoner.constants.ERROR_INFO
9504
+ */
9505
+ FLASHPHONER_API_NOT_INITIALIZED: 'Flashphoner API is not initialized',
9421
9506
 
9422
- define(errorInfo, 'FLASHPHONER_API_NOT_INITIALIZED', 'Flashphoner API is not initialized');
9423
- /**
9424
- * Error if options.urlServer is not specified
9425
- * @event OPTIONS_URLSERVER_MUST_BE_PROVIDED
9426
- * @memberof Flashphoner.constants.ERROR_INFO
9427
- */
9507
+ /**
9508
+ * Error if options.urlServer is not specified
9509
+ * @event OPTIONS_URLSERVER_MUST_BE_PROVIDED
9510
+ * @memberof Flashphoner.constants.ERROR_INFO
9511
+ */
9512
+ OPTIONS_URLSERVER_MUST_BE_PROVIDED: 'options.urlServer must be provided',
9428
9513
 
9429
- define(errorInfo, 'OPTIONS_URLSERVER_MUST_BE_PROVIDED', 'options.urlServer must be provided');
9430
- /**
9431
- * Error if session state is not REGISTERED
9432
- * @event INVALID_SESSION_STATE
9433
- * @memberof Flashphoner.constants.ERROR_INFO
9434
- */
9514
+ /**
9515
+ * Error if session state is not valid
9516
+ * @event INVALID_SESSION_STATE
9517
+ * @memberof Flashphoner.constants.ERROR_INFO
9518
+ */
9519
+ INVALID_SESSION_STATE: 'Invalid session state',
9435
9520
 
9436
- define(errorInfo, 'INVALID_SESSION_STATE', 'Invalid session state');
9437
- /**
9438
- * Error if no options provided
9439
- * @event OPTIONS_MUST_BE_PROVIDED
9440
- * @memberof Flashphoner.constants.ERROR_INFO
9441
- */
9521
+ /**
9522
+ * Error if no options provided
9523
+ * @event OPTIONS_MUST_BE_PROVIDED
9524
+ * @memberof Flashphoner.constants.ERROR_INFO
9525
+ */
9526
+ OPTIONS_MUST_BE_PROVIDED: 'options must be provided',
9442
9527
 
9443
- define(errorInfo, 'OPTIONS_MUST_BE_PROVIDED', 'options must be provided');
9444
- /**
9445
- * Error if call status is not {@link Flashphoner.constants.CALL_STATUS.NEW}
9446
- * @event INVALID_CALL_STATE
9447
- * @memberof Flashphoner.constants.ERROR_INFO
9448
- */
9528
+ /**
9529
+ * Error if call status is not {@link Flashphoner.constants.CALL_STATUS.NEW}
9530
+ * @event INVALID_CALL_STATE
9531
+ * @memberof Flashphoner.constants.ERROR_INFO
9532
+ */
9533
+ INVALID_CALL_STATE: 'Invalid call state',
9449
9534
 
9450
- define(errorInfo, 'INVALID_CALL_STATE', 'Invalid call state');
9451
- /**
9452
- * Error if event is not specified
9453
- * @event EVENT_CANT_BE_NULL
9454
- * @memberof Flashphoner.constants.ERROR_INFO
9455
- */
9535
+ /**
9536
+ * Error if event is not specified
9537
+ * @event EVENT_CANT_BE_NULL
9538
+ * @memberof Flashphoner.constants.ERROR_INFO
9539
+ */
9540
+ EVENT_CANT_BE_NULL: 'Event can\'t be null',
9541
+
9542
+ /**
9543
+ * Error if callback is not a valid function
9544
+ * @event CALLBACK_NEEDS_TO_BE_A_VALID_FUNCTION
9545
+ * @memberof Flashphoner.constants.ERROR_INFO
9546
+ */
9547
+ CALLBACK_NEEDS_TO_BE_A_VALID_FUNCTION: 'Callback needs to be a valid function',
9548
+
9549
+ /**
9550
+ * Error if options.name is not specified
9551
+ * @event OPTIONS_NAME_MUST_BE_PROVIDED
9552
+ * @memberof Flashphoner.constants.ERROR_INFO
9553
+ */
9554
+ OPTIONS_NAME_MUST_BE_PROVIDED: 'options.name must be provided',
9555
+
9556
+ /**
9557
+ * Error if number of cams is less than 2 or camera is already used by other application
9558
+ * @event CAN_NOT_SWITCH_CAM
9559
+ * @memberOf Flashphoner.constants.ERROR_INFO
9560
+ */
9561
+ CAN_NOT_SWITCH_CAM: 'Number of cams is less than 2 or camera is already used by other application',
9562
+
9563
+ /**
9564
+ * Error if number of mics is less than 2 or microphone is already used by other application
9565
+ * @event CAN_NOT_SWITCH_MIC
9566
+ * @memberOf Flashphoner.constants.ERROR_INFO
9567
+ */
9568
+ CAN_NOT_SWITCH_MIC: 'Number of mics is less than 2 or microphone is already used by other application',
9456
9569
 
9457
- define(errorInfo, 'EVENT_CANT_BE_NULL', 'Event can\'t be null');
9570
+ /**
9571
+ * Local browser error detected
9572
+ * @event LOCAL_ERROR
9573
+ * @memberOf Flashphoner.constants.ERROR_INFO
9574
+ */
9575
+ LOCAL_ERROR: 'Local error'
9576
+ });
9458
9577
  /**
9459
- * Error if callback is not a valid function
9460
- * @event CALLBACK_NEEDS_TO_BE_A_VALID_FUNCTION
9461
- * @memberof Flashphoner.constants.ERROR_INFO
9578
+ * Local media devices type
9579
+ * @namespace Flashphoner.constants.MEDIA_DEVICE_KIND
9462
9580
  */
9463
9581
 
9464
- define(errorInfo, 'CALLBACK_NEEDS_TO_BE_A_VALID_FUNCTION', 'Callback needs to be a valid function');
9582
+ var MEDIA_DEVICE_KIND = Object.freeze({
9583
+ /**
9584
+ * List local media output devices
9585
+ * @see Flashphoner.getMediaDevices
9586
+ * @memberOf Flashphoner.constants.MEDIA_DEVICE_KIND
9587
+ */
9588
+ OUTPUT: 'output',
9589
+
9590
+ /**
9591
+ * List local media input devices
9592
+ * @see Flashphoner.getMediaDevices
9593
+ * @memberOf Flashphoner.constants.MEDIA_DEVICE_KIND
9594
+ */
9595
+ INPUT: 'input',
9596
+
9597
+ /**
9598
+ * List local media devices
9599
+ * @see Flashphoner.getMediaDevices
9600
+ * @memberOf Flashphoner.constants.MEDIA_DEVICE_KIND
9601
+ */
9602
+ ALL: 'all'
9603
+ });
9465
9604
  /**
9466
- * Error if session state is not ESTABLISHED
9467
- * @event INVALID_SESSION_STATE
9468
- * @memberof Flashphoner.constants.ERROR_INFO
9605
+ * WebRTC transport type
9606
+ * @namespace Flashphoner.constants.TRANSPORT_TYPE
9469
9607
  */
9470
9608
 
9471
- define(errorInfo, 'INVALID_SESSION_STATE', 'Invalid session state');
9609
+ var TRANSPORT_TYPE = Object.freeze({
9610
+ /**
9611
+ * WebRTC RTP traffic goes over UDP (default)
9612
+ * @see Stream
9613
+ * @memberOf Flashphoner.constants.TRANSPORT_TYPE
9614
+ */
9615
+ UDP: 'UDP',
9616
+
9617
+ /**
9618
+ * WebRTC RTP traffic goes over TCP
9619
+ * @see Stream
9620
+ * @memberOf Flashphoner.constants.TRANSPORT_TYPE
9621
+ */
9622
+ TCP: 'TCP'
9623
+ });
9472
9624
  /**
9473
- * Error if options.name is not specified
9474
- * @event OPTIONS_NAME_MUST_BE_PROVIDED
9475
- * @memberof Flashphoner.constants.ERROR_INFO
9625
+ * WebRTC connection quality type
9626
+ * @namespace Flashphoner.constants.CONNECTION_QUALITY
9476
9627
  */
9477
9628
 
9478
- define(errorInfo, 'OPTIONS_NAME_MUST_BE_PROVIDED', 'options.name must be provided');
9629
+ var CONNECTION_QUALITY = Object.freeze({
9630
+ /**
9631
+ * Channel bandwidth is perfect
9632
+ * @see Stream
9633
+ * @memberOf Flashphoner.constants.CONNECTION_QUALITY
9634
+ */
9635
+ PERFECT: 'PERFECT',
9636
+
9637
+ /**
9638
+ * Channel bandwidth is good
9639
+ * @see Stream
9640
+ * @memberOf Flashphoner.constants.CONNECTION_QUALITY
9641
+ */
9642
+ GOOD: 'GOOD',
9643
+
9644
+ /**
9645
+ * Channel bandwidth is bad
9646
+ * @see Stream
9647
+ * @memberOf Flashphoner.constants.CONNECTION_QUALITY
9648
+ */
9649
+ BAD: 'BAD',
9650
+
9651
+ /**
9652
+ * Channel bandwidth is unknown (initial state)
9653
+ * @see Stream
9654
+ * @memberOf Flashphoner.constants.CONNECTION_QUALITY
9655
+ */
9656
+ UNKNOWN: 'UNKNOWN',
9657
+
9658
+ /**
9659
+ * Channel bandwidth is updating
9660
+ * @see Stream
9661
+ * @memberOf Flashphoner.constants.CONNECTION_QUALITY
9662
+ */
9663
+ UPDATE: 'UPDATE'
9664
+ });
9479
9665
  /**
9480
- * Error if number of cams is less than 2 or already used custom stream
9481
- * @event CAN_NOT_SWITCH_CAM
9482
- * @memberOf Flashphoner.constants.ERROR_INFO
9666
+ * Websocket signaling stream event
9667
+ * @see Stream
9668
+ * @memberOf Flashphoner.constants
9483
9669
  */
9484
9670
 
9485
- define(errorInfo, 'CAN_NOT_SWITCH_CAM', 'Number of cams is less than 2 or already used custom stream');
9671
+ var STREAM_EVENT = 'STREAM_EVENT';
9486
9672
  /**
9487
- * Error if number of mics is less than 2 or already used custom stream
9488
- * @event CAN_NOT_SWITCH_MIC
9489
- * @memberOf Flashphoner.constants.ERROR_INFO
9673
+ * Websocket signaling stream event type
9674
+ * @namespace Flashphoner.constants.STREAM_EVENT_TYPE
9490
9675
  */
9491
9676
 
9492
- define(errorInfo, 'CAN_NOT_SWITCH_MIC', 'Number of mics is less than 2 or already used custom stream');
9677
+ var STREAM_EVENT_TYPE = Object.freeze({
9678
+ /**
9679
+ * Stream audio is muted
9680
+ * @see Stream
9681
+ * @memberOf Flashphoner.constants.STREAM_EVENT_TYPE
9682
+ */
9683
+ AUDIO_MUTED: 'audioMuted',
9684
+
9685
+ /**
9686
+ * Stream audio is unmuted
9687
+ * @see Stream
9688
+ * @memberOf Flashphoner.constants.STREAM_EVENT_TYPE
9689
+ */
9690
+ AUDIO_UNMUTED: 'audioUnmuted',
9691
+
9692
+ /**
9693
+ * Stream video is muted
9694
+ * @see Stream
9695
+ * @memberOf Flashphoner.constants.STREAM_EVENT_TYPE
9696
+ */
9697
+ VIDEO_MUTED: 'videoMuted',
9698
+
9699
+ /**
9700
+ * Stream videoo is unmuted
9701
+ * @see Stream
9702
+ * @memberOf Flashphoner.constants.STREAM_EVENT_TYPE
9703
+ */
9704
+ VIDEO_UNMUTED: 'videoUnmuted',
9705
+
9706
+ /**
9707
+ * Data bound to the stream are received
9708
+ * @see Stream
9709
+ * @memberOf Flashphoner.constants.STREAM_EVENT_TYPE
9710
+ */
9711
+ DATA: 'data'
9712
+ });
9493
9713
  /**
9494
- * Error if recived local error
9495
- * @event CAN_NOT_SWITCH_MIC
9496
- * @memberOf Flashphoner.constants.ERROR_INFO
9714
+ * WebRTC video content hint type
9715
+ * @namespace Flashphoner.constants.CONTENT_HINT_TYPE
9497
9716
  */
9498
9717
 
9499
- define(errorInfo, 'LOCAL_ERROR', 'Local error');
9500
- var mediaDeviceKind = {};
9501
- define(mediaDeviceKind, 'OUTPUT', 'output');
9502
- define(mediaDeviceKind, 'INPUT', 'input');
9503
- define(mediaDeviceKind, 'ALL', 'all');
9504
- var transportType = {};
9505
- define(transportType, 'UDP', 'UDP');
9506
- define(transportType, 'TCP', 'TCP');
9507
- var connectionQuality = {};
9508
- define(connectionQuality, 'PERFECT', 'PERFECT');
9509
- define(connectionQuality, 'GOOD', 'GOOD');
9510
- define(connectionQuality, 'BAD', 'BAD');
9511
- define(connectionQuality, 'UNKNOWN', 'UNKNOWN');
9512
- define(connectionQuality, 'UPDATE', 'UPDATE');
9513
- var streamEventType = {};
9514
- define(streamEventType, 'AUDIO_MUTED', 'audioMuted');
9515
- define(streamEventType, 'AUDIO_UNMUTED', 'audioUnmuted');
9516
- define(streamEventType, 'VIDEO_MUTED', 'videoMuted');
9517
- define(streamEventType, 'VIDEO_UNMUTED', 'videoUnmuted');
9518
- define(streamEventType, 'DATA', 'data');
9519
- var contentHintType = {};
9520
- define(contentHintType, 'MOTION', 'motion');
9521
- define(contentHintType, 'DETAIL', 'detail');
9522
- define(contentHintType, 'TEXT', 'text');
9523
- var constants = {};
9524
- define(constants, 'SESSION_STATUS', sessionStatus);
9525
- define(constants, 'STREAM_EVENT_TYPE', streamEventType);
9526
- define(constants, 'STREAM_EVENT', 'STREAM_EVENT');
9527
- define(constants, 'STREAM_STATUS', streamStatus);
9528
- define(constants, 'CALL_STATUS', callStatus);
9529
- define(constants, 'STREAM_STATUS_INFO', streamStatusInfo);
9530
- define(constants, 'CALL_STATUS_INFO', callStatusInfo);
9531
- define(constants, 'ERROR_INFO', errorInfo);
9532
- define(constants, 'MEDIA_DEVICE_KIND', mediaDeviceKind);
9533
- define(constants, 'TRANSPORT_TYPE', transportType);
9534
- define(constants, 'CONNECTION_QUALITY', connectionQuality);
9535
- define(constants, 'CONTENT_HINT_TYPE', contentHintType); //define helper
9536
-
9537
- function define(obj, name, value) {
9538
- Object.defineProperty(obj, name, {
9539
- value: value,
9540
- enumerable: true
9541
- });
9542
- }
9718
+ var CONTENT_HINT_TYPE = Object.freeze({
9719
+ /**
9720
+ * Video content is motion (webcam case): keep FPS, resolution and bitrate may change
9721
+ * @see Stream
9722
+ * @memberOf Flashphoner.constants.CONTENT_HINT_TYPE
9723
+ */
9724
+ MOTION: 'motion',
9725
+
9726
+ /**
9727
+ * Video content is detail (sreen sharing case): keep resolution, bitrate may change, FPS may drop
9728
+ * @see Stream
9729
+ * @memberOf Flashphoner.constants.CONTENT_HINT_TYPE
9730
+ */
9731
+ DETAIL: 'detail',
9543
9732
 
9544
- module.exports = constants;
9733
+ /**
9734
+ * Video content is text (sreen sharing case): keep resolution and bitrate, FPS may drop
9735
+ * @see Stream
9736
+ * @memberOf Flashphoner.constants.CONTENT_HINT_TYPE
9737
+ */
9738
+ TEXT: 'text'
9739
+ });
9740
+ module.exports = {
9741
+ SESSION_STATUS: SESSION_STATUS,
9742
+ STREAM_STATUS: STREAM_STATUS,
9743
+ CALL_STATUS: CALL_STATUS,
9744
+ STREAM_STATUS_INFO: STREAM_STATUS_INFO,
9745
+ CALL_STATUS_INFO: CALL_STATUS_INFO,
9746
+ ERROR_INFO: ERROR_INFO,
9747
+ MEDIA_DEVICE_KIND: MEDIA_DEVICE_KIND,
9748
+ TRANSPORT_TYPE: TRANSPORT_TYPE,
9749
+ CONNECTION_QUALITY: CONNECTION_QUALITY,
9750
+ STREAM_EVENT: STREAM_EVENT,
9751
+ STREAM_EVENT_TYPE: STREAM_EVENT_TYPE,
9752
+ CONTENT_HINT_TYPE: CONTENT_HINT_TYPE
9753
+ };
9545
9754
 
9546
9755
  },{}],40:[function(require,module,exports){
9547
9756
  'use strict';
@@ -10174,7 +10383,7 @@ var createSession = function createSession(options) {
10174
10383
  mediaProviders: Object.keys(MediaProvider),
10175
10384
  keepAlive: keepAlive,
10176
10385
  authToken: authToken,
10177
- clientVersion: "2.0.215",
10386
+ clientVersion: "2.0.218",
10178
10387
  clientOSVersion: window.navigator.appVersion,
10179
10388
  clientBrowserVersion: window.navigator.userAgent,
10180
10389
  msePacketizationVersion: 2,
@@ -12827,6 +13036,9 @@ var Browser = {
12827
13036
  },
12828
13037
  isAndroidFirefox: function isAndroidFirefox() {
12829
13038
  return this.isAndroid() && /Firefox/i.test(navigator.userAgent);
13039
+ },
13040
+ isChromiumEdge: function isChromiumEdge() {
13041
+ return /Chrome/i.test(navigator.userAgent) && /Edg/i.test(navigator.userAgent);
12830
13042
  }
12831
13043
  };
12832
13044
  var SDP = {