@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.
@@ -17606,717 +17606,926 @@ exports['WSPlayer'] = WSPlayer;
17606
17606
  * @see Session
17607
17607
  */
17608
17608
 
17609
- var sessionStatus = {};
17610
- /**
17611
- * Fires when {@link Session} ws socket opens.
17612
- * @event CONNECTED
17613
- * @memberof Flashphoner.constants.SESSION_STATUS
17614
- */
17609
+ var SESSION_STATUS = Object.freeze({
17610
+ /**
17611
+ * Fires when {@link Session} ws socket opens.
17612
+ * @event CONNECTED
17613
+ * @memberof Flashphoner.constants.SESSION_STATUS
17614
+ */
17615
+ CONNECTED: 'CONNECTED',
17615
17616
 
17616
- define(sessionStatus, 'CONNECTED', 'CONNECTED');
17617
- /**
17618
- * Fires when {@link Session} receives connect ack from REST App.
17619
- * @event ESTABLISHED
17620
- * @memberof Flashphoner.constants.SESSION_STATUS
17621
- */
17617
+ /**
17618
+ * Fires when {@link Session} receives connect ack from REST App.
17619
+ * @event ESTABLISHED
17620
+ * @memberof Flashphoner.constants.SESSION_STATUS
17621
+ */
17622
+ ESTABLISHED: 'ESTABLISHED',
17622
17623
 
17623
- define(sessionStatus, 'ESTABLISHED', 'ESTABLISHED');
17624
- /**
17625
- * Fires when {@link Session} disconnects.
17626
- * @event DISCONNECTED
17627
- * @memberof Flashphoner.constants.SESSION_STATUS
17628
- */
17624
+ /**
17625
+ * Fires when {@link Session} disconnects.
17626
+ * @event DISCONNECTED
17627
+ * @memberof Flashphoner.constants.SESSION_STATUS
17628
+ */
17629
+ DISCONNECTED: 'DISCONNECTED',
17629
17630
 
17630
- define(sessionStatus, 'DISCONNECTED', 'DISCONNECTED');
17631
- /**
17632
- * Fires if {@link Session} call of rest method error.
17633
- * @event WARN
17634
- * @memberof Flashphoner.constants.SESSION_STATUS
17635
- */
17631
+ /**
17632
+ * Fires if {@link Session} call of rest method error.
17633
+ * @event WARN
17634
+ * @memberof Flashphoner.constants.SESSION_STATUS
17635
+ */
17636
+ WARN: 'WARN',
17636
17637
 
17637
- define(sessionStatus, 'WARN', 'WARN');
17638
- /**
17639
- * Fires if {@link Session} connection failed.
17640
- * Some of the reasons can be network connection failed, REST App failed
17641
- * @event FAILED
17642
- * @memberof Flashphoner.constants.SESSION_STATUS
17643
- */
17638
+ /**
17639
+ * Fires if {@link Session} connection failed.
17640
+ * Some of the reasons can be network connection failed, REST App failed
17641
+ * @event FAILED
17642
+ * @memberof Flashphoner.constants.SESSION_STATUS
17643
+ */
17644
+ FAILED: 'FAILED',
17644
17645
 
17645
- define(sessionStatus, 'FAILED', 'FAILED');
17646
- /**
17647
- * Fires wneh {@link Session} receives debug event
17648
- * @event DEBUG
17649
- * @memberof Flashphoner.constants.SESSION_STATUS
17650
- */
17646
+ /**
17647
+ * Fires wneh {@link Session} receives debug event
17648
+ * @event DEBUG
17649
+ * @memberof Flashphoner.constants.SESSION_STATUS
17650
+ */
17651
+ DEBUG: 'DEBUG',
17651
17652
 
17652
- define(sessionStatus, 'DEBUG', 'DEBUG');
17653
- /**
17654
- * Fires when {@link Session} receives custom REST App message.
17655
- *
17656
- * @event APP_DATA
17657
- * @memberof Flashphoner.constants.SESSION_STATUS
17658
- */
17653
+ /**
17654
+ * Fires when {@link Session} receives custom REST App message.
17655
+ *
17656
+ * @event APP_DATA
17657
+ * @memberof Flashphoner.constants.SESSION_STATUS
17658
+ */
17659
+ APP_DATA: 'APP_DATA',
17659
17660
 
17660
- define(sessionStatus, 'APP_DATA', 'APP_DATA');
17661
- /**
17662
- * Fires when {@link Session} receives status of sendData operation.
17663
- *
17664
- * @event SEND_DATA_STATUS
17665
- * @memberof Flashphoner.constants.SESSION_STATUS
17666
- */
17661
+ /**
17662
+ * Fires when {@link Session} receives status of sendData operation.
17663
+ *
17664
+ * @event SEND_DATA_STATUS
17665
+ * @memberof Flashphoner.constants.SESSION_STATUS
17666
+ */
17667
+ SEND_DATA_STATUS: 'SEND_DATA_STATUS',
17667
17668
 
17668
- define(sessionStatus, 'SEND_DATA_STATUS', 'SEND_DATA_STATUS'); //State of newly created Session
17669
+ /**
17670
+ * State of newly created {@link Session}.
17671
+ *
17672
+ * @event PENDING
17673
+ * @memberof Flashphoner.constants.SESSION_STATUS
17674
+ */
17675
+ PENDING: 'PENDING',
17669
17676
 
17670
- define(sessionStatus, 'PENDING', 'PENDING');
17671
- /**
17672
- * Fires when {@link Session} registers as sip client.
17673
- *
17674
- * @event APP_DATA
17675
- * @memberof Flashphoner.constants.SESSION_STATUS
17676
- */
17677
+ /**
17678
+ * Fires when {@link Session} registers as sip client.
17679
+ *
17680
+ * @event REGISTERED
17681
+ * @memberof Flashphoner.constants.SESSION_STATUS
17682
+ */
17683
+ REGISTERED: 'REGISTERED',
17677
17684
 
17678
- define(sessionStatus, 'REGISTERED', 'REGISTERED');
17679
- /**
17680
- * Fires when {@link Session} unregisters as sip client.
17681
- *
17682
- * @event APP_DATA
17683
- * @memberof Flashphoner.constants.SESSION_STATUS
17684
- */
17685
+ /**
17686
+ * Fires when {@link Session} unregisters as sip client.
17687
+ *
17688
+ * @event UNREGISTERED
17689
+ * @memberof Flashphoner.constants.SESSION_STATUS
17690
+ */
17691
+ UNREGISTERED: 'UNREGISTERED',
17685
17692
 
17686
- define(sessionStatus, 'UNREGISTERED', 'UNREGISTERED');
17687
- define(sessionStatus, 'INCOMING_CALL', 'INCOMING_CALL');
17693
+ /**
17694
+ * Fires when {@link Session} receives an incoming call.
17695
+ *
17696
+ * @event INCOMING_CALL
17697
+ * @memberof Flashphoner.constants.SESSION_STATUS
17698
+ */
17699
+ INCOMING_CALL: 'INCOMING_CALL'
17700
+ });
17688
17701
  /**
17689
17702
  * @namespace Flashphoner.constants.STREAM_STATUS
17690
17703
  * @see Stream
17691
17704
  */
17692
17705
 
