@flashphoner/websdk 2.0.216 → 2.0.217

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.
@@ -7728,717 +7728,926 @@ function filterStats(result, track, outbound) {
7728
7728
  * @see Session
7729
7729
  */
7730
7730
 
7731
- var sessionStatus = {};
7732
- /**
7733
- * Fires when {@link Session} ws socket opens.
7734
- * @event CONNECTED
7735
- * @memberof Flashphoner.constants.SESSION_STATUS
7736
- */
7731
+ var SESSION_STATUS = Object.freeze({
7732
+ /**
7733
+ * Fires when {@link Session} ws socket opens.
7734
+ * @event CONNECTED
7735
+ * @memberof Flashphoner.constants.SESSION_STATUS
7736
+ */
7737
+ CONNECTED: 'CONNECTED',
7737
7738
 
7738
- define(sessionStatus, 'CONNECTED', 'CONNECTED');
7739
- /**
7740
- * Fires when {@link Session} receives connect ack from REST App.
7741
- * @event ESTABLISHED
7742
- * @memberof Flashphoner.constants.SESSION_STATUS
7743
- */
7739
+ /**
7740
+ * Fires when {@link Session} receives connect ack from REST App.
7741
+ * @event ESTABLISHED
7742
+ * @memberof Flashphoner.constants.SESSION_STATUS
7743
+ */
7744
+ ESTABLISHED: 'ESTABLISHED',
7744
7745
 
7745
- define(sessionStatus, 'ESTABLISHED', 'ESTABLISHED');
7746
- /**
7747
- * Fires when {@link Session} disconnects.
7748
- * @event DISCONNECTED
7749
- * @memberof Flashphoner.constants.SESSION_STATUS
7750
- */
7746
+ /**
7747
+ * Fires when {@link Session} disconnects.
7748
+ * @event DISCONNECTED
7749
+ * @memberof Flashphoner.constants.SESSION_STATUS
7750
+ */
7751
+ DISCONNECTED: 'DISCONNECTED',
7751
7752
 
7752
- define(sessionStatus, 'DISCONNECTED', 'DISCONNECTED');
7753
- /**
7754
- * Fires if {@link Session} call of rest method error.
7755
- * @event WARN
7756
- * @memberof Flashphoner.constants.SESSION_STATUS
7757
- */
7753
+ /**
7754
+ * Fires if {@link Session} call of rest method error.
7755
+ * @event WARN
7756
+ * @memberof Flashphoner.constants.SESSION_STATUS
7757
+ */
7758
+ WARN: 'WARN',
7758
7759
 
7759
- define(sessionStatus, 'WARN', 'WARN');
7760
- /**
7761
- * Fires if {@link Session} connection failed.
7762
- * Some of the reasons can be network connection failed, REST App failed
7763
- * @event FAILED
7764
- * @memberof Flashphoner.constants.SESSION_STATUS
7765
- */
7760
+ /**
7761
+ * Fires if {@link Session} connection failed.
7762
+ * Some of the reasons can be network connection failed, REST App failed
7763
+ * @event FAILED
7764
+ * @memberof Flashphoner.constants.SESSION_STATUS
7765
+ */
7766
+ FAILED: 'FAILED',
7766
7767
 
7767
- define(sessionStatus, 'FAILED', 'FAILED');
7768
- /**
7769
- * Fires wneh {@link Session} receives debug event
7770
- * @event DEBUG
7771
- * @memberof Flashphoner.constants.SESSION_STATUS
7772
- */
7768
+ /**
7769
+ * Fires wneh {@link Session} receives debug event
7770
+ * @event DEBUG
7771
+ * @memberof Flashphoner.constants.SESSION_STATUS
7772
+ */
7773
+ DEBUG: 'DEBUG',
7773
7774
 
7774
- define(sessionStatus, 'DEBUG', 'DEBUG');
7775
- /**
7776
- * Fires when {@link Session} receives custom REST App message.
7777
- *
7778
- * @event APP_DATA
7779
- * @memberof Flashphoner.constants.SESSION_STATUS
7780
- */
7775
+ /**
7776
+ * Fires when {@link Session} receives custom REST App message.
7777
+ *
7778
+ * @event APP_DATA
7779
+ * @memberof Flashphoner.constants.SESSION_STATUS
7780
+ */
7781
+ APP_DATA: 'APP_DATA',
7781
7782
 
7782
- define(sessionStatus, 'APP_DATA', 'APP_DATA');
7783
- /**
7784
- * Fires when {@link Session} receives status of sendData operation.
7785
- *
7786
- * @event SEND_DATA_STATUS
7787
- * @memberof Flashphoner.constants.SESSION_STATUS
7788
- */
7783
+ /**
7784
+ * Fires when {@link Session} receives status of sendData operation.
7785
+ *
7786
+ * @event SEND_DATA_STATUS
7787
+ * @memberof Flashphoner.constants.SESSION_STATUS
7788
+ */
7789
+ SEND_DATA_STATUS: 'SEND_DATA_STATUS',
7789
7790
 
7790
- define(sessionStatus, 'SEND_DATA_STATUS', 'SEND_DATA_STATUS'); //State of newly created Session
7791
+ /**
7792
+ * State of newly created {@link Session}.
7793
+ *
7794
+ * @event PENDING
7795
+ * @memberof Flashphoner.constants.SESSION_STATUS
7796
+ */
7797
+ PENDING: 'PENDING',
7791
7798
 
7792
- define(sessionStatus, 'PENDING', 'PENDING');
7793
- /**
7794
- * Fires when {@link Session} registers as sip client.
7795
- *
7796
- * @event APP_DATA
7797
- * @memberof Flashphoner.constants.SESSION_STATUS
7798
- */
7799
+ /**
7800
+ * Fires when {@link Session} registers as sip client.
7801
+ *
7802
+ * @event REGISTERED
7803
+ * @memberof Flashphoner.constants.SESSION_STATUS
7804
+ */
7805
+ REGISTERED: 'REGISTERED',
7799
7806
 
7800
- define(sessionStatus, 'REGISTERED', 'REGISTERED');
7801
- /**
7802
- * Fires when {@link Session} unregisters as sip client.
7803
- *
7804
- * @event APP_DATA
7805
- * @memberof Flashphoner.constants.SESSION_STATUS
7806
- */
7807
+ /**
7808
+ * Fires when {@link Session} unregisters as sip client.
7809
+ *
7810
+ * @event UNREGISTERED
7811
+ * @memberof Flashphoner.constants.SESSION_STATUS
7812
+ */
7813
+ UNREGISTERED: 'UNREGISTERED',
7807
7814
 
7808
- define(sessionStatus, 'UNREGISTERED', 'UNREGISTERED');
7809
- define(sessionStatus, 'INCOMING_CALL', 'INCOMING_CALL');
7815
+ /**
7816
+ * Fires when {@link Session} receives an incoming call.
7817
+ *
7818
+ * @event INCOMING_CALL
7819
+ * @memberof Flashphoner.constants.SESSION_STATUS
7820
+ */
7821
+ INCOMING_CALL: 'INCOMING_CALL'
7822
+ });
7810
7823
  /**
7811
7824
  * @namespace Flashphoner.constants.STREAM_STATUS
7812
7825
  * @see Stream
7813
7826
  */
7814
7827
 
7815
- var streamStatus = {}; //State of newly created Stream
7816
-
7817
- define(streamStatus, 'NEW', 'NEW'); //State between publish/play and server response
7828
+ var STREAM_STATUS = Object.freeze({
7829
+ /**
7830
+ * State of newly created {@link Stream}.
7831
+ *
7832
+ * @event NEW
7833
+ * @memberof Flashphoner.constants.STREAM_STATUS
7834
+ */
7835
+ NEW: 'NEW',
7818
7836
 
7819
- define(streamStatus, 'PENDING', 'PENDING');
7820
- /**
7821
- * Fires when {@link Stream} starts publishing.
7822
- * @event PUBLISHING
7823
- * @memberof Flashphoner.constants.STREAM_STATUS
7824
- */
7837
+ /**
7838
+ * State before {@link Stream} publishing/playing.
7839
+ *
7840
+ * @event PENDING
7841
+ * @memberof Flashphoner.constants.STREAM_STATUS
7842
+ */
7843
+ PENDING: 'PENDING',
7825
7844
 
7826
- define(streamStatus, 'PUBLISHING', 'PUBLISHING');
7827
- /**
7828
- * Fires when {@link Stream} starts playing.
7829
- * @event PLAYING
7830
- * @memberof Flashphoner.constants.STREAM_STATUS
7831
- */
7845
+ /**
7846
+ * Fires when {@link Stream} starts publishing.
7847
+ * @event PUBLISHING
7848
+ * @memberof Flashphoner.constants.STREAM_STATUS
7849
+ */
7850
+ PUBLISHING: 'PUBLISHING',
7832
7851
 
7833
- define(streamStatus, 'PLAYING', 'PLAYING');
7834
- /**
7835
- * Fires if {@link Stream} paused.
7836
- * @event PAUSED
7837
- * @memberof Flashphoner.constants.STREAM_STATUS
7838
- */
7852
+ /**
7853
+ * Fires when {@link Stream} starts playing.
7854
+ * @event PLAYING
7855
+ * @memberof Flashphoner.constants.STREAM_STATUS
7856
+ */
7857
+ PLAYING: 'PLAYING',
7839
7858
 
7840
- define(streamStatus, 'PAUSED', 'PAUSED');
7841
- /**
7842
- * Fires if {@link Stream} was unpublished.
7843
- * @event UNPUBLISHING
7844
- * @memberof Flashphoner.constants.STREAM_STATUS
7845
- */
7859
+ /**
7860
+ * Fires if {@link Stream} paused.
7861
+ * @event PAUSED
7862
+ * @memberof Flashphoner.constants.STREAM_STATUS
7863
+ */
7864
+ PAUSED: 'PAUSED',
7846
7865
 
7847
- define(streamStatus, 'UNPUBLISHED', 'UNPUBLISHED');
7848
- /**
7849
- * Fires if {@link Stream} was stopped.
7850
- * @event STOPPED
7851
- * @memberof Flashphoner.constants.STREAM_STATUS
7852
- */
7866
+ /**
7867
+ * Fires if {@link Stream} was unpublished.
7868
+ * @event UNPUBLISHED
7869
+ * @memberof Flashphoner.constants.STREAM_STATUS
7870
+ */
7871
+ UNPUBLISHED: 'UNPUBLISHED',
7853
7872
 
7854
- define(streamStatus, 'STOPPED', 'STOPPED');
7855
- /**
7856
- * Fires if {@link Stream} failed.
7857
- * @event FAILED
7858
- * @memberof Flashphoner.constants.STREAM_STATUS
7859
- */
7873
+ /**
7874
+ * Fires if playing {@link Stream} was stopped.
7875
+ * @event STOPPED
7876
+ * @memberof Flashphoner.constants.STREAM_STATUS
7877
+ */
7878
+ STOPPED: 'STOPPED',
7860
7879
 
7861
- define(streamStatus, 'FAILED', 'FAILED');
7862
- /**
7863
- * Fires if {@link Stream} playback problem.
7864
- * @event PLAYBACK_PROBLEM
7865
- * @memberof Flashphoner.constants.STREAM_STATUS
7866
- */
7880
+ /**
7881
+ * Fires if {@link Stream} failed.
7882
+ * @event FAILED
7883
+ * @memberof Flashphoner.constants.STREAM_STATUS
7884
+ */
7885
+ FAILED: 'FAILED',
7867
7886
 
7868
- define(streamStatus, 'PLAYBACK_PROBLEM', 'PLAYBACK_PROBLEM');
7869
- /**
7870
- * Fires if {@link Stream} resize.
7871
- * @event RESIZE
7872
- * @memberof Flashphoner.constants.STREAM_STATUS
7873
- */
7887
+ /**
7888
+ * Fires if {@link Stream} playback problem.
7889
+ * @event PLAYBACK_PROBLEM
7890
+ * @memberof Flashphoner.constants.STREAM_STATUS
7891
+ */
7892
+ PLAYBACK_PROBLEM: 'PLAYBACK_PROBLEM',
7874
7893
 
7875
- define(streamStatus, 'RESIZE', 'RESIZE');
7876
- /**
7877
- * Fires when {@link Stream} snapshot becomes available.
7878
- * Snapshot is base64 encoded png available through {@link Stream.getInfo}
7879
- * @event SNAPSHOT_COMPLETE
7880
- * @memberof Flashphoner.constants.STREAM_STATUS
7881
- */
7894
+ /**
7895
+ * Fires if playing {@link Stream} picture resizing.
7896
+ * @event RESIZE
7897
+ * @memberof Flashphoner.constants.STREAM_STATUS
7898
+ */
7899
+ RESIZE: 'RESIZE',
7882
7900
 
7883
- define(streamStatus, 'SNAPSHOT_COMPLETE', 'SNAPSHOT_COMPLETE');
7884
- /**
7885
- * Fires on subscribe {@link Stream} if bitrate is higher than available network bandwidth.
7886
- * @event NOT_ENOUGH_BANDWIDTH
7887
- * @memberof Flashphoner.constants.NOT_ENOUGH_BANDWIDTH
7888
- */
7901
+ /**
7902
+ * Fires when {@link Stream} snapshot becomes available.
7903
+ * Snapshot is base64 encoded png available through {@link Stream.getInfo}
7904
+ * @event SNAPSHOT_COMPLETE
7905
+ * @memberof Flashphoner.constants.STREAM_STATUS
7906
+ */
7907
+ SNAPSHOT_COMPLETE: 'SNAPSHOT_COMPLETE',
7889
7908
 
7890
- define(streamStatus, 'NOT_ENOUGH_BANDWIDTH', 'NOT_ENOUGH_BANDWIDTH');
7909
+ /**
7910
+ * Fires on playing {@link Stream} if bitrate is higher than available network bandwidth.
7911
+ * @event NOT_ENOUGH_BANDWIDTH
7912
+ * @memberof Flashphoner.constants.NOT_ENOUGH_BANDWIDTH
7913
+ */
7914
+ NOT_ENOUGH_BANDWIDTH: 'NOT_ENOUGH_BANDWIDTH'
7915
+ });
7891
7916
  /**
7892
7917
  * @namespace Flashphoner.constants.CALL_STATUS
7893
7918
  * @see Call
7894
7919
  */
7895
7920
 
7896
- var callStatus = {}; //State of newly created Call
7897
-
7898
- define(callStatus, 'NEW', 'NEW');
7899
- define(callStatus, 'RING', 'RING');
7900
- define(callStatus, 'RING_MEDIA', 'RING_MEDIA');
7901
- define(callStatus, 'HOLD', 'HOLD');
7902
- define(callStatus, 'ESTABLISHED', 'ESTABLISHED');
7903
- define(callStatus, 'FINISH', 'FINISH');
7904
- define(callStatus, 'BUSY', 'BUSY');
7905
- define(callStatus, 'SESSION_PROGRESS', 'SESSION_PROGRESS');
7906
- define(callStatus, 'FAILED', 'FAILED');
7907
- define(callStatus, 'PENDING', 'PENDING');
7908
- define(callStatus, 'TRYING', 'TRYING');
7921
+ var CALL_STATUS = Object.freeze({
7922
+ /**
7923
+ * State of newly created {@link Call}
7924
+ * @event NEW
7925
+ * @memberof Flashphoner.constants.CALL_STATUS
7926
+ */
7927
+ NEW: 'NEW',
7928
+
7929
+ /**
7930
+ * The server is ringing to the callee
7931
+ * @event RING
7932
+ * @memberof Flashphoner.constants.CALL_STATUS
7933
+ */
7934
+ RING: 'RING',
7935
+ RING_MEDIA: 'RING_MEDIA',
7936
+
7937
+ /**
7938
+ * The {@link Call} was put on hold
7939
+ * @event HOLD
7940
+ * @memberof Flashphoner.constants.CALL_STATUS
7941
+ */
7942
+ HOLD: 'HOLD',
7943
+
7944
+ /**
7945
+ * The {@link Call} is established
7946
+ * @event ESTABLISHED
7947
+ * @memberof Flashphoner.constants.CALL_STATUS
7948
+ */
7949
+ ESTABLISHED: 'ESTABLISHED',
7950
+
7951
+ /**
7952
+ * The {@link Call} is finished
7953
+ * @event FINISH
7954
+ * @memberof Flashphoner.constants.CALL_STATUS
7955
+ */
7956
+ FINISH: 'FINISH',
7957
+
7958
+ /**
7959
+ * Callee is busy
7960
+ * @event BUSY
7961
+ * @memberof Flashphoner.constants.CALL_STATUS
7962
+ */
7963
+ BUSY: 'BUSY',
7964
+
7965
+ /**
7966
+ * SIP session is in progress
7967
+ * @event SESSION_PROGRESS
7968
+ * @memberof Flashphoner.constants.CALL_STATUS
7969
+ */
7970
+ SESSION_PROGRESS: 'SESSION_PROGRESS',
7971
+
7972
+ /**
7973
+ * The {@link Call} is failed
7974
+ * @event FAILED
7975
+ * @memberof Flashphoner.constants.CALL_STATUS
7976
+ */
7977
+ FAILED: 'FAILED',
7978
+
7979
+ /**
7980
+ * The {@link Call} state before ringing
7981
+ * @event PENDING
7982
+ * @memberof Flashphoner.constants.CALL_STATUS
7983
+ */
7984
+ PENDING: 'PENDING',
7985
+
7986
+ /**
7987
+ * The server trying to establish {@link Call}
7988
+ * @event TRYING
7989
+ * @memberof Flashphoner.constants.CALL_STATUS
7990
+ */
7991
+ TRYING: 'TRYING'
7992
+ });
7909
7993
  /**
7910
7994
  * @namespace Flashphoner.constants.STREAM_STATUS_INFO
7911
7995
  * @see Stream
7912
7996
  */
7913
7997
 
7914
- var streamStatusInfo = {};
7915
- /**
7916
- * Indicates general error during ICE negotiation. Usually occurs if client is behind some exotic nat/firewall.
7917
- * @event FAILED_BY_ICE_ERROR
7918
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
7919
- */
7920
-
7921
- define(streamStatusInfo, 'FAILED_BY_ICE_ERROR', 'Failed by ICE error');
7922
- /**
7923
- * Timeout has been reached during ICE establishment.
7924
- * @event FAILED_BY_ICE_TIMEOUT
7925
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
7926
- */
7998
+ var STREAM_STATUS_INFO = Object.freeze({
7999
+ /**
8000
+ * Indicates general error during ICE negotiation. Usually occurs if client is behind some exotic nat/firewall.
8001
+ * @event FAILED_BY_ICE_ERROR
8002
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8003
+ */
8004
+ FAILED_BY_ICE_ERROR: 'Failed by ICE error',
7927
8005
 
7928
- define(streamStatusInfo, 'FAILED_BY_ICE_TIMEOUT', 'Failed by ICE timeout');
7929
- /**
7930
- * ICE refresh failed on session.
7931
- * @event FAILED_BY_KEEP_ALIVE
7932
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
7933
- */
8006
+ /**
8007
+ * Timeout has been reached during ICE establishment.
8008
+ * @event FAILED_BY_ICE_TIMEOUT
8009
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8010
+ */
8011
+ FAILED_BY_ICE_TIMEOUT: 'Failed by ICE timeout',
7934
8012
 
7935
- define(streamStatusInfo, 'FAILED_BY_KEEP_ALIVE', 'Failed by ICE keep alive');
7936
- /**
7937
- * DTLS has wrong fingerprint.
7938
- * @event FAILED_BY_DTLS_FINGERPRINT_ERROR
7939
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
7940
- */
8013
+ /**
8014
+ * ICE refresh failed on session.
8015
+ * @event FAILED_BY_KEEP_ALIVE
8016
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8017
+ */
8018
+ FAILED_BY_KEEP_ALIVE: 'Failed by ICE keep alive',
7941
8019
 
7942
- define(streamStatusInfo, 'FAILED_BY_DTLS_FINGERPRINT_ERROR', 'Failed by DTLS fingerprint error');
7943
- /**
7944
- * Client did not send DTLS packets or packets were lost/corrupted during transmission.
7945
- * @event FAILED_BY_DTLS_ERROR
7946
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
7947
- */
8020
+ /**
8021
+ * DTLS has wrong fingerprint.
8022
+ * @event FAILED_BY_DTLS_FINGERPRINT_ERROR
8023
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8024
+ */
8025
+ FAILED_BY_DTLS_FINGERPRINT_ERROR: 'Failed by DTLS fingerprint error',
7948
8026
 
7949
- define(streamStatusInfo, 'FAILED_BY_DTLS_ERROR', 'Failed by DTLS error');
7950
- /**
7951
- * Indicates general HLS packetizer error, can occur during initialization or packetization (wrong input or out of disk space).
7952
- * @event FAILED_BY_HLS_WRITER_ERROR
7953
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
7954
- */
8027
+ /**
8028
+ * Client did not send DTLS packets or packets were lost/corrupted during transmission.
8029
+ * @event FAILED_BY_DTLS_ERROR
8030
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8031
+ */
8032
+ FAILED_BY_DTLS_ERROR: 'Failed by DTLS error',
7955
8033
 
7956
- define(streamStatusInfo, 'FAILED_BY_HLS_WRITER_ERROR', 'Failed by HLS writer error');
7957
- /**
7958
- * Indicates general RTMP republishing error, can occur during initialization or rtmp packetization.
7959
- * @event FAILED_BY_RTMP_WRITER_ERROR
7960
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
7961
- */
8034
+ /**
8035
+ * Indicates general HLS packetizer error, can occur during initialization or packetization (wrong input or out of disk space).
8036
+ * @event FAILED_BY_HLS_WRITER_ERROR
8037
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8038
+ */
8039
+ FAILED_BY_HLS_WRITER_ERROR: 'Failed by HLS writer error',
7962
8040
 
7963
- define(streamStatusInfo, 'FAILED_BY_RTMP_WRITER_ERROR', 'Failed by RTMP writer error');
7964
- /**
7965
- * RTP session failed by RTP activity timer.
7966
- * @event FAILED_BY_RTP_ACTIVITY
7967
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
7968
- */
8041
+ /**
8042
+ * Indicates general RTMP republishing error, can occur during initialization or rtmp packetization.
8043
+ * @event FAILED_BY_RTMP_WRITER_ERROR
8044
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8045
+ */
8046
+ FAILED_BY_RTMP_WRITER_ERROR: 'Failed by RTMP writer error',
7969
8047
 
7970
- define(streamStatusInfo, 'FAILED_BY_RTP_ACTIVITY', 'Failed by RTP activity');
7971
- /**
7972
- * Related session was disconnected.
7973
- * @event STOPPED_BY_SESSION_DISCONNECT
7974
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
7975
- */
8048
+ /**
8049
+ * RTP session failed by RTP activity timer.
8050
+ * @event FAILED_BY_RTP_ACTIVITY
8051
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8052
+ */
8053
+ FAILED_BY_RTP_ACTIVITY: 'Failed by RTP activity',
7976
8054
 
7977
- define(streamStatusInfo, 'STOPPED_BY_SESSION_DISCONNECT', 'Stopped by session disconnect');
7978
- /**
7979
- * Stream was stopped by rest terminate request.
7980
- * @event STOPPED_BY_REST_TERMINATE
7981
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
7982
- */
8055
+ /**
8056
+ * Related session was disconnected.
8057
+ * @event STOPPED_BY_SESSION_DISCONNECT
8058
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8059
+ */
8060
+ STOPPED_BY_SESSION_DISCONNECT: 'Stopped by session disconnect',
7983
8061
 
7984
- define(streamStatusInfo, 'STOPPED_BY_REST_TERMINATE', 'Stopped by rest /terminate');
7985
- /**
7986
- * Related publisher stopped its stream or lost connection.
7987
- * @event STOPPED_BY_PUBLISHER_STOP
7988
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
7989
- */
8062
+ /**
8063
+ * Stream was stopped by rest terminate request.
8064
+ * @event STOPPED_BY_REST_TERMINATE
8065
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8066
+ */
8067
+ STOPPED_BY_REST_TERMINATE: 'Stopped by rest /terminate',
7990
8068
 
7991
- define(streamStatusInfo, 'STOPPED_BY_PUBLISHER_STOP', 'Stopped by publisher stop');
7992
- /**
7993
- * Stop the media session by user after call was finished or unpublish stream.
7994
- * @event STOPPED_BY_USER
7995
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
7996
- */
8069
+ /**
8070
+ * Related publisher stopped its stream or lost connection.
8071
+ * @event STOPPED_BY_PUBLISHER_STOP
8072
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8073
+ */
8074
+ STOPPED_BY_PUBLISHER_STOP: 'Stopped by publisher stop',
7997
8075
 
7998
- define(streamStatusInfo, 'STOPPED_BY_USER', 'Stopped by user');
7999
- /**
8000
- * Error occurred on the stream.
8001
- * @event FAILED_BY_ERROR
8002
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8003
- */
8076
+ /**
8077
+ * Stop the media session by user after call was finished or unpublish stream.
8078
+ * @event STOPPED_BY_USER
8079
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8080
+ */
8081
+ STOPPED_BY_USER: 'Stopped by user',
8004
8082
 
8005
- define(streamStatusInfo, 'FAILED_BY_ERROR', 'Failed by error');
8006
- /**
8007
- * Indicates that error occurred during media session creation. This might be SDP parsing error, all ports are busy, wrong session related config etc.
8008
- * @event FAILED_TO_ADD_STREAM_TO_PROXY
8009
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8010
- */
8083
+ /**
8084
+ * Error occurred on the stream.
8085
+ * @event FAILED_BY_ERROR
8086
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8087
+ */
8088
+ FAILED_BY_ERROR: 'Failed by error',
8011
8089
 
8012
- define(streamStatusInfo, 'FAILED_TO_ADD_STREAM_TO_PROXY', 'Failed to add stream to proxy');
8013
- /**
8014
- * Stopped shapshot distributor.
8015
- * @event DISTRIBUTOR_STOPPED
8016
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8017
- */
8090
+ /**
8091
+ * Indicates that error occurred during media session creation. This might be SDP parsing error, all ports are busy, wrong session related config etc.
8092
+ * @event FAILED_TO_ADD_STREAM_TO_PROXY
8093
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8094
+ */
8095
+ FAILED_TO_ADD_STREAM_TO_PROXY: 'Failed to add stream to proxy',
8018
8096
 
8019
- define(streamStatusInfo, 'DISTRIBUTOR_STOPPED', 'Distributor stopped');
8020
- /**
8021
- * Publish stream is not ready, try again later.
8022
- * @event PUBLISH_STREAM_IS_NOT_READY
8023
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8024
- */
8097
+ /**
8098
+ * Stopped shapshot distributor.
8099
+ * @event DISTRIBUTOR_STOPPED
8100
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8101
+ */
8102
+ DISTRIBUTOR_STOPPED: 'Distributor stopped',
8025
8103
 
8026
- define(streamStatusInfo, 'PUBLISH_STREAM_IS_NOT_READY', 'Publish stream is not ready');
8027
- /**
8028
- * Stream with this name is not found, check the correct of the name.
8029
- * @event STREAM_NOT_FOUND
8030
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8031
- */
8104
+ /**
8105
+ * Publish stream is not ready, try again later.
8106
+ * @event PUBLISH_STREAM_IS_NOT_READY
8107
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8108
+ */
8109
+ PUBLISH_STREAM_IS_NOT_READY: 'Publish stream is not ready',
8032
8110
 
8033
- define(streamStatusInfo, 'STREAM_NOT_FOUND', 'Stream not found');
8034
- /**
8035
- * Server already has a publish stream with the same name, try using different one.
8036
- * @event STREAM_NAME_ALREADY_IN_USE
8037
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8038
- */
8111
+ /**
8112
+ * Stream with this name is not found, check the correct of the name.
8113
+ * @event STREAM_NOT_FOUND
8114
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8115
+ */
8116
+ STREAM_NOT_FOUND: 'Stream not found',
8039
8117
 
8040
- define(streamStatusInfo, 'STREAM_NAME_ALREADY_IN_USE', 'Stream name is already in use');
8041
- /**
8042
- * Error indicates that stream object received by server has empty mediaSessionId field.
8043
- * @event MEDIASESSION_ID_NULL
8044
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8045
- */
8118
+ /**
8119
+ * Server already has a publish stream with the same name, try using different one.
8120
+ * @event STREAM_NAME_ALREADY_IN_USE
8121
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8122
+ */
8123
+ STREAM_NAME_ALREADY_IN_USE: 'Stream name is already in use',
8046
8124
 
8047
- define(streamStatusInfo, 'MEDIASESSION_ID_NULL', 'MediaSessionId is null');
8048
- /**
8049
- * Published or subscribed sessions used this MediaSessionId.
8050
- * @event MEDIASESSION_ID_ALREADY_IN_USE
8051
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8052
- */
8125
+ /**
8126
+ * Error indicates that stream object received by server has empty mediaSessionId field.
8127
+ * @event MEDIASESSION_ID_NULL
8128
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8129
+ */
8130
+ MEDIASESSION_ID_NULL: 'MediaSessionId is null',
8053
8131
 
8054
- define(streamStatusInfo, 'MEDIASESSION_ID_ALREADY_IN_USE', 'MediaSessionId is already in use');
8055
- /**
8056
- * Session is not initialized or terminated on play ordinary stream.
8057
- * @event SESSION_NOT_READY
8058
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8059
- */
8132
+ /**
8133
+ * Published or subscribed sessions used this MediaSessionId.
8134
+ * @event MEDIASESSION_ID_ALREADY_IN_USE
8135
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8136
+ */
8137
+ MEDIASESSION_ID_ALREADY_IN_USE: 'MediaSessionId is already in use',
8060
8138
 
8061
- define(streamStatusInfo, 'SESSION_NOT_READY', 'Session not ready');
8062
- /**
8063
- * Actual session does not exist.
8064
- * @event SESSION_DOES_NOT_EXIST
8065
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8066
- */
8139
+ /**
8140
+ * Session is not initialized or terminated on play ordinary stream.
8141
+ * @event SESSION_NOT_READY
8142
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8143
+ */
8144
+ SESSION_NOT_READY: 'Session not ready',
8067
8145
 
8068
- define(streamStatusInfo, 'SESSION_DOES_NOT_EXIST', 'Session does not exist');
8069
- /**
8070
- * RTSP has wrong format on play stream, check correct of the RTSP url.
8071
- * @event RTSP_HAS_WRONG_FORMAT
8072
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8073
- */
8146
+ /**
8147
+ * Actual session does not exist.
8148
+ * @event SESSION_DOES_NOT_EXIST
8149
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8150
+ */
8151
+ SESSION_DOES_NOT_EXIST: 'Session does not exist',
8074
8152
 
8075
- define(streamStatusInfo, 'RTSP_HAS_WRONG_FORMAT', 'Rtsp has wrong format');
8076
- /**
8077
- * Failed to play vod stream, this format is not supported.
8078
- * @event FILE_HAS_WRONG_FORMAT
8079
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8080
- */
8153
+ /**
8154
+ * RTSP has wrong format on play stream, check the RTSP url validity.
8155
+ * @event RTSP_HAS_WRONG_FORMAT
8156
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8157
+ */
8158
+ RTSP_HAS_WRONG_FORMAT: 'Rtsp has wrong format',
8081
8159
 
8082
- define(streamStatusInfo, 'FILE_HAS_WRONG_FORMAT', 'File has wrong format');
8083
- /**
8084
- * Failed to connect to rtsp stream.
8085
- * @event FAILED_TO_CONNECT_TO_RTSP_STREAM
8086
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8087
- */
8160
+ /**
8161
+ * Failed to play vod stream, this format is not supported.
8162
+ * @event FILE_HAS_WRONG_FORMAT
8163
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8164
+ */
8165
+ FILE_HAS_WRONG_FORMAT: 'File has wrong format',
8088
8166
 
8089
- define(streamStatusInfo, 'FAILED_TO_CONNECT_TO_RTSP_STREAM', 'Failed to connect to rtsp stream');
8090
- /**
8091
- * Rtsp stream is not found, agent received "404-Not Found".
8092
- * @event RTSP_STREAM_NOT_FOUND
8093
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8094
- */
8167
+ /**
8168
+ * Failed to connect to rtsp stream.
8169
+ * @event FAILED_TO_CONNECT_TO_RTSP_STREAM
8170
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8171
+ */
8172
+ FAILED_TO_CONNECT_TO_RTSP_STREAM: 'Failed to connect to rtsp stream',
8095
8173
 
8096
- define(streamStatusInfo, 'RTSP_STREAM_NOT_FOUND', 'Rtsp stream not found');
8097
- /**
8098
- * On shutdown RTSP agent.
8099
- * @event RTSPAGENT_SHUTDOWN
8100
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8101
- */
8174
+ /**
8175
+ * Rtsp stream is not found, agent received "404-Not Found".
8176
+ * @event RTSP_STREAM_NOT_FOUND
8177
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8178
+ */
8179
+ RTSP_STREAM_NOT_FOUND: 'Rtsp stream not found',
8102
8180
 
8103
- define(streamStatusInfo, 'RTSPAGENT_SHUTDOWN', 'RtspAgent shutdown');
8104
- /**
8105
- * Stream failed
8106
- * @event STREAM_FAILED
8107
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8108
- */
8181
+ /**
8182
+ * On shutdown RTSP agent.
8183
+ * @event RTSPAGENT_SHUTDOWN
8184
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8185
+ */
8186
+ RTSPAGENT_SHUTDOWN: 'RtspAgent shutdown',
8109
8187
 
8110
- define(streamStatusInfo, 'STREAM_FAILED', 'Stream failed');
8111
- /**
8112
- * No common codecs on setup track, did not found corresponding trackId->mediaPort.
8113
- * @event NO_COMMON_CODECS
8114
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8115
- */
8188
+ /**
8189
+ * Stream failed
8190
+ * @event STREAM_FAILED
8191
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8192
+ */
8193
+ STREAM_FAILED: 'Stream failed',
8116
8194
 
8117
- define(streamStatusInfo, 'NO_COMMON_CODECS', 'No common codecs');
8118
- /**
8119
- * Bad referenced rtsp link, check for correct, example: rtsp://user:b@d_password@127.0.0.1/stream.
8120
- * @event BAD_URI
8121
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8122
- */
8195
+ /**
8196
+ * No common codecs on setup track, did not found corresponding trackId->mediaPort.
8197
+ * @event NO_COMMON_CODECS
8198
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8199
+ */
8200
+ NO_COMMON_CODECS: 'No common codecs',
8123
8201
 
8124
- define(streamStatusInfo, 'BAD_URI', 'Bad URI');
8125
- /**
8126
- * General VOD error, indicates that Exception occurred while reading/processing media file.
8127
- * @event GOT_EXCEPTION_WHILE_STREAMING_FILE
8128
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8129
- */
8202
+ /**
8203
+ * Bad referenced rtsp link, check for correct, example: rtsp://user:b@d_password@127.0.0.1/stream.
8204
+ * @event BAD_URI
8205
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8206
+ */
8207
+ BAD_URI: 'Bad URI',
8130
8208
 
8131
- define(streamStatusInfo, 'GOT_EXCEPTION_WHILE_STREAMING_FILE', 'Got exception while streaming file');
8132
- /**
8133
- * Requested stream shutdown.
8134
- * @event REQUESTED_STREAM_SHUTDOWN
8135
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8136
- */
8209
+ /**
8210
+ * General VOD error, indicates that Exception occurred while reading/processing media file.
8211
+ * @event GOT_EXCEPTION_WHILE_STREAMING_FILE
8212
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8213
+ */
8214
+ GOT_EXCEPTION_WHILE_STREAMING_FILE: 'Got exception while streaming file',
8137
8215
 
8138
- define(streamStatusInfo, 'REQUESTED_STREAM_SHUTDOWN', 'Requested stream shutdown');
8139
- /**
8140
- * Failed to create movie, file can not be read.
8141
- * @event FAILED_TO_READ_FILE
8142
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8143
- */
8216
+ /**
8217
+ * Requested stream shutdown.
8218
+ * @event REQUESTED_STREAM_SHUTDOWN
8219
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8220
+ */
8221
+ REQUESTED_STREAM_SHUTDOWN: 'Requested stream shutdown',
8144
8222
 
8145
- define(streamStatusInfo, 'FAILED_TO_READ_FILE', 'Failed to read file');
8146
- /**
8147
- * File does not exist, check filename.
8148
- * @event FILE_NOT_FOUND
8149
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8150
- */
8223
+ /**
8224
+ * Failed to create movie, file can not be read.
8225
+ * @event FAILED_TO_READ_FILE
8226
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8227
+ */
8228
+ FAILED_TO_READ_FILE: 'Failed to read file',
8151
8229
 
8152
- define(streamStatusInfo, 'FILE_NOT_FOUND', 'File not found');
8153
- /**
8154
- * Server failed to establish websocket connection with origin server.
8155
- * @event FAILED_TO_CONNECT_TO_ORIGIN_STREAM
8156
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8157
- */
8230
+ /**
8231
+ * File does not exist, check filename.
8232
+ * @event FILE_NOT_FOUND
8233
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8234
+ */
8235
+ FILE_NOT_FOUND: 'File not found',
8158
8236
 
8159
- define(streamStatusInfo, 'FAILED_TO_CONNECT_TO_ORIGIN_STREAM', 'Failed to connect to origin stream');
8160
- /**
8161
- * CDN stream not found.
8162
- * @event CDN_STREAM_NOT_FOUND
8163
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8164
- */
8237
+ /**
8238
+ * Server failed to establish websocket connection with origin server.
8239
+ * @event FAILED_TO_CONNECT_TO_ORIGIN_STREAM
8240
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8241
+ */
8242
+ FAILED_TO_CONNECT_TO_ORIGIN_STREAM: 'Failed to connect to origin stream',
8165
8243
 
8166
- define(streamStatusInfo, 'CDN_STREAM_NOT_FOUND', 'CDN stream not found');
8167
- /**
8168
- * Indicates that provided URL protocol in stream name is invalid.
8169
- * Valid: vod://file.mp4
8170
- * Invalid: dov://file.mp4
8171
- * @event FAILED_TO_GET_AGENT_STORAGE
8172
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8173
- */
8244
+ /**
8245
+ * CDN stream not found.
8246
+ * @event CDN_STREAM_NOT_FOUND
8247
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8248
+ */
8249
+ CDN_STREAM_NOT_FOUND: 'CDN stream not found',
8174
8250
 
8175
- define(streamStatusInfo, 'FAILED_TO_GET_AGENT_STORAGE', 'Failed to get agent storage');
8176
- /**
8177
- * Shutdown agent servicing origin stream.
8178
- * @event AGENT_SERVICING_ORIGIN_STREAM_IS_SHUTTING_DOWN
8179
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8180
- */
8251
+ /**
8252
+ * Indicates that provided URL protocol in stream name is invalid.
8253
+ * Valid: vod://file.mp4
8254
+ * Invalid: dov://file.mp4
8255
+ * @event FAILED_TO_GET_AGENT_STORAGE
8256
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8257
+ */
8258
+ FAILED_TO_GET_AGENT_STORAGE: 'Failed to get agent storage',
8181
8259
 
8182
- define(streamStatusInfo, 'AGENT_SERVICING_ORIGIN_STREAM_IS_SHUTTING_DOWN', 'Agent servicing origin stream is shutting down');
8183
- /**
8184
- * Terminated by keep-alive on walk through subscribers.
8185
- * @event TERMINATED_BY_KEEP_ALIVE
8186
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8187
- */
8260
+ /**
8261
+ * Shutdown agent servicing origin stream.
8262
+ * @event AGENT_SERVICING_ORIGIN_STREAM_IS_SHUTTING_DOWN
8263
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8264
+ */
8265
+ AGENT_SERVICING_ORIGIN_STREAM_IS_SHUTTING_DOWN: 'Agent servicing origin stream is shutting down',
8188
8266
 
8189
- define(streamStatusInfo, 'TERMINATED_BY_KEEP_ALIVE', 'Terminated by keep-alive');
8190
- /**
8191
- * Transcoding required, but disabled in settings
8192
- * @event TRANSCODING_REQUIRED_BUT_DISABLED
8193
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8194
- */
8267
+ /**
8268
+ * Terminated by keep-alive on walk through subscribers.
8269
+ * @event TERMINATED_BY_KEEP_ALIVE
8270
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8271
+ */
8272
+ TERMINATED_BY_KEEP_ALIVE: 'Terminated by keep-alive',
8195
8273
 
8196
- define(streamStatusInfo, 'TRANSCODING_REQUIRED_BUT_DISABLED', 'Transcoding required, but disabled');
8197
- /**
8198
- * Access restricted by access list
8199
- * @event RESTRICTED_ACCESS
8200
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8201
- */
8274
+ /**
8275
+ * Transcoding required, but disabled in server settings
8276
+ * @event TRANSCODING_REQUIRED_BUT_DISABLED
8277
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8278
+ */
8279
+ TRANSCODING_REQUIRED_BUT_DISABLED: 'Transcoding required, but disabled',
8202
8280
 
8203
- define(streamStatusInfo, 'RESTRICTED_ACCESS', 'Restricted access');
8204
- /**
8205
- * No available transcoders for stream
8206
- * @event RESTRICTED_ACCESS
8207
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8208
- */
8281
+ /**
8282
+ * Access restricted by access list
8283
+ * @event RESTRICTED_ACCESS
8284
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8285
+ */
8286
+ RESTRICTED_ACCESS: 'Restricted access',
8209
8287
 
8210
- define(streamStatusInfo, 'NO_AVAILABLE_TRANSCODERS', 'No available transcoders');
8288
+ /**
8289
+ * No available transcoders for stream
8290
+ * @event NO_AVAILABLE_TRANSCODERS
8291
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
8292
+ */
8293
+ NO_AVAILABLE_TRANSCODERS: 'No available transcoders'
8294
+ });
8211
8295
  /**
8212
8296
  * @namespace Flashphoner.constants.CALL_STATUS_INFO
8213
8297
  * @see Call
8214
8298
  */
8215
8299
 
8216
- var callStatusInfo = {};
8217
- /**
8218
- * Normal call hangup.
8219
- * @event NORMAL_CALL_CLEARING
8220
- * @memberof Flashphoner.constants.CALL_STATUS_INFO
8221
- */
8222
-
8223
- define(callStatusInfo, 'NORMAL_CALL_CLEARING', 'Normal call clearing');
8224
- /**
8225
- * Error occurred on session creation.
8226
- * @event FAILED_BY_SESSION_CREATION
8227
- * @memberof Flashphoner.constants.CALL_STATUS_INFO
8228
- */
8300
+ var CALL_STATUS_INFO = Object.freeze({
8301
+ /**
8302
+ * Normal call hangup.
8303
+ * @event NORMAL_CALL_CLEARING
8304
+ * @memberof Flashphoner.constants.CALL_STATUS_INFO
8305
+ */
8306
+ NORMAL_CALL_CLEARING: 'Normal call clearing',
8229
8307
 
8230
- define(callStatusInfo, 'FAILED_BY_SESSION_CREATION', 'Failed by session creation');
8231
- /**
8232
- * Failed by error during ICE establishment.
8233
- * @event FAILED_BY_ICE_ERROR
8234
- * @memberof Flashphoner.constants.CALL_STATUS_INFO
8235
- */
8308
+ /**
8309
+ * Error occurred while creating a session
8310
+ * @event FAILED_BY_SESSION_CREATION
8311
+ * @memberof Flashphoner.constants.CALL_STATUS_INFO
8312
+ */
8313
+ FAILED_BY_SESSION_CREATION: 'Failed by session creation',
8236
8314
 
8237
- define(callStatusInfo, 'FAILED_BY_ICE_ERROR', 'Failed by ICE error');
8238
- /**
8239
- * RTP session failed by RTP activity timer.
8240
- * @event FAILED_BY_RTP_ACTIVITY
8241
- * @memberof Flashphoner.constants.CALL_STATUS_INFO
8242
- */
8315
+ /**
8316
+ * Failed by error during ICE establishment.
8317
+ * @event FAILED_BY_ICE_ERROR
8318
+ * @memberof Flashphoner.constants.CALL_STATUS_INFO
8319
+ */
8320
+ FAILED_BY_ICE_ERROR: 'Failed by ICE error',
8243
8321
 
8244
- define(callStatusInfo, 'FAILED_BY_RTP_ACTIVITY', 'Failed by RTP activity');
8245
- /**
8246
- * FF writer was failed on RTMP.
8247
- * @event FAILED_BY_RTMP_WRITER_ERROR
8248
- * @memberof Flashphoner.constants.CALL_STATUS_INFO
8249
- */
8322
+ /**
8323
+ * RTP session failed by RTP activity timer.
8324
+ * @event FAILED_BY_RTP_ACTIVITY
8325
+ * @memberof Flashphoner.constants.CALL_STATUS_INFO
8326
+ */
8327
+ FAILED_BY_RTP_ACTIVITY: 'Failed by RTP activity',
8250
8328
 
8251
- define(callStatusInfo, 'FAILED_BY_RTMP_WRITER_ERROR', 'Failed by RTMP writer error');
8252
- /**
8253
- * DTLS wrong fingerprint.
8254
- * @event FAILED_BY_DTLS_FINGERPRINT_ERROR
8255
- * @memberof Flashphoner.constants.CALL_STATUS_INFO
8256
- */
8329
+ /**
8330
+ * FF writer was failed on RTMP.
8331
+ * @event FAILED_BY_RTMP_WRITER_ERROR
8332
+ * @memberof Flashphoner.constants.CALL_STATUS_INFO
8333
+ */
8334
+ FAILED_BY_RTMP_WRITER_ERROR: 'Failed by RTMP writer error',
8257
8335
 
8258
- define(callStatusInfo, 'FAILED_BY_DTLS_FINGERPRINT_ERROR', 'Failed by DTLS fingerprint error');
8259
- /**
8260
- * No common codecs in sdp
8261
- * @event NO_COMMON_CODECS
8262
- * @memberof Flashphoner.constants.CALL_STATUS_INFO
8263
- */
8336
+ /**
8337
+ * DTLS wrong fingerprint.
8338
+ * @event FAILED_BY_DTLS_FINGERPRINT_ERROR
8339
+ * @memberof Flashphoner.constants.CALL_STATUS_INFO
8340
+ */
8341
+ FAILED_BY_DTLS_FINGERPRINT_ERROR: 'Failed by DTLS fingerprint error',
8264
8342
 
8265
- define(callStatusInfo, 'NO_COMMON_CODECS', 'No common codecs');
8266
- /**
8267
- * Client did not send DTLS packets or packets were lost/corrupted during transmission.
8268
- * @event FAILED_BY_DTLS_ERROR
8269
- * @memberof Flashphoner.constants.CALL_STATUS_INFO
8270
- */
8343
+ /**
8344
+ * No common codecs in sdp
8345
+ * @event NO_COMMON_CODECS
8346
+ * @memberof Flashphoner.constants.CALL_STATUS_INFO
8347
+ */
8348
+ NO_COMMON_CODECS: 'No common codecs',
8271
8349
 
8272
- define(callStatusInfo, 'FAILED_BY_DTLS_ERROR', 'Failed by DTLS error');
8273
- /**
8274
- * Error occurred during call
8275
- * @event FAILED_BY_ERROR
8276
- * @memberof Flashphoner.constants.CALL_STATUS_INFO
8277
- */
8350
+ /**
8351
+ * Client did not send DTLS packets or packets were lost/corrupted during transmission.
8352
+ * @event FAILED_BY_DTLS_ERROR
8353
+ * @memberof Flashphoner.constants.CALL_STATUS_INFO
8354
+ */
8355
+ FAILED_BY_DTLS_ERROR: 'Failed by DTLS error',
8278
8356
 
8279
- define(callStatusInfo, 'FAILED_BY_ERROR', 'Failed by error');
8280
- /**
8281
- * Call failed by request timeout
8282
- * @event FAILED_BY_REQUEST_TIMEOUT
8283
- * @memberof Flashphoner.constants.CALL_STATUS_INFO
8284
- */
8357
+ /**
8358
+ * Error occurred during the call
8359
+ * @event FAILED_BY_ERROR
8360
+ * @memberof Flashphoner.constants.CALL_STATUS_INFO
8361
+ */
8362
+ FAILED_BY_ERROR: 'Failed by error',
8285
8363
 
8286
- define(callStatusInfo, 'FAILED_BY_REQUEST_TIMEOUT', 'Failed by request timeout');
8287
- /**
8288
- * Transcoding required, but disabled in settings
8289
- * @event TRANSCODING_REQUIRED_BUT_DISABLED
8290
- * @memberof Flashphoner.constants.CALL_STATUS_INFO
8291
- */
8364
+ /**
8365
+ * Call failed by request timeout
8366
+ * @event FAILED_BY_REQUEST_TIMEOUT
8367
+ * @memberof Flashphoner.constants.CALL_STATUS_INFO
8368
+ */
8369
+ FAILED_BY_REQUEST_TIMEOUT: 'Failed by request timeout',
8292
8370
 
8293
- define(callStatusInfo, 'TRANSCODING_REQUIRED_BUT_DISABLED', 'Transcoding required, but disabled');
8371
+ /**
8372
+ * Transcoding required, but disabled in settings
8373
+ * @event TRANSCODING_REQUIRED_BUT_DISABLED
8374
+ * @memberof Flashphoner.constants.CALL_STATUS_INFO
8375
+ */
8376
+ TRANSCODING_REQUIRED_BUT_DISABLED: 'Transcoding required, but disabled'
8377
+ });
8294
8378
  /**
8295
8379
  * @namespace Flashphoner.constants.ERROR_INFO
8296
8380
  */
8297
8381
 
8298
- var errorInfo = {};
8299
- /**
8300
- * Error if none of MediaProviders available
8301
- * @event NONE_OF_MEDIAPROVIDERS_AVAILABLE
8302
- * @memberof Flashphoner.constants.ERROR_INFO
8303
- */
8382
+ var ERROR_INFO = Object.freeze({
8383
+ /**
8384
+ * Error if none of MediaProviders available
8385
+ * @event NONE_OF_MEDIAPROVIDERS_AVAILABLE
8386
+ * @memberof Flashphoner.constants.ERROR_INFO
8387
+ */
8388
+ NONE_OF_MEDIAPROVIDERS_AVAILABLE: 'None of MediaProviders available',
8304
8389
 
8305
- define(errorInfo, 'NONE_OF_MEDIAPROVIDERS_AVAILABLE', 'None of MediaProviders available');
8306
- /**
8307
- * Error if none of preferred MediaProviders available
8308
- * @event NONE_OF_PREFERRED_MEDIAPROVIDERS_AVAILABLE
8309
- * @memberof Flashphoner.constants.ERROR_INFO
8310
- */
8390
+ /**
8391
+ * Error if none of preferred MediaProviders available
8392
+ * @event NONE_OF_PREFERRED_MEDIAPROVIDERS_AVAILABLE
8393
+ * @memberof Flashphoner.constants.ERROR_INFO
8394
+ */
8395
+ NONE_OF_PREFERRED_MEDIAPROVIDERS_AVAILABLE: 'None of preferred MediaProviders available',
8311
8396
 
8312
- define(errorInfo, 'NONE_OF_PREFERRED_MEDIAPROVIDERS_AVAILABLE', 'None of preferred MediaProviders available');
8313
- /**
8314
- * Error if API is not initialized
8315
- * @event FLASHPHONER_API_NOT_INITIALIZED
8316
- * @memberof Flashphoner.constants.ERROR_INFO
8317
- */
8397
+ /**
8398
+ * Error if API is not initialized
8399
+ * @event FLASHPHONER_API_NOT_INITIALIZED
8400
+ * @memberof Flashphoner.constants.ERROR_INFO
8401
+ */
8402
+ FLASHPHONER_API_NOT_INITIALIZED: 'Flashphoner API is not initialized',
8318
8403
 
8319
- define(errorInfo, 'FLASHPHONER_API_NOT_INITIALIZED', 'Flashphoner API is not initialized');
8320
- /**
8321
- * Error if options.urlServer is not specified
8322
- * @event OPTIONS_URLSERVER_MUST_BE_PROVIDED
8323
- * @memberof Flashphoner.constants.ERROR_INFO
8324
- */
8404
+ /**
8405
+ * Error if options.urlServer is not specified
8406
+ * @event OPTIONS_URLSERVER_MUST_BE_PROVIDED
8407
+ * @memberof Flashphoner.constants.ERROR_INFO
8408
+ */
8409
+ OPTIONS_URLSERVER_MUST_BE_PROVIDED: 'options.urlServer must be provided',
8325
8410
 
8326
- define(errorInfo, 'OPTIONS_URLSERVER_MUST_BE_PROVIDED', 'options.urlServer must be provided');
8327
- /**
8328
- * Error if session state is not REGISTERED
8329
- * @event INVALID_SESSION_STATE
8330
- * @memberof Flashphoner.constants.ERROR_INFO
8331
- */
8411
+ /**
8412
+ * Error if session state is not valid
8413
+ * @event INVALID_SESSION_STATE
8414
+ * @memberof Flashphoner.constants.ERROR_INFO
8415
+ */
8416
+ INVALID_SESSION_STATE: 'Invalid session state',
8332
8417
 
8333
- define(errorInfo, 'INVALID_SESSION_STATE', 'Invalid session state');
8334
- /**
8335
- * Error if no options provided
8336
- * @event OPTIONS_MUST_BE_PROVIDED
8337
- * @memberof Flashphoner.constants.ERROR_INFO
8338
- */
8418
+ /**
8419
+ * Error if no options provided
8420
+ * @event OPTIONS_MUST_BE_PROVIDED
8421
+ * @memberof Flashphoner.constants.ERROR_INFO
8422
+ */
8423
+ OPTIONS_MUST_BE_PROVIDED: 'options must be provided',
8339
8424
 
8340
- define(errorInfo, 'OPTIONS_MUST_BE_PROVIDED', 'options must be provided');
8341
- /**
8342
- * Error if call status is not {@link Flashphoner.constants.CALL_STATUS.NEW}
8343
- * @event INVALID_CALL_STATE
8344
- * @memberof Flashphoner.constants.ERROR_INFO
8345
- */
8425
+ /**
8426
+ * Error if call status is not {@link Flashphoner.constants.CALL_STATUS.NEW}
8427
+ * @event INVALID_CALL_STATE
8428
+ * @memberof Flashphoner.constants.ERROR_INFO
8429
+ */
8430
+ INVALID_CALL_STATE: 'Invalid call state',
8346
8431
 
8347
- define(errorInfo, 'INVALID_CALL_STATE', 'Invalid call state');
8348
- /**
8349
- * Error if event is not specified
8350
- * @event EVENT_CANT_BE_NULL
8351
- * @memberof Flashphoner.constants.ERROR_INFO
8352
- */
8432
+ /**
8433
+ * Error if event is not specified
8434
+ * @event EVENT_CANT_BE_NULL
8435
+ * @memberof Flashphoner.constants.ERROR_INFO
8436
+ */
8437
+ EVENT_CANT_BE_NULL: 'Event can\'t be null',
8438
+
8439
+ /**
8440
+ * Error if callback is not a valid function
8441
+ * @event CALLBACK_NEEDS_TO_BE_A_VALID_FUNCTION
8442
+ * @memberof Flashphoner.constants.ERROR_INFO
8443
+ */
8444
+ CALLBACK_NEEDS_TO_BE_A_VALID_FUNCTION: 'Callback needs to be a valid function',
8353
8445
 
8354
- define(errorInfo, 'EVENT_CANT_BE_NULL', 'Event can\'t be null');
8446
+ /**
8447
+ * Error if options.name is not specified
8448
+ * @event OPTIONS_NAME_MUST_BE_PROVIDED
8449
+ * @memberof Flashphoner.constants.ERROR_INFO
8450
+ */
8451
+ OPTIONS_NAME_MUST_BE_PROVIDED: 'options.name must be provided',
8452
+
8453
+ /**
8454
+ * Error if number of cams is less than 2 or camera is already used by other application
8455
+ * @event CAN_NOT_SWITCH_CAM
8456
+ * @memberOf Flashphoner.constants.ERROR_INFO
8457
+ */
8458
+ CAN_NOT_SWITCH_CAM: 'Number of cams is less than 2 or camera is already used by other application',
8459
+
8460
+ /**
8461
+ * Error if number of mics is less than 2 or microphone is already used by other application
8462
+ * @event CAN_NOT_SWITCH_MIC
8463
+ * @memberOf Flashphoner.constants.ERROR_INFO
8464
+ */
8465
+ CAN_NOT_SWITCH_MIC: 'Number of mics is less than 2 or microphone is already used by other application',
8466
+
8467
+ /**
8468
+ * Local browser error detected
8469
+ * @event LOCAL_ERROR
8470
+ * @memberOf Flashphoner.constants.ERROR_INFO
8471
+ */
8472
+ LOCAL_ERROR: 'Local error'
8473
+ });
8355
8474
  /**
8356
- * Error if callback is not a valid function
8357
- * @event CALLBACK_NEEDS_TO_BE_A_VALID_FUNCTION
8358
- * @memberof Flashphoner.constants.ERROR_INFO
8475
+ * Local media devices type
8476
+ * @namespace Flashphoner.constants.MEDIA_DEVICE_KIND
8359
8477
  */
8360
8478
 
8361
- define(errorInfo, 'CALLBACK_NEEDS_TO_BE_A_VALID_FUNCTION', 'Callback needs to be a valid function');
8479
+ var MEDIA_DEVICE_KIND = Object.freeze({
8480
+ /**
8481
+ * List local media output devices
8482
+ * @see Flashphoner.getMediaDevices
8483
+ * @memberOf Flashphoner.constants.MEDIA_DEVICE_KIND
8484
+ */
8485
+ OUTPUT: 'output',
8486
+
8487
+ /**
8488
+ * List local media input devices
8489
+ * @see Flashphoner.getMediaDevices
8490
+ * @memberOf Flashphoner.constants.MEDIA_DEVICE_KIND
8491
+ */
8492
+ INPUT: 'input',
8493
+
8494
+ /**
8495
+ * List local media devices
8496
+ * @see Flashphoner.getMediaDevices
8497
+ * @memberOf Flashphoner.constants.MEDIA_DEVICE_KIND
8498
+ */
8499
+ ALL: 'all'
8500
+ });
8362
8501
  /**
8363
- * Error if session state is not ESTABLISHED
8364
- * @event INVALID_SESSION_STATE
8365
- * @memberof Flashphoner.constants.ERROR_INFO
8502
+ * WebRTC transport type
8503
+ * @namespace Flashphoner.constants.TRANSPORT_TYPE
8366
8504
  */
8367
8505
 
8368
- define(errorInfo, 'INVALID_SESSION_STATE', 'Invalid session state');
8506
+ var TRANSPORT_TYPE = Object.freeze({
8507
+ /**
8508
+ * WebRTC RTP traffic goes over UDP (default)
8509
+ * @see Stream
8510
+ * @memberOf Flashphoner.constants.TRANSPORT_TYPE
8511
+ */
8512
+ UDP: 'UDP',
8513
+
8514
+ /**
8515
+ * WebRTC RTP traffic goes over TCP
8516
+ * @see Stream
8517
+ * @memberOf Flashphoner.constants.TRANSPORT_TYPE
8518
+ */
8519
+ TCP: 'TCP'
8520
+ });
8369
8521
  /**
8370
- * Error if options.name is not specified
8371
- * @event OPTIONS_NAME_MUST_BE_PROVIDED
8372
- * @memberof Flashphoner.constants.ERROR_INFO
8522
+ * WebRTC connection quality type
8523
+ * @namespace Flashphoner.constants.CONNECTION_QUALITY
8373
8524
  */
8374
8525
 
8375
- define(errorInfo, 'OPTIONS_NAME_MUST_BE_PROVIDED', 'options.name must be provided');
8526
+ var CONNECTION_QUALITY = Object.freeze({
8527
+ /**
8528
+ * Channel bandwidth is perfect
8529
+ * @see Stream
8530
+ * @memberOf Flashphoner.constants.CONNECTION_QUALITY
8531
+ */
8532
+ PERFECT: 'PERFECT',
8533
+
8534
+ /**
8535
+ * Channel bandwidth is good
8536
+ * @see Stream
8537
+ * @memberOf Flashphoner.constants.CONNECTION_QUALITY
8538
+ */
8539
+ GOOD: 'GOOD',
8540
+
8541
+ /**
8542
+ * Channel bandwidth is bad
8543
+ * @see Stream
8544
+ * @memberOf Flashphoner.constants.CONNECTION_QUALITY
8545
+ */
8546
+ BAD: 'BAD',
8547
+
8548
+ /**
8549
+ * Channel bandwidth is unknown (initial state)
8550
+ * @see Stream
8551
+ * @memberOf Flashphoner.constants.CONNECTION_QUALITY
8552
+ */
8553
+ UNKNOWN: 'UNKNOWN',
8554
+
8555
+ /**
8556
+ * Channel bandwidth is updating
8557
+ * @see Stream
8558
+ * @memberOf Flashphoner.constants.CONNECTION_QUALITY
8559
+ */
8560
+ UPDATE: 'UPDATE'
8561
+ });
8376
8562
  /**
8377
- * Error if number of cams is less than 2 or already used custom stream
8378
- * @event CAN_NOT_SWITCH_CAM
8379
- * @memberOf Flashphoner.constants.ERROR_INFO
8563
+ * Websocket signaling stream event
8564
+ * @see Stream
8565
+ * @memberOf Flashphoner.constants
8380
8566
  */
8381
8567
 
8382
- define(errorInfo, 'CAN_NOT_SWITCH_CAM', 'Number of cams is less than 2 or already used custom stream');
8568
+ var STREAM_EVENT = 'STREAM_EVENT';
8383
8569
  /**
8384
- * Error if number of mics is less than 2 or already used custom stream
8385
- * @event CAN_NOT_SWITCH_MIC
8386
- * @memberOf Flashphoner.constants.ERROR_INFO
8570
+ * Websocket signaling stream event type
8571
+ * @namespace Flashphoner.constants.STREAM_EVENT_TYPE
8387
8572
  */
8388
8573
 
8389
- define(errorInfo, 'CAN_NOT_SWITCH_MIC', 'Number of mics is less than 2 or already used custom stream');
8574
+ var STREAM_EVENT_TYPE = Object.freeze({
8575
+ /**
8576
+ * Stream audio is muted
8577
+ * @see Stream
8578
+ * @memberOf Flashphoner.constants.STREAM_EVENT_TYPE
8579
+ */
8580
+ AUDIO_MUTED: 'audioMuted',
8581
+
8582
+ /**
8583
+ * Stream audio is unmuted
8584
+ * @see Stream
8585
+ * @memberOf Flashphoner.constants.STREAM_EVENT_TYPE
8586
+ */
8587
+ AUDIO_UNMUTED: 'audioUnmuted',
8588
+
8589
+ /**
8590
+ * Stream video is muted
8591
+ * @see Stream
8592
+ * @memberOf Flashphoner.constants.STREAM_EVENT_TYPE
8593
+ */
8594
+ VIDEO_MUTED: 'videoMuted',
8595
+
8596
+ /**
8597
+ * Stream videoo is unmuted
8598
+ * @see Stream
8599
+ * @memberOf Flashphoner.constants.STREAM_EVENT_TYPE
8600
+ */
8601
+ VIDEO_UNMUTED: 'videoUnmuted',
8602
+
8603
+ /**
8604
+ * Data bound to the stream are received
8605
+ * @see Stream
8606
+ * @memberOf Flashphoner.constants.STREAM_EVENT_TYPE
8607
+ */
8608
+ DATA: 'data'
8609
+ });
8390
8610
  /**
8391
- * Error if recived local error
8392
- * @event CAN_NOT_SWITCH_MIC
8393
- * @memberOf Flashphoner.constants.ERROR_INFO
8611
+ * WebRTC video content hint type
8612
+ * @namespace Flashphoner.constants.CONTENT_HINT_TYPE
8394
8613
  */
8395
8614
 
8396
- define(errorInfo, 'LOCAL_ERROR', 'Local error');
8397
- var mediaDeviceKind = {};
8398
- define(mediaDeviceKind, 'OUTPUT', 'output');
8399
- define(mediaDeviceKind, 'INPUT', 'input');
8400
- define(mediaDeviceKind, 'ALL', 'all');
8401
- var transportType = {};
8402
- define(transportType, 'UDP', 'UDP');
8403
- define(transportType, 'TCP', 'TCP');
8404
- var connectionQuality = {};
8405
- define(connectionQuality, 'PERFECT', 'PERFECT');
8406
- define(connectionQuality, 'GOOD', 'GOOD');
8407
- define(connectionQuality, 'BAD', 'BAD');
8408
- define(connectionQuality, 'UNKNOWN', 'UNKNOWN');
8409
- define(connectionQuality, 'UPDATE', 'UPDATE');
8410
- var streamEventType = {};
8411
- define(streamEventType, 'AUDIO_MUTED', 'audioMuted');
8412
- define(streamEventType, 'AUDIO_UNMUTED', 'audioUnmuted');
8413
- define(streamEventType, 'VIDEO_MUTED', 'videoMuted');
8414
- define(streamEventType, 'VIDEO_UNMUTED', 'videoUnmuted');
8415
- define(streamEventType, 'DATA', 'data');
8416
- var contentHintType = {};
8417
- define(contentHintType, 'MOTION', 'motion');
8418
- define(contentHintType, 'DETAIL', 'detail');
8419
- define(contentHintType, 'TEXT', 'text');
8420
- var constants = {};
8421
- define(constants, 'SESSION_STATUS', sessionStatus);
8422
- define(constants, 'STREAM_EVENT_TYPE', streamEventType);
8423
- define(constants, 'STREAM_EVENT', 'STREAM_EVENT');
8424
- define(constants, 'STREAM_STATUS', streamStatus);
8425
- define(constants, 'CALL_STATUS', callStatus);
8426
- define(constants, 'STREAM_STATUS_INFO', streamStatusInfo);
8427
- define(constants, 'CALL_STATUS_INFO', callStatusInfo);
8428
- define(constants, 'ERROR_INFO', errorInfo);
8429
- define(constants, 'MEDIA_DEVICE_KIND', mediaDeviceKind);
8430
- define(constants, 'TRANSPORT_TYPE', transportType);
8431
- define(constants, 'CONNECTION_QUALITY', connectionQuality);
8432
- define(constants, 'CONTENT_HINT_TYPE', contentHintType); //define helper
8433
-
8434
- function define(obj, name, value) {
8435
- Object.defineProperty(obj, name, {
8436
- value: value,
8437
- enumerable: true
8438
- });
8439
- }
8615
+ var CONTENT_HINT_TYPE = Object.freeze({
8616
+ /**
8617
+ * Video content is motion (webcam case): keep FPS, resolution and bitrate may change
8618
+ * @see Stream
8619
+ * @memberOf Flashphoner.constants.CONTENT_HINT_TYPE
8620
+ */
8621
+ MOTION: 'motion',
8622
+
8623
+ /**
8624
+ * Video content is detail (sreen sharing case): keep resolution, bitrate may change, FPS may drop
8625
+ * @see Stream
8626
+ * @memberOf Flashphoner.constants.CONTENT_HINT_TYPE
8627
+ */
8628
+ DETAIL: 'detail',
8440
8629
 
8441
- module.exports = constants;
8630
+ /**
8631
+ * Video content is text (sreen sharing case): keep resolution and bitrate, FPS may drop
8632
+ * @see Stream
8633
+ * @memberOf Flashphoner.constants.CONTENT_HINT_TYPE
8634
+ */
8635
+ TEXT: 'text'
8636
+ });
8637
+ module.exports = {
8638
+ SESSION_STATUS: SESSION_STATUS,
8639
+ STREAM_STATUS: STREAM_STATUS,
8640
+ CALL_STATUS: CALL_STATUS,
8641
+ STREAM_STATUS_INFO: STREAM_STATUS_INFO,
8642
+ CALL_STATUS_INFO: CALL_STATUS_INFO,
8643
+ ERROR_INFO: ERROR_INFO,
8644
+ MEDIA_DEVICE_KIND: MEDIA_DEVICE_KIND,
8645
+ TRANSPORT_TYPE: TRANSPORT_TYPE,
8646
+ CONNECTION_QUALITY: CONNECTION_QUALITY,
8647
+ STREAM_EVENT: STREAM_EVENT,
8648
+ STREAM_EVENT_TYPE: STREAM_EVENT_TYPE,
8649
+ CONTENT_HINT_TYPE: CONTENT_HINT_TYPE
8650
+ };
8442
8651
 
8443
8652
  },{}],39:[function(require,module,exports){
8444
8653
  'use strict';
@@ -9071,7 +9280,7 @@ var createSession = function createSession(options) {
9071
9280
  mediaProviders: Object.keys(MediaProvider),
9072
9281
  keepAlive: keepAlive,
9073
9282
  authToken: authToken,
9074
- clientVersion: "2.0.216",
9283
+ clientVersion: "2.0.217",
9075
9284
  clientOSVersion: window.navigator.appVersion,
9076
9285
  clientBrowserVersion: window.navigator.userAgent,
9077
9286
  msePacketizationVersion: 2,