@flashphoner/websdk 2.0.212 → 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.
- package/docTemplate/README.md +1 -1
- package/examples/demo/streaming/conference/conference.html +4 -0
- package/examples/demo/streaming/conference/conference.js +203 -62
- package/examples/demo/streaming/video-chat/video-chat.html +5 -0
- package/flashphoner-no-flash.js +1128 -818
- package/flashphoner-no-flash.min.js +2 -2
- package/flashphoner-no-webrtc.js +1122 -812
- package/flashphoner-no-webrtc.min.js +2 -2
- package/flashphoner-no-wsplayer.js +1128 -818
- package/flashphoner-no-wsplayer.min.js +2 -2
- package/flashphoner-room-api.js +1112 -908
- package/flashphoner-room-api.min.js +2 -2
- package/flashphoner-temasys-flash-websocket-without-adapterjs.js +1129 -814
- package/flashphoner-temasys-flash-websocket.js +1127 -812
- package/flashphoner-temasys-flash-websocket.min.js +1 -1
- package/flashphoner-webrtc-only.js +1122 -817
- package/flashphoner-webrtc-only.min.js +1 -1
- package/flashphoner.js +1134 -819
- package/flashphoner.min.js +2 -2
- package/package.json +1 -1
- package/src/constants.d.ts +792 -1
- package/src/constants.js +790 -704
- package/src/flash-media-provider.js +5 -0
- package/src/flashphoner-core.d.ts +359 -209
- package/src/flashphoner-core.js +98 -29
- package/src/room-module.d.ts +2 -2
- package/src/room-module.js +9 -2
- package/src/temasys-media-provider.js +5 -0
- package/src/util.js +207 -185
- package/src/webrtc-media-provider.js +12 -7
- package/src/websocket-media-provider.js +5 -0
|
@@ -7728,717 +7728,926 @@ function filterStats(result, track, outbound) {
|
|
|
7728
7728
|
* @see Session
|
|
7729
7729
|
*/
|
|
7730
7730
|
|
|
7731
|
-
var
|
|
7732
|
-
/**
|
|
7733
|
-
|
|
7734
|
-
|
|
7735
|
-
|
|
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
|
-
|
|
7739
|
-
|
|
7740
|
-
|
|
7741
|
-
|
|
7742
|
-
|
|
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
|
-
|
|
7746
|
-
|
|
7747
|
-
|
|
7748
|
-
|
|
7749
|
-
|
|
7750
|
-
|
|
7746
|
+
/**
|
|
7747
|
+
* Fires when {@link Session} disconnects.
|
|
7748
|
+
* @event DISCONNECTED
|
|
7749
|
+
* @memberof Flashphoner.constants.SESSION_STATUS
|
|
7750
|
+
*/
|
|
7751
|
+
DISCONNECTED: 'DISCONNECTED',
|
|
7751
7752
|
|
|
7752
|
-
|
|
7753
|
-
|
|
7754
|
-
|
|
7755
|
-
|
|
7756
|
-
|
|
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
|
-
|
|
7760
|
-
|
|
7761
|
-
|
|
7762
|
-
|
|
7763
|
-
|
|
7764
|
-
|
|
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
|
-
|
|
7768
|
-
|
|
7769
|
-
|
|
7770
|
-
|
|
7771
|
-
|
|
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
|
-
|
|
7775
|
-
|
|
7776
|
-
|
|
7777
|
-
|
|
7778
|
-
|
|
7779
|
-
|
|
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
|
-
|
|
7783
|
-
|
|
7784
|
-
|
|
7785
|
-
|
|
7786
|
-
|
|
7787
|
-
|
|
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
|
-
|
|
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
|
-
|
|
7793
|
-
|
|
7794
|
-
|
|
7795
|
-
|
|
7796
|
-
|
|
7797
|
-
|
|
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
|
-
|
|
7801
|
-
|
|
7802
|
-
|
|
7803
|
-
|
|
7804
|
-
|
|
7805
|
-
|
|
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
|
-
|
|
7809
|
-
|
|
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
|
|
7816
|
-
|
|
7817
|
-
|
|
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
|
-
|
|
7820
|
-
|
|
7821
|
-
|
|
7822
|
-
|
|
7823
|
-
|
|
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
|
-
|
|
7827
|
-
|
|
7828
|
-
|
|
7829
|
-
|
|
7830
|
-
|
|
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
|
-
|
|
7834
|
-
|
|
7835
|
-
|
|
7836
|
-
|
|
7837
|
-
|
|
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
|
-
|
|
7841
|
-
|
|
7842
|
-
|
|
7843
|
-
|
|
7844
|
-
|
|
7845
|
-
|
|
7859
|
+
/**
|
|
7860
|
+
* Fires if {@link Stream} paused.
|
|
7861
|
+
* @event PAUSED
|
|
7862
|
+
* @memberof Flashphoner.constants.STREAM_STATUS
|
|
7863
|
+
*/
|
|
7864
|
+
PAUSED: 'PAUSED',
|
|
7846
7865
|
|
|
7847
|
-
|
|
7848
|
-
|
|
7849
|
-
|
|
7850
|
-
|
|
7851
|
-
|
|
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
|
-
|
|
7855
|
-
|
|
7856
|
-
|
|
7857
|
-
|
|
7858
|
-
|
|
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
|
-
|
|
7862
|
-
|
|
7863
|
-
|
|
7864
|
-
|
|
7865
|
-
|
|
7866
|
-
|
|
7880
|
+
/**
|
|
7881
|
+
* Fires if {@link Stream} failed.
|
|
7882
|
+
* @event FAILED
|
|
7883
|
+
* @memberof Flashphoner.constants.STREAM_STATUS
|
|
7884
|
+
*/
|
|
7885
|
+
FAILED: 'FAILED',
|
|
7867
7886
|
|
|
7868
|
-
|
|
7869
|
-
|
|
7870
|
-
|
|
7871
|
-
|
|
7872
|
-
|
|
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
|
-
|
|
7876
|
-
|
|
7877
|
-
|
|
7878
|
-
|
|
7879
|
-
|
|
7880
|
-
|
|
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
|
-
|
|
7884
|
-
|
|
7885
|
-
|
|
7886
|
-
|
|
7887
|
-
|
|
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
|
-
|
|
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
|
|
7897
|
-
|
|
7898
|
-
|
|
7899
|
-
|
|
7900
|
-
|
|
7901
|
-
|
|
7902
|
-
|
|
7903
|
-
|
|
7904
|
-
|
|
7905
|
-
|
|
7906
|
-
|
|
7907
|
-
|
|
7908
|
-
|
|
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
|
|
7915
|
-
/**
|
|
7916
|
-
|
|
7917
|
-
|
|
7918
|
-
|
|
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
|
-
|
|
7929
|
-
|
|
7930
|
-
|
|
7931
|
-
|
|
7932
|
-
|
|
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
|
-
|
|
7936
|
-
|
|
7937
|
-
|
|
7938
|
-
|
|
7939
|
-
|
|
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
|
-
|
|
7943
|
-
|
|
7944
|
-
|
|
7945
|
-
|
|
7946
|
-
|
|
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
|
-
|
|
7950
|
-
|
|
7951
|
-
|
|
7952
|
-
|
|
7953
|
-
|
|
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
|
-
|
|
7957
|
-
|
|
7958
|
-
|
|
7959
|
-
|
|
7960
|
-
|
|
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
|
-
|
|
7964
|
-
|
|
7965
|
-
|
|
7966
|
-
|
|
7967
|
-
|
|
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
|
-
|
|
7971
|
-
|
|
7972
|
-
|
|
7973
|
-
|
|
7974
|
-
|
|
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
|
-
|
|
7978
|
-
|
|
7979
|
-
|
|
7980
|
-
|
|
7981
|
-
|
|
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
|
-
|
|
7985
|
-
|
|
7986
|
-
|
|
7987
|
-
|
|
7988
|
-
|
|
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
|
-
|
|
7992
|
-
|
|
7993
|
-
|
|
7994
|
-
|
|
7995
|
-
|
|
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
|
-
|
|
7999
|
-
|
|
8000
|
-
|
|
8001
|
-
|
|
8002
|
-
|
|
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
|
-
|
|
8006
|
-
|
|
8007
|
-
|
|
8008
|
-
|
|
8009
|
-
|
|
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
|
-
|
|
8013
|
-
|
|
8014
|
-
|
|
8015
|
-
|
|
8016
|
-
|
|
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
|
-
|
|
8020
|
-
|
|
8021
|
-
|
|
8022
|
-
|
|
8023
|
-
|
|
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
|
-
|
|
8027
|
-
|
|
8028
|
-
|
|
8029
|
-
|
|
8030
|
-
|
|
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
|
-
|
|
8034
|
-
|
|
8035
|
-
|
|
8036
|
-
|
|
8037
|
-
|
|
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
|
-
|
|
8041
|
-
|
|
8042
|
-
|
|
8043
|
-
|
|
8044
|
-
|
|
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
|
-
|
|
8048
|
-
|
|
8049
|
-
|
|
8050
|
-
|
|
8051
|
-
|
|
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
|
-
|
|
8055
|
-
|
|
8056
|
-
|
|
8057
|
-
|
|
8058
|
-
|
|
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
|
-
|
|
8062
|
-
|
|
8063
|
-
|
|
8064
|
-
|
|
8065
|
-
|
|
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
|
-
|
|
8069
|
-
|
|
8070
|
-
|
|
8071
|
-
|
|
8072
|
-
|
|
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
|
-
|
|
8076
|
-
|
|
8077
|
-
|
|
8078
|
-
|
|
8079
|
-
|
|
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
|
-
|
|
8083
|
-
|
|
8084
|
-
|
|
8085
|
-
|
|
8086
|
-
|
|
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
|
-
|
|
8090
|
-
|
|
8091
|
-
|
|
8092
|
-
|
|
8093
|
-
|
|
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
|
-
|
|
8097
|
-
|
|
8098
|
-
|
|
8099
|
-
|
|
8100
|
-
|
|
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
|
-
|
|
8104
|
-
|
|
8105
|
-
|
|
8106
|
-
|
|
8107
|
-
|
|
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
|
-
|
|
8111
|
-
|
|
8112
|
-
|
|
8113
|
-
|
|
8114
|
-
|
|
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
|
-
|
|
8118
|
-
|
|
8119
|
-
|
|
8120
|
-
|
|
8121
|
-
|
|
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
|
-
|
|
8125
|
-
|
|
8126
|
-
|
|
8127
|
-
|
|
8128
|
-
|
|
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
|
-
|
|
8132
|
-
|
|
8133
|
-
|
|
8134
|
-
|
|
8135
|
-
|
|
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
|
-
|
|
8139
|
-
|
|
8140
|
-
|
|
8141
|
-
|
|
8142
|
-
|
|
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
|
-
|
|
8146
|
-
|
|
8147
|
-
|
|
8148
|
-
|
|
8149
|
-
|
|
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
|
-
|
|
8153
|
-
|
|
8154
|
-
|
|
8155
|
-
|
|
8156
|
-
|
|
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
|
-
|
|
8160
|
-
|
|
8161
|
-
|
|
8162
|
-
|
|
8163
|
-
|
|
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
|
-
|
|
8167
|
-
|
|
8168
|
-
|
|
8169
|
-
|
|
8170
|
-
|
|
8171
|
-
|
|
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
|
-
|
|
8176
|
-
|
|
8177
|
-
|
|
8178
|
-
|
|
8179
|
-
|
|
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
|
-
|
|
8183
|
-
|
|
8184
|
-
|
|
8185
|
-
|
|
8186
|
-
|
|
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
|
-
|
|
8190
|
-
|
|
8191
|
-
|
|
8192
|
-
|
|
8193
|
-
|
|
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
|
-
|
|
8197
|
-
|
|
8198
|
-
|
|
8199
|
-
|
|
8200
|
-
|
|
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
|
-
|
|
8204
|
-
|
|
8205
|
-
|
|
8206
|
-
|
|
8207
|
-
|
|
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
|
-
|
|
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
|
|
8217
|
-
/**
|
|
8218
|
-
|
|
8219
|
-
|
|
8220
|
-
|
|
8221
|
-
|
|
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',
|
|
8222
8307
|
|
|
8223
|
-
|
|
8224
|
-
|
|
8225
|
-
|
|
8226
|
-
|
|
8227
|
-
|
|
8228
|
-
|
|
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',
|
|
8229
8314
|
|
|
8230
|
-
|
|
8231
|
-
|
|
8232
|
-
|
|
8233
|
-
|
|
8234
|
-
|
|
8235
|
-
|
|
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',
|
|
8236
8321
|
|
|
8237
|
-
|
|
8238
|
-
|
|
8239
|
-
|
|
8240
|
-
|
|
8241
|
-
|
|
8242
|
-
|
|
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',
|
|
8243
8328
|
|
|
8244
|
-
|
|
8245
|
-
|
|
8246
|
-
|
|
8247
|
-
|
|
8248
|
-
|
|
8249
|
-
|
|
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',
|
|
8250
8335
|
|
|
8251
|
-
|
|
8252
|
-
|
|
8253
|
-
|
|
8254
|
-
|
|
8255
|
-
|
|
8256
|
-
|
|
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',
|
|
8257
8342
|
|
|
8258
|
-
|
|
8259
|
-
|
|
8260
|
-
|
|
8261
|
-
|
|
8262
|
-
|
|
8263
|
-
|
|
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',
|
|
8264
8349
|
|
|
8265
|
-
|
|
8266
|
-
|
|
8267
|
-
|
|
8268
|
-
|
|
8269
|
-
|
|
8270
|
-
|
|
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',
|
|
8271
8356
|
|
|
8272
|
-
|
|
8273
|
-
|
|
8274
|
-
|
|
8275
|
-
|
|
8276
|
-
|
|
8277
|
-
|
|
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',
|
|
8363
|
+
|
|
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',
|
|
8278
8370
|
|
|
8279
|
-
|
|
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
|
+
});
|
|
8280
8378
|
/**
|
|
8281
|
-
|
|
8282
|
-
|
|
8283
|
-
* @memberof Flashphoner.constants.CALL_STATUS_INFO
|
|
8284
|
-
*/
|
|
8379
|
+
* @namespace Flashphoner.constants.ERROR_INFO
|
|
8380
|
+
*/
|
|
8285
8381
|
|
|
8286
|
-
|
|
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',
|
|
8389
|
+
|
|
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',
|
|
8396
|
+
|
|
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',
|
|
8403
|
+
|
|
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',
|
|
8410
|
+
|
|
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',
|
|
8417
|
+
|
|
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',
|
|
8424
|
+
|
|
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',
|
|
8431
|
+
|
|
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',
|
|
8445
|
+
|
|
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
|
+
});
|
|
8287
8474
|
/**
|
|
8288
|
-
*
|
|
8289
|
-
* @
|
|
8290
|
-
* @memberof Flashphoner.constants.CALL_STATUS_INFO
|
|
8475
|
+
* Local media devices type
|
|
8476
|
+
* @namespace Flashphoner.constants.MEDIA_DEVICE_KIND
|
|
8291
8477
|
*/
|
|
8292
8478
|
|
|
8293
|
-
|
|
8294
|
-
/**
|
|
8295
|
-
*
|
|
8296
|
-
|
|
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',
|
|
8297
8486
|
|
|
8298
|
-
|
|
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
|
+
});
|
|
8299
8501
|
/**
|
|
8300
|
-
*
|
|
8301
|
-
* @
|
|
8302
|
-
* @memberof Flashphoner.constants.ERROR_INFO
|
|
8502
|
+
* WebRTC transport type
|
|
8503
|
+
* @namespace Flashphoner.constants.TRANSPORT_TYPE
|
|
8303
8504
|
*/
|
|
8304
8505
|
|
|
8305
|
-
|
|
8306
|
-
/**
|
|
8307
|
-
|
|
8308
|
-
|
|
8309
|
-
|
|
8310
|
-
|
|
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',
|
|
8311
8513
|
|
|
8312
|
-
|
|
8514
|
+
/**
|
|
8515
|
+
* WebRTC RTP traffic goes over TCP
|
|
8516
|
+
* @see Stream
|
|
8517
|
+
* @memberOf Flashphoner.constants.TRANSPORT_TYPE
|
|
8518
|
+
*/
|
|
8519
|
+
TCP: 'TCP'
|
|
8520
|
+
});
|
|
8313
8521
|
/**
|
|
8314
|
-
*
|
|
8315
|
-
* @
|
|
8316
|
-
* @memberof Flashphoner.constants.ERROR_INFO
|
|
8522
|
+
* WebRTC connection quality type
|
|
8523
|
+
* @namespace Flashphoner.constants.CONNECTION_QUALITY
|
|
8317
8524
|
*/
|
|
8318
8525
|
|
|
8319
|
-
|
|
8320
|
-
/**
|
|
8321
|
-
|
|
8322
|
-
|
|
8323
|
-
|
|
8324
|
-
|
|
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',
|
|
8325
8533
|
|
|
8326
|
-
|
|
8327
|
-
|
|
8328
|
-
|
|
8329
|
-
|
|
8330
|
-
|
|
8331
|
-
|
|
8534
|
+
/**
|
|
8535
|
+
* Channel bandwidth is good
|
|
8536
|
+
* @see Stream
|
|
8537
|
+
* @memberOf Flashphoner.constants.CONNECTION_QUALITY
|
|
8538
|
+
*/
|
|
8539
|
+
GOOD: 'GOOD',
|
|
8332
8540
|
|
|
8333
|
-
|
|
8334
|
-
|
|
8335
|
-
|
|
8336
|
-
|
|
8337
|
-
|
|
8338
|
-
|
|
8541
|
+
/**
|
|
8542
|
+
* Channel bandwidth is bad
|
|
8543
|
+
* @see Stream
|
|
8544
|
+
* @memberOf Flashphoner.constants.CONNECTION_QUALITY
|
|
8545
|
+
*/
|
|
8546
|
+
BAD: 'BAD',
|
|
8339
8547
|
|
|
8340
|
-
|
|
8341
|
-
|
|
8342
|
-
|
|
8343
|
-
|
|
8344
|
-
|
|
8345
|
-
|
|
8548
|
+
/**
|
|
8549
|
+
* Channel bandwidth is unknown (initial state)
|
|
8550
|
+
* @see Stream
|
|
8551
|
+
* @memberOf Flashphoner.constants.CONNECTION_QUALITY
|
|
8552
|
+
*/
|
|
8553
|
+
UNKNOWN: 'UNKNOWN',
|
|
8346
8554
|
|
|
8347
|
-
|
|
8555
|
+
/**
|
|
8556
|
+
* Channel bandwidth is updating
|
|
8557
|
+
* @see Stream
|
|
8558
|
+
* @memberOf Flashphoner.constants.CONNECTION_QUALITY
|
|
8559
|
+
*/
|
|
8560
|
+
UPDATE: 'UPDATE'
|
|
8561
|
+
});
|
|
8348
8562
|
/**
|
|
8349
|
-
*
|
|
8350
|
-
* @
|
|
8351
|
-
* @
|
|
8563
|
+
* Websocket signaling stream event
|
|
8564
|
+
* @see Stream
|
|
8565
|
+
* @memberOf Flashphoner.constants
|
|
8352
8566
|
*/
|
|
8353
8567
|
|
|
8354
|
-
|
|
8568
|
+
var STREAM_EVENT = 'STREAM_EVENT';
|
|
8355
8569
|
/**
|
|
8356
|
-
*
|
|
8357
|
-
* @
|
|
8358
|
-
* @memberof Flashphoner.constants.ERROR_INFO
|
|
8570
|
+
* Websocket signaling stream event type
|
|
8571
|
+
* @namespace Flashphoner.constants.STREAM_EVENT_TYPE
|
|
8359
8572
|
*/
|
|
8360
8573
|
|
|
8361
|
-
|
|
8362
|
-
/**
|
|
8363
|
-
|
|
8364
|
-
|
|
8365
|
-
|
|
8366
|
-
|
|
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',
|
|
8367
8581
|
|
|
8368
|
-
|
|
8369
|
-
|
|
8370
|
-
|
|
8371
|
-
|
|
8372
|
-
|
|
8373
|
-
|
|
8582
|
+
/**
|
|
8583
|
+
* Stream audio is unmuted
|
|
8584
|
+
* @see Stream
|
|
8585
|
+
* @memberOf Flashphoner.constants.STREAM_EVENT_TYPE
|
|
8586
|
+
*/
|
|
8587
|
+
AUDIO_UNMUTED: 'audioUnmuted',
|
|
8374
8588
|
|
|
8375
|
-
|
|
8376
|
-
|
|
8377
|
-
|
|
8378
|
-
|
|
8379
|
-
|
|
8380
|
-
|
|
8589
|
+
/**
|
|
8590
|
+
* Stream video is muted
|
|
8591
|
+
* @see Stream
|
|
8592
|
+
* @memberOf Flashphoner.constants.STREAM_EVENT_TYPE
|
|
8593
|
+
*/
|
|
8594
|
+
VIDEO_MUTED: 'videoMuted',
|
|
8381
8595
|
|
|
8382
|
-
|
|
8383
|
-
|
|
8384
|
-
|
|
8385
|
-
|
|
8386
|
-
|
|
8387
|
-
|
|
8596
|
+
/**
|
|
8597
|
+
* Stream videoo is unmuted
|
|
8598
|
+
* @see Stream
|
|
8599
|
+
* @memberOf Flashphoner.constants.STREAM_EVENT_TYPE
|
|
8600
|
+
*/
|
|
8601
|
+
VIDEO_UNMUTED: 'videoUnmuted',
|
|
8388
8602
|
|
|
8389
|
-
|
|
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
|
-
*
|
|
8392
|
-
* @
|
|
8393
|
-
* @memberOf Flashphoner.constants.ERROR_INFO
|
|
8611
|
+
* WebRTC video content hint type
|
|
8612
|
+
* @namespace Flashphoner.constants.CONTENT_HINT_TYPE
|
|
8394
8613
|
*/
|
|
8395
8614
|
|
|
8396
|
-
|
|
8397
|
-
|
|
8398
|
-
|
|
8399
|
-
|
|
8400
|
-
|
|
8401
|
-
|
|
8402
|
-
|
|
8403
|
-
|
|
8404
|
-
|
|
8405
|
-
|
|
8406
|
-
|
|
8407
|
-
|
|
8408
|
-
|
|
8409
|
-
|
|
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
|
-
|
|
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';
|
|
@@ -8452,8 +8661,9 @@ var constants = require("./constants");
|
|
|
8452
8661
|
|
|
8453
8662
|
var util = require('./util');
|
|
8454
8663
|
|
|
8455
|
-
var
|
|
8664
|
+
var LoggerObject = require('./util').logger;
|
|
8456
8665
|
|
|
8666
|
+
var coreLogger;
|
|
8457
8667
|
var loggerConf = {
|
|
8458
8668
|
push: false,
|
|
8459
8669
|
severity: "INFO"
|
|
@@ -8501,7 +8711,7 @@ var disableConnectionQualityCalculation;
|
|
|
8501
8711
|
* @param {String=} options.decoderLocation Location of video-worker2.js file
|
|
8502
8712
|
* @param {String=} options.screenSharingExtensionId Chrome screen sharing extension id
|
|
8503
8713
|
* @param {Object=} options.constraints Default local media constraints
|
|
8504
|
-
* @param {Object=} options.logger
|
|
8714
|
+
* @param {Object=} options.logger Core logger options
|
|
8505
8715
|
* @throws {Error} Error if none of MediaProviders available
|
|
8506
8716
|
* @memberof Flashphoner
|
|
8507
8717
|
*/
|
|
@@ -8510,16 +8720,10 @@ var init = function init(options) {
|
|
|
8510
8720
|
if (!initialized) {
|
|
8511
8721
|
if (!options) {
|
|
8512
8722
|
options = {};
|
|
8513
|
-
}
|
|
8514
|
-
|
|
8515
|
-
loggerConf = options.logger || loggerConf;
|
|
8723
|
+
} // init global logger
|
|
8516
8724
|
|
|
8517
|
-
if (options.logger !== null) {
|
|
8518
|
-
loggerConf.enableLogs = true;
|
|
8519
|
-
} // init logger
|
|
8520
8725
|
|
|
8521
|
-
|
|
8522
|
-
logger.init(loggerConf.severity || "INFO", loggerConf.push || false, loggerConf.customLogger, loggerConf.enableLogs);
|
|
8726
|
+
coreLogger = createLogger(options.logger);
|
|
8523
8727
|
var waitingTemasys = false;
|
|
8524
8728
|
|
|
8525
8729
|
try {
|
|
@@ -8540,7 +8744,7 @@ var init = function init(options) {
|
|
|
8540
8744
|
constraints: options.constraints || getDefaultMediaConstraints(),
|
|
8541
8745
|
extensionId: options.screenSharingExtensionId,
|
|
8542
8746
|
audioContext: audioContext,
|
|
8543
|
-
logger:
|
|
8747
|
+
logger: coreLogger,
|
|
8544
8748
|
createMicGainNode: enableGainNode
|
|
8545
8749
|
};
|
|
8546
8750
|
webRtcProvider.configure(webRtcConf);
|
|
@@ -8557,7 +8761,7 @@ var init = function init(options) {
|
|
|
8557
8761
|
var webRtcConf = {
|
|
8558
8762
|
constraints: options.constraints || getDefaultMediaConstraints(),
|
|
8559
8763
|
extensionId: options.screenSharingExtensionId,
|
|
8560
|
-
logger:
|
|
8764
|
+
logger: coreLogger
|
|
8561
8765
|
};
|
|
8562
8766
|
webRtcProvider.configure(webRtcConf); // Just reorder media provider list
|
|
8563
8767
|
|
|
@@ -8585,7 +8789,7 @@ var init = function init(options) {
|
|
|
8585
8789
|
var flashConf = {
|
|
8586
8790
|
constraints: options.constraints || getDefaultMediaConstraints(),
|
|
8587
8791
|
flashMediaProviderSwfLocation: options.flashMediaProviderSwfLocation,
|
|
8588
|
-
logger:
|
|
8792
|
+
logger: coreLogger
|
|
8589
8793
|
};
|
|
8590
8794
|
flashProvider.configure(flashConf);
|
|
8591
8795
|
}
|
|
@@ -8609,7 +8813,7 @@ var init = function init(options) {
|
|
|
8609
8813
|
receiverLocation: options.receiverLocation,
|
|
8610
8814
|
decoderLocation: options.decoderLocation,
|
|
8611
8815
|
audioContext: audioContext,
|
|
8612
|
-
logger:
|
|
8816
|
+
logger: coreLogger
|
|
8613
8817
|
};
|
|
8614
8818
|
websocketProvider.configure(wsConf);
|
|
8615
8819
|
} //check at least 1 provider available
|
|
@@ -8631,7 +8835,7 @@ var init = function init(options) {
|
|
|
8631
8835
|
MediaProvider = _MediaProvider;
|
|
8632
8836
|
}
|
|
8633
8837
|
} else {
|
|
8634
|
-
|
|
8838
|
+
corelogger.warn(LOG_PREFIX, "Preferred media provider is not available.");
|
|
8635
8839
|
}
|
|
8636
8840
|
}
|
|
8637
8841
|
|
|
@@ -8659,7 +8863,7 @@ var init = function init(options) {
|
|
|
8659
8863
|
options.mediaProvidersReadyCallback(Object.keys(MediaProvider));
|
|
8660
8864
|
}
|
|
8661
8865
|
|
|
8662
|
-
|
|
8866
|
+
coreLogger.info(LOG_PREFIX, "Initialized");
|
|
8663
8867
|
initialized = true;
|
|
8664
8868
|
}
|
|
8665
8869
|
};
|
|
@@ -8698,7 +8902,7 @@ var playFirstVideo = function playFirstVideo(display, isLocal, src) {
|
|
|
8698
8902
|
}
|
|
8699
8903
|
};
|
|
8700
8904
|
/**
|
|
8701
|
-
* Get logger
|
|
8905
|
+
* Get core logger
|
|
8702
8906
|
*
|
|
8703
8907
|
* @returns {Object} Logger
|
|
8704
8908
|
* @memberof Flashphoner
|
|
@@ -8709,7 +8913,7 @@ var getLogger = function getLogger() {
|
|
|
8709
8913
|
if (!initialized) {
|
|
8710
8914
|
console.warn("Initialize API first.");
|
|
8711
8915
|
} else {
|
|
8712
|
-
return
|
|
8916
|
+
return coreLogger;
|
|
8713
8917
|
}
|
|
8714
8918
|
};
|
|
8715
8919
|
/**
|
|
@@ -8882,6 +9086,31 @@ var getSessions = function getSessions() {
|
|
|
8882
9086
|
|
|
8883
9087
|
var getSession = function getSession(id) {
|
|
8884
9088
|
return sessions[id];
|
|
9089
|
+
}; // Get logger configuration from options
|
|
9090
|
+
|
|
9091
|
+
|
|
9092
|
+
var getLoggerConf = function getLoggerConf(loggerOptions) {
|
|
9093
|
+
var conf = loggerOptions || loggerConf;
|
|
9094
|
+
|
|
9095
|
+
if (loggerOptions !== null) {
|
|
9096
|
+
conf.enableLogs = true;
|
|
9097
|
+
}
|
|
9098
|
+
|
|
9099
|
+
return conf;
|
|
9100
|
+
}; // Create a new logger object
|
|
9101
|
+
|
|
9102
|
+
|
|
9103
|
+
var createLogger = function createLogger(loggerOptions) {
|
|
9104
|
+
var parentLogger = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : coreLogger;
|
|
9105
|
+
var newLogger = parentLogger;
|
|
9106
|
+
|
|
9107
|
+
if (newLogger === undefined || loggerOptions != undefined) {
|
|
9108
|
+
var loggerConf = getLoggerConf(loggerOptions);
|
|
9109
|
+
newLogger = new LoggerObject();
|
|
9110
|
+
newLogger.init(loggerConf.severity || "INFO", loggerConf.push || false, loggerConf.customLogger, loggerConf.enableLogs);
|
|
9111
|
+
}
|
|
9112
|
+
|
|
9113
|
+
return newLogger;
|
|
8885
9114
|
};
|
|
8886
9115
|
/**
|
|
8887
9116
|
* Create new session and connect to server.
|
|
@@ -8901,6 +9130,7 @@ var getSession = function getSession(id) {
|
|
|
8901
9130
|
* @param {Integer=} options.pingInterval Server ping interval in milliseconds [0]
|
|
8902
9131
|
* @param {Integer=} options.receiveProbes A maximum subsequental pings received missing count [0]
|
|
8903
9132
|
* @param {Integer=} options.probesInterval Interval to check subsequental pings received [0]
|
|
9133
|
+
* @param {Object=} options.logger Session logger options
|
|
8904
9134
|
* @returns {Session} Created session
|
|
8905
9135
|
* @throws {Error} Error if API is not initialized
|
|
8906
9136
|
* @throws {TypeError} Error if options.urlServer is not specified
|
|
@@ -8915,8 +9145,12 @@ var createSession = function createSession(options) {
|
|
|
8915
9145
|
|
|
8916
9146
|
if (!options || !options.urlServer) {
|
|
8917
9147
|
throw new TypeError("options.urlServer must be provided");
|
|
8918
|
-
}
|
|
9148
|
+
} // Set session logger #WCS-2434
|
|
9149
|
+
|
|
8919
9150
|
|
|
9151
|
+
var sessionLogger = createLogger(options.logger); // Override logger for all low level operations
|
|
9152
|
+
|
|
9153
|
+
var logger = sessionLogger;
|
|
8920
9154
|
var id_ = uuid_v1();
|
|
8921
9155
|
var sessionStatus = SESSION_STATUS.PENDING;
|
|
8922
9156
|
var urlServer = options.urlServer;
|
|
@@ -9022,7 +9256,7 @@ var createSession = function createSession(options) {
|
|
|
9022
9256
|
if (timeout != undefined && timeout > 0) {
|
|
9023
9257
|
connectionTimeout = setTimeout(function () {
|
|
9024
9258
|
if (wsConnection.readyState == 0) {
|
|
9025
|
-
|
|
9259
|
+
logger.warn(LOG_PREFIX, "WS connection timeout");
|
|
9026
9260
|
wsConnection.close();
|
|
9027
9261
|
}
|
|
9028
9262
|
}, timeout);
|
|
@@ -9046,7 +9280,7 @@ var createSession = function createSession(options) {
|
|
|
9046
9280
|
mediaProviders: Object.keys(MediaProvider),
|
|
9047
9281
|
keepAlive: keepAlive,
|
|
9048
9282
|
authToken: authToken,
|
|
9049
|
-
clientVersion: "2.0.
|
|
9283
|
+
clientVersion: "2.0.217",
|
|
9050
9284
|
clientOSVersion: window.navigator.appVersion,
|
|
9051
9285
|
clientBrowserVersion: window.navigator.userAgent,
|
|
9052
9286
|
msePacketizationVersion: 2,
|
|
@@ -9352,6 +9586,7 @@ var createSession = function createSession(options) {
|
|
|
9352
9586
|
* @param {Array<string>=} options.sipSDP Array of custom SDP params (ex. bandwidth (b=))
|
|
9353
9587
|
* @param {Array<string>=} options.sipHeaders Array of custom SIP headers
|
|
9354
9588
|
* @param {string=} options.videoContentHint Video content hint for browser ('detail' by default to maintain resolution), {@link Flashphoner.constants.CONTENT_HINT_TYPE}
|
|
9589
|
+
* @param {Object=} options.logger Call logger options
|
|
9355
9590
|
* @param {sdpHook} sdpHook The callback that handles sdp from the server
|
|
9356
9591
|
* @returns {Call} Call
|
|
9357
9592
|
* @throws {TypeError} Error if no options provided
|
|
@@ -9364,15 +9599,18 @@ var createSession = function createSession(options) {
|
|
|
9364
9599
|
var createCall = function createCall(options) {
|
|
9365
9600
|
//check session state
|
|
9366
9601
|
if (sessionStatus !== SESSION_STATUS.REGISTERED && sessionStatus !== SESSION_STATUS.ESTABLISHED) {
|
|
9367
|
-
|
|
9368
|
-
throw new Error('Invalid session state');
|
|
9602
|
+
throw new Error('Invalid session state ' + sessionStatus);
|
|
9369
9603
|
} //check options
|
|
9370
9604
|
|
|
9371
9605
|
|
|
9372
9606
|
if (!options) {
|
|
9373
9607
|
throw new TypeError("options must be provided");
|
|
9374
|
-
}
|
|
9608
|
+
} // Set call logger #WCS-2434
|
|
9609
|
+
|
|
9610
|
+
|
|
9611
|
+
var callLogger = createLogger(options.logger, sessionLogger); // Override logger for all low level operations
|
|
9375
9612
|
|
|
9613
|
+
var logger = callLogger;
|
|
9376
9614
|
var login = appKey == 'clickToCallApp' ? '' : cConfig.sipLogin;
|
|
9377
9615
|
var caller_ = options.incoming ? options.caller : login;
|
|
9378
9616
|
var callee_ = options.callee;
|
|
@@ -9518,7 +9756,8 @@ var createSession = function createSession(options) {
|
|
|
9518
9756
|
constraints: constraints,
|
|
9519
9757
|
connectionConfig: mediaOptions,
|
|
9520
9758
|
audioOutputId: audioOutputId,
|
|
9521
|
-
videoContentHint: videoContentHint
|
|
9759
|
+
videoContentHint: videoContentHint,
|
|
9760
|
+
logger: logger
|
|
9522
9761
|
}).then(function (newConnection) {
|
|
9523
9762
|
mediaConnection = newConnection;
|
|
9524
9763
|
return mediaConnection.createOffer({
|
|
@@ -10104,7 +10343,7 @@ var createSession = function createSession(options) {
|
|
|
10104
10343
|
/**
|
|
10105
10344
|
* Get call info
|
|
10106
10345
|
* @returns {string} Info
|
|
10107
|
-
* @memberof
|
|
10346
|
+
* @memberof Call
|
|
10108
10347
|
* @inner
|
|
10109
10348
|
*/
|
|
10110
10349
|
|
|
@@ -10115,7 +10354,7 @@ var createSession = function createSession(options) {
|
|
|
10115
10354
|
/**
|
|
10116
10355
|
* Get stream error info
|
|
10117
10356
|
* @returns {string} Error info
|
|
10118
|
-
* @memberof
|
|
10357
|
+
* @memberof Call
|
|
10119
10358
|
* @inner
|
|
10120
10359
|
*/
|
|
10121
10360
|
|
|
@@ -10123,6 +10362,17 @@ var createSession = function createSession(options) {
|
|
|
10123
10362
|
var getErrorInfo = function getErrorInfo() {
|
|
10124
10363
|
return errorInfo_;
|
|
10125
10364
|
};
|
|
10365
|
+
/**
|
|
10366
|
+
* Get call logger
|
|
10367
|
+
*
|
|
10368
|
+
* @returns {Object} Logger
|
|
10369
|
+
* @memberof Call
|
|
10370
|
+
*/
|
|
10371
|
+
|
|
10372
|
+
|
|
10373
|
+
var getLogger = function getLogger() {
|
|
10374
|
+
return callLogger;
|
|
10375
|
+
};
|
|
10126
10376
|
|
|
10127
10377
|
call.call = call_;
|
|
10128
10378
|
call.answer = answer;
|
|
@@ -10154,6 +10404,7 @@ var createSession = function createSession(options) {
|
|
|
10154
10404
|
call.switchMic = switchMic;
|
|
10155
10405
|
call.switchToScreen = switchToScreen;
|
|
10156
10406
|
call.switchToCam = switchToCam;
|
|
10407
|
+
call.getLogger = getLogger;
|
|
10157
10408
|
calls[id_] = call;
|
|
10158
10409
|
return call;
|
|
10159
10410
|
};
|
|
@@ -10200,6 +10451,7 @@ var createSession = function createSession(options) {
|
|
|
10200
10451
|
* @param {string=} options.useCanvasMediaStream EXPERIMENTAL: when publish bind browser's media stream to the canvas. It can be useful for image filtering
|
|
10201
10452
|
* @param {string=} options.videoContentHint Video content hint for browser ('detail' by default to maintain resolution), {@link Flashphoner.constants.CONTENT_HINT_TYPE}
|
|
10202
10453
|
* @param {Boolean=} options.unmutePlayOnStart Unmute playback on start. May be used after user gesture only, so set 'unmutePlayOnStart: false' for autoplay
|
|
10454
|
+
* @param {Object=} options.logger Stream logger options
|
|
10203
10455
|
* @param {sdpHook} sdpHook The callback that handles sdp from the server
|
|
10204
10456
|
* @returns {Stream} Stream
|
|
10205
10457
|
* @throws {TypeError} Error if no options provided
|
|
@@ -10215,7 +10467,7 @@ var createSession = function createSession(options) {
|
|
|
10215
10467
|
var availableCallbacks = []; //check session state
|
|
10216
10468
|
|
|
10217
10469
|
if (sessionStatus !== SESSION_STATUS.ESTABLISHED) {
|
|
10218
|
-
throw new Error('Invalid session state');
|
|
10470
|
+
throw new Error('Invalid session state ' + sessionStatus);
|
|
10219
10471
|
} //check options
|
|
10220
10472
|
|
|
10221
10473
|
|
|
@@ -10225,8 +10477,12 @@ var createSession = function createSession(options) {
|
|
|
10225
10477
|
|
|
10226
10478
|
if (!options.name) {
|
|
10227
10479
|
throw new TypeError("options.name must be provided");
|
|
10228
|
-
}
|
|
10480
|
+
} // Set stream logger #WCS-2434
|
|
10229
10481
|
|
|
10482
|
+
|
|
10483
|
+
var streamLogger = createLogger(options.logger, sessionLogger); // Override logger for all low level operations
|
|
10484
|
+
|
|
10485
|
+
var logger = streamLogger;
|
|
10230
10486
|
var clientKf = new KalmanFilter();
|
|
10231
10487
|
var serverKf = new KalmanFilter();
|
|
10232
10488
|
var id_ = uuid_v1();
|
|
@@ -10470,7 +10726,7 @@ var createSession = function createSession(options) {
|
|
|
10470
10726
|
logger.debug(LOG_PREFIX, "Play stream " + name_);
|
|
10471
10727
|
|
|
10472
10728
|
if (status_ !== STREAM_STATUS.NEW) {
|
|
10473
|
-
throw new Error("Invalid stream state");
|
|
10729
|
+
throw new Error("Invalid stream state " + status_);
|
|
10474
10730
|
}
|
|
10475
10731
|
|
|
10476
10732
|
status_ = STREAM_STATUS.PENDING; //create mediaProvider connection
|
|
@@ -10489,7 +10745,8 @@ var createSession = function createSession(options) {
|
|
|
10489
10745
|
audioOutputId: audioOutputId,
|
|
10490
10746
|
remoteVideo: remoteVideo,
|
|
10491
10747
|
playoutDelay: playoutDelay,
|
|
10492
|
-
unmutePlayOnStart: unmutePlayOnStart
|
|
10748
|
+
unmutePlayOnStart: unmutePlayOnStart,
|
|
10749
|
+
logger: logger
|
|
10493
10750
|
}, streamRefreshHandlers[id_]).then(function (newConnection) {
|
|
10494
10751
|
mediaConnection = newConnection;
|
|
10495
10752
|
|
|
@@ -10553,7 +10810,7 @@ var createSession = function createSession(options) {
|
|
|
10553
10810
|
logger.debug(LOG_PREFIX, "Publish stream " + name_);
|
|
10554
10811
|
|
|
10555
10812
|
if (status_ !== STREAM_STATUS.NEW) {
|
|
10556
|
-
throw new Error("Invalid stream state");
|
|
10813
|
+
throw new Error("Invalid stream state " + status_);
|
|
10557
10814
|
}
|
|
10558
10815
|
|
|
10559
10816
|
status_ = STREAM_STATUS.PENDING;
|
|
@@ -10587,7 +10844,8 @@ var createSession = function createSession(options) {
|
|
|
10587
10844
|
connectionConfig: mediaOptions,
|
|
10588
10845
|
connectionConstraints: mediaConnectionConstraints,
|
|
10589
10846
|
customStream: constraints && constraints.customStream ? constraints.customStream : false,
|
|
10590
|
-
videoContentHint: videoContentHint
|
|
10847
|
+
videoContentHint: videoContentHint,
|
|
10848
|
+
logger: logger
|
|
10591
10849
|
}).then(function (newConnection) {
|
|
10592
10850
|
mediaConnection = newConnection;
|
|
10593
10851
|
return mediaConnection.createOffer({
|
|
@@ -11217,6 +11475,17 @@ var createSession = function createSession(options) {
|
|
|
11217
11475
|
availableCallbacks.push(promise);
|
|
11218
11476
|
});
|
|
11219
11477
|
};
|
|
11478
|
+
/**
|
|
11479
|
+
* Get stream logger
|
|
11480
|
+
*
|
|
11481
|
+
* @returns {Object} Logger
|
|
11482
|
+
* @memberof Stream
|
|
11483
|
+
*/
|
|
11484
|
+
|
|
11485
|
+
|
|
11486
|
+
var getLogger = function getLogger() {
|
|
11487
|
+
return streamLogger;
|
|
11488
|
+
};
|
|
11220
11489
|
|
|
11221
11490
|
stream.play = play;
|
|
11222
11491
|
stream.publish = publish;
|
|
@@ -11256,6 +11525,7 @@ var createSession = function createSession(options) {
|
|
|
11256
11525
|
stream.switchToScreen = switchToScreen;
|
|
11257
11526
|
stream.switchToCam = switchToCam;
|
|
11258
11527
|
stream.sendData = sendData;
|
|
11528
|
+
stream.getLogger = getLogger;
|
|
11259
11529
|
streams[id_] = stream;
|
|
11260
11530
|
return stream;
|
|
11261
11531
|
};
|
|
@@ -11464,6 +11734,17 @@ var createSession = function createSession(options) {
|
|
|
11464
11734
|
}
|
|
11465
11735
|
|
|
11466
11736
|
return sdp;
|
|
11737
|
+
};
|
|
11738
|
+
/**
|
|
11739
|
+
* Get session logger
|
|
11740
|
+
*
|
|
11741
|
+
* @returns {Object} Logger
|
|
11742
|
+
* @memberof Session
|
|
11743
|
+
*/
|
|
11744
|
+
|
|
11745
|
+
|
|
11746
|
+
var getLogger = function getLogger() {
|
|
11747
|
+
return sessionLogger;
|
|
11467
11748
|
}; //export Session
|
|
11468
11749
|
|
|
11469
11750
|
|
|
@@ -11479,7 +11760,8 @@ var createSession = function createSession(options) {
|
|
|
11479
11760
|
session.submitBugReport = submitBugReport;
|
|
11480
11761
|
session.startDebug = startDebug;
|
|
11481
11762
|
session.stopDebug = stopDebug;
|
|
11482
|
-
session.on = on;
|
|
11763
|
+
session.on = on;
|
|
11764
|
+
session.getLogger = getLogger; //save interface to global map
|
|
11483
11765
|
|
|
11484
11766
|
sessions[id_] = session;
|
|
11485
11767
|
return session;
|
|
@@ -11515,165 +11797,171 @@ module.exports = {
|
|
|
11515
11797
|
},{"./constants":38,"./flash-media-provider":1,"./media-source-media-provider":1,"./temasys-media-provider":1,"./util":40,"./webrtc-media-provider":41,"./websocket-media-provider":1,"kalmanjs":2,"promise-polyfill":4,"uuid":8,"webrtc-adapter":23}],40:[function(require,module,exports){
|
|
11516
11798
|
'use strict';
|
|
11517
11799
|
|
|
11518
|
-
|
|
11519
|
-
|
|
11520
|
-
|
|
11521
|
-
|
|
11522
|
-
}
|
|
11800
|
+
var isEmptyObject = function isEmptyObject(obj) {
|
|
11801
|
+
for (var name in obj) {
|
|
11802
|
+
return false;
|
|
11803
|
+
}
|
|
11523
11804
|
|
|
11524
|
-
|
|
11525
|
-
|
|
11805
|
+
return true;
|
|
11806
|
+
};
|
|
11807
|
+
/**
|
|
11808
|
+
* Copy values of object own properties to array.
|
|
11809
|
+
*
|
|
11810
|
+
* @param obj
|
|
11811
|
+
* @returns {Array}
|
|
11812
|
+
*/
|
|
11526
11813
|
|
|
11527
|
-
/**
|
|
11528
|
-
* Copy values of object own properties to array.
|
|
11529
|
-
*
|
|
11530
|
-
* @param obj
|
|
11531
|
-
* @returns {Array}
|
|
11532
|
-
*/
|
|
11533
|
-
copyObjectToArray: function copyObjectToArray(obj) {
|
|
11534
|
-
var ret = [];
|
|
11535
11814
|
|
|
11536
|
-
|
|
11537
|
-
|
|
11538
|
-
|
|
11539
|
-
|
|
11815
|
+
var copyObjectToArray = function copyObjectToArray(obj) {
|
|
11816
|
+
var ret = [];
|
|
11817
|
+
|
|
11818
|
+
for (var prop in obj) {
|
|
11819
|
+
if (obj.hasOwnProperty(prop)) {
|
|
11820
|
+
ret.push(obj[prop]);
|
|
11540
11821
|
}
|
|
11822
|
+
}
|
|
11541
11823
|
|
|
11542
|
-
|
|
11543
|
-
|
|
11824
|
+
return ret;
|
|
11825
|
+
};
|
|
11826
|
+
/**
|
|
11827
|
+
* Copy src properties to dst object.
|
|
11828
|
+
* Will overwrite dst prop with src prop in case of dst prop exist.
|
|
11829
|
+
*/
|
|
11544
11830
|
|
|
11545
|
-
|
|
11546
|
-
|
|
11547
|
-
|
|
11548
|
-
|
|
11549
|
-
|
|
11550
|
-
for (var prop in src) {
|
|
11551
|
-
if (src.hasOwnProperty(prop)) {
|
|
11552
|
-
dst[prop] = src[prop];
|
|
11553
|
-
}
|
|
11831
|
+
|
|
11832
|
+
var copyObjectPropsToAnotherObject = function copyObjectPropsToAnotherObject(src, dst) {
|
|
11833
|
+
for (var prop in src) {
|
|
11834
|
+
if (src.hasOwnProperty(prop)) {
|
|
11835
|
+
dst[prop] = src[prop];
|
|
11554
11836
|
}
|
|
11555
|
-
}
|
|
11556
|
-
|
|
11557
|
-
var result = {};
|
|
11837
|
+
}
|
|
11838
|
+
};
|
|
11558
11839
|
|
|
11559
|
-
|
|
11560
|
-
|
|
11561
|
-
* Report types: googComponent, googCandidatePair, googCertificate, googLibjingleSession, googTrack, ssrc
|
|
11562
|
-
*/
|
|
11563
|
-
var gotResult = false;
|
|
11840
|
+
var processRtcStatsReport = function processRtcStatsReport(browser, report) {
|
|
11841
|
+
var result = {};
|
|
11564
11842
|
|
|
11565
|
-
|
|
11566
|
-
|
|
11567
|
-
|
|
11568
|
-
|
|
11569
|
-
|
|
11570
|
-
}
|
|
11843
|
+
if (browser == "chrome") {
|
|
11844
|
+
/**
|
|
11845
|
+
* Report types: googComponent, googCandidatePair, googCertificate, googLibjingleSession, googTrack, ssrc
|
|
11846
|
+
*/
|
|
11847
|
+
var gotResult = false;
|
|
11571
11848
|
|
|
11572
|
-
|
|
11849
|
+
if (report.type && report.type == "googCandidatePair") {
|
|
11850
|
+
//check if this is active pair
|
|
11851
|
+
if (report.googActiveConnection == "true") {
|
|
11573
11852
|
gotResult = true;
|
|
11574
11853
|
}
|
|
11854
|
+
}
|
|
11575
11855
|
|
|
11576
|
-
|
|
11577
|
-
|
|
11578
|
-
|
|
11579
|
-
|
|
11580
|
-
|
|
11856
|
+
if (report.type && report.type == "ssrc") {
|
|
11857
|
+
gotResult = true;
|
|
11858
|
+
}
|
|
11859
|
+
|
|
11860
|
+
if (gotResult) {
|
|
11861
|
+
for (var k in report) {
|
|
11862
|
+
if (report.hasOwnProperty(k)) {
|
|
11863
|
+
result[k] = report[k];
|
|
11581
11864
|
}
|
|
11582
11865
|
}
|
|
11866
|
+
}
|
|
11583
11867
|
|
|
11584
|
-
|
|
11585
|
-
|
|
11586
|
-
|
|
11587
|
-
|
|
11588
|
-
|
|
11589
|
-
|
|
11590
|
-
|
|
11868
|
+
return result;
|
|
11869
|
+
} else if (browser == "firefox") {
|
|
11870
|
+
/**
|
|
11871
|
+
* RTCStatsReport http://mxr.mozilla.org/mozilla-central/source/dom/webidl/RTCStatsReport.webidl
|
|
11872
|
+
*/
|
|
11873
|
+
if (report.type && (report.type == "outboundrtp" || report.type == "inboundrtp") && report.id.indexOf("rtcp") == -1) {
|
|
11874
|
+
result = {};
|
|
11591
11875
|
|
|
11592
|
-
|
|
11593
|
-
|
|
11594
|
-
|
|
11595
|
-
}
|
|
11876
|
+
for (var k in report) {
|
|
11877
|
+
if (report.hasOwnProperty(k)) {
|
|
11878
|
+
result[k] = report[k];
|
|
11596
11879
|
}
|
|
11597
11880
|
}
|
|
11598
|
-
|
|
11599
|
-
return result;
|
|
11600
|
-
} else {
|
|
11601
|
-
return result;
|
|
11602
11881
|
}
|
|
11603
11882
|
|
|
11604
|
-
;
|
|
11883
|
+
return result;
|
|
11884
|
+
} else {
|
|
11885
|
+
return result;
|
|
11886
|
+
}
|
|
11887
|
+
};
|
|
11888
|
+
|
|
11889
|
+
var Browser = {
|
|
11890
|
+
isIE: function isIE() {
|
|
11891
|
+
return (
|
|
11892
|
+
/*@cc_on!@*/
|
|
11893
|
+
false || !!document.documentMode
|
|
11894
|
+
);
|
|
11605
11895
|
},
|
|
11606
|
-
|
|
11607
|
-
|
|
11608
|
-
return (
|
|
11609
|
-
/*@cc_on!@*/
|
|
11610
|
-
false || !!document.documentMode
|
|
11611
|
-
);
|
|
11612
|
-
},
|
|
11613
|
-
isFirefox: function isFirefox() {
|
|
11614
|
-
return typeof InstallTrigger !== 'undefined';
|
|
11615
|
-
},
|
|
11616
|
-
isChrome: function isChrome() {
|
|
11617
|
-
return !!window.chrome && /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor) && !/OPR/.test(navigator.userAgent);
|
|
11618
|
-
},
|
|
11619
|
-
isEdge: function isEdge() {
|
|
11620
|
-
return !isIE && !!window.StyleMedia;
|
|
11621
|
-
},
|
|
11622
|
-
isOpera: function isOpera() {
|
|
11623
|
-
return !!window.opr && !!opr.addons || !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0;
|
|
11624
|
-
},
|
|
11625
|
-
isiOS: function isiOS() {
|
|
11626
|
-
return /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
|
|
11627
|
-
},
|
|
11628
|
-
isSafari: function isSafari() {
|
|
11629
|
-
var userAgent = navigator.userAgent.toLowerCase();
|
|
11630
|
-
return /(safari|applewebkit)/i.test(userAgent) && !userAgent.includes("chrome") && !userAgent.includes("android");
|
|
11631
|
-
},
|
|
11632
|
-
isAndroid: function isAndroid() {
|
|
11633
|
-
return navigator.userAgent.toLowerCase().indexOf("android") > -1;
|
|
11634
|
-
},
|
|
11635
|
-
isSafariWebRTC: function isSafariWebRTC() {
|
|
11636
|
-
return navigator.mediaDevices && this.isSafari();
|
|
11637
|
-
},
|
|
11638
|
-
isSamsungBrowser: function isSamsungBrowser() {
|
|
11639
|
-
return /SamsungBrowser/i.test(navigator.userAgent);
|
|
11640
|
-
},
|
|
11641
|
-
isAndroidFirefox: function isAndroidFirefox() {
|
|
11642
|
-
return this.isAndroid() && /Firefox/i.test(navigator.userAgent);
|
|
11643
|
-
}
|
|
11896
|
+
isFirefox: function isFirefox() {
|
|
11897
|
+
return typeof InstallTrigger !== 'undefined';
|
|
11644
11898
|
},
|
|
11645
|
-
|
|
11646
|
-
|
|
11647
|
-
|
|
11648
|
-
|
|
11649
|
-
|
|
11650
|
-
|
|
11651
|
-
|
|
11652
|
-
|
|
11653
|
-
|
|
11654
|
-
|
|
11655
|
-
|
|
11656
|
-
|
|
11899
|
+
isChrome: function isChrome() {
|
|
11900
|
+
return !!window.chrome && /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor) && !/OPR/.test(navigator.userAgent);
|
|
11901
|
+
},
|
|
11902
|
+
isEdge: function isEdge() {
|
|
11903
|
+
return !isIE && !!window.StyleMedia;
|
|
11904
|
+
},
|
|
11905
|
+
isOpera: function isOpera() {
|
|
11906
|
+
return !!window.opr && !!opr.addons || !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0;
|
|
11907
|
+
},
|
|
11908
|
+
isiOS: function isiOS() {
|
|
11909
|
+
return /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
|
|
11910
|
+
},
|
|
11911
|
+
isSafari: function isSafari() {
|
|
11912
|
+
var userAgent = navigator.userAgent.toLowerCase();
|
|
11913
|
+
return /(safari|applewebkit)/i.test(userAgent) && !userAgent.includes("chrome") && !userAgent.includes("android");
|
|
11914
|
+
},
|
|
11915
|
+
isAndroid: function isAndroid() {
|
|
11916
|
+
return navigator.userAgent.toLowerCase().indexOf("android") > -1;
|
|
11917
|
+
},
|
|
11918
|
+
isSafariWebRTC: function isSafariWebRTC() {
|
|
11919
|
+
return navigator.mediaDevices && this.isSafari();
|
|
11920
|
+
},
|
|
11921
|
+
isSamsungBrowser: function isSamsungBrowser() {
|
|
11922
|
+
return /SamsungBrowser/i.test(navigator.userAgent);
|
|
11923
|
+
},
|
|
11924
|
+
isAndroidFirefox: function isAndroidFirefox() {
|
|
11925
|
+
return this.isAndroid() && /Firefox/i.test(navigator.userAgent);
|
|
11926
|
+
},
|
|
11927
|
+
isChromiumEdge: function isChromiumEdge() {
|
|
11928
|
+
return /Chrome/i.test(navigator.userAgent) && /Edg/i.test(navigator.userAgent);
|
|
11929
|
+
}
|
|
11930
|
+
};
|
|
11931
|
+
var SDP = {
|
|
11932
|
+
matchPrefix: function matchPrefix(sdp, prefix) {
|
|
11933
|
+
var parts = sdp.trim().split('\n').map(function (line) {
|
|
11934
|
+
return line.trim();
|
|
11935
|
+
});
|
|
11936
|
+
return parts.filter(function (line) {
|
|
11937
|
+
return line.indexOf(prefix) === 0;
|
|
11938
|
+
});
|
|
11939
|
+
},
|
|
11940
|
+
writeFmtp: function writeFmtp(sdp, param, codec) {
|
|
11941
|
+
var sdpArray = sdp.split("\n");
|
|
11942
|
+
var i;
|
|
11657
11943
|
|
|
11658
|
-
|
|
11659
|
-
|
|
11660
|
-
|
|
11661
|
-
|
|
11662
|
-
|
|
11944
|
+
for (i = 0; i < sdpArray.length; i++) {
|
|
11945
|
+
if (sdpArray[i].search(codec) != -1 && sdpArray[i].indexOf("a=rtpmap") == 0) {
|
|
11946
|
+
sdpArray[i] += "\na=fmtp:" + sdpArray[i].match(/[0-9]+/)[0] + " " + param + "\r";
|
|
11947
|
+
}
|
|
11948
|
+
} //normalize sdp after modifications
|
|
11663
11949
|
|
|
11664
11950
|
|
|
11665
|
-
|
|
11951
|
+
var result = "";
|
|
11666
11952
|
|
|
11667
|
-
|
|
11668
|
-
|
|
11669
|
-
|
|
11670
|
-
}
|
|
11953
|
+
for (i = 0; i < sdpArray.length; i++) {
|
|
11954
|
+
if (sdpArray[i] != "") {
|
|
11955
|
+
result += sdpArray[i] + "\n";
|
|
11671
11956
|
}
|
|
11672
|
-
|
|
11673
|
-
return result;
|
|
11674
11957
|
}
|
|
11675
|
-
|
|
11676
|
-
|
|
11958
|
+
|
|
11959
|
+
return result;
|
|
11960
|
+
}
|
|
11961
|
+
};
|
|
11962
|
+
|
|
11963
|
+
var logger = function logger() {
|
|
11964
|
+
return {
|
|
11677
11965
|
init: function init(verbosity, enablePushLogs, customLogger, enableLogs) {
|
|
11678
11966
|
switch (verbosity.toUpperCase()) {
|
|
11679
11967
|
case "DEBUG":
|
|
@@ -11854,92 +12142,104 @@ module.exports = {
|
|
|
11854
12142
|
default:
|
|
11855
12143
|
this.verbosity = 2;
|
|
11856
12144
|
}
|
|
11857
|
-
|
|
11858
|
-
;
|
|
11859
12145
|
}
|
|
11860
|
-
}
|
|
11861
|
-
|
|
11862
|
-
if (!codecs.length) return sdp;
|
|
11863
|
-
var sdpArray = sdp.split("\n");
|
|
11864
|
-
var codecsArray = codecs.split(","); //search and delete codecs line
|
|
12146
|
+
};
|
|
12147
|
+
};
|
|
11865
12148
|
|
|
11866
|
-
|
|
11867
|
-
|
|
12149
|
+
var stripCodecs = function stripCodecs(sdp, codecs) {
|
|
12150
|
+
if (!codecs.length) return sdp;
|
|
12151
|
+
var sdpArray = sdp.split("\n");
|
|
12152
|
+
var codecsArray = codecs.split(","); //search and delete codecs line
|
|
11868
12153
|
|
|
11869
|
-
|
|
11870
|
-
|
|
12154
|
+
var pt = [];
|
|
12155
|
+
var i;
|
|
11871
12156
|
|
|
11872
|
-
|
|
11873
|
-
|
|
11874
|
-
|
|
11875
|
-
|
|
11876
|
-
|
|
11877
|
-
|
|
12157
|
+
for (var p = 0; p < codecsArray.length; p++) {
|
|
12158
|
+
console.log("Searching for codec " + codecsArray[p]);
|
|
12159
|
+
|
|
12160
|
+
for (i = 0; i < sdpArray.length; i++) {
|
|
12161
|
+
if (sdpArray[i].search(new RegExp(codecsArray[p], 'i')) != -1 && sdpArray[i].indexOf("a=rtpmap") == 0) {
|
|
12162
|
+
console.log(codecsArray[p] + " detected");
|
|
12163
|
+
pt.push(sdpArray[i].match(/[0-9]+/)[0]);
|
|
12164
|
+
sdpArray[i] = "";
|
|
11878
12165
|
}
|
|
11879
12166
|
}
|
|
12167
|
+
}
|
|
11880
12168
|
|
|
11881
|
-
|
|
11882
|
-
|
|
11883
|
-
|
|
11884
|
-
|
|
11885
|
-
|
|
11886
|
-
|
|
11887
|
-
}
|
|
12169
|
+
if (pt.length) {
|
|
12170
|
+
//searching for fmtp
|
|
12171
|
+
for (p = 0; p < pt.length; p++) {
|
|
12172
|
+
for (i = 0; i < sdpArray.length; i++) {
|
|
12173
|
+
if (sdpArray[i].search("a=fmtp:" + pt[p]) != -1 || sdpArray[i].search("a=rtcp-fb:" + pt[p]) != -1) {
|
|
12174
|
+
sdpArray[i] = "";
|
|
11888
12175
|
}
|
|
11889
|
-
}
|
|
12176
|
+
}
|
|
12177
|
+
} //delete entries from m= line
|
|
11890
12178
|
|
|
11891
12179
|
|
|
11892
|
-
|
|
11893
|
-
|
|
11894
|
-
|
|
11895
|
-
|
|
12180
|
+
for (i = 0; i < sdpArray.length; i++) {
|
|
12181
|
+
if (sdpArray[i].search("m=audio") != -1 || sdpArray[i].search("m=video") != -1) {
|
|
12182
|
+
var mLineSplitted = sdpArray[i].split(" ");
|
|
12183
|
+
var newMLine = "";
|
|
11896
12184
|
|
|
11897
|
-
|
|
11898
|
-
|
|
11899
|
-
|
|
12185
|
+
for (var m = 0; m < mLineSplitted.length; m++) {
|
|
12186
|
+
if (pt.indexOf(mLineSplitted[m].trim()) == -1 || m <= 2) {
|
|
12187
|
+
newMLine += mLineSplitted[m];
|
|
11900
12188
|
|
|
11901
|
-
|
|
11902
|
-
|
|
11903
|
-
}
|
|
12189
|
+
if (m < mLineSplitted.length - 1) {
|
|
12190
|
+
newMLine = newMLine + " ";
|
|
11904
12191
|
}
|
|
11905
12192
|
}
|
|
11906
|
-
|
|
11907
|
-
sdpArray[i] = newMLine;
|
|
11908
12193
|
}
|
|
12194
|
+
|
|
12195
|
+
sdpArray[i] = newMLine;
|
|
11909
12196
|
}
|
|
11910
|
-
}
|
|
12197
|
+
}
|
|
12198
|
+
} //normalize sdp after modifications
|
|
11911
12199
|
|
|
11912
12200
|
|
|
11913
|
-
|
|
12201
|
+
var result = "";
|
|
11914
12202
|
|
|
11915
|
-
|
|
11916
|
-
|
|
11917
|
-
|
|
11918
|
-
}
|
|
12203
|
+
for (i = 0; i < sdpArray.length; i++) {
|
|
12204
|
+
if (sdpArray[i] != "") {
|
|
12205
|
+
result += sdpArray[i] + "\n";
|
|
11919
12206
|
}
|
|
12207
|
+
}
|
|
11920
12208
|
|
|
11921
|
-
|
|
11922
|
-
|
|
11923
|
-
getCurrentCodecAndSampleRate: function getCurrentCodecAndSampleRate(sdp, mediaType) {
|
|
11924
|
-
var rows = sdp.split("\n");
|
|
11925
|
-
var codecPt;
|
|
12209
|
+
return result;
|
|
12210
|
+
};
|
|
11926
12211
|
|
|
11927
|
-
|
|
11928
|
-
|
|
11929
|
-
|
|
11930
|
-
ret.name = rows[i].split(" ")[1].split("/")[0];
|
|
11931
|
-
ret.sampleRate = rows[i].split(" ")[1].split("/")[1];
|
|
11932
|
-
return ret;
|
|
11933
|
-
} //WCS-2136. WebRTC statistics doesn't work for VP8
|
|
12212
|
+
var getCurrentCodecAndSampleRate = function getCurrentCodecAndSampleRate(sdp, mediaType) {
|
|
12213
|
+
var rows = sdp.split("\n");
|
|
12214
|
+
var codecPt;
|
|
11934
12215
|
|
|
12216
|
+
for (var i = 0; i < rows.length; i++) {
|
|
12217
|
+
if (codecPt && rows[i].indexOf("a=rtpmap:" + codecPt) != -1) {
|
|
12218
|
+
var ret = {};
|
|
12219
|
+
ret.name = rows[i].split(" ")[1].split("/")[0];
|
|
12220
|
+
ret.sampleRate = rows[i].split(" ")[1].split("/")[1];
|
|
12221
|
+
return ret;
|
|
12222
|
+
} //WCS-2136. WebRTC statistics doesn't work for VP8
|
|
11935
12223
|
|
|
11936
|
-
|
|
11937
|
-
|
|
11938
|
-
|
|
12224
|
+
|
|
12225
|
+
if (rows[i].indexOf("m=" + mediaType) != -1) {
|
|
12226
|
+
codecPt = rows[i].split(" ")[3].trim();
|
|
11939
12227
|
}
|
|
11940
12228
|
}
|
|
11941
12229
|
};
|
|
11942
12230
|
|
|
12231
|
+
module.exports = {
|
|
12232
|
+
isEmptyObject: isEmptyObject,
|
|
12233
|
+
copyObjectToArray: copyObjectToArray,
|
|
12234
|
+
copyObjectPropsToAnotherObject: copyObjectPropsToAnotherObject,
|
|
12235
|
+
processRtcStatsReport: processRtcStatsReport,
|
|
12236
|
+
Browser: Browser,
|
|
12237
|
+
SDP: SDP,
|
|
12238
|
+
logger: logger,
|
|
12239
|
+
stripCodecs: stripCodecs,
|
|
12240
|
+
getCurrentCodecAndSampleRate: getCurrentCodecAndSampleRate
|
|
12241
|
+
};
|
|
12242
|
+
|
|
11943
12243
|
},{}],41:[function(require,module,exports){
|
|
11944
12244
|
'use strict';
|
|
11945
12245
|
|
|
@@ -11973,6 +12273,11 @@ var mics = [];
|
|
|
11973
12273
|
|
|
11974
12274
|
var createConnection = function createConnection(options) {
|
|
11975
12275
|
return new Promise(function (resolve, reject) {
|
|
12276
|
+
// Set connection logger #WCS-2434
|
|
12277
|
+
if (options.logger) {
|
|
12278
|
+
logger = options.logger;
|
|
12279
|
+
}
|
|
12280
|
+
|
|
11976
12281
|
var id = options.id;
|
|
11977
12282
|
var connectionConfig = options.connectionConfig || {
|
|
11978
12283
|
"iceServers": []
|
|
@@ -12103,9 +12408,9 @@ var createConnection = function createConnection(options) {
|
|
|
12103
12408
|
function setContentHint(stream, hint) {
|
|
12104
12409
|
stream.getVideoTracks().forEach(function (track) {
|
|
12105
12410
|
if (track.contentHint === undefined) {
|
|
12106
|
-
logger.warn("contentHint unsupported");
|
|
12411
|
+
logger.warn(LOG_PREFIX, "Track contentHint unsupported");
|
|
12107
12412
|
} else {
|
|
12108
|
-
logger.info("Set video track contentHint to " + hint);
|
|
12413
|
+
logger.info(LOG_PREFIX, "Set video track contentHint to " + hint);
|
|
12109
12414
|
track.contentHint = hint;
|
|
12110
12415
|
}
|
|
12111
12416
|
});
|
|
@@ -12142,7 +12447,7 @@ var createConnection = function createConnection(options) {
|
|
|
12142
12447
|
//WCS-2771 add playback delay
|
|
12143
12448
|
connection.getReceivers().forEach(function (track) {
|
|
12144
12449
|
if (track.playoutDelayHint === undefined) {
|
|
12145
|
-
logger.warn("
|
|
12450
|
+
logger.warn(LOG_PREFIX, "Playout delay unsupported");
|
|
12146
12451
|
}
|
|
12147
12452
|
|
|
12148
12453
|
track.playoutDelayHint = playoutDelay;
|
|
@@ -12535,7 +12840,7 @@ var createConnection = function createConnection(options) {
|
|
|
12535
12840
|
localVideo.srcObject.addTrack(audioTrack);
|
|
12536
12841
|
}
|
|
12537
12842
|
|
|
12538
|
-
logger.info("Switch camera to " + cam);
|
|
12843
|
+
logger.info(LOG_PREFIX, "Switch camera to " + cam);
|
|
12539
12844
|
resolve(cam);
|
|
12540
12845
|
})["catch"](function (reason) {
|
|
12541
12846
|
logger.error(LOG_PREFIX, reason);
|
|
@@ -12593,7 +12898,7 @@ var createConnection = function createConnection(options) {
|
|
|
12593
12898
|
localVideo.srcObject.addTrack(videoTrack);
|
|
12594
12899
|
}
|
|
12595
12900
|
|
|
12596
|
-
logger.info("Switch mic to " + mic);
|
|
12901
|
+
logger.info(LOG_PREFIX, "Switch mic to " + mic);
|
|
12597
12902
|
resolve(mic);
|
|
12598
12903
|
})["catch"](function (reason) {
|
|
12599
12904
|
logger.error(LOG_PREFIX, reason);
|
|
@@ -12687,7 +12992,7 @@ var createConnection = function createConnection(options) {
|
|
|
12687
12992
|
localVideo.srcObject.addTrack(currentAudioTrack);
|
|
12688
12993
|
}
|
|
12689
12994
|
});
|
|
12690
|
-
logger.info("Switch to screen");
|
|
12995
|
+
logger.info(LOG_PREFIX, "Switch to screen");
|
|
12691
12996
|
screenShare = true;
|
|
12692
12997
|
resolve();
|
|
12693
12998
|
};
|
|
@@ -12719,7 +13024,7 @@ var createConnection = function createConnection(options) {
|
|
|
12719
13024
|
});
|
|
12720
13025
|
}
|
|
12721
13026
|
|
|
12722
|
-
logger.info("Switch to cam");
|
|
13027
|
+
logger.info(LOG_PREFIX, "Switch to cam");
|
|
12723
13028
|
screenShare = false;
|
|
12724
13029
|
};
|
|
12725
13030
|
|