17693
- var streamStatus = {}; //State of newly created Stream
17694
-
17695
- define(streamStatus, 'NEW', 'NEW'); //State between publish/play and server response
17706
+ var STREAM_STATUS = Object.freeze({
17707
+ /**
17708
+ * State of newly created {@link Stream}.
17709
+ *
17710
+ * @event NEW
17711
+ * @memberof Flashphoner.constants.STREAM_STATUS
17712
+ */
17713
+ NEW: 'NEW',
17696
17714
 
17697
- define(streamStatus, 'PENDING', 'PENDING');
17698
- /**
17699
- * Fires when {@link Stream} starts publishing.
17700
- * @event PUBLISHING
17701
- * @memberof Flashphoner.constants.STREAM_STATUS
17702
- */
17715
+ /**
17716
+ * State before {@link Stream} publishing/playing.
17717
+ *
17718
+ * @event PENDING
17719
+ * @memberof Flashphoner.constants.STREAM_STATUS
17720
+ */
17721
+ PENDING: 'PENDING',
17703
17722
 
17704
- define(streamStatus, 'PUBLISHING', 'PUBLISHING');
17705
- /**
17706
- * Fires when {@link Stream} starts playing.
17707
- * @event PLAYING
17708
- * @memberof Flashphoner.constants.STREAM_STATUS
17709
- */
17723
+ /**
17724
+ * Fires when {@link Stream} starts publishing.
17725
+ * @event PUBLISHING
17726
+ * @memberof Flashphoner.constants.STREAM_STATUS
17727
+ */
17728
+ PUBLISHING: 'PUBLISHING',
17710
17729
 
17711
- define(streamStatus, 'PLAYING', 'PLAYING');
17712
- /**
17713
- * Fires if {@link Stream} paused.
17714
- * @event PAUSED
17715
- * @memberof Flashphoner.constants.STREAM_STATUS
17716
- */
17730
+ /**
17731
+ * Fires when {@link Stream} starts playing.
17732
+ * @event PLAYING
17733
+ * @memberof Flashphoner.constants.STREAM_STATUS
17734
+ */
17735
+ PLAYING: 'PLAYING',
17717
17736
 
17718
- define(streamStatus, 'PAUSED', 'PAUSED');
17719
- /**
17720
- * Fires if {@link Stream} was unpublished.
17721
- * @event UNPUBLISHING
17722
- * @memberof Flashphoner.constants.STREAM_STATUS
17723
- */
17737
+ /**
17738
+ * Fires if {@link Stream} paused.
17739
+ * @event PAUSED
17740
+ * @memberof Flashphoner.constants.STREAM_STATUS
17741
+ */
17742
+ PAUSED: 'PAUSED',
17724
17743
 
17725
- define(streamStatus, 'UNPUBLISHED', 'UNPUBLISHED');
17726
- /**
17727
- * Fires if {@link Stream} was stopped.
17728
- * @event STOPPED
17729
- * @memberof Flashphoner.constants.STREAM_STATUS
17730
- */
17744
+ /**
17745
+ * Fires if {@link Stream} was unpublished.
17746
+ * @event UNPUBLISHED
17747
+ * @memberof Flashphoner.constants.STREAM_STATUS
17748
+ */
17749
+ UNPUBLISHED: 'UNPUBLISHED',
17731
17750
 
17732
- define(streamStatus, 'STOPPED', 'STOPPED');
17733
- /**
17734
- * Fires if {@link Stream} failed.
17735
- * @event FAILED
17736
- * @memberof Flashphoner.constants.STREAM_STATUS
17737
- */
17751
+ /**
17752
+ * Fires if playing {@link Stream} was stopped.
17753
+ * @event STOPPED
17754
+ * @memberof Flashphoner.constants.STREAM_STATUS
17755
+ */
17756
+ STOPPED: 'STOPPED',
17738
17757
 
17739
- define(streamStatus, 'FAILED', 'FAILED');
17740
- /**
17741
- * Fires if {@link Stream} playback problem.
17742
- * @event PLAYBACK_PROBLEM
17743
- * @memberof Flashphoner.constants.STREAM_STATUS
17744
- */
17758
+ /**
17759
+ * Fires if {@link Stream} failed.
17760
+ * @event FAILED
17761
+ * @memberof Flashphoner.constants.STREAM_STATUS
17762
+ */
17763
+ FAILED: 'FAILED',
17745
17764
 
17746
- define(streamStatus, 'PLAYBACK_PROBLEM', 'PLAYBACK_PROBLEM');
17747
- /**
17748
- * Fires if {@link Stream} resize.
17749
- * @event RESIZE
17750
- * @memberof Flashphoner.constants.STREAM_STATUS
17751
- */
17765
+ /**
17766
+ * Fires if {@link Stream} playback problem.
17767
+ * @event PLAYBACK_PROBLEM
17768
+ * @memberof Flashphoner.constants.STREAM_STATUS
17769
+ */
17770
+ PLAYBACK_PROBLEM: 'PLAYBACK_PROBLEM',
17752
17771
 
17753
- define(streamStatus, 'RESIZE', 'RESIZE');
17754
- /**
17755
- * Fires when {@link Stream} snapshot becomes available.
17756
- * Snapshot is base64 encoded png available through {@link Stream.getInfo}
17757
- * @event SNAPSHOT_COMPLETE
17758
- * @memberof Flashphoner.constants.STREAM_STATUS
17759
- */
17772
+ /**
17773
+ * Fires if playing {@link Stream} picture resizing.
17774
+ * @event RESIZE
17775
+ * @memberof Flashphoner.constants.STREAM_STATUS
17776
+ */
17777
+ RESIZE: 'RESIZE',
17760
17778
 
17761
- define(streamStatus, 'SNAPSHOT_COMPLETE', 'SNAPSHOT_COMPLETE');
17762
- /**
17763
- * Fires on subscribe {@link Stream} if bitrate is higher than available network bandwidth.
17764
- * @event NOT_ENOUGH_BANDWIDTH
17765
- * @memberof Flashphoner.constants.NOT_ENOUGH_BANDWIDTH
17766
- */
17779
+ /**
17780
+ * Fires when {@link Stream} snapshot becomes available.
17781
+ * Snapshot is base64 encoded png available through {@link Stream.getInfo}
17782
+ * @event SNAPSHOT_COMPLETE
17783
+ * @memberof Flashphoner.constants.STREAM_STATUS
17784
+ */
17785
+ SNAPSHOT_COMPLETE: 'SNAPSHOT_COMPLETE',
17767
17786
 
17768
- define(streamStatus, 'NOT_ENOUGH_BANDWIDTH', 'NOT_ENOUGH_BANDWIDTH');
17787
+ /**
17788
+ * Fires on playing {@link Stream} if bitrate is higher than available network bandwidth.
17789
+ * @event NOT_ENOUGH_BANDWIDTH
17790
+ * @memberof Flashphoner.constants.NOT_ENOUGH_BANDWIDTH
17791
+ */
17792
+ NOT_ENOUGH_BANDWIDTH: 'NOT_ENOUGH_BANDWIDTH'
17793
+ });
17769
17794
  /**
17770
17795
  * @namespace Flashphoner.constants.CALL_STATUS
17771
17796
  * @see Call
17772
17797
  */
17773
17798
 
17774
- var callStatus = {}; //State of newly created Call
17775
-
17776
- define(callStatus, 'NEW', 'NEW');
17777
- define(callStatus, 'RING', 'RING');
17778
- define(callStatus, 'RING_MEDIA', 'RING_MEDIA');
17779
- define(callStatus, 'HOLD', 'HOLD');
17780
- define(callStatus, 'ESTABLISHED', 'ESTABLISHED');
17781
- define(callStatus, 'FINISH', 'FINISH');
17782
- define(callStatus, 'BUSY', 'BUSY');
17783
- define(callStatus, 'SESSION_PROGRESS', 'SESSION_PROGRESS');
17784
- define(callStatus, 'FAILED', 'FAILED');
17785
- define(callStatus, 'PENDING', 'PENDING');
17786
- define(callStatus, 'TRYING', 'TRYING');
17799
+ var CALL_STATUS = Object.freeze({
17800
+ /**
17801
+ * State of newly created {@link Call}
17802
+ * @event NEW
17803
+ * @memberof Flashphoner.constants.CALL_STATUS
17804
+ */
17805
+ NEW: 'NEW',
17806
+
17807
+ /**
17808
+ * The server is ringing to the callee
17809
+ * @event RING
17810
+ * @memberof Flashphoner.constants.CALL_STATUS
17811
+ */
17812
+ RING: 'RING',
17813
+ RING_MEDIA: 'RING_MEDIA',
17814
+
17815
+ /**
17816
+ * The {@link Call} was put on hold
17817
+ * @event HOLD
17818
+ * @memberof Flashphoner.constants.CALL_STATUS
17819
+ */
17820
+ HOLD: 'HOLD',
17821
+
17822
+ /**
17823
+ * The {@link Call} is established
17824
+ * @event ESTABLISHED
17825
+ * @memberof Flashphoner.constants.CALL_STATUS
17826
+ */
17827
+ ESTABLISHED: 'ESTABLISHED',
17828
+
17829
+ /**
17830
+ * The {@link Call} is finished
17831
+ * @event FINISH
17832
+ * @memberof Flashphoner.constants.CALL_STATUS
17833
+ */
17834
+ FINISH: 'FINISH',
17835
+
17836
+ /**
17837
+ * Callee is busy
17838
+ * @event BUSY
17839
+ * @memberof Flashphoner.constants.CALL_STATUS
17840
+ */
17841
+ BUSY: 'BUSY',
17842
+
17843
+ /**
17844
+ * SIP session is in progress
17845
+ * @event SESSION_PROGRESS
17846
+ * @memberof Flashphoner.constants.CALL_STATUS
17847
+ */
17848
+ SESSION_PROGRESS: 'SESSION_PROGRESS',
17849
+
17850
+ /**
17851
+ * The {@link Call} is failed
17852
+ * @event FAILED
17853
+ * @memberof Flashphoner.constants.CALL_STATUS
17854
+ */
17855
+ FAILED: 'FAILED',
17856
+
17857
+ /**
17858
+ * The {@link Call} state before ringing
17859
+ * @event PENDING
17860
+ * @memberof Flashphoner.constants.CALL_STATUS
17861
+ */
17862
+ PENDING: 'PENDING',
17863
+
17864
+ /**
17865
+ * The server trying to establish {@link Call}
17866
+ * @event TRYING
17867
+ * @memberof Flashphoner.constants.CALL_STATUS
17868
+ */
17869
+ TRYING: 'TRYING'
17870
+ });
17787
17871
  /**
17788
17872
  * @namespace Flashphoner.constants.STREAM_STATUS_INFO
17789
17873
  * @see Stream
17790
17874
  */
17791
17875
 
17792
- var streamStatusInfo = {};
17793
- /**
17794
- * Indicates general error during ICE negotiation. Usually occurs if client is behind some exotic nat/firewall.
17795
- * @event FAILED_BY_ICE_ERROR
17796
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
17797
- */
17798
-
17799
- define(streamStatusInfo, 'FAILED_BY_ICE_ERROR', 'Failed by ICE error');
17800
- /**
17801
- * Timeout has been reached during ICE establishment.
17802
- * @event FAILED_BY_ICE_TIMEOUT
17803
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
17804
- */
17876
+ var STREAM_STATUS_INFO = Object.freeze({
17877
+ /**
17878
+ * Indicates general error during ICE negotiation. Usually occurs if client is behind some exotic nat/firewall.
17879
+ * @event FAILED_BY_ICE_ERROR
17880
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
17881
+ */
17882
+ FAILED_BY_ICE_ERROR: 'Failed by ICE error',
17805
17883
 
17806
- define(streamStatusInfo, 'FAILED_BY_ICE_TIMEOUT', 'Failed by ICE timeout');
17807
- /**
17808
- * ICE refresh failed on session.
17809
- * @event FAILED_BY_KEEP_ALIVE
17810
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
17811
- */
17884
+ /**
17885
+ * Timeout has been reached during ICE establishment.
17886
+ * @event FAILED_BY_ICE_TIMEOUT
17887
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
17888
+ */
17889
+ FAILED_BY_ICE_TIMEOUT: 'Failed by ICE timeout',
17812
17890
 
17813
- define(streamStatusInfo, 'FAILED_BY_KEEP_ALIVE', 'Failed by ICE keep alive');
17814
- /**
17815
- * DTLS has wrong fingerprint.
17816
- * @event FAILED_BY_DTLS_FINGERPRINT_ERROR
17817
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
17818
- */
17891
+ /**
17892
+ * ICE refresh failed on session.
17893
+ * @event FAILED_BY_KEEP_ALIVE
17894
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
17895
+ */
17896
+ FAILED_BY_KEEP_ALIVE: 'Failed by ICE keep alive',
17819
17897
 
17820
- define(streamStatusInfo, 'FAILED_BY_DTLS_FINGERPRINT_ERROR', 'Failed by DTLS fingerprint error');
17821
- /**
17822
- * Client did not send DTLS packets or packets were lost/corrupted during transmission.
17823
- * @event FAILED_BY_DTLS_ERROR
17824
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
17825
- */
17898
+ /**
17899
+ * DTLS has wrong fingerprint.
17900
+ * @event FAILED_BY_DTLS_FINGERPRINT_ERROR
17901
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
17902
+ */
17903
+ FAILED_BY_DTLS_FINGERPRINT_ERROR: 'Failed by DTLS fingerprint error',
17826
17904
 
17827
- define(streamStatusInfo, 'FAILED_BY_DTLS_ERROR', 'Failed by DTLS error');
17828
- /**
17829
- * Indicates general HLS packetizer error, can occur during initialization or packetization (wrong input or out of disk space).
17830
- * @event FAILED_BY_HLS_WRITER_ERROR
17831
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
17832
- */
17905
+ /**
17906
+ * Client did not send DTLS packets or packets were lost/corrupted during transmission.
17907
+ * @event FAILED_BY_DTLS_ERROR
17908
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
17909
+ */
17910
+ FAILED_BY_DTLS_ERROR: 'Failed by DTLS error',
17833
17911
 
17834
- define(streamStatusInfo, 'FAILED_BY_HLS_WRITER_ERROR', 'Failed by HLS writer error');
17835
- /**
17836
- * Indicates general RTMP republishing error, can occur during initialization or rtmp packetization.
17837
- * @event FAILED_BY_RTMP_WRITER_ERROR
17838
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
17839
- */
17912
+ /**
17913
+ * Indicates general HLS packetizer error, can occur during initialization or packetization (wrong input or out of disk space).
17914
+ * @event FAILED_BY_HLS_WRITER_ERROR
17915
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
17916
+ */
17917
+ FAILED_BY_HLS_WRITER_ERROR: 'Failed by HLS writer error',
17840
17918
 
17841
- define(streamStatusInfo, 'FAILED_BY_RTMP_WRITER_ERROR', 'Failed by RTMP writer error');
17842
- /**
17843
- * RTP session failed by RTP activity timer.
17844
- * @event FAILED_BY_RTP_ACTIVITY
17845
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
17846
- */
17919
+ /**
17920
+ * Indicates general RTMP republishing error, can occur during initialization or rtmp packetization.
17921
+ * @event FAILED_BY_RTMP_WRITER_ERROR
17922
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
17923
+ */
17924
+ FAILED_BY_RTMP_WRITER_ERROR: 'Failed by RTMP writer error',
17847
17925
 
17848
- define(streamStatusInfo, 'FAILED_BY_RTP_ACTIVITY', 'Failed by RTP activity');
17849
- /**
17850
- * Related session was disconnected.
17851
- * @event STOPPED_BY_SESSION_DISCONNECT
17852
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
17853
- */
17926
+ /**
17927
+ * RTP session failed by RTP activity timer.
17928
+ * @event FAILED_BY_RTP_ACTIVITY
17929
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
17930
+ */
17931
+ FAILED_BY_RTP_ACTIVITY: 'Failed by RTP activity',
17854
17932
 
17855
- define(streamStatusInfo, 'STOPPED_BY_SESSION_DISCONNECT', 'Stopped by session disconnect');
17856
- /**
17857
- * Stream was stopped by rest terminate request.
17858
- * @event STOPPED_BY_REST_TERMINATE
17859
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
17860
- */
17933
+ /**
17934
+ * Related session was disconnected.
17935
+ * @event STOPPED_BY_SESSION_DISCONNECT
17936
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
17937
+ */
17938
+ STOPPED_BY_SESSION_DISCONNECT: 'Stopped by session disconnect',
17861
17939
 
17862
- define(streamStatusInfo, 'STOPPED_BY_REST_TERMINATE', 'Stopped by rest /terminate');
17863
- /**
17864
- * Related publisher stopped its stream or lost connection.
17865
- * @event STOPPED_BY_PUBLISHER_STOP
17866
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
17867
- */
17940
+ /**
17941
+ * Stream was stopped by rest terminate request.
17942
+ * @event STOPPED_BY_REST_TERMINATE
17943
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
17944
+ */
17945
+ STOPPED_BY_REST_TERMINATE: 'Stopped by rest /terminate',
17868
17946
 
17869
- define(streamStatusInfo, 'STOPPED_BY_PUBLISHER_STOP', 'Stopped by publisher stop');
17870
- /**
17871
- * Stop the media session by user after call was finished or unpublish stream.
17872
- * @event STOPPED_BY_USER
17873
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
17874
- */
17947
+ /**
17948
+ * Related publisher stopped its stream or lost connection.
17949
+ * @event STOPPED_BY_PUBLISHER_STOP
17950
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
17951
+ */
17952
+ STOPPED_BY_PUBLISHER_STOP: 'Stopped by publisher stop',
17875
17953
 
17876
- define(streamStatusInfo, 'STOPPED_BY_USER', 'Stopped by user');
17877
- /**
17878
- * Error occurred on the stream.
17879
- * @event FAILED_BY_ERROR
17880
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
17881
- */
17954
+ /**
17955
+ * Stop the media session by user after call was finished or unpublish stream.
17956
+ * @event STOPPED_BY_USER
17957
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
17958
+ */
17959
+ STOPPED_BY_USER: 'Stopped by user',
17882
17960
 
17883
- define(streamStatusInfo, 'FAILED_BY_ERROR', 'Failed by error');
17884
- /**
17885
- * Indicates that error occurred during media session creation. This might be SDP parsing error, all ports are busy, wrong session related config etc.
17886
- * @event FAILED_TO_ADD_STREAM_TO_PROXY
17887
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
17888
- */
17961
+ /**
17962
+ * Error occurred on the stream.
17963
+ * @event FAILED_BY_ERROR
17964
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
17965
+ */
17966
+ FAILED_BY_ERROR: 'Failed by error',
17889
17967
 
17890
- define(streamStatusInfo, 'FAILED_TO_ADD_STREAM_TO_PROXY', 'Failed to add stream to proxy');
17891
- /**
17892
- * Stopped shapshot distributor.
17893
- * @event DISTRIBUTOR_STOPPED
17894
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
17895
- */
17968
+ /**
17969
+ * Indicates that error occurred during media session creation. This might be SDP parsing error, all ports are busy, wrong session related config etc.
17970
+ * @event FAILED_TO_ADD_STREAM_TO_PROXY
17971
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
17972
+ */
17973
+ FAILED_TO_ADD_STREAM_TO_PROXY: 'Failed to add stream to proxy',
17896
17974
 
17897
- define(streamStatusInfo, 'DISTRIBUTOR_STOPPED', 'Distributor stopped');
17898
- /**
17899
- * Publish stream is not ready, try again later.
17900
- * @event PUBLISH_STREAM_IS_NOT_READY
17901
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
17902
- */
17975
+ /**
17976
+ * Stopped shapshot distributor.
17977
+ * @event DISTRIBUTOR_STOPPED
17978
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
17979
+ */
17980
+ DISTRIBUTOR_STOPPED: 'Distributor stopped',
17903
17981
 
17904
- define(streamStatusInfo, 'PUBLISH_STREAM_IS_NOT_READY', 'Publish stream is not ready');
17905
- /**
17906
- * Stream with this name is not found, check the correct of the name.
17907
- * @event STREAM_NOT_FOUND
17908
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
17909
- */
17982
+ /**
17983
+ * Publish stream is not ready, try again later.
17984
+ * @event PUBLISH_STREAM_IS_NOT_READY
17985
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
17986
+ */
17987
+ PUBLISH_STREAM_IS_NOT_READY: 'Publish stream is not ready',
17910
17988
 
17911
- define(streamStatusInfo, 'STREAM_NOT_FOUND', 'Stream not found');
17912
- /**
17913
- * Server already has a publish stream with the same name, try using different one.
17914
- * @event STREAM_NAME_ALREADY_IN_USE
17915
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
17916
- */
17989
+ /**
17990
+ * Stream with this name is not found, check the correct of the name.
17991
+ * @event STREAM_NOT_FOUND
17992
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
17993
+ */
17994
+ STREAM_NOT_FOUND: 'Stream not found',
17917
17995
 
17918
- define(streamStatusInfo, 'STREAM_NAME_ALREADY_IN_USE', 'Stream name is already in use');
17919
- /**
17920
- * Error indicates that stream object received by server has empty mediaSessionId field.
17921
- * @event MEDIASESSION_ID_NULL
17922
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
17923
- */
17996
+ /**
17997
+ * Server already has a publish stream with the same name, try using different one.
17998
+ * @event STREAM_NAME_ALREADY_IN_USE
17999
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
18000
+ */
18001
+ STREAM_NAME_ALREADY_IN_USE: 'Stream name is already in use',
17924
18002
 
17925
- define(streamStatusInfo, 'MEDIASESSION_ID_NULL', 'MediaSessionId is null');
17926
- /**
17927
- * Published or subscribed sessions used this MediaSessionId.
17928
- * @event MEDIASESSION_ID_ALREADY_IN_USE
17929
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
17930
- */
18003
+ /**
18004
+ * Error indicates that stream object received by server has empty mediaSessionId field.
18005
+ * @event MEDIASESSION_ID_NULL
18006
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
18007
+ */
18008
+ MEDIASESSION_ID_NULL: 'MediaSessionId is null',
17931
18009
 
17932
- define(streamStatusInfo, 'MEDIASESSION_ID_ALREADY_IN_USE', 'MediaSessionId is already in use');
17933
- /**
17934
- * Session is not initialized or terminated on play ordinary stream.
17935
- * @event SESSION_NOT_READY
17936
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
17937
- */
18010
+ /**
18011
+ * Published or subscribed sessions used this MediaSessionId.
18012
+ * @event MEDIASESSION_ID_ALREADY_IN_USE
18013
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
18014
+ */
18015
+ MEDIASESSION_ID_ALREADY_IN_USE: 'MediaSessionId is already in use',
17938
18016
 
17939
- define(streamStatusInfo, 'SESSION_NOT_READY', 'Session not ready');
17940
- /**
17941
- * Actual session does not exist.
17942
- * @event SESSION_DOES_NOT_EXIST
17943
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
17944
- */
18017
+ /**
18018
+ * Session is not initialized or terminated on play ordinary stream.
18019
+ * @event SESSION_NOT_READY
18020
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
18021
+ */
18022
+ SESSION_NOT_READY: 'Session not ready',
17945
18023
 
17946
- define(streamStatusInfo, 'SESSION_DOES_NOT_EXIST', 'Session does not exist');
17947
- /**
17948
- * RTSP has wrong format on play stream, check correct of the RTSP url.
17949
- * @event RTSP_HAS_WRONG_FORMAT
17950
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
17951
- */
18024
+ /**
18025
+ * Actual session does not exist.
18026
+ * @event SESSION_DOES_NOT_EXIST
18027
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
18028
+ */
18029
+ SESSION_DOES_NOT_EXIST: 'Session does not exist',
17952
18030
 
17953
- define(streamStatusInfo, 'RTSP_HAS_WRONG_FORMAT', 'Rtsp has wrong format');
17954
- /**
17955
- * Failed to play vod stream, this format is not supported.
17956
- * @event FILE_HAS_WRONG_FORMAT
17957
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
17958
- */
18031
+ /**
18032
+ * RTSP has wrong format on play stream, check the RTSP url validity.
18033
+ * @event RTSP_HAS_WRONG_FORMAT
18034
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
18035
+ */
18036
+ RTSP_HAS_WRONG_FORMAT: 'Rtsp has wrong format',
17959
18037
 
17960
- define(streamStatusInfo, 'FILE_HAS_WRONG_FORMAT', 'File has wrong format');
17961
- /**
17962
- * Failed to connect to rtsp stream.
17963
- * @event FAILED_TO_CONNECT_TO_RTSP_STREAM
17964
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
17965
- */
18038
+ /**
18039
+ * Failed to play vod stream, this format is not supported.
18040
+ * @event FILE_HAS_WRONG_FORMAT
18041
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
18042
+ */
18043
+ FILE_HAS_WRONG_FORMAT: 'File has wrong format',
17966
18044
 
17967
- define(streamStatusInfo, 'FAILED_TO_CONNECT_TO_RTSP_STREAM', 'Failed to connect to rtsp stream');
17968
- /**
17969
- * Rtsp stream is not found, agent received "404-Not Found".
17970
- * @event RTSP_STREAM_NOT_FOUND
17971
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
17972
- */
18045
+ /**
18046
+ * Failed to connect to rtsp stream.
18047
+ * @event FAILED_TO_CONNECT_TO_RTSP_STREAM
18048
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
18049
+ */
18050
+ FAILED_TO_CONNECT_TO_RTSP_STREAM: 'Failed to connect to rtsp stream',
17973
18051
 
17974
- define(streamStatusInfo, 'RTSP_STREAM_NOT_FOUND', 'Rtsp stream not found');
17975
- /**
17976
- * On shutdown RTSP agent.
17977
- * @event RTSPAGENT_SHUTDOWN
17978
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
17979
- */
18052
+ /**
18053
+ * Rtsp stream is not found, agent received "404-Not Found".
18054
+ * @event RTSP_STREAM_NOT_FOUND
18055
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
18056
+ */
18057
+ RTSP_STREAM_NOT_FOUND: 'Rtsp stream not found',
17980
18058
 
17981
- define(streamStatusInfo, 'RTSPAGENT_SHUTDOWN', 'RtspAgent shutdown');
17982
- /**
17983
- * Stream failed
17984
- * @event STREAM_FAILED
17985
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
17986
- */
18059
+ /**
18060
+ * On shutdown RTSP agent.
18061
+ * @event RTSPAGENT_SHUTDOWN
18062
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
18063
+ */
18064
+ RTSPAGENT_SHUTDOWN: 'RtspAgent shutdown',
17987
18065
 
17988
- define(streamStatusInfo, 'STREAM_FAILED', 'Stream failed');
17989
- /**
17990
- * No common codecs on setup track, did not found corresponding trackId->mediaPort.
17991
- * @event NO_COMMON_CODECS
17992
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
17993
- */
18066
+ /**
18067
+ * Stream failed
18068
+ * @event STREAM_FAILED
18069
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
18070
+ */
18071
+ STREAM_FAILED: 'Stream failed',
17994
18072
 
17995
- define(streamStatusInfo, 'NO_COMMON_CODECS', 'No common codecs');
17996
- /**
17997
- * Bad referenced rtsp link, check for correct, example: rtsp://user:b@d_password@127.0.0.1/stream.
17998
- * @event BAD_URI
17999
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
18000
- */
18073
+ /**
18074
+ * No common codecs on setup track, did not found corresponding trackId->mediaPort.
18075
+ * @event NO_COMMON_CODECS
18076
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
18077
+ */
18078
+ NO_COMMON_CODECS: 'No common codecs',
18001
18079
 
18002
- define(streamStatusInfo, 'BAD_URI', 'Bad URI');
18003
- /**
18004
- * General VOD error, indicates that Exception occurred while reading/processing media file.
18005
- * @event GOT_EXCEPTION_WHILE_STREAMING_FILE
18006
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
18007
- */
18080
+ /**
18081
+ * Bad referenced rtsp link, check for correct, example: rtsp://user:b@d_password@127.0.0.1/stream.
18082
+ * @event BAD_URI
18083
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
18084
+ */
18085
+ BAD_URI: 'Bad URI',
18008
18086
 
18009
- define(streamStatusInfo, 'GOT_EXCEPTION_WHILE_STREAMING_FILE', 'Got exception while streaming file');
18010
- /**
18011
- * Requested stream shutdown.
18012
- * @event REQUESTED_STREAM_SHUTDOWN
18013
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
18014
- */
18087
+ /**
18088
+ * General VOD error, indicates that Exception occurred while reading/processing media file.
18089
+ * @event GOT_EXCEPTION_WHILE_STREAMING_FILE
18090
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
18091
+ */
18092
+ GOT_EXCEPTION_WHILE_STREAMING_FILE: 'Got exception while streaming file',
18015
18093
 
18016
- define(streamStatusInfo, 'REQUESTED_STREAM_SHUTDOWN', 'Requested stream shutdown');
18017
- /**
18018
- * Failed to create movie, file can not be read.
18019
- * @event FAILED_TO_READ_FILE
18020
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
18021
- */
18094
+ /**
18095
+ * Requested stream shutdown.
18096
+ * @event REQUESTED_STREAM_SHUTDOWN
18097
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
18098
+ */
18099
+ REQUESTED_STREAM_SHUTDOWN: 'Requested stream shutdown',
18022
18100
 
18023
- define(streamStatusInfo, 'FAILED_TO_READ_FILE', 'Failed to read file');
18024
- /**
18025
- * File does not exist, check filename.
18026
- * @event FILE_NOT_FOUND
18027
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
18028
- */
18101
+ /**
18102
+ * Failed to create movie, file can not be read.
18103
+ * @event FAILED_TO_READ_FILE
18104
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
18105
+ */
18106
+ FAILED_TO_READ_FILE: 'Failed to read file',
18029
18107
 
18030
- define(streamStatusInfo, 'FILE_NOT_FOUND', 'File not found');
18031
- /**
18032
- * Server failed to establish websocket connection with origin server.
18033
- * @event FAILED_TO_CONNECT_TO_ORIGIN_STREAM
18034
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
18035
- */
18108
+ /**
18109
+ * File does not exist, check filename.
18110
+ * @event FILE_NOT_FOUND
18111
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
18112
+ */
18113
+ FILE_NOT_FOUND: 'File not found',
18036
18114
 
18037
- define(streamStatusInfo, 'FAILED_TO_CONNECT_TO_ORIGIN_STREAM', 'Failed to connect to origin stream');
18038
- /**
18039
- * CDN stream not found.
18040
- * @event CDN_STREAM_NOT_FOUND
18041
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
18042
- */
18115
+ /**
18116
+ * Server failed to establish websocket connection with origin server.
18117
+ * @event FAILED_TO_CONNECT_TO_ORIGIN_STREAM
18118
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
18119
+ */
18120
+ FAILED_TO_CONNECT_TO_ORIGIN_STREAM: 'Failed to connect to origin stream',
18043
18121
 
18044
- define(streamStatusInfo, 'CDN_STREAM_NOT_FOUND', 'CDN stream not found');
18045
- /**
18046
- * Indicates that provided URL protocol in stream name is invalid.
18047
- * Valid: vod://file.mp4
18048
- * Invalid: dov://file.mp4
18049
- * @event FAILED_TO_GET_AGENT_STORAGE
18050
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
18051
- */
18122
+ /**
18123
+ * CDN stream not found.
18124
+ * @event CDN_STREAM_NOT_FOUND
18125
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
18126
+ */
18127
+ CDN_STREAM_NOT_FOUND: 'CDN stream not found',
18052
18128
 
18053
- define(streamStatusInfo, 'FAILED_TO_GET_AGENT_STORAGE', 'Failed to get agent storage');
18054
- /**
18055
- * Shutdown agent servicing origin stream.
18056
- * @event AGENT_SERVICING_ORIGIN_STREAM_IS_SHUTTING_DOWN
18057
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
18058
- */
18129
+ /**
18130
+ * Indicates that provided URL protocol in stream name is invalid.
18131
+ * Valid: vod://file.mp4
18132
+ * Invalid: dov://file.mp4
18133
+ * @event FAILED_TO_GET_AGENT_STORAGE
18134
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
18135
+ */
18136
+ FAILED_TO_GET_AGENT_STORAGE: 'Failed to get agent storage',
18059
18137
 
18060
- define(streamStatusInfo, 'AGENT_SERVICING_ORIGIN_STREAM_IS_SHUTTING_DOWN', 'Agent servicing origin stream is shutting down');
18061
- /**
18062
- * Terminated by keep-alive on walk through subscribers.
18063
- * @event TERMINATED_BY_KEEP_ALIVE
18064
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
18065
- */
18138
+ /**
18139
+ * Shutdown agent servicing origin stream.
18140
+ * @event AGENT_SERVICING_ORIGIN_STREAM_IS_SHUTTING_DOWN
18141
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
18142
+ */
18143
+ AGENT_SERVICING_ORIGIN_STREAM_IS_SHUTTING_DOWN: 'Agent servicing origin stream is shutting down',
18066
18144
 
18067
- define(streamStatusInfo, 'TERMINATED_BY_KEEP_ALIVE', 'Terminated by keep-alive');
18068
- /**
18069
- * Transcoding required, but disabled in settings
18070
- * @event TRANSCODING_REQUIRED_BUT_DISABLED
18071
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
18072
- */
18145
+ /**
18146
+ * Terminated by keep-alive on walk through subscribers.
18147
+ * @event TERMINATED_BY_KEEP_ALIVE
18148
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
18149
+ */
18150
+ TERMINATED_BY_KEEP_ALIVE: 'Terminated by keep-alive',
18073
18151
 
18074
- define(streamStatusInfo, 'TRANSCODING_REQUIRED_BUT_DISABLED', 'Transcoding required, but disabled');
18075
- /**
18076
- * Access restricted by access list
18077
- * @event RESTRICTED_ACCESS
18078
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
18079
- */
18152
+ /**
18153
+ * Transcoding required, but disabled in server settings
18154
+ * @event TRANSCODING_REQUIRED_BUT_DISABLED
18155
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
18156
+ */
18157
+ TRANSCODING_REQUIRED_BUT_DISABLED: 'Transcoding required, but disabled',
18080
18158
 
18081
- define(streamStatusInfo, 'RESTRICTED_ACCESS', 'Restricted access');
18082
- /**
18083
- * No available transcoders for stream
18084
- * @event RESTRICTED_ACCESS
18085
- * @memberof Flashphoner.constants.STREAM_STATUS_INFO
18086
- */
18159
+ /**
18160
+ * Access restricted by access list
18161
+ * @event RESTRICTED_ACCESS
18162
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
18163
+ */
18164
+ RESTRICTED_ACCESS: 'Restricted access',
18087
18165
 
18088
- define(streamStatusInfo, 'NO_AVAILABLE_TRANSCODERS', 'No available transcoders');
18166
+ /**
18167
+ * No available transcoders for stream
18168
+ * @event NO_AVAILABLE_TRANSCODERS
18169
+ * @memberof Flashphoner.constants.STREAM_STATUS_INFO
18170
+ */
18171
+ NO_AVAILABLE_TRANSCODERS: 'No available transcoders'
18172
+ });
18089
18173
  /**
18090
18174
  * @namespace Flashphoner.constants.CALL_STATUS_INFO
18091
18175
  * @see Call
18092
18176
  */
18093
18177
 
18094
- var callStatusInfo = {};
18095
- /**
18096
- * Normal call hangup.
18097
- * @event NORMAL_CALL_CLEARING
18098
- * @memberof Flashphoner.constants.CALL_STATUS_INFO
18099
- */
18100
-
18101
- define(callStatusInfo, 'NORMAL_CALL_CLEARING', 'Normal call clearing');
18102
- /**
18103
- * Error occurred on session creation.
18104
- * @event FAILED_BY_SESSION_CREATION
18105
- * @memberof Flashphoner.constants.CALL_STATUS_INFO
18106
- */
18178
+ var CALL_STATUS_INFO = Object.freeze({
18179
+ /**
18180
+ * Normal call hangup.
18181
+ * @event NORMAL_CALL_CLEARING
18182
+ * @memberof Flashphoner.constants.CALL_STATUS_INFO
18183
+ */
18184
+ NORMAL_CALL_CLEARING: 'Normal call clearing',
18107
18185
 
18108
- define(callStatusInfo, 'FAILED_BY_SESSION_CREATION', 'Failed by session creation');
18109
- /**
18110
- * Failed by error during ICE establishment.
18111
- * @event FAILED_BY_ICE_ERROR
18112
- * @memberof Flashphoner.constants.CALL_STATUS_INFO
18113
- */
18186
+ /**
18187
+ * Error occurred while creating a session
18188
+ * @event FAILED_BY_SESSION_CREATION
18189
+ * @memberof Flashphoner.constants.CALL_STATUS_INFO
18190
+ */
18191
+ FAILED_BY_SESSION_CREATION: 'Failed by session creation',
18114
18192
 
18115
- define(callStatusInfo, 'FAILED_BY_ICE_ERROR', 'Failed by ICE error');
18116
- /**
18117
- * RTP session failed by RTP activity timer.
18118
- * @event FAILED_BY_RTP_ACTIVITY
18119
- * @memberof Flashphoner.constants.CALL_STATUS_INFO
18120
- */
18193
+ /**
18194
+ * Failed by error during ICE establishment.
18195
+ * @event FAILED_BY_ICE_ERROR
18196
+ * @memberof Flashphoner.constants.CALL_STATUS_INFO
18197
+ */
18198
+ FAILED_BY_ICE_ERROR: 'Failed by ICE error',
18121
18199
 
18122
- define(callStatusInfo, 'FAILED_BY_RTP_ACTIVITY', 'Failed by RTP activity');
18123
- /**
18124
- * FF writer was failed on RTMP.
18125
- * @event FAILED_BY_RTMP_WRITER_ERROR
18126
- * @memberof Flashphoner.constants.CALL_STATUS_INFO
18127
- */
18200
+ /**
18201
+ * RTP session failed by RTP activity timer.
18202
+ * @event FAILED_BY_RTP_ACTIVITY
18203
+ * @memberof Flashphoner.constants.CALL_STATUS_INFO
18204
+ */
18205
+ FAILED_BY_RTP_ACTIVITY: 'Failed by RTP activity',
18128
18206
 
18129
- define(callStatusInfo, 'FAILED_BY_RTMP_WRITER_ERROR', 'Failed by RTMP writer error');
18130
- /**
18131
- * DTLS wrong fingerprint.
18132
- * @event FAILED_BY_DTLS_FINGERPRINT_ERROR
18133
- * @memberof Flashphoner.constants.CALL_STATUS_INFO
18134
- */
18207
+ /**
18208
+ * FF writer was failed on RTMP.
18209
+ * @event FAILED_BY_RTMP_WRITER_ERROR
18210
+ * @memberof Flashphoner.constants.CALL_STATUS_INFO
18211
+ */
18212
+ FAILED_BY_RTMP_WRITER_ERROR: 'Failed by RTMP writer error',
18135
18213
 
18136
- define(callStatusInfo, 'FAILED_BY_DTLS_FINGERPRINT_ERROR', 'Failed by DTLS fingerprint error');
18137
- /**
18138
- * No common codecs in sdp
18139
- * @event NO_COMMON_CODECS
18140
- * @memberof Flashphoner.constants.CALL_STATUS_INFO
18141
- */
18214
+ /**
18215
+ * DTLS wrong fingerprint.
18216
+ * @event FAILED_BY_DTLS_FINGERPRINT_ERROR
18217
+ * @memberof Flashphoner.constants.CALL_STATUS_INFO
18218
+ */
18219
+ FAILED_BY_DTLS_FINGERPRINT_ERROR: 'Failed by DTLS fingerprint error',
18142
18220
 
18143
- define(callStatusInfo, 'NO_COMMON_CODECS', 'No common codecs');
18144
- /**
18145
- * Client did not send DTLS packets or packets were lost/corrupted during transmission.
18146
- * @event FAILED_BY_DTLS_ERROR
18147
- * @memberof Flashphoner.constants.CALL_STATUS_INFO
18148
- */
18221
+ /**
18222
+ * No common codecs in sdp
18223
+ * @event NO_COMMON_CODECS
18224
+ * @memberof Flashphoner.constants.CALL_STATUS_INFO
18225
+ */
18226
+ NO_COMMON_CODECS: 'No common codecs',
18149
18227
 
18150
- define(callStatusInfo, 'FAILED_BY_DTLS_ERROR', 'Failed by DTLS error');
18151
- /**
18152
- * Error occurred during call
18153
- * @event FAILED_BY_ERROR
18154
- * @memberof Flashphoner.constants.CALL_STATUS_INFO
18155
- */
18228
+ /**
18229
+ * Client did not send DTLS packets or packets were lost/corrupted during transmission.
18230
+ * @event FAILED_BY_DTLS_ERROR
18231
+ * @memberof Flashphoner.constants.CALL_STATUS_INFO
18232
+ */
18233
+ FAILED_BY_DTLS_ERROR: 'Failed by DTLS error',
18156
18234
 
18157
- define(callStatusInfo, 'FAILED_BY_ERROR', 'Failed by error');
18158
- /**
18159
- * Call failed by request timeout
18160
- * @event FAILED_BY_REQUEST_TIMEOUT
18161
- * @memberof Flashphoner.constants.CALL_STATUS_INFO
18162
- */
18235
+ /**
18236
+ * Error occurred during the call
18237
+ * @event FAILED_BY_ERROR
18238
+ * @memberof Flashphoner.constants.CALL_STATUS_INFO
18239
+ */
18240
+ FAILED_BY_ERROR: 'Failed by error',
18163
18241
 
18164
- define(callStatusInfo, 'FAILED_BY_REQUEST_TIMEOUT', 'Failed by request timeout');
18165
- /**
18166
- * Transcoding required, but disabled in settings
18167
- * @event TRANSCODING_REQUIRED_BUT_DISABLED
18168
- * @memberof Flashphoner.constants.CALL_STATUS_INFO
18169
- */
18242
+ /**
18243
+ * Call failed by request timeout
18244
+ * @event FAILED_BY_REQUEST_TIMEOUT
18245
+ * @memberof Flashphoner.constants.CALL_STATUS_INFO
18246
+ */
18247
+ FAILED_BY_REQUEST_TIMEOUT: 'Failed by request timeout',
18170
18248
 
18171
- define(callStatusInfo, 'TRANSCODING_REQUIRED_BUT_DISABLED', 'Transcoding required, but disabled');
18249
+ /**
18250
+ * Transcoding required, but disabled in settings
18251
+ * @event TRANSCODING_REQUIRED_BUT_DISABLED
18252
+ * @memberof Flashphoner.constants.CALL_STATUS_INFO
18253
+ */
18254
+ TRANSCODING_REQUIRED_BUT_DISABLED: 'Transcoding required, but disabled'
18255
+ });
18172
18256
  /**
18173
18257
  * @namespace Flashphoner.constants.ERROR_INFO
18174
18258
  */
18175
18259
 
18176
- var errorInfo = {};
18177
- /**
18178
- * Error if none of MediaProviders available
18179
- * @event NONE_OF_MEDIAPROVIDERS_AVAILABLE
18180
- * @memberof Flashphoner.constants.ERROR_INFO
18181
- */
18260
+ var ERROR_INFO = Object.freeze({
18261
+ /**
18262
+ * Error if none of MediaProviders available
18263
+ * @event NONE_OF_MEDIAPROVIDERS_AVAILABLE
18264
+ * @memberof Flashphoner.constants.ERROR_INFO
18265
+ */
18266
+ NONE_OF_MEDIAPROVIDERS_AVAILABLE: 'None of MediaProviders available',
18182
18267
 
18183
- define(errorInfo, 'NONE_OF_MEDIAPROVIDERS_AVAILABLE', 'None of MediaProviders available');
18184
- /**
18185
- * Error if none of preferred MediaProviders available
18186
- * @event NONE_OF_PREFERRED_MEDIAPROVIDERS_AVAILABLE
18187
- * @memberof Flashphoner.constants.ERROR_INFO
18188
- */
18268
+ /**
18269
+ * Error if none of preferred MediaProviders available
18270
+ * @event NONE_OF_PREFERRED_MEDIAPROVIDERS_AVAILABLE
18271
+ * @memberof Flashphoner.constants.ERROR_INFO
18272
+ */
18273
+ NONE_OF_PREFERRED_MEDIAPROVIDERS_AVAILABLE: 'None of preferred MediaProviders available',
18189
18274
 
18190
- define(errorInfo, 'NONE_OF_PREFERRED_MEDIAPROVIDERS_AVAILABLE', 'None of preferred MediaProviders available');
18191
- /**
18192
- * Error if API is not initialized
18193
- * @event FLASHPHONER_API_NOT_INITIALIZED
18194
- * @memberof Flashphoner.constants.ERROR_INFO
18195
- */
18275
+ /**
18276
+ * Error if API is not initialized
18277
+ * @event FLASHPHONER_API_NOT_INITIALIZED
18278
+ * @memberof Flashphoner.constants.ERROR_INFO
18279
+ */
18280
+ FLASHPHONER_API_NOT_INITIALIZED: 'Flashphoner API is not initialized',
18196
18281
 
18197
- define(errorInfo, 'FLASHPHONER_API_NOT_INITIALIZED', 'Flashphoner API is not initialized');
18198
- /**
18199
- * Error if options.urlServer is not specified
18200
- * @event OPTIONS_URLSERVER_MUST_BE_PROVIDED
18201
- * @memberof Flashphoner.constants.ERROR_INFO
18202
- */
18282
+ /**
18283
+ * Error if options.urlServer is not specified
18284
+ * @event OPTIONS_URLSERVER_MUST_BE_PROVIDED
18285
+ * @memberof Flashphoner.constants.ERROR_INFO
18286
+ */
18287
+ OPTIONS_URLSERVER_MUST_BE_PROVIDED: 'options.urlServer must be provided',
18203
18288
 
18204
- define(errorInfo, 'OPTIONS_URLSERVER_MUST_BE_PROVIDED', 'options.urlServer must be provided');
18205
- /**
18206
- * Error if session state is not REGISTERED
18207
- * @event INVALID_SESSION_STATE
18208
- * @memberof Flashphoner.constants.ERROR_INFO
18209
- */
18289
+ /**
18290
+ * Error if session state is not valid
18291
+ * @event INVALID_SESSION_STATE
18292
+ * @memberof Flashphoner.constants.ERROR_INFO
18293
+ */
18294
+ INVALID_SESSION_STATE: 'Invalid session state',
18210
18295
 
18211
- define(errorInfo, 'INVALID_SESSION_STATE', 'Invalid session state');
18212
- /**
18213
- * Error if no options provided
18214
- * @event OPTIONS_MUST_BE_PROVIDED
18215
- * @memberof Flashphoner.constants.ERROR_INFO
18216
- */
18296
+ /**
18297
+ * Error if no options provided
18298
+ * @event OPTIONS_MUST_BE_PROVIDED
18299
+ * @memberof Flashphoner.constants.ERROR_INFO
18300
+ */
18301
+ OPTIONS_MUST_BE_PROVIDED: 'options must be provided',
18217
18302
 
18218
- define(errorInfo, 'OPTIONS_MUST_BE_PROVIDED', 'options must be provided');
18219
- /**
18220
- * Error if call status is not {@link Flashphoner.constants.CALL_STATUS.NEW}
18221
- * @event INVALID_CALL_STATE
18222
- * @memberof Flashphoner.constants.ERROR_INFO
18223
- */
18303
+ /**
18304
+ * Error if call status is not {@link Flashphoner.constants.CALL_STATUS.NEW}
18305
+ * @event INVALID_CALL_STATE
18306
+ * @memberof Flashphoner.constants.ERROR_INFO
18307
+ */
18308
+ INVALID_CALL_STATE: 'Invalid call state',
18224
18309
 
18225
- define(errorInfo, 'INVALID_CALL_STATE', 'Invalid call state');
18226
- /**
18227
- * Error if event is not specified
18228
- * @event EVENT_CANT_BE_NULL
18229
- * @memberof Flashphoner.constants.ERROR_INFO
18230
- */
18310
+ /**
18311
+ * Error if event is not specified
18312
+ * @event EVENT_CANT_BE_NULL
18313
+ * @memberof Flashphoner.constants.ERROR_INFO
18314
+ */
18315
+ EVENT_CANT_BE_NULL: 'Event can\'t be null',
18316
+
18317
+ /**
18318
+ * Error if callback is not a valid function
18319
+ * @event CALLBACK_NEEDS_TO_BE_A_VALID_FUNCTION
18320
+ * @memberof Flashphoner.constants.ERROR_INFO
18321
+ */
18322
+ CALLBACK_NEEDS_TO_BE_A_VALID_FUNCTION: 'Callback needs to be a valid function',
18323
+
18324
+ /**
18325
+ * Error if options.name is not specified
18326
+ * @event OPTIONS_NAME_MUST_BE_PROVIDED
18327
+ * @memberof Flashphoner.constants.ERROR_INFO
18328
+ */
18329
+ OPTIONS_NAME_MUST_BE_PROVIDED: 'options.name must be provided',
18330
+
18331
+ /**
18332
+ * Error if number of cams is less than 2 or camera is already used by other application
18333
+ * @event CAN_NOT_SWITCH_CAM
18334
+ * @memberOf Flashphoner.constants.ERROR_INFO
18335
+ */
18336
+ CAN_NOT_SWITCH_CAM: 'Number of cams is less than 2 or camera is already used by other application',
18337
+
18338
+ /**
18339
+ * Error if number of mics is less than 2 or microphone is already used by other application
18340
+ * @event CAN_NOT_SWITCH_MIC
18341
+ * @memberOf Flashphoner.constants.ERROR_INFO
18342
+ */
18343
+ CAN_NOT_SWITCH_MIC: 'Number of mics is less than 2 or microphone is already used by other application',
18231
18344
 
18232
- define(errorInfo, 'EVENT_CANT_BE_NULL', 'Event can\'t be null');
18345
+ /**
18346
+ * Local browser error detected
18347
+ * @event LOCAL_ERROR
18348
+ * @memberOf Flashphoner.constants.ERROR_INFO
18349
+ */
18350
+ LOCAL_ERROR: 'Local error'
18351
+ });
18233
18352
  /**
18234
- * Error if callback is not a valid function
18235
- * @event CALLBACK_NEEDS_TO_BE_A_VALID_FUNCTION
18236
- * @memberof Flashphoner.constants.ERROR_INFO
18353
+ * Local media devices type
18354
+ * @namespace Flashphoner.constants.MEDIA_DEVICE_KIND
18237
18355
  */
18238
18356
 
18239
- define(errorInfo, 'CALLBACK_NEEDS_TO_BE_A_VALID_FUNCTION', 'Callback needs to be a valid function');
18357
+ var MEDIA_DEVICE_KIND = Object.freeze({
18358
+ /**
18359
+ * List local media output devices
18360
+ * @see Flashphoner.getMediaDevices
18361
+ * @memberOf Flashphoner.constants.MEDIA_DEVICE_KIND
18362
+ */
18363
+ OUTPUT: 'output',
18364
+
18365
+ /**
18366
+ * List local media input devices
18367
+ * @see Flashphoner.getMediaDevices
18368
+ * @memberOf Flashphoner.constants.MEDIA_DEVICE_KIND
18369
+ */
18370
+ INPUT: 'input',
18371
+
18372
+ /**
18373
+ * List local media devices
18374
+ * @see Flashphoner.getMediaDevices
18375
+ * @memberOf Flashphoner.constants.MEDIA_DEVICE_KIND
18376
+ */
18377
+ ALL: 'all'
18378
+ });
18240
18379
  /**
18241
- * Error if session state is not ESTABLISHED
18242
- * @event INVALID_SESSION_STATE
18243
- * @memberof Flashphoner.constants.ERROR_INFO
18380
+ * WebRTC transport type
18381
+ * @namespace Flashphoner.constants.TRANSPORT_TYPE
18244
18382
  */
18245
18383
 
18246
- define(errorInfo, 'INVALID_SESSION_STATE', 'Invalid session state');
18384
+ var TRANSPORT_TYPE = Object.freeze({
18385
+ /**
18386
+ * WebRTC RTP traffic goes over UDP (default)
18387
+ * @see Stream
18388
+ * @memberOf Flashphoner.constants.TRANSPORT_TYPE
18389
+ */
18390
+ UDP: 'UDP',
18391
+
18392
+ /**
18393
+ * WebRTC RTP traffic goes over TCP
18394
+ * @see Stream
18395
+ * @memberOf Flashphoner.constants.TRANSPORT_TYPE
18396
+ */
18397
+ TCP: 'TCP'
18398
+ });
18247
18399
  /**
18248
- * Error if options.name is not specified
18249
- * @event OPTIONS_NAME_MUST_BE_PROVIDED
18250
- * @memberof Flashphoner.constants.ERROR_INFO
18400
+ * WebRTC connection quality type
18401
+ * @namespace Flashphoner.constants.CONNECTION_QUALITY
18251
18402
  */
18252
18403
 
18253
- define(errorInfo, 'OPTIONS_NAME_MUST_BE_PROVIDED', 'options.name must be provided');
18404
+ var CONNECTION_QUALITY = Object.freeze({
18405
+ /**
18406
+ * Channel bandwidth is perfect
18407
+ * @see Stream
18408
+ * @memberOf Flashphoner.constants.CONNECTION_QUALITY
18409
+ */
18410
+ PERFECT: 'PERFECT',
18411
+
18412
+ /**
18413
+ * Channel bandwidth is good
18414
+ * @see Stream
18415
+ * @memberOf Flashphoner.constants.CONNECTION_QUALITY
18416
+ */
18417
+ GOOD: 'GOOD',
18418
+
18419
+ /**
18420
+ * Channel bandwidth is bad
18421
+ * @see Stream
18422
+ * @memberOf Flashphoner.constants.CONNECTION_QUALITY
18423
+ */
18424
+ BAD: 'BAD',
18425
+
18426
+ /**
18427
+ * Channel bandwidth is unknown (initial state)
18428
+ * @see Stream
18429
+ * @memberOf Flashphoner.constants.CONNECTION_QUALITY
18430
+ */
18431
+ UNKNOWN: 'UNKNOWN',
18432
+
18433
+ /**
18434
+ * Channel bandwidth is updating
18435
+ * @see Stream
18436
+ * @memberOf Flashphoner.constants.CONNECTION_QUALITY
18437
+ */
18438
+ UPDATE: 'UPDATE'
18439
+ });
18254
18440
  /**
18255
- * Error if number of cams is less than 2 or already used custom stream
18256
- * @event CAN_NOT_SWITCH_CAM
18257
- * @memberOf Flashphoner.constants.ERROR_INFO
18441
+ * Websocket signaling stream event
18442
+ * @see Stream
18443
+ * @memberOf Flashphoner.constants
18258
18444
  */
18259
18445
 
18260
- define(errorInfo, 'CAN_NOT_SWITCH_CAM', 'Number of cams is less than 2 or already used custom stream');
18446
+ var STREAM_EVENT = 'STREAM_EVENT';
18261
18447
  /**
18262
- * Error if number of mics is less than 2 or already used custom stream
18263
- * @event CAN_NOT_SWITCH_MIC
18264
- * @memberOf Flashphoner.constants.ERROR_INFO
18448
+ * Websocket signaling stream event type
18449
+ * @namespace Flashphoner.constants.STREAM_EVENT_TYPE
18265
18450
  */
18266
18451
 
18267
- define(errorInfo, 'CAN_NOT_SWITCH_MIC', 'Number of mics is less than 2 or already used custom stream');
18452
+ var STREAM_EVENT_TYPE = Object.freeze({
18453
+ /**
18454
+ * Stream audio is muted
18455
+ * @see Stream
18456
+ * @memberOf Flashphoner.constants.STREAM_EVENT_TYPE
18457
+ */
18458
+ AUDIO_MUTED: 'audioMuted',
18459
+
18460
+ /**
18461
+ * Stream audio is unmuted
18462
+ * @see Stream
18463
+ * @memberOf Flashphoner.constants.STREAM_EVENT_TYPE
18464
+ */
18465
+ AUDIO_UNMUTED: 'audioUnmuted',
18466
+
18467
+ /**
18468
+ * Stream video is muted
18469
+ * @see Stream
18470
+ * @memberOf Flashphoner.constants.STREAM_EVENT_TYPE
18471
+ */
18472
+ VIDEO_MUTED: 'videoMuted',
18473
+
18474
+ /**
18475
+ * Stream videoo is unmuted
18476
+ * @see Stream
18477
+ * @memberOf Flashphoner.constants.STREAM_EVENT_TYPE
18478
+ */
18479
+ VIDEO_UNMUTED: 'videoUnmuted',
18480
+
18481
+ /**
18482
+ * Data bound to the stream are received
18483
+ * @see Stream
18484
+ * @memberOf Flashphoner.constants.STREAM_EVENT_TYPE
18485
+ */
18486
+ DATA: 'data'
18487
+ });
18268
18488
  /**
18269
- * Error if recived local error
18270
- * @event CAN_NOT_SWITCH_MIC
18271
- * @memberOf Flashphoner.constants.ERROR_INFO
18489
+ * WebRTC video content hint type
18490
+ * @namespace Flashphoner.constants.CONTENT_HINT_TYPE
18272
18491
  */
18273
18492
 
18274
- define(errorInfo, 'LOCAL_ERROR', 'Local error');
18275
- var mediaDeviceKind = {};
18276
- define(mediaDeviceKind, 'OUTPUT', 'output');
18277
- define(mediaDeviceKind, 'INPUT', 'input');
18278
- define(mediaDeviceKind, 'ALL', 'all');
18279
- var transportType = {};
18280
- define(transportType, 'UDP', 'UDP');
18281
- define(transportType, 'TCP', 'TCP');
18282
- var connectionQuality = {};
18283
- define(connectionQuality, 'PERFECT', 'PERFECT');
18284
- define(connectionQuality, 'GOOD', 'GOOD');
18285
- define(connectionQuality, 'BAD', 'BAD');
18286
- define(connectionQuality, 'UNKNOWN', 'UNKNOWN');
18287
- define(connectionQuality, 'UPDATE', 'UPDATE');
18288
- var streamEventType = {};
18289
- define(streamEventType, 'AUDIO_MUTED', 'audioMuted');
18290
- define(streamEventType, 'AUDIO_UNMUTED', 'audioUnmuted');
18291
- define(streamEventType, 'VIDEO_MUTED', 'videoMuted');
18292
- define(streamEventType, 'VIDEO_UNMUTED', 'videoUnmuted');
18293
- define(streamEventType, 'DATA', 'data');
18294
- var contentHintType = {};
18295
- define(contentHintType, 'MOTION', 'motion');
18296
- define(contentHintType, 'DETAIL', 'detail');
18297
- define(contentHintType, 'TEXT', 'text');
18298
- var constants = {};
18299
- define(constants, 'SESSION_STATUS', sessionStatus);
18300
- define(constants, 'STREAM_EVENT_TYPE', streamEventType);
18301
- define(constants, 'STREAM_EVENT', 'STREAM_EVENT');
18302
- define(constants, 'STREAM_STATUS', streamStatus);
18303
- define(constants, 'CALL_STATUS', callStatus);
18304
- define(constants, 'STREAM_STATUS_INFO', streamStatusInfo);
18305
- define(constants, 'CALL_STATUS_INFO', callStatusInfo);
18306
- define(constants, 'ERROR_INFO', errorInfo);
18307
- define(constants, 'MEDIA_DEVICE_KIND', mediaDeviceKind);
18308
- define(constants, 'TRANSPORT_TYPE', transportType);
18309
- define(constants, 'CONNECTION_QUALITY', connectionQuality);
18310
- define(constants, 'CONTENT_HINT_TYPE', contentHintType); //define helper
18311
-
18312
- function define(obj, name, value) {
18313
- Object.defineProperty(obj, name, {
18314
- value: value,
18315
- enumerable: true
18316
- });
18317
- }
18493
+ var CONTENT_HINT_TYPE = Object.freeze({
18494
+ /**
18495
+ * Video content is motion (webcam case): keep FPS, resolution and bitrate may change
18496
+ * @see Stream
18497
+ * @memberOf Flashphoner.constants.CONTENT_HINT_TYPE
18498
+ */
18499
+ MOTION: 'motion',
18500
+
18501
+ /**
18502
+ * Video content is detail (sreen sharing case): keep resolution, bitrate may change, FPS may drop
18503
+ * @see Stream
18504
+ * @memberOf Flashphoner.constants.CONTENT_HINT_TYPE
18505
+ */
18506
+ DETAIL: 'detail',
18318
18507
 
18319
- module.exports = constants;
18508
+ /**
18509
+ * Video content is text (sreen sharing case): keep resolution and bitrate, FPS may drop
18510
+ * @see Stream
18511
+ * @memberOf Flashphoner.constants.CONTENT_HINT_TYPE
18512
+ */
18513
+ TEXT: 'text'
18514
+ });
18515
+ module.exports = {
18516
+ SESSION_STATUS: SESSION_STATUS,
18517
+ STREAM_STATUS: STREAM_STATUS,
18518
+ CALL_STATUS: CALL_STATUS,
18519
+ STREAM_STATUS_INFO: STREAM_STATUS_INFO,
18520
+ CALL_STATUS_INFO: CALL_STATUS_INFO,
18521
+ ERROR_INFO: ERROR_INFO,
18522
+ MEDIA_DEVICE_KIND: MEDIA_DEVICE_KIND,
18523
+ TRANSPORT_TYPE: TRANSPORT_TYPE,
18524
+ CONNECTION_QUALITY: CONNECTION_QUALITY,
18525
+ STREAM_EVENT: STREAM_EVENT,
18526
+ STREAM_EVENT_TYPE: STREAM_EVENT_TYPE,
18527
+ CONTENT_HINT_TYPE: CONTENT_HINT_TYPE
18528
+ };
18320
18529
 
18321
18530
  },{}],42:[function(require,module,exports){
18322
18531
  'use strict';
@@ -19589,7 +19798,7 @@ var createSession = function createSession(options) {
19589
19798
  mediaProviders: Object.keys(MediaProvider),
19590
19799
  keepAlive: keepAlive,
19591
19800
  authToken: authToken,
19592
- clientVersion: "2.0.215",
19801
+ clientVersion: "2.0.218",
19593
19802
  clientOSVersion: window.navigator.appVersion,
19594
19803
  clientBrowserVersion: window.navigator.userAgent,
19595
19804
  msePacketizationVersion: 2,
@@ -22902,6 +23111,9 @@ var Browser = {
22902
23111
  },
22903
23112
  isAndroidFirefox: function isAndroidFirefox() {
22904
23113
  return this.isAndroid() && /Firefox/i.test(navigator.userAgent);
23114
+ },
23115
+ isChromiumEdge: function isChromiumEdge() {
23116
+ return /Chrome/i.test(navigator.userAgent) && /Edg/i.test(navigator.userAgent);
22905
23117
  }
22906
23118
  };
22907
23119
  var SDP = {