@flashphoner/websdk 2.0.216 → 2.0.217
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docTemplate/README.md +1 -1
- package/flashphoner-no-flash.js +797 -588
- package/flashphoner-no-flash.min.js +1 -1
- package/flashphoner-no-webrtc.js +797 -588
- package/flashphoner-no-webrtc.min.js +1 -1
- package/flashphoner-no-wsplayer.js +797 -588
- package/flashphoner-no-wsplayer.min.js +1 -1
- package/flashphoner-room-api.js +780 -694
- package/flashphoner-room-api.min.js +1 -1
- package/flashphoner-temasys-flash-websocket-without-adapterjs.js +797 -588
- package/flashphoner-temasys-flash-websocket.js +797 -588
- package/flashphoner-temasys-flash-websocket.min.js +1 -1
- package/flashphoner-webrtc-only.js +797 -588
- package/flashphoner-webrtc-only.min.js +1 -1
- package/flashphoner.js +797 -588
- package/flashphoner.min.js +1 -1
- package/package.json +1 -1
- package/src/constants.d.ts +792 -1
- package/src/constants.js +790 -704
- package/src/flashphoner-core.d.ts +359 -212
- package/src/flashphoner-core.js +1 -1
- package/src/room-module.d.ts +2 -2
package/flashphoner-room-api.js
CHANGED
|
@@ -8293,738 +8293,824 @@ function filterStats(result, track, outbound) {
|
|
|
8293
8293
|
var _0x8674=['feedDecoder','postMessage','now','getBufferTimeLength','Unknown\x20request','bind','audioChunkLength','context','sampleRate','videoWidth','videoHeight','token','dropDelayMultiplier','Failed\x20to\x20init\x20stream\x20receiver\x20','videoDecoder','decoderPath','onmessage','No\x20timestamp\x20available\x20for\x20decoded\x20picture,\x20discarding','shift','STOPPED','audioBuffer','sync','start','setVolume','requestVideoFrameCallback','Failed\x20to\x20init\x20video\x20decoder\x20','fps','framesRendered','noDataSince','prototype','receivedIframe','lastPlayedVideoTime','kframe','decode','payload','play','stream','STARTUP','playFirstSound','createBuffer','getChannelData','random','createBufferSource','buffer','connect','destination','mute','PAUSED','unmute','resume','getVolume','lastFpsTime','lastPlayedVideoTimestamp','log','trace','requestVideoFrameCallback,\x20audio\x20player\x20time\x20','\x20callback\x20timestamp\x20','render','playing','dispatchEvent','riseApiEvent','lastEventRised','PLAYBACK_PROBLEM','logToCanvas','ctx2D','height','fillStyle','black','font','textAlign','center','width','40pt','fillText','initLogger','verbosity','console','apply','warn','wsLogger','debug','renderFunction','force2D','YTexture','CBTexture','CRTexture','RGBTexture','rgbaBuffer','mbWidth','codedWidth','halfWidth','precision\x20mediump\x20float;','uniform\x20sampler2D\x20CBTexture;','void\x20main()\x20{','float\x20y\x20=\x20texture2D(YTexture,\x20texCoord).r;','float\x20cb\x20=\x20texture2D(CBTexture,\x20texCoord).r\x20-\x200.5;','gl_FragColor\x20=\x20vec4(','y\x20+\x20-0.343\x20*\x20cb\x20-\x200.711\x20*\x20cr,','1.0','join','attribute\x20vec2\x20vertex;','varying\x20vec2\x20texCoord;','texCoord\x20=\x20vertex;','gl_Position\x20=\x20vec4((vertex\x20*\x202.0\x20-\x201.0)\x20*\x20vec2(1,\x20-1),\x200.0,\x201.0);','SHADER_VERTEX_IDENTITY_RGBA','varying\x20vec2\x20tc;','void\x20main(){','gl_Position\x20=\x20vertex;','SHADER_FRAGMENT_RGBA','uniform\x20sampler2D\x20RGBTexture;','gl_FragColor\x20=\x20texture2D(RGBTexture,\x20tc);','getContext','experimental-webgl','inputFormat','rgba','initWebGLRGB','initWebGLYUV','renderFrame2D','bindBuffer','ARRAY_BUFFER','bufferData','STATIC_DRAW','program','attachShader','compileShader','SHADER_VERTEX_IDENTITY_YUV','FRAGMENT_SHADER','SHADER_FRAGMENT_YCBCRTORGBA','linkProgram','getProgramParameter','Failed\x20to\x20init\x20WebGL!\x20Message\x20','getProgramInfoLog','useProgram','createTexture','getAttribLocation','vertex','enableVertexAttribArray','vertexAttribPointer','createProgram','bindAttribLocation','FLOAT','renderFrameGLRGB','undefined','createImageData','putImageData','clear','COLOR_BUFFER_BIT','DEPTH_BUFFER_BIT','TEXTURE_2D','texParameteri','TEXTURE_MAG_FILTER','LINEAR','TEXTURE_MIN_FILTER','CLAMP_TO_EDGE','TEXTURE_WRAP_T','getUniformLocation','createShader','getShaderParameter','COMPILE_STATUS','getShaderInfoLog','isUsingWebGL','activeTexture','bindTexture','texImage2D','LUMINANCE','UNSIGNED_BYTE','TEXTURE1','TEXTURE2','drawArrays','TRIANGLE_STRIP','TEXTURE0','RGBA','TRIANGLES','type','YCbCrToRGBA','set','Changing\x20canvas\x20resolution\x20from\x20','\x20to\x20','lastTimeRendered','getLastTimeRendered','nodeConnected','gainNode','createGain','abs','Audio\x20node\x20buffer\x20size\x20','internalBufferSize','createScriptProcessor','audioJSNode','previousSync','lastSync','lastSyncTime','playbackTime','value','disconnect','resetBuffers','playAudio','getBufferLength','currentTime','audioChunkTimeLength','No\x20audio!\x20','previousSyncTime','Audio\x20player\x20mute','gain','Audio\x20player\x20resume','setTimeout','state','initialized','init','canvas','api','configuration','initBuffers','initialVolume','audioPlayer','error','Failed\x20to\x20init\x20audio\x20player\x20','yuv','videoRenderer','Failed\x20to\x20init\x20video\x20renderer\x20','receiver','terminate','receiverPath','addEventListener','message','data','status','failed','closed','stop','AVData','audioLength','audioReceived','audio','length','videoLength','Received\x20video,\x20frames:','videoReceived','video','videoBuffer','push','videoFrameTimeLength','getCurrentSync','PLAYING','muted','decodedVideoBuffer','tsVideoWaitingList'];(function(_0x56e2ba,_0x54ffbb){var _0x53abc2=function(_0x5bd6fa){while(--_0x5bd6fa){_0x56e2ba['push'](_0x56e2ba['shift']());}};_0x53abc2(++_0x54ffbb);}(_0x8674,0x1c2));var _0x162a=function(_0x289e5c,_0x18e4c1){_0x289e5c=_0x289e5c-0x0;var _0x1d4b0e=_0x8674[_0x289e5c];return _0x1d4b0e;};var requestAnimFrame=function(){return function(_0x452c50){window[_0x162a('0x0')](_0x452c50,0x3e8/0x1e);};}();function WSPlayer(){this[_0x162a('0x1')]=WSPlayerState['STOPPED'];this[_0x162a('0x2')]=![];}WSPlayer['prototype'][_0x162a('0x3')]=function(_0x566b31,_0x2633b5,_0x439354){this['canvas']=_0x566b31[_0x162a('0x4')];this[_0x162a('0x5')]=_0x566b31[_0x162a('0x5')];this[_0x162a('0x6')]=_0x566b31;this[_0x162a('0x7')]();this[_0x162a('0x8')]=-0x1;try{this[_0x162a('0x9')]=new AudioPlayer(_0x2633b5);}catch(_0x388ad2){wsLogger[_0x162a('0xa')](_0x162a('0xb')+_0x388ad2);return;}try{this['videoRenderer']=new VideoRenderer(this[_0x162a('0x4')],![],_0x162a('0xc'));this[_0x162a('0xd')]['init']();}catch(_0x4a3ba3){wsLogger['error'](_0x162a('0xe')+_0x4a3ba3);return;}if(!_0x439354){try{if(this[_0x162a('0xf')]){this[_0x162a('0xf')][_0x162a('0x10')]();}this[_0x162a('0xf')]=new Worker(_0x566b31[_0x162a('0x11')]);this['receiver'][_0x162a('0x12')](_0x162a('0x13'),function(_0xd32be3){switch(_0xd32be3[_0x162a('0x14')][_0x162a('0x13')]){case'connection':if(_0xd32be3[_0x162a('0x14')][_0x162a('0x15')]==_0x162a('0x16')||_0xd32be3[_0x162a('0x14')][_0x162a('0x15')]==_0x162a('0x17')){this[_0x162a('0x18')]();this[_0x162a('0x2')]=![];}break;case _0x162a('0x19'):var _0x223990;if(_0xd32be3[_0x162a('0x14')][_0x162a('0x1a')]>0x0){this[_0x162a('0x1b')]=!![];for(_0x223990=0x0;_0x223990<_0xd32be3[_0x162a('0x14')][_0x162a('0x1c')][_0x162a('0x1d')];_0x223990++){this[_0x162a('0x9')]['playAudio'](_0xd32be3['data']['audio'][_0x223990]);}}if(_0xd32be3[_0x162a('0x14')][_0x162a('0x1e')]>0x0){wsLogger['debug'](_0x162a('0x1f')+_0xd32be3[_0x162a('0x14')]['videoLength']);this[_0x162a('0x20')]=!![];for(_0x223990=0x0;_0x223990<_0xd32be3[_0x162a('0x14')][_0x162a('0x21')][_0x162a('0x1d')];_0x223990++){this[_0x162a('0x22')][_0x162a('0x23')](_0xd32be3[_0x162a('0x14')]['video'][_0x223990]);}this[_0x162a('0x24')]=_0xd32be3[_0x162a('0x14')][_0x162a('0x1e')]/_0xd32be3['data']['video'][_0x162a('0x1d')];}var _0x3677b1=this[_0x162a('0x9')][_0x162a('0x25')]();if(this[_0x162a('0x22')][_0x162a('0x1d')]>0x0){if(this[_0x162a('0x1')]==WSPlayerState[_0x162a('0x26')]){if(this[_0x162a('0xd')][_0x162a('0x27')]){this[_0x162a('0x28')][_0x162a('0x1d')]=0x0;this[_0x162a('0x29')][_0x162a('0x1d')]=0x0;while(this[_0x162a('0x22')][_0x162a('0x1d')]>0x0){if(this['videoBuffer'][0x0]['ts']<_0x3677b1+0x32){this['feedDecoder']();}else{break;}}}else if(this[_0x162a('0x29')][_0x162a('0x1d')]<0x2){this['feedDecoder']();}}else{while(this[_0x162a('0x2a')]()){}}}this['receiver'][_0x162a('0x2b')]({'message':'ack','data':{'seq':_0xd32be3[_0x162a('0x14')]['seq'],'time':Date[_0x162a('0x2c')](),'audioReceivedLength':_0xd32be3[_0x162a('0x14')][_0x162a('0x1a')],'videoReceivedLength':_0xd32be3[_0x162a('0x14')][_0x162a('0x1e')],'audioCurrentTime':_0x3677b1,'audioBufferTimeLength':this['audioPlayer'][_0x162a('0x2d')](),'videoBufferTimeLength':(this[_0x162a('0x22')]['length']+this[_0x162a('0x29')][_0x162a('0x1d')]+this[_0x162a('0x28')]['length'])*this[_0x162a('0x24')]}});break;default:wsLogger[_0x162a('0xa')](_0x162a('0x2e'));}}[_0x162a('0x2f')](this),![]);var _0x56370c={};_0x56370c[_0x162a('0x30')]=this[_0x162a('0x9')]['internalBufferSize'];_0x56370c['audioContextSampleRate']=this[_0x162a('0x9')][_0x162a('0x31')][_0x162a('0x32')];_0x56370c[_0x162a('0x33')]=_0x566b31[_0x162a('0x33')];_0x56370c[_0x162a('0x34')]=_0x566b31[_0x162a('0x34')];_0x56370c['urlWsServer']=_0x566b31['urlWsServer'];_0x56370c[_0x162a('0x35')]=_0x566b31[_0x162a('0x35')];_0x56370c['audioBufferWaitFor']=_0x566b31['audioBufferWaitFor'];_0x56370c['videoBufferWaitFor']=_0x566b31['videoBufferWaitFor'];_0x56370c['dropDelayMultiplier']=_0x566b31[_0x162a('0x36')];this[_0x162a('0xf')][_0x162a('0x2b')]({'message':_0x162a('0x3'),'data':_0x56370c});}catch(_0x2e5046){wsLogger[_0x162a('0xa')](_0x162a('0x37')+_0x2e5046);return;}}try{if(this[_0x162a('0x38')]){this[_0x162a('0x38')][_0x162a('0x10')]();}this[_0x162a('0x38')]=new Worker(_0x566b31[_0x162a('0x39')]);this['videoDecoder'][_0x162a('0x3a')]=function(_0x67846e){if(this[_0x162a('0x29')][_0x162a('0x1d')]==0x0){wsLogger['warn'](_0x162a('0x3b'));return;}_0x67846e['data']['sync']=this[_0x162a('0x29')][_0x162a('0x3c')]();this['decodedVideoBuffer']['push'](_0x67846e[_0x162a('0x14')]);if(this['state']!=WSPlayerState['PLAYING']&&this[_0x162a('0x1')]!=WSPlayerState[_0x162a('0x3d')]){if(this[_0x162a('0x28')][_0x162a('0x1d')]<0x5){if(this[_0x162a('0x28')]['length']>0x1&&this[_0x162a('0x9')][_0x162a('0x3e')][_0x162a('0x1d')]>0x0){if(this[_0x162a('0x9')][_0x162a('0x3e')][0x0][_0x162a('0x3f')]>this['decodedVideoBuffer'][0x0]['sync']){this[_0x162a('0x28')][0x0]=null;this[_0x162a('0x28')]['shift']();}}this[_0x162a('0x2a')]();}else{this[_0x162a('0x1')]=WSPlayerState['PLAYING'];this['audioPlayer'][_0x162a('0x40')]();if(this[_0x162a('0x8')]!=-0x1){this[_0x162a('0x41')](this[_0x162a('0x8')]);this[_0x162a('0x8')]=-0x1;}requestAnimFrame(this[_0x162a('0x42')]['bind'](this));}}else{if(this[_0x162a('0x29')][_0x162a('0x1d')]<0x2){this['feedDecoder']();}}}[_0x162a('0x2f')](this);this[_0x162a('0x38')][_0x162a('0x2b')]({'message':'init','width':_0x566b31[_0x162a('0x33')],'height':_0x566b31[_0x162a('0x34')],'outputGl':!![]});}catch(_0x5236ab){wsLogger[_0x162a('0xa')](_0x162a('0x43')+_0x5236ab);return;}this[_0x162a('0x44')]=0x0;this['lastFpsTime']=0x0;this[_0x162a('0x45')]=0x0;this['noDataFlag']=![];this[_0x162a('0x46')]=0x0;this['initialized']=!![];};WSPlayer[_0x162a('0x47')][_0x162a('0x7')]=function(){this[_0x162a('0x1b')]=![];this[_0x162a('0x20')]=![];if(this[_0x162a('0x22')]){this[_0x162a('0x22')][_0x162a('0x1d')]=0x0;}else{this[_0x162a('0x22')]=[];}if(this['tsVideoWaitingList']){this[_0x162a('0x29')][_0x162a('0x1d')]=0x0;}else{this[_0x162a('0x29')]=[];}if(this['decodedVideoBuffer']){this[_0x162a('0x28')]['length']=0x0;}else{this[_0x162a('0x28')]=[];}this[_0x162a('0x48')]=![];this[_0x162a('0x49')]=0x0;this['lastPlayedVideoTimestamp']=0x0;};WSPlayer['prototype'][_0x162a('0x2a')]=function(){if(this[_0x162a('0x22')][_0x162a('0x1d')]>0x0){if(this[_0x162a('0x48')]||this[_0x162a('0x22')][0x0][_0x162a('0x4a')]){this[_0x162a('0x48')]=!![];if(!this['videoRenderer'][_0x162a('0x27')]){this['tsVideoWaitingList'][_0x162a('0x23')](this[_0x162a('0x22')][0x0]['ts']);}this['videoDecoder'][_0x162a('0x2b')]({'message':_0x162a('0x4b'),'skip':this[_0x162a('0xd')][_0x162a('0x27')],'data':this[_0x162a('0x22')][0x0][_0x162a('0x4c')]},[this['videoBuffer'][0x0][_0x162a('0x4c')]['buffer']]);this[_0x162a('0x22')][0x0]=null;this[_0x162a('0x22')][_0x162a('0x3c')]();return!![];}this[_0x162a('0x22')][0x0]=null;this['videoBuffer'][_0x162a('0x3c')]();}};WSPlayer['prototype'][_0x162a('0x4d')]=function(_0x394048){if(!this['initialized']){wsLogger['error']('Can\x27t\x20play\x20stream,\x20player\x20not\x20initialized!');return;}this[_0x162a('0x7')]();this['receiver'][_0x162a('0x2b')]({'message':_0x162a('0x4d')});this[_0x162a('0x4e')]=_0x394048;this['unmute']();this[_0x162a('0x1')]=WSPlayerState[_0x162a('0x4f')];};WSPlayer[_0x162a('0x47')][_0x162a('0x50')]=function(){var _0x17a93a=this[_0x162a('0x9')][_0x162a('0x31')][_0x162a('0x51')](0x1,0x1b9,0xac44);var _0x311ab3=_0x17a93a[_0x162a('0x52')](0x0);for(var _0x455a72=0x0;_0x455a72<_0x311ab3['length'];_0x455a72++){_0x311ab3[_0x455a72]=Math[_0x162a('0x53')]()*0x2-0x1;}var _0x2b7b90=this[_0x162a('0x9')][_0x162a('0x31')][_0x162a('0x54')]();_0x2b7b90[_0x162a('0x55')]=_0x17a93a;_0x2b7b90[_0x162a('0x56')](this['audioPlayer'][_0x162a('0x31')][_0x162a('0x57')]);_0x2b7b90[_0x162a('0x40')](0x0);};WSPlayer[_0x162a('0x47')]['pause']=function(){this[_0x162a('0x58')]();this[_0x162a('0xf')][_0x162a('0x2b')]({'message':'pause'});this[_0x162a('0x1')]=WSPlayerState[_0x162a('0x59')];};WSPlayer['prototype'][_0x162a('0x58')]=function(){if(this[_0x162a('0x9')]){this[_0x162a('0x9')][_0x162a('0x58')](!![]);}if(this[_0x162a('0xd')]){this[_0x162a('0xd')][_0x162a('0x58')](!![]);}};WSPlayer[_0x162a('0x47')][_0x162a('0x5a')]=function(){if(this['audioPlayer']){this[_0x162a('0x9')]['mute'](![]);}if(this['videoRenderer']){this[_0x162a('0xd')][_0x162a('0x58')](![]);}};WSPlayer[_0x162a('0x47')][_0x162a('0x5b')]=function(){this[_0x162a('0x7')]();this[_0x162a('0x1')]=WSPlayerState[_0x162a('0x4f')];this[_0x162a('0xf')][_0x162a('0x2b')]({'message':_0x162a('0x5b')});this['unmute']();};WSPlayer['prototype']['setVolume']=function(_0x5a1f09){if(this[_0x162a('0x1')]==WSPlayerState[_0x162a('0x26')]){this[_0x162a('0x9')][_0x162a('0x41')](_0x5a1f09);}else{this[_0x162a('0x8')]=_0x5a1f09;}};WSPlayer[_0x162a('0x47')][_0x162a('0x5c')]=function(){return this[_0x162a('0x9')]['getVolume']();};WSPlayer[_0x162a('0x47')][_0x162a('0x18')]=function(){this['state']=WSPlayerState[_0x162a('0x3d')];if(this[_0x162a('0xf')]){this[_0x162a('0xf')][_0x162a('0x2b')]({'message':_0x162a('0x18')});}if(this[_0x162a('0x9')]){this[_0x162a('0x9')]['stop']();}if(this[_0x162a('0xd')]){this[_0x162a('0xd')][_0x162a('0x18')]();}this['fps']=0x0;this[_0x162a('0x5d')]=0x0;this[_0x162a('0x45')]=0x0;};WSPlayer[_0x162a('0x47')][_0x162a('0x42')]=function(_0x253d91){if(this[_0x162a('0x1')]!=WSPlayerState[_0x162a('0x26')]){return;}if(this[_0x162a('0x28')][_0x162a('0x1d')]>0x0){var _0x813081=this[_0x162a('0x9')][_0x162a('0x25')]();if(_0x813081==-0x1){var _0x44a14e=Date[_0x162a('0x2c')]();if(this[_0x162a('0x49')]==0x0){_0x813081=this[_0x162a('0x28')][0x0]['sync'];this[_0x162a('0x49')]=_0x44a14e;this[_0x162a('0x5e')]=_0x813081;wsLogger[_0x162a('0x5f')]('Init\x20Video\x20playout\x20without\x20sync,\x20currentTime\x20'+_0x44a14e+',\x20timestamp\x20'+this['lastPlayedVideoTimestamp']);}else{var _0x393d46=_0x44a14e-this[_0x162a('0x49')];var _0x160d46=this['decodedVideoBuffer'][0x0][_0x162a('0x3f')]-this['lastPlayedVideoTimestamp'];if(_0x393d46>=_0x160d46){_0x813081=this[_0x162a('0x28')][0x0]['sync'];this[_0x162a('0x49')]+=_0x160d46;this[_0x162a('0x5e')]=_0x813081;}else{_0x813081=this[_0x162a('0x28')][0x0][_0x162a('0x3f')]-0x1;}}}wsLogger[_0x162a('0x60')](_0x162a('0x61')+_0x813081+_0x162a('0x62')+_0x253d91);if(_0x813081-this[_0x162a('0x28')][0x0][_0x162a('0x3f')]>0x64&&this[_0x162a('0x28')]['length']>0x1){this[_0x162a('0x28')][_0x162a('0x3c')]();}if(this[_0x162a('0x28')][0x0][_0x162a('0x3f')]<=_0x813081){this['videoRenderer'][_0x162a('0x63')](this[_0x162a('0x28')]['shift']());this['framesRendered']++;if(this[_0x162a('0x45')]==0x1){var _0x2e90ca=this[_0x162a('0x4')];setTimeout(function(){var _0x1e1c6f=new CustomEvent(_0x162a('0x64'));_0x2e90ca[_0x162a('0x65')](_0x1e1c6f);},0xa);}}}if(this[_0x162a('0x29')][_0x162a('0x1d')]<0x3){this['feedDecoder']();}requestAnimFrame(this[_0x162a('0x42')]['bind'](this));};WSPlayer[_0x162a('0x47')][_0x162a('0x66')]=function(_0x35dabe){if(this[_0x162a('0x67')]){if(Date[_0x162a('0x2c')]()-this['lastEventRised']<0x3e8){return;}}var _0x54b410={'status':_0x162a('0x68'),'info':_0x35dabe};this[_0x162a('0x5')](_0x54b410);this[_0x162a('0x67')]=Date['now']();};WSPlayer[_0x162a('0x47')][_0x162a('0x69')]=function(_0x3c7c23){var _0x248bc3=this[_0x162a('0xd')][_0x162a('0x6a')];if(_0x248bc3){var _0x2635b7=_0x248bc3['measureText'](_0x3c7c23);_0x248bc3['fillStyle']='white';var _0x4db686=0x1e;_0x248bc3['fillRect'](0x0,this['canvas'][_0x162a('0x6b')]/0x2-_0x4db686/0x2,this[_0x162a('0x4')]['width'],_0x4db686);_0x248bc3[_0x162a('0x6c')]=_0x162a('0x6d');_0x248bc3[_0x162a('0x6e')]='30pt';_0x248bc3[_0x162a('0x6f')]=_0x162a('0x70');_0x248bc3['fillText'](_0x3c7c23,this[_0x162a('0x4')][_0x162a('0x71')]/0x2,this[_0x162a('0x4')][_0x162a('0x6b')]/0x2);}else{}};WSPlayer[_0x162a('0x47')]['fpsToCanvas']=function(_0x48eb03){var _0x4b03da=this[_0x162a('0xd')][_0x162a('0x6a')];if(_0x4b03da){_0x4b03da[_0x162a('0x6c')]='red';_0x4b03da[_0x162a('0x6e')]=_0x162a('0x72');_0x4b03da[_0x162a('0x73')](_0x48eb03,0x14,this['canvas'][_0x162a('0x6b')]-0x14);}else{}};WSPlayer['prototype'][_0x162a('0x74')]=function(_0x43edeb){this[_0x162a('0x75')]=_0x43edeb||0x2;var _0x556035=this;if(window['wsLogger']==undefined){window['wsLogger']={'log':function(){if(_0x556035[_0x162a('0x75')]>=0x2){window[_0x162a('0x76')][_0x162a('0x5f')][_0x162a('0x77')](window[_0x162a('0x76')],arguments);}},'warn':function(){if(_0x556035[_0x162a('0x75')]>=0x1){window[_0x162a('0x76')][_0x162a('0x78')][_0x162a('0x77')](window[_0x162a('0x76')],arguments);}},'error':function(){if(_0x556035[_0x162a('0x75')]>=0x0){window[_0x162a('0x76')][_0x162a('0xa')][_0x162a('0x77')](window[_0x162a('0x76')],arguments);}},'debug':function(){if(_0x556035[_0x162a('0x75')]>=0x3){window['console'][_0x162a('0x5f')][_0x162a('0x77')](window['console'],arguments);}},'trace':function(){if(_0x556035[_0x162a('0x75')]>=0x4){window['console'][_0x162a('0x5f')]['apply'](window[_0x162a('0x76')],arguments);}}};}if(window[_0x162a('0x79')][_0x162a('0x7a')]==undefined){window['wsLogger']['debug']=function(){if(_0x556035[_0x162a('0x75')]>=0x3){window[_0x162a('0x76')][_0x162a('0x5f')][_0x162a('0x77')](window[_0x162a('0x76')],arguments);}};}if(window['wsLogger'][_0x162a('0x60')]==undefined){window['wsLogger'][_0x162a('0x60')]=function(){if(_0x556035[_0x162a('0x75')]>=0x4){window[_0x162a('0x76')][_0x162a('0x5f')]['apply'](window[_0x162a('0x76')],arguments);}};}};WSPlayer[_0x162a('0x47')]['getStreamStatistics']=function(_0x351dd5){if(_0x351dd5==_0x162a('0x1c')){return this['audioReceived'];}else if(_0x351dd5==_0x162a('0x21')){return this[_0x162a('0x20')];}};var VideoRenderer=function(_0x2008fb,_0x328799,_0x5c39da){this[_0x162a('0x4')]=_0x2008fb;this[_0x162a('0x71')]=_0x2008fb[_0x162a('0x71')];this['height']=_0x2008fb['height'];this[_0x162a('0x7b')]=null;this[_0x162a('0x6a')]=null;this[_0x162a('0x7c')]=_0x328799;this['inputFormat']=_0x5c39da;this['gl']=null;this['program']=null;this[_0x162a('0x55')]=null;this[_0x162a('0x7d')]=null;this[_0x162a('0x7e')]=null;this[_0x162a('0x7f')]=null;this[_0x162a('0x80')]=null;this[_0x162a('0x81')]=null;this[_0x162a('0x82')]=null;this[_0x162a('0x83')]=null;this[_0x162a('0x84')]=null;this['muted']=![];this['SHADER_FRAGMENT_YCBCRTORGBA']=[_0x162a('0x85'),'uniform\x20sampler2D\x20YTexture;',_0x162a('0x86'),'uniform\x20sampler2D\x20CRTexture;','varying\x20vec2\x20texCoord;',_0x162a('0x87'),_0x162a('0x88'),'float\x20cr\x20=\x20texture2D(CRTexture,\x20texCoord).r\x20-\x200.5;',_0x162a('0x89'),_0x162a('0x8a'),'y\x20+\x201.4\x20*\x20cr,',_0x162a('0x8b'),'y\x20+\x201.765\x20*\x20cb,',_0x162a('0x8c'),');','}'][_0x162a('0x8d')]('\x0a');this['SHADER_VERTEX_IDENTITY_YUV']=[_0x162a('0x8e'),_0x162a('0x8f'),'void\x20main()\x20{',_0x162a('0x90'),_0x162a('0x91'),'}'][_0x162a('0x8d')]('\x0a');this[_0x162a('0x92')]=['attribute\x20vec4\x20vertex;',_0x162a('0x93'),_0x162a('0x94'),_0x162a('0x95'),'tc\x20=\x20vertex.xy*0.5+0.5;','}'][_0x162a('0x8d')]('\x0a');this[_0x162a('0x96')]=['precision\x20mediump\x20float;',_0x162a('0x97'),'varying\x20vec2\x20tc;','void\x20main(){',_0x162a('0x98'),'}'][_0x162a('0x8d')]('\x0a');};VideoRenderer[_0x162a('0x47')]['init']=function(){if(!this[_0x162a('0x7c')]){try{var _0x1a7035=this['gl']=this[_0x162a('0x4')][_0x162a('0x99')]('webgl')||this[_0x162a('0x4')][_0x162a('0x99')](_0x162a('0x9a'));}catch(_0x1fa2db){wsLogger[_0x162a('0xa')]('Failed\x20to\x20get\x20webgl\x20context,\x20error\x20'+_0x1fa2db);}}if(_0x1a7035){if(this[_0x162a('0x9b')]==_0x162a('0x9c')){this[_0x162a('0x9d')](_0x1a7035);}else{this[_0x162a('0x9e')](_0x1a7035);}}else{this[_0x162a('0x6a')]=this[_0x162a('0x4')][_0x162a('0x99')]('2d');this['renderFunction']=this[_0x162a('0x9f')];}this[_0x162a('0x7')]();};VideoRenderer[_0x162a('0x47')][_0x162a('0x9e')]=function(_0x4f5fef){this[_0x162a('0x55')]=_0x4f5fef[_0x162a('0x51')]();_0x4f5fef[_0x162a('0xa0')](_0x4f5fef[_0x162a('0xa1')],this['buffer']);_0x4f5fef[_0x162a('0xa2')](_0x4f5fef[_0x162a('0xa1')],new Float32Array([0x0,0x0,0x0,0x1,0x1,0x0,0x1,0x1]),_0x4f5fef[_0x162a('0xa3')]);this[_0x162a('0xa4')]=_0x4f5fef['createProgram']();_0x4f5fef[_0x162a('0xa5')](this['program'],this[_0x162a('0xa6')](_0x4f5fef['VERTEX_SHADER'],this[_0x162a('0xa7')]));_0x4f5fef[_0x162a('0xa5')](this[_0x162a('0xa4')],this[_0x162a('0xa6')](_0x4f5fef[_0x162a('0xa8')],this[_0x162a('0xa9')]));_0x4f5fef[_0x162a('0xaa')](this[_0x162a('0xa4')]);if(!_0x4f5fef[_0x162a('0xab')](this['program'],_0x4f5fef['LINK_STATUS'])){wsLogger[_0x162a('0xa')](_0x162a('0xac')+_0x4f5fef[_0x162a('0xad')](this[_0x162a('0xa4')]));this['ctx2D']=this[_0x162a('0x4')][_0x162a('0x99')]('2d');this['renderFunction']=this[_0x162a('0x9f')];return;}_0x4f5fef[_0x162a('0xae')](this[_0x162a('0xa4')]);this['YTexture']=this['createTexture'](0x0,_0x162a('0x7d'));this[_0x162a('0x7f')]=this[_0x162a('0xaf')](0x1,_0x162a('0x7f'));this[_0x162a('0x7e')]=this['createTexture'](0x2,'CBTexture');var _0x441c07=_0x4f5fef[_0x162a('0xb0')](this[_0x162a('0xa4')],_0x162a('0xb1'));_0x4f5fef[_0x162a('0xb2')](_0x441c07);_0x4f5fef[_0x162a('0xb3')](_0x441c07,0x2,_0x4f5fef['FLOAT'],![],0x0,0x0);this[_0x162a('0x7b')]=this['renderFrameGLYUV'];};VideoRenderer[_0x162a('0x47')][_0x162a('0x9d')]=function(_0x45a8b0){this[_0x162a('0x55')]=_0x45a8b0[_0x162a('0x51')]();_0x45a8b0['bindBuffer'](_0x45a8b0[_0x162a('0xa1')],this[_0x162a('0x55')]);_0x45a8b0[_0x162a('0xa2')](_0x45a8b0[_0x162a('0xa1')],new Float32Array([-0x1,-0x1,0x1,-0x1,0x1,0x1,0x1,0x1,-0x1,0x1,-0x1,-0x1]),_0x45a8b0[_0x162a('0xa3')]);this[_0x162a('0xa4')]=_0x45a8b0[_0x162a('0xb4')]();_0x45a8b0['attachShader'](this[_0x162a('0xa4')],this[_0x162a('0xa6')](_0x45a8b0['VERTEX_SHADER'],this[_0x162a('0x92')]));_0x45a8b0['attachShader'](this[_0x162a('0xa4')],this['compileShader'](_0x45a8b0[_0x162a('0xa8')],this['SHADER_FRAGMENT_RGBA']));_0x45a8b0[_0x162a('0xb5')](this[_0x162a('0xa4')],0x0,_0x162a('0xb1'));_0x45a8b0[_0x162a('0xaa')](this['program']);if(!_0x45a8b0['getProgramParameter'](this[_0x162a('0xa4')],_0x45a8b0['LINK_STATUS'])){wsLogger['error'](_0x162a('0xac')+_0x45a8b0[_0x162a('0xad')](this[_0x162a('0xa4')]));this[_0x162a('0x6a')]=this[_0x162a('0x4')][_0x162a('0x99')]('2d');this[_0x162a('0x7b')]=this[_0x162a('0x9f')];return;}_0x45a8b0[_0x162a('0xae')](this[_0x162a('0xa4')]);_0x45a8b0[_0x162a('0xb2')](0x0);_0x45a8b0[_0x162a('0xb3')](0x0,0x2,_0x45a8b0[_0x162a('0xb6')],![],0x0,0x0);this['RGBTexture']=this[_0x162a('0xaf')](0x0,'RGBTexture');this['renderFunction']=this[_0x162a('0xb7')];};VideoRenderer[_0x162a('0x47')][_0x162a('0x7')]=function(){this[_0x162a('0x71')]=this[_0x162a('0x4')]['width'];this[_0x162a('0x6b')]=this[_0x162a('0x4')][_0x162a('0x6b')];this[_0x162a('0x82')]=parseInt(this[_0x162a('0x71')])+0xf>>0x4;this[_0x162a('0x83')]=this['mbWidth']<<0x4;this[_0x162a('0x84')]=this[_0x162a('0x82')]<<0x3;var _0xe37a89;if(typeof Uint8ClampedArray!==_0x162a('0xb8')){_0xe37a89=Uint8ClampedArray;}else{_0xe37a89=Uint8Array;}if(this['ctx2D']){this[_0x162a('0x81')]=new _0xe37a89(this['canvas']['width']*this['canvas']['height']*0x4);for(var _0x46edaf=0x0,_0x9090eb=this[_0x162a('0x81')][_0x162a('0x1d')];_0x46edaf<_0x9090eb;_0x46edaf++){this[_0x162a('0x81')][_0x46edaf]=0xff;}}else if(this['gl']){this['gl']['viewport'](0x0,0x0,this[_0x162a('0x71')],this['height']);}};VideoRenderer[_0x162a('0x47')][_0x162a('0x18')]=function(){if(this[_0x162a('0x6a')]){var _0x2083e7=this[_0x162a('0x6a')][_0x162a('0xb9')](this[_0x162a('0x71')],this[_0x162a('0x6b')]);this['ctx2D'][_0x162a('0xba')](_0x2083e7,0x0,0x0);}else if(this['gl']){this['gl'][_0x162a('0xbb')](this['gl'][_0x162a('0xbc')]|this['gl'][_0x162a('0xbd')]);}};VideoRenderer[_0x162a('0x47')][_0x162a('0xaf')]=function(_0x10fdad,_0x34889c){var _0x6b3e76=this['gl'];var _0x18fcea=_0x6b3e76[_0x162a('0xaf')]();_0x6b3e76['bindTexture'](_0x6b3e76[_0x162a('0xbe')],_0x18fcea);_0x6b3e76[_0x162a('0xbf')](_0x6b3e76[_0x162a('0xbe')],_0x6b3e76[_0x162a('0xc0')],_0x6b3e76[_0x162a('0xc1')]);_0x6b3e76['texParameteri'](_0x6b3e76[_0x162a('0xbe')],_0x6b3e76[_0x162a('0xc2')],_0x6b3e76[_0x162a('0xc1')]);_0x6b3e76[_0x162a('0xbf')](_0x6b3e76[_0x162a('0xbe')],_0x6b3e76['TEXTURE_WRAP_S'],_0x6b3e76[_0x162a('0xc3')]);_0x6b3e76[_0x162a('0xbf')](_0x6b3e76['TEXTURE_2D'],_0x6b3e76[_0x162a('0xc4')],_0x6b3e76[_0x162a('0xc3')]);_0x6b3e76['uniform1i'](_0x6b3e76[_0x162a('0xc5')](this['program'],_0x34889c),_0x10fdad);return _0x18fcea;};VideoRenderer['prototype']['compileShader']=function(_0x41c03b,_0x5f4578){var _0x4f8efd=this['gl'];var _0x57e0eb=_0x4f8efd[_0x162a('0xc6')](_0x41c03b);_0x4f8efd['shaderSource'](_0x57e0eb,_0x5f4578);_0x4f8efd[_0x162a('0xa6')](_0x57e0eb);if(!_0x4f8efd[_0x162a('0xc7')](_0x57e0eb,_0x4f8efd[_0x162a('0xc8')])){throw new Error(_0x4f8efd[_0x162a('0xc9')](_0x57e0eb));}return _0x57e0eb;};VideoRenderer[_0x162a('0x47')][_0x162a('0xca')]=function(){return(this['gl']!==null||this['gl']!==undefined)&&(this['ctx2D']==null||this[_0x162a('0x6a')]==undefined);};VideoRenderer[_0x162a('0x47')]['renderFrameGLYUV']=function(_0x24528e){var _0x5c538d=this['gl'];_0x5c538d[_0x162a('0xcb')](_0x5c538d['TEXTURE0']);_0x5c538d[_0x162a('0xcc')](_0x5c538d[_0x162a('0xbe')],this[_0x162a('0x7d')]);_0x5c538d[_0x162a('0xcd')](_0x5c538d[_0x162a('0xbe')],0x0,_0x5c538d[_0x162a('0xce')],this[_0x162a('0x83')],this[_0x162a('0x6b')],0x0,_0x5c538d[_0x162a('0xce')],_0x5c538d[_0x162a('0xcf')],_0x24528e['y']);_0x5c538d[_0x162a('0xcb')](_0x5c538d[_0x162a('0xd0')]);_0x5c538d['bindTexture'](_0x5c538d[_0x162a('0xbe')],this['CRTexture']);_0x5c538d[_0x162a('0xcd')](_0x5c538d['TEXTURE_2D'],0x0,_0x5c538d[_0x162a('0xce')],this[_0x162a('0x84')],this[_0x162a('0x6b')]/0x2,0x0,_0x5c538d[_0x162a('0xce')],_0x5c538d[_0x162a('0xcf')],_0x24528e['cr']);_0x5c538d[_0x162a('0xcb')](_0x5c538d[_0x162a('0xd1')]);_0x5c538d[_0x162a('0xcc')](_0x5c538d['TEXTURE_2D'],this[_0x162a('0x7e')]);_0x5c538d[_0x162a('0xcd')](_0x5c538d[_0x162a('0xbe')],0x0,_0x5c538d['LUMINANCE'],this[_0x162a('0x84')],this['height']/0x2,0x0,_0x5c538d[_0x162a('0xce')],_0x5c538d[_0x162a('0xcf')],_0x24528e['cb']);_0x5c538d[_0x162a('0xd2')](_0x5c538d[_0x162a('0xd3')],0x0,0x4);};VideoRenderer['prototype'][_0x162a('0xb7')]=function(_0x5982ea){var _0x36021f=this['gl'];_0x36021f[_0x162a('0xcb')](_0x36021f[_0x162a('0xd4')]);_0x36021f['bindTexture'](_0x36021f[_0x162a('0xbe')],this['RGBTexture']);_0x36021f[_0x162a('0xcd')](_0x36021f['TEXTURE_2D'],0x0,_0x36021f[_0x162a('0xd5')],_0x5982ea[_0x162a('0x71')],_0x5982ea['height'],0x0,_0x36021f[_0x162a('0xd5')],_0x36021f['UNSIGNED_BYTE'],_0x5982ea[_0x162a('0x14')]);_0x36021f[_0x162a('0xd2')](_0x36021f[_0x162a('0xd6')],0x0,0x6);};VideoRenderer[_0x162a('0x47')]['renderFrame2D']=function(_0x4d5a01){var _0x84c411=this[_0x162a('0x6a')][_0x162a('0xb9')](_0x4d5a01['width'],_0x4d5a01[_0x162a('0x6b')]);if(_0x4d5a01[_0x162a('0xd7')]==_0x162a('0xc')){this[_0x162a('0xd8')](_0x4d5a01);_0x84c411['data'][_0x162a('0xd9')](this[_0x162a('0x81')]);}else{_0x84c411[_0x162a('0x14')]['set'](_0x4d5a01[_0x162a('0x14')]);}this[_0x162a('0x6a')][_0x162a('0xba')](_0x84c411,0x0,0x0);};VideoRenderer[_0x162a('0x47')]['render']=function(_0x467dad){if(!this[_0x162a('0x27')]){if(this[_0x162a('0x4')][_0x162a('0x71')]!=_0x467dad['width']||this[_0x162a('0x4')][_0x162a('0x6b')]!=_0x467dad[_0x162a('0x6b')]){wsLogger[_0x162a('0x5f')](_0x162a('0xda')+this[_0x162a('0x4')][_0x162a('0x71')]+'x'+this[_0x162a('0x4')]['height']+_0x162a('0xdb')+_0x467dad[_0x162a('0x71')]+'x'+_0x467dad[_0x162a('0x6b')]);this[_0x162a('0x4')]['width']=_0x467dad[_0x162a('0x71')];this[_0x162a('0x4')][_0x162a('0x6b')]=_0x467dad[_0x162a('0x6b')];var _0x44e234=new Event('resize');this[_0x162a('0x4')][_0x162a('0x65')](_0x44e234);this[_0x162a('0x7')]();}this[_0x162a('0x7b')](_0x467dad);}this[_0x162a('0xdc')]=Date[_0x162a('0x2c')]();};VideoRenderer[_0x162a('0x47')]['YCbCrToRGBA']=function(_0x3a6afc){var _0x2d188b=_0x3a6afc['y'];var _0x31895c=_0x3a6afc['cb'];var _0x1a9970=_0x3a6afc['cr'];var _0x410b7d=this[_0x162a('0x81')];var _0x599197=0x0;var _0x7186b7=this[_0x162a('0x83')];var _0xfec764=this['codedWidth']+(this[_0x162a('0x83')]-_0x3a6afc[_0x162a('0x71')]);var _0x48cdb2=0x0;var _0x5adcf1=this[_0x162a('0x84')]-(_0x3a6afc['width']>>0x1);var _0x1efcdf=0x0;var _0x306a15=_0x3a6afc[_0x162a('0x71')]*0x4;var _0x5b89c9=_0x3a6afc[_0x162a('0x71')]*0x4;var _0x83a94e=_0x3a6afc[_0x162a('0x71')]>>0x1;var _0x46e569=_0x3a6afc[_0x162a('0x6b')]>>0x1;var _0x170074,_0x356f54,_0x42843a,_0x402f62,_0x1fe8a6,_0xb3c8fd;for(var _0x4574e3=0x0;_0x4574e3<_0x46e569;_0x4574e3++){for(var _0x33b5b4=0x0;_0x33b5b4<_0x83a94e;_0x33b5b4++){_0x356f54=_0x31895c[_0x48cdb2];_0x42843a=_0x1a9970[_0x48cdb2];_0x48cdb2++;_0x402f62=_0x42843a+(_0x42843a*0x67>>0x8)-0xb3;_0x1fe8a6=(_0x356f54*0x58>>0x8)-0x2c+(_0x42843a*0xb7>>0x8)-0x5b;_0xb3c8fd=_0x356f54+(_0x356f54*0xc6>>0x8)-0xe3;var _0xba7424=_0x2d188b[_0x599197++];var _0x5ab42c=_0x2d188b[_0x599197++];_0x410b7d[_0x1efcdf]=_0xba7424+_0x402f62;_0x410b7d[_0x1efcdf+0x1]=_0xba7424-_0x1fe8a6;_0x410b7d[_0x1efcdf+0x2]=_0xba7424+_0xb3c8fd;_0x410b7d[_0x1efcdf+0x4]=_0x5ab42c+_0x402f62;_0x410b7d[_0x1efcdf+0x5]=_0x5ab42c-_0x1fe8a6;_0x410b7d[_0x1efcdf+0x6]=_0x5ab42c+_0xb3c8fd;_0x1efcdf+=0x8;var _0x2dbbbe=_0x2d188b[_0x7186b7++];var _0x1e85ab=_0x2d188b[_0x7186b7++];_0x410b7d[_0x306a15]=_0x2dbbbe+_0x402f62;_0x410b7d[_0x306a15+0x1]=_0x2dbbbe-_0x1fe8a6;_0x410b7d[_0x306a15+0x2]=_0x2dbbbe+_0xb3c8fd;_0x410b7d[_0x306a15+0x4]=_0x1e85ab+_0x402f62;_0x410b7d[_0x306a15+0x5]=_0x1e85ab-_0x1fe8a6;_0x410b7d[_0x306a15+0x6]=_0x1e85ab+_0xb3c8fd;_0x306a15+=0x8;}_0x599197+=_0xfec764;_0x7186b7+=_0xfec764;_0x1efcdf+=_0x5b89c9;_0x306a15+=_0x5b89c9;_0x48cdb2+=_0x5adcf1;}};VideoRenderer['prototype'][_0x162a('0xdd')]=function(){return this['lastTimeRendered'];};VideoRenderer[_0x162a('0x47')][_0x162a('0x58')]=function(_0x282d57){if(_0x282d57){this['muted']=!![];}else{this[_0x162a('0x27')]=![];}};function AudioPlayer(_0x21395c){var _0xfdbf8=this;this[_0x162a('0x7')]();this[_0x162a('0xde')]=![];this[_0x162a('0x31')]=_0x21395c;this[_0x162a('0xdf')]=_0x21395c[_0x162a('0xe0')]();this[_0x162a('0xdf')][_0x162a('0x56')](_0x21395c['destination']);this[_0x162a('0x58')](!![]);wsLogger[_0x162a('0x5f')]('Sample\x20rate\x20'+this[_0x162a('0x31')][_0x162a('0x32')]);var _0x363810=[];var _0x4a5353;for(_0x4a5353=0x100;_0x4a5353<=0x4000;_0x4a5353=_0x4a5353*0x2){_0x363810[_0x162a('0x23')](_0x4a5353);}var _0x4d6dd9=this[_0x162a('0x31')][_0x162a('0x32')]/0x1;var _0x3b65d4=_0x363810[0x0];var _0x4e4e5e=Math[_0x162a('0xe1')](_0x4d6dd9-_0x3b65d4);for(_0x4a5353=0x0;_0x4a5353<_0x363810['length'];_0x4a5353++){var _0xec6c77=Math[_0x162a('0xe1')](_0x4d6dd9-_0x363810[_0x4a5353]);if(_0xec6c77<_0x4e4e5e){_0x4e4e5e=_0xec6c77;_0x3b65d4=_0x363810[_0x4a5353];}}wsLogger[_0x162a('0x5f')](_0x162a('0xe2')+_0x3b65d4);this[_0x162a('0xe3')]=_0x3b65d4;this['audioChunkTimeLength']=this['internalBufferSize']/this[_0x162a('0x31')][_0x162a('0x32')]*0x3e8;try{this[_0x162a('0x31')][_0x162a('0xe4')]=this[_0x162a('0x31')]['createScriptProcessor']||this['context']['createJavaScriptNode'];this['audioJSNode']=this[_0x162a('0x31')]['createScriptProcessor'](this[_0x162a('0xe3')],0x1,0x1);}catch(_0x5e2288){wsLogger[_0x162a('0xa')]('JS\x20Audio\x20Node\x20is\x20not\x20supported\x20in\x20this\x20browser'+_0x5e2288);}this[_0x162a('0xe5')]['onaudioprocess']=function(_0x26db61){var _0x163877=_0x26db61['outputBuffer'][_0x162a('0x52')](0x0);var _0x4a5353;if(_0xfdbf8[_0x162a('0x3e')][_0x162a('0x1d')]>0x0){var _0x1d8762=_0xfdbf8[_0x162a('0x3e')][_0x162a('0x3c')]();for(_0x4a5353=0x0;_0x4a5353<_0x163877['length'];_0x4a5353++){_0x163877[_0x4a5353]=_0x1d8762[_0x162a('0x4c')][_0x4a5353];}if(!_0xfdbf8['lastSync']){_0xfdbf8['previousSync']=_0x1d8762[_0x162a('0x3f')];}else{_0xfdbf8[_0x162a('0xe6')]=_0xfdbf8[_0x162a('0xe7')];}_0xfdbf8['lastSync']=_0x1d8762[_0x162a('0x3f')];if(!_0xfdbf8[_0x162a('0xe8')]){_0xfdbf8['previousSyncTime']=_0x26db61[_0x162a('0xe9')]*0x3e8;}else{_0xfdbf8['previousSyncTime']=_0xfdbf8[_0x162a('0xe8')];}_0xfdbf8['lastSyncTime']=_0x26db61[_0x162a('0xe9')]*0x3e8;_0xfdbf8['bufferExhausted']=![];}else{for(_0x4a5353=0x0;_0x4a5353<_0x163877['length'];_0x4a5353++){_0x163877[_0x4a5353]=0x0;}_0xfdbf8['bufferExhausted']=!![];if(_0xfdbf8[_0x162a('0xdf')]['gain'][_0x162a('0xea')]!=0x0){wsLogger[_0x162a('0x7a')]('No\x20audio\x20in\x20audio\x20buffer!');}}};}AudioPlayer[_0x162a('0x47')][_0x162a('0x40')]=function(){if(!this[_0x162a('0xde')]){this['audioJSNode'][_0x162a('0x56')](this['gainNode']);this[_0x162a('0xde')]=!![];}this[_0x162a('0x58')](![]);};AudioPlayer[_0x162a('0x47')]['stop']=function(){this['audioJSNode'][_0x162a('0xeb')]();this[_0x162a('0xde')]=![];this[_0x162a('0xe7')]=undefined;this[_0x162a('0xe8')]=undefined;this[_0x162a('0x3e')]=[];this['mute'](!![]);};AudioPlayer[_0x162a('0x47')][_0x162a('0x7')]=function(){if(this[_0x162a('0x3e')]){this[_0x162a('0x3e')]['length']=0x0;}else{this[_0x162a('0x3e')]=[];}};AudioPlayer[_0x162a('0x47')][_0x162a('0xec')]=function(){this['initBuffers']();};AudioPlayer[_0x162a('0x47')][_0x162a('0xed')]=function(_0x554ebf){this['audioBuffer'][_0x162a('0x23')](_0x554ebf);};AudioPlayer[_0x162a('0x47')][_0x162a('0xee')]=function(){return this[_0x162a('0x3e')]['length'];};AudioPlayer[_0x162a('0x47')][_0x162a('0x25')]=function(){if(this[_0x162a('0xe7')]&&this['lastSyncTime']){var _0x21f724=this[_0x162a('0x31')][_0x162a('0xef')]*0x3e8;if(_0x21f724>=this[_0x162a('0xe8')]){if(_0x21f724-this[_0x162a('0xe8')]>this[_0x162a('0xf0')]){wsLogger[_0x162a('0x7a')](_0x162a('0xf1')+(_0x21f724-this[_0x162a('0xf0')]-this[_0x162a('0xe8')]));return this['lastSync']+this[_0x162a('0xf0')];}return _0x21f724-this[_0x162a('0xe8')]+this['lastSync'];}else{return _0x21f724-this[_0x162a('0xf2')]+this[_0x162a('0xe6')];}}return-0x1;};AudioPlayer[_0x162a('0x47')][_0x162a('0x2d')]=function(){var _0x4d5368=this[_0x162a('0x31')][_0x162a('0xef')]*0x3e8-this[_0x162a('0xe8')];var _0xd6ff56=this[_0x162a('0xf0')]-_0x4d5368;return _0xd6ff56>0x0?this['audioChunkTimeLength']*this[_0x162a('0x3e')]['length']+_0xd6ff56:this[_0x162a('0xf0')]*this['audioBuffer'][_0x162a('0x1d')];};AudioPlayer[_0x162a('0x47')]['getLastTimePlayed']=function(){return this[_0x162a('0xe8')];};AudioPlayer['prototype'][_0x162a('0x58')]=function(_0x197c70){if(_0x197c70){wsLogger[_0x162a('0x5f')](_0x162a('0xf3'));this['gainNode'][_0x162a('0xf4')]['value']=0x0;}else{wsLogger['log'](_0x162a('0xf5'));this[_0x162a('0xdf')][_0x162a('0xf4')][_0x162a('0xea')]=0x1;}};AudioPlayer['prototype'][_0x162a('0x41')]=function(_0x36b36f){this[_0x162a('0xdf')][_0x162a('0xf4')][_0x162a('0xea')]=_0x36b36f/0x64;};AudioPlayer['prototype'][_0x162a('0x5c')]=function(){return this['gainNode'][_0x162a('0xf4')][_0x162a('0xea')]*0x64;};var WSPlayerState=function(){};WSPlayerState[_0x162a('0x3d')]=_0x162a('0x3d');WSPlayerState[_0x162a('0x26')]='PLAYING';WSPlayerState[_0x162a('0x59')]='PAUSED';WSPlayerState['STARTUP']='STARTUP';exports['WSPlayer']=WSPlayer;
|
|
8294
8294
|
},{}],40:[function(require,module,exports){
|
|
8295
8295
|
'use strict';
|
|
8296
|
-
|
|
8297
8296
|
/**
|
|
8298
8297
|
* @namespace Flashphoner.constants.SESSION_STATUS
|
|
8299
8298
|
* @see Session
|
|
8300
8299
|
*/
|
|
8301
|
-
|
|
8302
|
-
|
|
8303
|
-
|
|
8304
|
-
|
|
8305
|
-
|
|
8306
|
-
|
|
8307
|
-
|
|
8308
|
-
|
|
8309
|
-
|
|
8310
|
-
|
|
8311
|
-
|
|
8312
|
-
|
|
8313
|
-
|
|
8314
|
-
|
|
8315
|
-
|
|
8316
|
-
|
|
8317
|
-
|
|
8318
|
-
|
|
8319
|
-
|
|
8320
|
-
|
|
8321
|
-
|
|
8322
|
-
|
|
8323
|
-
|
|
8324
|
-
|
|
8325
|
-
|
|
8326
|
-
|
|
8327
|
-
|
|
8328
|
-
|
|
8329
|
-
|
|
8330
|
-
|
|
8331
|
-
|
|
8332
|
-
|
|
8333
|
-
|
|
8334
|
-
|
|
8335
|
-
|
|
8336
|
-
|
|
8337
|
-
|
|
8338
|
-
|
|
8339
|
-
/**
|
|
8340
|
-
|
|
8341
|
-
|
|
8342
|
-
|
|
8343
|
-
|
|
8344
|
-
|
|
8345
|
-
|
|
8346
|
-
/**
|
|
8347
|
-
|
|
8348
|
-
|
|
8349
|
-
|
|
8350
|
-
|
|
8351
|
-
|
|
8352
|
-
|
|
8353
|
-
|
|
8354
|
-
|
|
8355
|
-
|
|
8356
|
-
|
|
8357
|
-
|
|
8358
|
-
|
|
8359
|
-
|
|
8360
|
-
|
|
8361
|
-
|
|
8362
|
-
|
|
8363
|
-
|
|
8364
|
-
|
|
8365
|
-
|
|
8366
|
-
|
|
8367
|
-
|
|
8368
|
-
|
|
8369
|
-
|
|
8370
|
-
|
|
8371
|
-
|
|
8372
|
-
|
|
8373
|
-
|
|
8374
|
-
|
|
8375
|
-
|
|
8376
|
-
|
|
8377
|
-
|
|
8378
|
-
|
|
8379
|
-
|
|
8380
|
-
|
|
8381
|
-
|
|
8300
|
+
const SESSION_STATUS = Object.freeze({
|
|
8301
|
+
/**
|
|
8302
|
+
* Fires when {@link Session} ws socket opens.
|
|
8303
|
+
* @event CONNECTED
|
|
8304
|
+
* @memberof Flashphoner.constants.SESSION_STATUS
|
|
8305
|
+
*/
|
|
8306
|
+
CONNECTED: 'CONNECTED',
|
|
8307
|
+
/**
|
|
8308
|
+
* Fires when {@link Session} receives connect ack from REST App.
|
|
8309
|
+
* @event ESTABLISHED
|
|
8310
|
+
* @memberof Flashphoner.constants.SESSION_STATUS
|
|
8311
|
+
*/
|
|
8312
|
+
ESTABLISHED: 'ESTABLISHED',
|
|
8313
|
+
/**
|
|
8314
|
+
* Fires when {@link Session} disconnects.
|
|
8315
|
+
* @event DISCONNECTED
|
|
8316
|
+
* @memberof Flashphoner.constants.SESSION_STATUS
|
|
8317
|
+
*/
|
|
8318
|
+
DISCONNECTED: 'DISCONNECTED',
|
|
8319
|
+
/**
|
|
8320
|
+
* Fires if {@link Session} call of rest method error.
|
|
8321
|
+
* @event WARN
|
|
8322
|
+
* @memberof Flashphoner.constants.SESSION_STATUS
|
|
8323
|
+
*/
|
|
8324
|
+
WARN: 'WARN',
|
|
8325
|
+
/**
|
|
8326
|
+
* Fires if {@link Session} connection failed.
|
|
8327
|
+
* Some of the reasons can be network connection failed, REST App failed
|
|
8328
|
+
* @event FAILED
|
|
8329
|
+
* @memberof Flashphoner.constants.SESSION_STATUS
|
|
8330
|
+
*/
|
|
8331
|
+
FAILED: 'FAILED',
|
|
8332
|
+
/**
|
|
8333
|
+
* Fires wneh {@link Session} receives debug event
|
|
8334
|
+
* @event DEBUG
|
|
8335
|
+
* @memberof Flashphoner.constants.SESSION_STATUS
|
|
8336
|
+
*/
|
|
8337
|
+
DEBUG: 'DEBUG',
|
|
8338
|
+
/**
|
|
8339
|
+
* Fires when {@link Session} receives custom REST App message.
|
|
8340
|
+
*
|
|
8341
|
+
* @event APP_DATA
|
|
8342
|
+
* @memberof Flashphoner.constants.SESSION_STATUS
|
|
8343
|
+
*/
|
|
8344
|
+
APP_DATA: 'APP_DATA',
|
|
8345
|
+
/**
|
|
8346
|
+
* Fires when {@link Session} receives status of sendData operation.
|
|
8347
|
+
*
|
|
8348
|
+
* @event SEND_DATA_STATUS
|
|
8349
|
+
* @memberof Flashphoner.constants.SESSION_STATUS
|
|
8350
|
+
*/
|
|
8351
|
+
SEND_DATA_STATUS: 'SEND_DATA_STATUS',
|
|
8352
|
+
/**
|
|
8353
|
+
* State of newly created {@link Session}.
|
|
8354
|
+
*
|
|
8355
|
+
* @event PENDING
|
|
8356
|
+
* @memberof Flashphoner.constants.SESSION_STATUS
|
|
8357
|
+
*/
|
|
8358
|
+
PENDING: 'PENDING',
|
|
8359
|
+
/**
|
|
8360
|
+
* Fires when {@link Session} registers as sip client.
|
|
8361
|
+
*
|
|
8362
|
+
* @event REGISTERED
|
|
8363
|
+
* @memberof Flashphoner.constants.SESSION_STATUS
|
|
8364
|
+
*/
|
|
8365
|
+
REGISTERED: 'REGISTERED',
|
|
8366
|
+
/**
|
|
8367
|
+
* Fires when {@link Session} unregisters as sip client.
|
|
8368
|
+
*
|
|
8369
|
+
* @event UNREGISTERED
|
|
8370
|
+
* @memberof Flashphoner.constants.SESSION_STATUS
|
|
8371
|
+
*/
|
|
8372
|
+
UNREGISTERED: 'UNREGISTERED',
|
|
8373
|
+
/**
|
|
8374
|
+
* Fires when {@link Session} receives an incoming call.
|
|
8375
|
+
*
|
|
8376
|
+
* @event INCOMING_CALL
|
|
8377
|
+
* @memberof Flashphoner.constants.SESSION_STATUS
|
|
8378
|
+
*/
|
|
8379
|
+
INCOMING_CALL: 'INCOMING_CALL'
|
|
8380
|
+
});
|
|
8382
8381
|
|
|
8383
8382
|
/**
|
|
8384
8383
|
* @namespace Flashphoner.constants.STREAM_STATUS
|
|
8385
8384
|
* @see Stream
|
|
8386
8385
|
*/
|
|
8387
|
-
|
|
8388
|
-
|
|
8389
|
-
|
|
8390
|
-
|
|
8391
|
-
|
|
8392
|
-
|
|
8393
|
-
|
|
8394
|
-
|
|
8395
|
-
|
|
8396
|
-
|
|
8397
|
-
|
|
8398
|
-
|
|
8399
|
-
|
|
8400
|
-
|
|
8401
|
-
|
|
8402
|
-
|
|
8403
|
-
|
|
8404
|
-
|
|
8405
|
-
|
|
8406
|
-
|
|
8407
|
-
|
|
8408
|
-
|
|
8409
|
-
|
|
8410
|
-
|
|
8411
|
-
|
|
8412
|
-
|
|
8413
|
-
|
|
8414
|
-
/**
|
|
8415
|
-
|
|
8416
|
-
|
|
8417
|
-
|
|
8418
|
-
|
|
8419
|
-
|
|
8420
|
-
|
|
8421
|
-
|
|
8422
|
-
|
|
8423
|
-
|
|
8424
|
-
|
|
8425
|
-
|
|
8426
|
-
|
|
8427
|
-
|
|
8428
|
-
|
|
8429
|
-
|
|
8430
|
-
|
|
8431
|
-
|
|
8432
|
-
|
|
8433
|
-
|
|
8434
|
-
|
|
8435
|
-
|
|
8436
|
-
|
|
8437
|
-
|
|
8438
|
-
|
|
8439
|
-
|
|
8440
|
-
|
|
8441
|
-
|
|
8442
|
-
|
|
8443
|
-
|
|
8444
|
-
|
|
8445
|
-
|
|
8446
|
-
|
|
8447
|
-
|
|
8448
|
-
|
|
8449
|
-
|
|
8450
|
-
|
|
8451
|
-
|
|
8452
|
-
|
|
8453
|
-
|
|
8454
|
-
|
|
8455
|
-
|
|
8456
|
-
|
|
8457
|
-
/**
|
|
8458
|
-
|
|
8459
|
-
|
|
8460
|
-
|
|
8461
|
-
|
|
8462
|
-
|
|
8463
|
-
|
|
8464
|
-
/**
|
|
8465
|
-
* @namespace Flashphoner.constants.CALL_STATUS
|
|
8466
|
-
* @see Call
|
|
8467
|
-
*/
|
|
8468
|
-
var callStatus = {};
|
|
8469
|
-
//State of newly created Call
|
|
8470
|
-
define(callStatus, 'NEW', 'NEW');
|
|
8471
|
-
define(callStatus, 'RING', 'RING');
|
|
8472
|
-
define(callStatus, 'RING_MEDIA', 'RING_MEDIA');
|
|
8473
|
-
define(callStatus, 'HOLD', 'HOLD');
|
|
8474
|
-
define(callStatus, 'ESTABLISHED', 'ESTABLISHED');
|
|
8475
|
-
define(callStatus, 'FINISH', 'FINISH');
|
|
8476
|
-
define(callStatus, 'BUSY', 'BUSY');
|
|
8477
|
-
define(callStatus, 'SESSION_PROGRESS', 'SESSION_PROGRESS');
|
|
8478
|
-
define(callStatus, 'FAILED', 'FAILED');
|
|
8479
|
-
define(callStatus, 'PENDING', 'PENDING');
|
|
8480
|
-
define(callStatus, 'TRYING', 'TRYING');
|
|
8481
|
-
|
|
8482
|
-
/**
|
|
8483
|
-
* @namespace Flashphoner.constants.STREAM_STATUS_INFO
|
|
8484
|
-
* @see Stream
|
|
8485
|
-
*/
|
|
8486
|
-
var streamStatusInfo = {};
|
|
8487
|
-
|
|
8488
|
-
/**
|
|
8489
|
-
* Indicates general error during ICE negotiation. Usually occurs if client is behind some exotic nat/firewall.
|
|
8490
|
-
* @event FAILED_BY_ICE_ERROR
|
|
8491
|
-
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8492
|
-
*/
|
|
8493
|
-
define(streamStatusInfo, 'FAILED_BY_ICE_ERROR', 'Failed by ICE error');
|
|
8494
|
-
|
|
8495
|
-
/**
|
|
8496
|
-
* Timeout has been reached during ICE establishment.
|
|
8497
|
-
* @event FAILED_BY_ICE_TIMEOUT
|
|
8498
|
-
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8499
|
-
*/
|
|
8500
|
-
define(streamStatusInfo, 'FAILED_BY_ICE_TIMEOUT', 'Failed by ICE timeout');
|
|
8501
|
-
|
|
8502
|
-
/**
|
|
8503
|
-
* ICE refresh failed on session.
|
|
8504
|
-
* @event FAILED_BY_KEEP_ALIVE
|
|
8505
|
-
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8506
|
-
*/
|
|
8507
|
-
define(streamStatusInfo, 'FAILED_BY_KEEP_ALIVE', 'Failed by ICE keep alive');
|
|
8508
|
-
|
|
8509
|
-
/**
|
|
8510
|
-
* DTLS has wrong fingerprint.
|
|
8511
|
-
* @event FAILED_BY_DTLS_FINGERPRINT_ERROR
|
|
8512
|
-
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8513
|
-
*/
|
|
8514
|
-
define(streamStatusInfo, 'FAILED_BY_DTLS_FINGERPRINT_ERROR', 'Failed by DTLS fingerprint error');
|
|
8515
|
-
|
|
8516
|
-
/**
|
|
8517
|
-
* Client did not send DTLS packets or packets were lost/corrupted during transmission.
|
|
8518
|
-
* @event FAILED_BY_DTLS_ERROR
|
|
8519
|
-
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8520
|
-
*/
|
|
8521
|
-
define(streamStatusInfo, 'FAILED_BY_DTLS_ERROR', 'Failed by DTLS error');
|
|
8522
|
-
|
|
8523
|
-
/**
|
|
8524
|
-
* Indicates general HLS packetizer error, can occur during initialization or packetization (wrong input or out of disk space).
|
|
8525
|
-
* @event FAILED_BY_HLS_WRITER_ERROR
|
|
8526
|
-
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8527
|
-
*/
|
|
8528
|
-
define(streamStatusInfo, 'FAILED_BY_HLS_WRITER_ERROR', 'Failed by HLS writer error');
|
|
8529
|
-
|
|
8530
|
-
/**
|
|
8531
|
-
* Indicates general RTMP republishing error, can occur during initialization or rtmp packetization.
|
|
8532
|
-
* @event FAILED_BY_RTMP_WRITER_ERROR
|
|
8533
|
-
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8534
|
-
*/
|
|
8535
|
-
define(streamStatusInfo, 'FAILED_BY_RTMP_WRITER_ERROR', 'Failed by RTMP writer error');
|
|
8536
|
-
|
|
8537
|
-
/**
|
|
8538
|
-
* RTP session failed by RTP activity timer.
|
|
8539
|
-
* @event FAILED_BY_RTP_ACTIVITY
|
|
8540
|
-
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8541
|
-
*/
|
|
8542
|
-
define(streamStatusInfo, 'FAILED_BY_RTP_ACTIVITY', 'Failed by RTP activity');
|
|
8543
|
-
|
|
8544
|
-
/**
|
|
8545
|
-
* Related session was disconnected.
|
|
8546
|
-
* @event STOPPED_BY_SESSION_DISCONNECT
|
|
8547
|
-
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8548
|
-
*/
|
|
8549
|
-
define(streamStatusInfo, 'STOPPED_BY_SESSION_DISCONNECT', 'Stopped by session disconnect');
|
|
8550
|
-
|
|
8551
|
-
/**
|
|
8552
|
-
* Stream was stopped by rest terminate request.
|
|
8553
|
-
* @event STOPPED_BY_REST_TERMINATE
|
|
8554
|
-
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8555
|
-
*/
|
|
8556
|
-
define(streamStatusInfo, 'STOPPED_BY_REST_TERMINATE', 'Stopped by rest /terminate');
|
|
8557
|
-
|
|
8558
|
-
/**
|
|
8559
|
-
* Related publisher stopped its stream or lost connection.
|
|
8560
|
-
* @event STOPPED_BY_PUBLISHER_STOP
|
|
8561
|
-
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8562
|
-
*/
|
|
8563
|
-
define(streamStatusInfo, 'STOPPED_BY_PUBLISHER_STOP', 'Stopped by publisher stop');
|
|
8564
|
-
|
|
8565
|
-
/**
|
|
8566
|
-
* Stop the media session by user after call was finished or unpublish stream.
|
|
8567
|
-
* @event STOPPED_BY_USER
|
|
8568
|
-
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8569
|
-
*/
|
|
8570
|
-
define(streamStatusInfo, 'STOPPED_BY_USER', 'Stopped by user');
|
|
8571
|
-
|
|
8572
|
-
/**
|
|
8573
|
-
* Error occurred on the stream.
|
|
8574
|
-
* @event FAILED_BY_ERROR
|
|
8575
|
-
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8576
|
-
*/
|
|
8577
|
-
define(streamStatusInfo, 'FAILED_BY_ERROR', 'Failed by error');
|
|
8578
|
-
|
|
8579
|
-
/**
|
|
8580
|
-
* Indicates that error occurred during media session creation. This might be SDP parsing error, all ports are busy, wrong session related config etc.
|
|
8581
|
-
* @event FAILED_TO_ADD_STREAM_TO_PROXY
|
|
8582
|
-
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8583
|
-
*/
|
|
8584
|
-
define(streamStatusInfo, 'FAILED_TO_ADD_STREAM_TO_PROXY', 'Failed to add stream to proxy');
|
|
8585
|
-
|
|
8586
|
-
/**
|
|
8587
|
-
* Stopped shapshot distributor.
|
|
8588
|
-
* @event DISTRIBUTOR_STOPPED
|
|
8589
|
-
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8590
|
-
*/
|
|
8591
|
-
define(streamStatusInfo, 'DISTRIBUTOR_STOPPED', 'Distributor stopped');
|
|
8592
|
-
|
|
8593
|
-
/**
|
|
8594
|
-
* Publish stream is not ready, try again later.
|
|
8595
|
-
* @event PUBLISH_STREAM_IS_NOT_READY
|
|
8596
|
-
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8597
|
-
*/
|
|
8598
|
-
define(streamStatusInfo, 'PUBLISH_STREAM_IS_NOT_READY', 'Publish stream is not ready');
|
|
8599
|
-
|
|
8600
|
-
/**
|
|
8601
|
-
* Stream with this name is not found, check the correct of the name.
|
|
8602
|
-
* @event STREAM_NOT_FOUND
|
|
8603
|
-
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8604
|
-
*/
|
|
8605
|
-
define(streamStatusInfo, 'STREAM_NOT_FOUND', 'Stream not found');
|
|
8606
|
-
|
|
8607
|
-
/**
|
|
8608
|
-
* Server already has a publish stream with the same name, try using different one.
|
|
8609
|
-
* @event STREAM_NAME_ALREADY_IN_USE
|
|
8610
|
-
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8611
|
-
*/
|
|
8612
|
-
define(streamStatusInfo, 'STREAM_NAME_ALREADY_IN_USE', 'Stream name is already in use');
|
|
8613
|
-
|
|
8614
|
-
/**
|
|
8615
|
-
* Error indicates that stream object received by server has empty mediaSessionId field.
|
|
8616
|
-
* @event MEDIASESSION_ID_NULL
|
|
8617
|
-
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8618
|
-
*/
|
|
8619
|
-
define(streamStatusInfo, 'MEDIASESSION_ID_NULL', 'MediaSessionId is null');
|
|
8620
|
-
|
|
8621
|
-
/**
|
|
8622
|
-
* Published or subscribed sessions used this MediaSessionId.
|
|
8623
|
-
* @event MEDIASESSION_ID_ALREADY_IN_USE
|
|
8624
|
-
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8625
|
-
*/
|
|
8626
|
-
define(streamStatusInfo, 'MEDIASESSION_ID_ALREADY_IN_USE', 'MediaSessionId is already in use');
|
|
8627
|
-
|
|
8628
|
-
/**
|
|
8629
|
-
* Session is not initialized or terminated on play ordinary stream.
|
|
8630
|
-
* @event SESSION_NOT_READY
|
|
8631
|
-
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8632
|
-
*/
|
|
8633
|
-
define(streamStatusInfo, 'SESSION_NOT_READY', 'Session not ready');
|
|
8634
|
-
|
|
8635
|
-
/**
|
|
8636
|
-
* Actual session does not exist.
|
|
8637
|
-
* @event SESSION_DOES_NOT_EXIST
|
|
8638
|
-
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8639
|
-
*/
|
|
8640
|
-
define(streamStatusInfo, 'SESSION_DOES_NOT_EXIST', 'Session does not exist');
|
|
8641
|
-
|
|
8642
|
-
/**
|
|
8643
|
-
* RTSP has wrong format on play stream, check correct of the RTSP url.
|
|
8644
|
-
* @event RTSP_HAS_WRONG_FORMAT
|
|
8645
|
-
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8646
|
-
*/
|
|
8647
|
-
define(streamStatusInfo, 'RTSP_HAS_WRONG_FORMAT', 'Rtsp has wrong format');
|
|
8648
|
-
|
|
8649
|
-
/**
|
|
8650
|
-
* Failed to play vod stream, this format is not supported.
|
|
8651
|
-
* @event FILE_HAS_WRONG_FORMAT
|
|
8652
|
-
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8653
|
-
*/
|
|
8654
|
-
define(streamStatusInfo, 'FILE_HAS_WRONG_FORMAT', 'File has wrong format');
|
|
8655
|
-
|
|
8656
|
-
/**
|
|
8657
|
-
* Failed to connect to rtsp stream.
|
|
8658
|
-
* @event FAILED_TO_CONNECT_TO_RTSP_STREAM
|
|
8659
|
-
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8660
|
-
*/
|
|
8661
|
-
define(streamStatusInfo, 'FAILED_TO_CONNECT_TO_RTSP_STREAM', 'Failed to connect to rtsp stream');
|
|
8662
|
-
|
|
8663
|
-
/**
|
|
8664
|
-
* Rtsp stream is not found, agent received "404-Not Found".
|
|
8665
|
-
* @event RTSP_STREAM_NOT_FOUND
|
|
8666
|
-
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8667
|
-
*/
|
|
8668
|
-
define(streamStatusInfo, 'RTSP_STREAM_NOT_FOUND', 'Rtsp stream not found');
|
|
8669
|
-
|
|
8670
|
-
/**
|
|
8671
|
-
* On shutdown RTSP agent.
|
|
8672
|
-
* @event RTSPAGENT_SHUTDOWN
|
|
8673
|
-
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8674
|
-
*/
|
|
8675
|
-
define(streamStatusInfo, 'RTSPAGENT_SHUTDOWN', 'RtspAgent shutdown');
|
|
8676
|
-
|
|
8677
|
-
/**
|
|
8678
|
-
* Stream failed
|
|
8679
|
-
* @event STREAM_FAILED
|
|
8680
|
-
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8681
|
-
*/
|
|
8682
|
-
define(streamStatusInfo, 'STREAM_FAILED', 'Stream failed');
|
|
8683
|
-
|
|
8684
|
-
/**
|
|
8685
|
-
* No common codecs on setup track, did not found corresponding trackId->mediaPort.
|
|
8686
|
-
* @event NO_COMMON_CODECS
|
|
8687
|
-
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8688
|
-
*/
|
|
8689
|
-
define(streamStatusInfo, 'NO_COMMON_CODECS', 'No common codecs');
|
|
8690
|
-
|
|
8691
|
-
/**
|
|
8692
|
-
* Bad referenced rtsp link, check for correct, example: rtsp://user:b@d_password@127.0.0.1/stream.
|
|
8693
|
-
* @event BAD_URI
|
|
8694
|
-
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8695
|
-
*/
|
|
8696
|
-
define(streamStatusInfo, 'BAD_URI', 'Bad URI');
|
|
8697
|
-
|
|
8698
|
-
/**
|
|
8699
|
-
* General VOD error, indicates that Exception occurred while reading/processing media file.
|
|
8700
|
-
* @event GOT_EXCEPTION_WHILE_STREAMING_FILE
|
|
8701
|
-
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8702
|
-
*/
|
|
8703
|
-
define(streamStatusInfo, 'GOT_EXCEPTION_WHILE_STREAMING_FILE', 'Got exception while streaming file');
|
|
8704
|
-
|
|
8705
|
-
/**
|
|
8706
|
-
* Requested stream shutdown.
|
|
8707
|
-
* @event REQUESTED_STREAM_SHUTDOWN
|
|
8708
|
-
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8709
|
-
*/
|
|
8710
|
-
define(streamStatusInfo, 'REQUESTED_STREAM_SHUTDOWN', 'Requested stream shutdown');
|
|
8711
|
-
|
|
8712
|
-
/**
|
|
8713
|
-
* Failed to create movie, file can not be read.
|
|
8714
|
-
* @event FAILED_TO_READ_FILE
|
|
8715
|
-
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8716
|
-
*/
|
|
8717
|
-
define(streamStatusInfo, 'FAILED_TO_READ_FILE', 'Failed to read file');
|
|
8718
|
-
|
|
8719
|
-
/**
|
|
8720
|
-
* File does not exist, check filename.
|
|
8721
|
-
* @event FILE_NOT_FOUND
|
|
8722
|
-
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8723
|
-
*/
|
|
8724
|
-
define(streamStatusInfo, 'FILE_NOT_FOUND', 'File not found');
|
|
8725
|
-
|
|
8726
|
-
/**
|
|
8727
|
-
* Server failed to establish websocket connection with origin server.
|
|
8728
|
-
* @event FAILED_TO_CONNECT_TO_ORIGIN_STREAM
|
|
8729
|
-
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8730
|
-
*/
|
|
8731
|
-
define(streamStatusInfo, 'FAILED_TO_CONNECT_TO_ORIGIN_STREAM', 'Failed to connect to origin stream');
|
|
8732
|
-
|
|
8733
|
-
/**
|
|
8734
|
-
* CDN stream not found.
|
|
8735
|
-
* @event CDN_STREAM_NOT_FOUND
|
|
8736
|
-
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8737
|
-
*/
|
|
8738
|
-
define(streamStatusInfo, 'CDN_STREAM_NOT_FOUND', 'CDN stream not found');
|
|
8739
|
-
|
|
8740
|
-
/**
|
|
8741
|
-
* Indicates that provided URL protocol in stream name is invalid.
|
|
8742
|
-
* Valid: vod://file.mp4
|
|
8743
|
-
* Invalid: dov://file.mp4
|
|
8744
|
-
* @event FAILED_TO_GET_AGENT_STORAGE
|
|
8745
|
-
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8746
|
-
*/
|
|
8747
|
-
define(streamStatusInfo, 'FAILED_TO_GET_AGENT_STORAGE', 'Failed to get agent storage');
|
|
8748
|
-
|
|
8749
|
-
/**
|
|
8750
|
-
* Shutdown agent servicing origin stream.
|
|
8751
|
-
* @event AGENT_SERVICING_ORIGIN_STREAM_IS_SHUTTING_DOWN
|
|
8752
|
-
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8753
|
-
*/
|
|
8754
|
-
define(streamStatusInfo, 'AGENT_SERVICING_ORIGIN_STREAM_IS_SHUTTING_DOWN', 'Agent servicing origin stream is shutting down');
|
|
8755
|
-
|
|
8756
|
-
/**
|
|
8757
|
-
* Terminated by keep-alive on walk through subscribers.
|
|
8758
|
-
* @event TERMINATED_BY_KEEP_ALIVE
|
|
8759
|
-
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8760
|
-
*/
|
|
8761
|
-
define(streamStatusInfo, 'TERMINATED_BY_KEEP_ALIVE', 'Terminated by keep-alive');
|
|
8762
|
-
|
|
8763
|
-
/**
|
|
8764
|
-
* Transcoding required, but disabled in settings
|
|
8765
|
-
* @event TRANSCODING_REQUIRED_BUT_DISABLED
|
|
8766
|
-
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8767
|
-
*/
|
|
8768
|
-
define(streamStatusInfo, 'TRANSCODING_REQUIRED_BUT_DISABLED', 'Transcoding required, but disabled');
|
|
8769
|
-
|
|
8770
|
-
/**
|
|
8771
|
-
* Access restricted by access list
|
|
8772
|
-
* @event RESTRICTED_ACCESS
|
|
8773
|
-
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8774
|
-
*/
|
|
8775
|
-
define(streamStatusInfo, 'RESTRICTED_ACCESS', 'Restricted access');
|
|
8776
|
-
|
|
8777
|
-
/**
|
|
8778
|
-
* No available transcoders for stream
|
|
8779
|
-
* @event RESTRICTED_ACCESS
|
|
8780
|
-
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8781
|
-
*/
|
|
8782
|
-
define(streamStatusInfo, 'NO_AVAILABLE_TRANSCODERS', 'No available transcoders');
|
|
8783
|
-
|
|
8784
|
-
/**
|
|
8785
|
-
* @namespace Flashphoner.constants.CALL_STATUS_INFO
|
|
8786
|
-
* @see Call
|
|
8787
|
-
*/
|
|
8788
|
-
var callStatusInfo = {};
|
|
8789
|
-
|
|
8790
|
-
/**
|
|
8791
|
-
* Normal call hangup.
|
|
8792
|
-
* @event NORMAL_CALL_CLEARING
|
|
8793
|
-
* @memberof Flashphoner.constants.CALL_STATUS_INFO
|
|
8794
|
-
*/
|
|
8795
|
-
define(callStatusInfo, 'NORMAL_CALL_CLEARING', 'Normal call clearing');
|
|
8796
|
-
|
|
8797
|
-
/**
|
|
8798
|
-
* Error occurred on session creation.
|
|
8799
|
-
* @event FAILED_BY_SESSION_CREATION
|
|
8800
|
-
* @memberof Flashphoner.constants.CALL_STATUS_INFO
|
|
8801
|
-
*/
|
|
8802
|
-
define(callStatusInfo, 'FAILED_BY_SESSION_CREATION', 'Failed by session creation');
|
|
8803
|
-
|
|
8804
|
-
/**
|
|
8805
|
-
* Failed by error during ICE establishment.
|
|
8806
|
-
* @event FAILED_BY_ICE_ERROR
|
|
8807
|
-
* @memberof Flashphoner.constants.CALL_STATUS_INFO
|
|
8808
|
-
*/
|
|
8809
|
-
define(callStatusInfo, 'FAILED_BY_ICE_ERROR', 'Failed by ICE error');
|
|
8810
|
-
|
|
8811
|
-
/**
|
|
8812
|
-
* RTP session failed by RTP activity timer.
|
|
8813
|
-
* @event FAILED_BY_RTP_ACTIVITY
|
|
8814
|
-
* @memberof Flashphoner.constants.CALL_STATUS_INFO
|
|
8815
|
-
*/
|
|
8816
|
-
define(callStatusInfo, 'FAILED_BY_RTP_ACTIVITY', 'Failed by RTP activity');
|
|
8817
|
-
|
|
8818
|
-
/**
|
|
8819
|
-
* FF writer was failed on RTMP.
|
|
8820
|
-
* @event FAILED_BY_RTMP_WRITER_ERROR
|
|
8821
|
-
* @memberof Flashphoner.constants.CALL_STATUS_INFO
|
|
8822
|
-
*/
|
|
8823
|
-
define(callStatusInfo, 'FAILED_BY_RTMP_WRITER_ERROR', 'Failed by RTMP writer error');
|
|
8824
|
-
|
|
8825
|
-
/**
|
|
8826
|
-
* DTLS wrong fingerprint.
|
|
8827
|
-
* @event FAILED_BY_DTLS_FINGERPRINT_ERROR
|
|
8828
|
-
* @memberof Flashphoner.constants.CALL_STATUS_INFO
|
|
8829
|
-
*/
|
|
8830
|
-
define(callStatusInfo, 'FAILED_BY_DTLS_FINGERPRINT_ERROR', 'Failed by DTLS fingerprint error');
|
|
8831
|
-
|
|
8832
|
-
/**
|
|
8833
|
-
* No common codecs in sdp
|
|
8834
|
-
* @event NO_COMMON_CODECS
|
|
8835
|
-
* @memberof Flashphoner.constants.CALL_STATUS_INFO
|
|
8836
|
-
*/
|
|
8837
|
-
define(callStatusInfo, 'NO_COMMON_CODECS', 'No common codecs');
|
|
8838
|
-
|
|
8839
|
-
/**
|
|
8840
|
-
* Client did not send DTLS packets or packets were lost/corrupted during transmission.
|
|
8841
|
-
* @event FAILED_BY_DTLS_ERROR
|
|
8842
|
-
* @memberof Flashphoner.constants.CALL_STATUS_INFO
|
|
8843
|
-
*/
|
|
8844
|
-
define(callStatusInfo, 'FAILED_BY_DTLS_ERROR', 'Failed by DTLS error');
|
|
8386
|
+
const STREAM_STATUS = Object.freeze({
|
|
8387
|
+
/**
|
|
8388
|
+
* State of newly created {@link Stream}.
|
|
8389
|
+
*
|
|
8390
|
+
* @event NEW
|
|
8391
|
+
* @memberof Flashphoner.constants.STREAM_STATUS
|
|
8392
|
+
*/
|
|
8393
|
+
NEW: 'NEW',
|
|
8394
|
+
/**
|
|
8395
|
+
* State before {@link Stream} publishing/playing.
|
|
8396
|
+
*
|
|
8397
|
+
* @event PENDING
|
|
8398
|
+
* @memberof Flashphoner.constants.STREAM_STATUS
|
|
8399
|
+
*/
|
|
8400
|
+
PENDING: 'PENDING',
|
|
8401
|
+
/**
|
|
8402
|
+
* Fires when {@link Stream} starts publishing.
|
|
8403
|
+
* @event PUBLISHING
|
|
8404
|
+
* @memberof Flashphoner.constants.STREAM_STATUS
|
|
8405
|
+
*/
|
|
8406
|
+
PUBLISHING: 'PUBLISHING',
|
|
8407
|
+
/**
|
|
8408
|
+
* Fires when {@link Stream} starts playing.
|
|
8409
|
+
* @event PLAYING
|
|
8410
|
+
* @memberof Flashphoner.constants.STREAM_STATUS
|
|
8411
|
+
*/
|
|
8412
|
+
PLAYING: 'PLAYING',
|
|
8413
|
+
/**
|
|
8414
|
+
* Fires if {@link Stream} paused.
|
|
8415
|
+
* @event PAUSED
|
|
8416
|
+
* @memberof Flashphoner.constants.STREAM_STATUS
|
|
8417
|
+
*/
|
|
8418
|
+
PAUSED: 'PAUSED',
|
|
8419
|
+
/**
|
|
8420
|
+
* Fires if {@link Stream} was unpublished.
|
|
8421
|
+
* @event UNPUBLISHED
|
|
8422
|
+
* @memberof Flashphoner.constants.STREAM_STATUS
|
|
8423
|
+
*/
|
|
8424
|
+
UNPUBLISHED: 'UNPUBLISHED',
|
|
8425
|
+
/**
|
|
8426
|
+
* Fires if playing {@link Stream} was stopped.
|
|
8427
|
+
* @event STOPPED
|
|
8428
|
+
* @memberof Flashphoner.constants.STREAM_STATUS
|
|
8429
|
+
*/
|
|
8430
|
+
STOPPED: 'STOPPED',
|
|
8431
|
+
/**
|
|
8432
|
+
* Fires if {@link Stream} failed.
|
|
8433
|
+
* @event FAILED
|
|
8434
|
+
* @memberof Flashphoner.constants.STREAM_STATUS
|
|
8435
|
+
*/
|
|
8436
|
+
FAILED: 'FAILED',
|
|
8437
|
+
/**
|
|
8438
|
+
* Fires if {@link Stream} playback problem.
|
|
8439
|
+
* @event PLAYBACK_PROBLEM
|
|
8440
|
+
* @memberof Flashphoner.constants.STREAM_STATUS
|
|
8441
|
+
*/
|
|
8442
|
+
PLAYBACK_PROBLEM: 'PLAYBACK_PROBLEM',
|
|
8443
|
+
/**
|
|
8444
|
+
* Fires if playing {@link Stream} picture resizing.
|
|
8445
|
+
* @event RESIZE
|
|
8446
|
+
* @memberof Flashphoner.constants.STREAM_STATUS
|
|
8447
|
+
*/
|
|
8448
|
+
RESIZE: 'RESIZE',
|
|
8449
|
+
/**
|
|
8450
|
+
* Fires when {@link Stream} snapshot becomes available.
|
|
8451
|
+
* Snapshot is base64 encoded png available through {@link Stream.getInfo}
|
|
8452
|
+
* @event SNAPSHOT_COMPLETE
|
|
8453
|
+
* @memberof Flashphoner.constants.STREAM_STATUS
|
|
8454
|
+
*/
|
|
8455
|
+
SNAPSHOT_COMPLETE: 'SNAPSHOT_COMPLETE',
|
|
8456
|
+
/**
|
|
8457
|
+
* Fires on playing {@link Stream} if bitrate is higher than available network bandwidth.
|
|
8458
|
+
* @event NOT_ENOUGH_BANDWIDTH
|
|
8459
|
+
* @memberof Flashphoner.constants.NOT_ENOUGH_BANDWIDTH
|
|
8460
|
+
*/
|
|
8461
|
+
NOT_ENOUGH_BANDWIDTH: 'NOT_ENOUGH_BANDWIDTH'
|
|
8462
|
+
});
|
|
8845
8463
|
|
|
8846
8464
|
/**
|
|
8847
|
-
*
|
|
8848
|
-
* @
|
|
8849
|
-
* @memberof Flashphoner.constants.CALL_STATUS_INFO
|
|
8465
|
+
* @namespace Flashphoner.constants.CALL_STATUS
|
|
8466
|
+
* @see Call
|
|
8850
8467
|
*/
|
|
8851
|
-
|
|
8468
|
+
const CALL_STATUS = Object.freeze({
|
|
8469
|
+
/**
|
|
8470
|
+
* State of newly created {@link Call}
|
|
8471
|
+
* @event NEW
|
|
8472
|
+
* @memberof Flashphoner.constants.CALL_STATUS
|
|
8473
|
+
*/
|
|
8474
|
+
NEW: 'NEW',
|
|
8475
|
+
/**
|
|
8476
|
+
* The server is ringing to the callee
|
|
8477
|
+
* @event RING
|
|
8478
|
+
* @memberof Flashphoner.constants.CALL_STATUS
|
|
8479
|
+
*/
|
|
8480
|
+
RING: 'RING',
|
|
8481
|
+
RING_MEDIA: 'RING_MEDIA',
|
|
8482
|
+
/**
|
|
8483
|
+
* The {@link Call} was put on hold
|
|
8484
|
+
* @event HOLD
|
|
8485
|
+
* @memberof Flashphoner.constants.CALL_STATUS
|
|
8486
|
+
*/
|
|
8487
|
+
HOLD: 'HOLD',
|
|
8488
|
+
/**
|
|
8489
|
+
* The {@link Call} is established
|
|
8490
|
+
* @event ESTABLISHED
|
|
8491
|
+
* @memberof Flashphoner.constants.CALL_STATUS
|
|
8492
|
+
*/
|
|
8493
|
+
ESTABLISHED: 'ESTABLISHED',
|
|
8494
|
+
/**
|
|
8495
|
+
* The {@link Call} is finished
|
|
8496
|
+
* @event FINISH
|
|
8497
|
+
* @memberof Flashphoner.constants.CALL_STATUS
|
|
8498
|
+
*/
|
|
8499
|
+
FINISH: 'FINISH',
|
|
8500
|
+
/**
|
|
8501
|
+
* Callee is busy
|
|
8502
|
+
* @event BUSY
|
|
8503
|
+
* @memberof Flashphoner.constants.CALL_STATUS
|
|
8504
|
+
*/
|
|
8505
|
+
BUSY: 'BUSY',
|
|
8506
|
+
/**
|
|
8507
|
+
* SIP session is in progress
|
|
8508
|
+
* @event SESSION_PROGRESS
|
|
8509
|
+
* @memberof Flashphoner.constants.CALL_STATUS
|
|
8510
|
+
*/
|
|
8511
|
+
SESSION_PROGRESS: 'SESSION_PROGRESS',
|
|
8512
|
+
/**
|
|
8513
|
+
* The {@link Call} is failed
|
|
8514
|
+
* @event FAILED
|
|
8515
|
+
* @memberof Flashphoner.constants.CALL_STATUS
|
|
8516
|
+
*/
|
|
8517
|
+
FAILED: 'FAILED',
|
|
8518
|
+
/**
|
|
8519
|
+
* The {@link Call} state before ringing
|
|
8520
|
+
* @event PENDING
|
|
8521
|
+
* @memberof Flashphoner.constants.CALL_STATUS
|
|
8522
|
+
*/
|
|
8523
|
+
PENDING: 'PENDING',
|
|
8524
|
+
/**
|
|
8525
|
+
* The server trying to establish {@link Call}
|
|
8526
|
+
* @event TRYING
|
|
8527
|
+
* @memberof Flashphoner.constants.CALL_STATUS
|
|
8528
|
+
*/
|
|
8529
|
+
TRYING: 'TRYING'
|
|
8530
|
+
});
|
|
8852
8531
|
|
|
8853
8532
|
/**
|
|
8854
|
-
|
|
8855
|
-
|
|
8856
|
-
|
|
8857
|
-
|
|
8858
|
-
|
|
8533
|
+
* @namespace Flashphoner.constants.STREAM_STATUS_INFO
|
|
8534
|
+
* @see Stream
|
|
8535
|
+
*/
|
|
8536
|
+
const STREAM_STATUS_INFO = Object.freeze({
|
|
8537
|
+
/**
|
|
8538
|
+
* Indicates general error during ICE negotiation. Usually occurs if client is behind some exotic nat/firewall.
|
|
8539
|
+
* @event FAILED_BY_ICE_ERROR
|
|
8540
|
+
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8541
|
+
*/
|
|
8542
|
+
FAILED_BY_ICE_ERROR: 'Failed by ICE error',
|
|
8543
|
+
/**
|
|
8544
|
+
* Timeout has been reached during ICE establishment.
|
|
8545
|
+
* @event FAILED_BY_ICE_TIMEOUT
|
|
8546
|
+
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8547
|
+
*/
|
|
8548
|
+
FAILED_BY_ICE_TIMEOUT: 'Failed by ICE timeout',
|
|
8549
|
+
/**
|
|
8550
|
+
* ICE refresh failed on session.
|
|
8551
|
+
* @event FAILED_BY_KEEP_ALIVE
|
|
8552
|
+
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8553
|
+
*/
|
|
8554
|
+
FAILED_BY_KEEP_ALIVE: 'Failed by ICE keep alive',
|
|
8555
|
+
/**
|
|
8556
|
+
* DTLS has wrong fingerprint.
|
|
8557
|
+
* @event FAILED_BY_DTLS_FINGERPRINT_ERROR
|
|
8558
|
+
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8559
|
+
*/
|
|
8560
|
+
FAILED_BY_DTLS_FINGERPRINT_ERROR: 'Failed by DTLS fingerprint error',
|
|
8561
|
+
/**
|
|
8562
|
+
* Client did not send DTLS packets or packets were lost/corrupted during transmission.
|
|
8563
|
+
* @event FAILED_BY_DTLS_ERROR
|
|
8564
|
+
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8565
|
+
*/
|
|
8566
|
+
FAILED_BY_DTLS_ERROR: 'Failed by DTLS error',
|
|
8567
|
+
/**
|
|
8568
|
+
* Indicates general HLS packetizer error, can occur during initialization or packetization (wrong input or out of disk space).
|
|
8569
|
+
* @event FAILED_BY_HLS_WRITER_ERROR
|
|
8570
|
+
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8571
|
+
*/
|
|
8572
|
+
FAILED_BY_HLS_WRITER_ERROR: 'Failed by HLS writer error',
|
|
8573
|
+
/**
|
|
8574
|
+
* Indicates general RTMP republishing error, can occur during initialization or rtmp packetization.
|
|
8575
|
+
* @event FAILED_BY_RTMP_WRITER_ERROR
|
|
8576
|
+
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8577
|
+
*/
|
|
8578
|
+
FAILED_BY_RTMP_WRITER_ERROR: 'Failed by RTMP writer error',
|
|
8579
|
+
/**
|
|
8580
|
+
* RTP session failed by RTP activity timer.
|
|
8581
|
+
* @event FAILED_BY_RTP_ACTIVITY
|
|
8582
|
+
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8583
|
+
*/
|
|
8584
|
+
FAILED_BY_RTP_ACTIVITY: 'Failed by RTP activity',
|
|
8585
|
+
/**
|
|
8586
|
+
* Related session was disconnected.
|
|
8587
|
+
* @event STOPPED_BY_SESSION_DISCONNECT
|
|
8588
|
+
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8589
|
+
*/
|
|
8590
|
+
STOPPED_BY_SESSION_DISCONNECT: 'Stopped by session disconnect',
|
|
8591
|
+
/**
|
|
8592
|
+
* Stream was stopped by rest terminate request.
|
|
8593
|
+
* @event STOPPED_BY_REST_TERMINATE
|
|
8594
|
+
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8595
|
+
*/
|
|
8596
|
+
STOPPED_BY_REST_TERMINATE: 'Stopped by rest /terminate',
|
|
8597
|
+
/**
|
|
8598
|
+
* Related publisher stopped its stream or lost connection.
|
|
8599
|
+
* @event STOPPED_BY_PUBLISHER_STOP
|
|
8600
|
+
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8601
|
+
*/
|
|
8602
|
+
STOPPED_BY_PUBLISHER_STOP: 'Stopped by publisher stop',
|
|
8603
|
+
/**
|
|
8604
|
+
* Stop the media session by user after call was finished or unpublish stream.
|
|
8605
|
+
* @event STOPPED_BY_USER
|
|
8606
|
+
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8607
|
+
*/
|
|
8608
|
+
STOPPED_BY_USER: 'Stopped by user',
|
|
8609
|
+
/**
|
|
8610
|
+
* Error occurred on the stream.
|
|
8611
|
+
* @event FAILED_BY_ERROR
|
|
8612
|
+
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8613
|
+
*/
|
|
8614
|
+
FAILED_BY_ERROR: 'Failed by error',
|
|
8615
|
+
/**
|
|
8616
|
+
* Indicates that error occurred during media session creation. This might be SDP parsing error, all ports are busy, wrong session related config etc.
|
|
8617
|
+
* @event FAILED_TO_ADD_STREAM_TO_PROXY
|
|
8618
|
+
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8619
|
+
*/
|
|
8620
|
+
FAILED_TO_ADD_STREAM_TO_PROXY: 'Failed to add stream to proxy',
|
|
8621
|
+
/**
|
|
8622
|
+
* Stopped shapshot distributor.
|
|
8623
|
+
* @event DISTRIBUTOR_STOPPED
|
|
8624
|
+
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8625
|
+
*/
|
|
8626
|
+
DISTRIBUTOR_STOPPED: 'Distributor stopped',
|
|
8627
|
+
/**
|
|
8628
|
+
* Publish stream is not ready, try again later.
|
|
8629
|
+
* @event PUBLISH_STREAM_IS_NOT_READY
|
|
8630
|
+
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8631
|
+
*/
|
|
8632
|
+
PUBLISH_STREAM_IS_NOT_READY: 'Publish stream is not ready',
|
|
8633
|
+
/**
|
|
8634
|
+
* Stream with this name is not found, check the correct of the name.
|
|
8635
|
+
* @event STREAM_NOT_FOUND
|
|
8636
|
+
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8637
|
+
*/
|
|
8638
|
+
STREAM_NOT_FOUND: 'Stream not found',
|
|
8639
|
+
/**
|
|
8640
|
+
* Server already has a publish stream with the same name, try using different one.
|
|
8641
|
+
* @event STREAM_NAME_ALREADY_IN_USE
|
|
8642
|
+
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8643
|
+
*/
|
|
8644
|
+
STREAM_NAME_ALREADY_IN_USE: 'Stream name is already in use',
|
|
8645
|
+
/**
|
|
8646
|
+
* Error indicates that stream object received by server has empty mediaSessionId field.
|
|
8647
|
+
* @event MEDIASESSION_ID_NULL
|
|
8648
|
+
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8649
|
+
*/
|
|
8650
|
+
MEDIASESSION_ID_NULL: 'MediaSessionId is null',
|
|
8651
|
+
/**
|
|
8652
|
+
* Published or subscribed sessions used this MediaSessionId.
|
|
8653
|
+
* @event MEDIASESSION_ID_ALREADY_IN_USE
|
|
8654
|
+
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8655
|
+
*/
|
|
8656
|
+
MEDIASESSION_ID_ALREADY_IN_USE: 'MediaSessionId is already in use',
|
|
8657
|
+
/**
|
|
8658
|
+
* Session is not initialized or terminated on play ordinary stream.
|
|
8659
|
+
* @event SESSION_NOT_READY
|
|
8660
|
+
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8661
|
+
*/
|
|
8662
|
+
SESSION_NOT_READY: 'Session not ready',
|
|
8663
|
+
/**
|
|
8664
|
+
* Actual session does not exist.
|
|
8665
|
+
* @event SESSION_DOES_NOT_EXIST
|
|
8666
|
+
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8667
|
+
*/
|
|
8668
|
+
SESSION_DOES_NOT_EXIST: 'Session does not exist',
|
|
8669
|
+
/**
|
|
8670
|
+
* RTSP has wrong format on play stream, check the RTSP url validity.
|
|
8671
|
+
* @event RTSP_HAS_WRONG_FORMAT
|
|
8672
|
+
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8673
|
+
*/
|
|
8674
|
+
RTSP_HAS_WRONG_FORMAT: 'Rtsp has wrong format',
|
|
8675
|
+
/**
|
|
8676
|
+
* Failed to play vod stream, this format is not supported.
|
|
8677
|
+
* @event FILE_HAS_WRONG_FORMAT
|
|
8678
|
+
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8679
|
+
*/
|
|
8680
|
+
FILE_HAS_WRONG_FORMAT: 'File has wrong format',
|
|
8681
|
+
/**
|
|
8682
|
+
* Failed to connect to rtsp stream.
|
|
8683
|
+
* @event FAILED_TO_CONNECT_TO_RTSP_STREAM
|
|
8684
|
+
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8685
|
+
*/
|
|
8686
|
+
FAILED_TO_CONNECT_TO_RTSP_STREAM: 'Failed to connect to rtsp stream',
|
|
8687
|
+
/**
|
|
8688
|
+
* Rtsp stream is not found, agent received "404-Not Found".
|
|
8689
|
+
* @event RTSP_STREAM_NOT_FOUND
|
|
8690
|
+
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8691
|
+
*/
|
|
8692
|
+
RTSP_STREAM_NOT_FOUND: 'Rtsp stream not found',
|
|
8693
|
+
/**
|
|
8694
|
+
* On shutdown RTSP agent.
|
|
8695
|
+
* @event RTSPAGENT_SHUTDOWN
|
|
8696
|
+
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8697
|
+
*/
|
|
8698
|
+
RTSPAGENT_SHUTDOWN: 'RtspAgent shutdown',
|
|
8699
|
+
/**
|
|
8700
|
+
* Stream failed
|
|
8701
|
+
* @event STREAM_FAILED
|
|
8702
|
+
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8703
|
+
*/
|
|
8704
|
+
STREAM_FAILED: 'Stream failed',
|
|
8705
|
+
/**
|
|
8706
|
+
* No common codecs on setup track, did not found corresponding trackId->mediaPort.
|
|
8707
|
+
* @event NO_COMMON_CODECS
|
|
8708
|
+
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8709
|
+
*/
|
|
8710
|
+
NO_COMMON_CODECS: 'No common codecs',
|
|
8711
|
+
/**
|
|
8712
|
+
* Bad referenced rtsp link, check for correct, example: rtsp://user:b@d_password@127.0.0.1/stream.
|
|
8713
|
+
* @event BAD_URI
|
|
8714
|
+
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8715
|
+
*/
|
|
8716
|
+
BAD_URI: 'Bad URI',
|
|
8717
|
+
/**
|
|
8718
|
+
* General VOD error, indicates that Exception occurred while reading/processing media file.
|
|
8719
|
+
* @event GOT_EXCEPTION_WHILE_STREAMING_FILE
|
|
8720
|
+
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8721
|
+
*/
|
|
8722
|
+
GOT_EXCEPTION_WHILE_STREAMING_FILE: 'Got exception while streaming file',
|
|
8723
|
+
/**
|
|
8724
|
+
* Requested stream shutdown.
|
|
8725
|
+
* @event REQUESTED_STREAM_SHUTDOWN
|
|
8726
|
+
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8727
|
+
*/
|
|
8728
|
+
REQUESTED_STREAM_SHUTDOWN: 'Requested stream shutdown',
|
|
8729
|
+
/**
|
|
8730
|
+
* Failed to create movie, file can not be read.
|
|
8731
|
+
* @event FAILED_TO_READ_FILE
|
|
8732
|
+
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8733
|
+
*/
|
|
8734
|
+
FAILED_TO_READ_FILE: 'Failed to read file',
|
|
8735
|
+
/**
|
|
8736
|
+
* File does not exist, check filename.
|
|
8737
|
+
* @event FILE_NOT_FOUND
|
|
8738
|
+
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8739
|
+
*/
|
|
8740
|
+
FILE_NOT_FOUND: 'File not found',
|
|
8741
|
+
/**
|
|
8742
|
+
* Server failed to establish websocket connection with origin server.
|
|
8743
|
+
* @event FAILED_TO_CONNECT_TO_ORIGIN_STREAM
|
|
8744
|
+
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8745
|
+
*/
|
|
8746
|
+
FAILED_TO_CONNECT_TO_ORIGIN_STREAM: 'Failed to connect to origin stream',
|
|
8747
|
+
/**
|
|
8748
|
+
* CDN stream not found.
|
|
8749
|
+
* @event CDN_STREAM_NOT_FOUND
|
|
8750
|
+
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8751
|
+
*/
|
|
8752
|
+
CDN_STREAM_NOT_FOUND: 'CDN stream not found',
|
|
8753
|
+
/**
|
|
8754
|
+
* Indicates that provided URL protocol in stream name is invalid.
|
|
8755
|
+
* Valid: vod://file.mp4
|
|
8756
|
+
* Invalid: dov://file.mp4
|
|
8757
|
+
* @event FAILED_TO_GET_AGENT_STORAGE
|
|
8758
|
+
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8759
|
+
*/
|
|
8760
|
+
FAILED_TO_GET_AGENT_STORAGE: 'Failed to get agent storage',
|
|
8761
|
+
/**
|
|
8762
|
+
* Shutdown agent servicing origin stream.
|
|
8763
|
+
* @event AGENT_SERVICING_ORIGIN_STREAM_IS_SHUTTING_DOWN
|
|
8764
|
+
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8765
|
+
*/
|
|
8766
|
+
AGENT_SERVICING_ORIGIN_STREAM_IS_SHUTTING_DOWN: 'Agent servicing origin stream is shutting down',
|
|
8767
|
+
/**
|
|
8768
|
+
* Terminated by keep-alive on walk through subscribers.
|
|
8769
|
+
* @event TERMINATED_BY_KEEP_ALIVE
|
|
8770
|
+
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8771
|
+
*/
|
|
8772
|
+
TERMINATED_BY_KEEP_ALIVE: 'Terminated by keep-alive',
|
|
8773
|
+
/**
|
|
8774
|
+
* Transcoding required, but disabled in server settings
|
|
8775
|
+
* @event TRANSCODING_REQUIRED_BUT_DISABLED
|
|
8776
|
+
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8777
|
+
*/
|
|
8778
|
+
TRANSCODING_REQUIRED_BUT_DISABLED: 'Transcoding required, but disabled',
|
|
8779
|
+
/**
|
|
8780
|
+
* Access restricted by access list
|
|
8781
|
+
* @event RESTRICTED_ACCESS
|
|
8782
|
+
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8783
|
+
*/
|
|
8784
|
+
RESTRICTED_ACCESS: 'Restricted access',
|
|
8785
|
+
/**
|
|
8786
|
+
* No available transcoders for stream
|
|
8787
|
+
* @event NO_AVAILABLE_TRANSCODERS
|
|
8788
|
+
* @memberof Flashphoner.constants.STREAM_STATUS_INFO
|
|
8789
|
+
*/
|
|
8790
|
+
NO_AVAILABLE_TRANSCODERS: 'No available transcoders'
|
|
8791
|
+
});
|
|
8859
8792
|
|
|
8860
8793
|
/**
|
|
8861
|
-
|
|
8862
|
-
|
|
8863
|
-
|
|
8864
|
-
|
|
8865
|
-
|
|
8794
|
+
* @namespace Flashphoner.constants.CALL_STATUS_INFO
|
|
8795
|
+
* @see Call
|
|
8796
|
+
*/
|
|
8797
|
+
const CALL_STATUS_INFO = Object.freeze({
|
|
8798
|
+
/**
|
|
8799
|
+
* Normal call hangup.
|
|
8800
|
+
* @event NORMAL_CALL_CLEARING
|
|
8801
|
+
* @memberof Flashphoner.constants.CALL_STATUS_INFO
|
|
8802
|
+
*/
|
|
8803
|
+
NORMAL_CALL_CLEARING: 'Normal call clearing',
|
|
8804
|
+
/**
|
|
8805
|
+
* Error occurred while creating a session
|
|
8806
|
+
* @event FAILED_BY_SESSION_CREATION
|
|
8807
|
+
* @memberof Flashphoner.constants.CALL_STATUS_INFO
|
|
8808
|
+
*/
|
|
8809
|
+
FAILED_BY_SESSION_CREATION: 'Failed by session creation',
|
|
8810
|
+
/**
|
|
8811
|
+
* Failed by error during ICE establishment.
|
|
8812
|
+
* @event FAILED_BY_ICE_ERROR
|
|
8813
|
+
* @memberof Flashphoner.constants.CALL_STATUS_INFO
|
|
8814
|
+
*/
|
|
8815
|
+
FAILED_BY_ICE_ERROR: 'Failed by ICE error',
|
|
8816
|
+
/**
|
|
8817
|
+
* RTP session failed by RTP activity timer.
|
|
8818
|
+
* @event FAILED_BY_RTP_ACTIVITY
|
|
8819
|
+
* @memberof Flashphoner.constants.CALL_STATUS_INFO
|
|
8820
|
+
*/
|
|
8821
|
+
FAILED_BY_RTP_ACTIVITY: 'Failed by RTP activity',
|
|
8822
|
+
/**
|
|
8823
|
+
* FF writer was failed on RTMP.
|
|
8824
|
+
* @event FAILED_BY_RTMP_WRITER_ERROR
|
|
8825
|
+
* @memberof Flashphoner.constants.CALL_STATUS_INFO
|
|
8826
|
+
*/
|
|
8827
|
+
FAILED_BY_RTMP_WRITER_ERROR: 'Failed by RTMP writer error',
|
|
8828
|
+
/**
|
|
8829
|
+
* DTLS wrong fingerprint.
|
|
8830
|
+
* @event FAILED_BY_DTLS_FINGERPRINT_ERROR
|
|
8831
|
+
* @memberof Flashphoner.constants.CALL_STATUS_INFO
|
|
8832
|
+
*/
|
|
8833
|
+
FAILED_BY_DTLS_FINGERPRINT_ERROR: 'Failed by DTLS fingerprint error',
|
|
8834
|
+
/**
|
|
8835
|
+
* No common codecs in sdp
|
|
8836
|
+
* @event NO_COMMON_CODECS
|
|
8837
|
+
* @memberof Flashphoner.constants.CALL_STATUS_INFO
|
|
8838
|
+
*/
|
|
8839
|
+
NO_COMMON_CODECS: 'No common codecs',
|
|
8840
|
+
/**
|
|
8841
|
+
* Client did not send DTLS packets or packets were lost/corrupted during transmission.
|
|
8842
|
+
* @event FAILED_BY_DTLS_ERROR
|
|
8843
|
+
* @memberof Flashphoner.constants.CALL_STATUS_INFO
|
|
8844
|
+
*/
|
|
8845
|
+
FAILED_BY_DTLS_ERROR: 'Failed by DTLS error',
|
|
8846
|
+
/**
|
|
8847
|
+
* Error occurred during the call
|
|
8848
|
+
* @event FAILED_BY_ERROR
|
|
8849
|
+
* @memberof Flashphoner.constants.CALL_STATUS_INFO
|
|
8850
|
+
*/
|
|
8851
|
+
FAILED_BY_ERROR: 'Failed by error',
|
|
8852
|
+
/**
|
|
8853
|
+
* Call failed by request timeout
|
|
8854
|
+
* @event FAILED_BY_REQUEST_TIMEOUT
|
|
8855
|
+
* @memberof Flashphoner.constants.CALL_STATUS_INFO
|
|
8856
|
+
*/
|
|
8857
|
+
FAILED_BY_REQUEST_TIMEOUT: 'Failed by request timeout',
|
|
8858
|
+
/**
|
|
8859
|
+
* Transcoding required, but disabled in settings
|
|
8860
|
+
* @event TRANSCODING_REQUIRED_BUT_DISABLED
|
|
8861
|
+
* @memberof Flashphoner.constants.CALL_STATUS_INFO
|
|
8862
|
+
*/
|
|
8863
|
+
TRANSCODING_REQUIRED_BUT_DISABLED: 'Transcoding required, but disabled'
|
|
8864
|
+
});
|
|
8866
8865
|
|
|
8867
8866
|
/**
|
|
8868
8867
|
* @namespace Flashphoner.constants.ERROR_INFO
|
|
8869
8868
|
*/
|
|
8870
|
-
|
|
8871
|
-
|
|
8872
|
-
|
|
8873
|
-
|
|
8874
|
-
|
|
8875
|
-
|
|
8876
|
-
|
|
8877
|
-
|
|
8878
|
-
|
|
8879
|
-
|
|
8880
|
-
|
|
8881
|
-
|
|
8882
|
-
|
|
8883
|
-
|
|
8884
|
-
|
|
8885
|
-
|
|
8886
|
-
|
|
8887
|
-
|
|
8888
|
-
|
|
8889
|
-
|
|
8890
|
-
|
|
8891
|
-
|
|
8892
|
-
|
|
8893
|
-
|
|
8894
|
-
|
|
8895
|
-
|
|
8896
|
-
|
|
8897
|
-
|
|
8898
|
-
|
|
8899
|
-
|
|
8900
|
-
|
|
8901
|
-
|
|
8902
|
-
|
|
8903
|
-
|
|
8904
|
-
|
|
8905
|
-
|
|
8906
|
-
|
|
8907
|
-
/**
|
|
8908
|
-
|
|
8909
|
-
|
|
8910
|
-
|
|
8911
|
-
|
|
8912
|
-
|
|
8913
|
-
|
|
8914
|
-
|
|
8915
|
-
|
|
8916
|
-
|
|
8917
|
-
|
|
8918
|
-
|
|
8919
|
-
|
|
8920
|
-
|
|
8921
|
-
|
|
8922
|
-
|
|
8923
|
-
|
|
8924
|
-
|
|
8925
|
-
|
|
8926
|
-
|
|
8869
|
+
const ERROR_INFO = Object.freeze({
|
|
8870
|
+
/**
|
|
8871
|
+
* Error if none of MediaProviders available
|
|
8872
|
+
* @event NONE_OF_MEDIAPROVIDERS_AVAILABLE
|
|
8873
|
+
* @memberof Flashphoner.constants.ERROR_INFO
|
|
8874
|
+
*/
|
|
8875
|
+
NONE_OF_MEDIAPROVIDERS_AVAILABLE: 'None of MediaProviders available',
|
|
8876
|
+
/**
|
|
8877
|
+
* Error if none of preferred MediaProviders available
|
|
8878
|
+
* @event NONE_OF_PREFERRED_MEDIAPROVIDERS_AVAILABLE
|
|
8879
|
+
* @memberof Flashphoner.constants.ERROR_INFO
|
|
8880
|
+
*/
|
|
8881
|
+
NONE_OF_PREFERRED_MEDIAPROVIDERS_AVAILABLE: 'None of preferred MediaProviders available',
|
|
8882
|
+
/**
|
|
8883
|
+
* Error if API is not initialized
|
|
8884
|
+
* @event FLASHPHONER_API_NOT_INITIALIZED
|
|
8885
|
+
* @memberof Flashphoner.constants.ERROR_INFO
|
|
8886
|
+
*/
|
|
8887
|
+
FLASHPHONER_API_NOT_INITIALIZED: 'Flashphoner API is not initialized',
|
|
8888
|
+
/**
|
|
8889
|
+
* Error if options.urlServer is not specified
|
|
8890
|
+
* @event OPTIONS_URLSERVER_MUST_BE_PROVIDED
|
|
8891
|
+
* @memberof Flashphoner.constants.ERROR_INFO
|
|
8892
|
+
*/
|
|
8893
|
+
OPTIONS_URLSERVER_MUST_BE_PROVIDED: 'options.urlServer must be provided',
|
|
8894
|
+
/**
|
|
8895
|
+
* Error if session state is not valid
|
|
8896
|
+
* @event INVALID_SESSION_STATE
|
|
8897
|
+
* @memberof Flashphoner.constants.ERROR_INFO
|
|
8898
|
+
*/
|
|
8899
|
+
INVALID_SESSION_STATE: 'Invalid session state',
|
|
8900
|
+
/**
|
|
8901
|
+
* Error if no options provided
|
|
8902
|
+
* @event OPTIONS_MUST_BE_PROVIDED
|
|
8903
|
+
* @memberof Flashphoner.constants.ERROR_INFO
|
|
8904
|
+
*/
|
|
8905
|
+
OPTIONS_MUST_BE_PROVIDED: 'options must be provided',
|
|
8906
|
+
/**
|
|
8907
|
+
* Error if call status is not {@link Flashphoner.constants.CALL_STATUS.NEW}
|
|
8908
|
+
* @event INVALID_CALL_STATE
|
|
8909
|
+
* @memberof Flashphoner.constants.ERROR_INFO
|
|
8910
|
+
*/
|
|
8911
|
+
INVALID_CALL_STATE: 'Invalid call state',
|
|
8912
|
+
/**
|
|
8913
|
+
* Error if event is not specified
|
|
8914
|
+
* @event EVENT_CANT_BE_NULL
|
|
8915
|
+
* @memberof Flashphoner.constants.ERROR_INFO
|
|
8916
|
+
*/
|
|
8917
|
+
EVENT_CANT_BE_NULL: 'Event can\'t be null',
|
|
8918
|
+
/**
|
|
8919
|
+
* Error if callback is not a valid function
|
|
8920
|
+
* @event CALLBACK_NEEDS_TO_BE_A_VALID_FUNCTION
|
|
8921
|
+
* @memberof Flashphoner.constants.ERROR_INFO
|
|
8922
|
+
*/
|
|
8923
|
+
CALLBACK_NEEDS_TO_BE_A_VALID_FUNCTION: 'Callback needs to be a valid function',
|
|
8924
|
+
/**
|
|
8925
|
+
* Error if options.name is not specified
|
|
8926
|
+
* @event OPTIONS_NAME_MUST_BE_PROVIDED
|
|
8927
|
+
* @memberof Flashphoner.constants.ERROR_INFO
|
|
8928
|
+
*/
|
|
8929
|
+
OPTIONS_NAME_MUST_BE_PROVIDED: 'options.name must be provided',
|
|
8930
|
+
/**
|
|
8931
|
+
* Error if number of cams is less than 2 or camera is already used by other application
|
|
8932
|
+
* @event CAN_NOT_SWITCH_CAM
|
|
8933
|
+
* @memberOf Flashphoner.constants.ERROR_INFO
|
|
8934
|
+
*/
|
|
8935
|
+
CAN_NOT_SWITCH_CAM: 'Number of cams is less than 2 or camera is already used by other application',
|
|
8936
|
+
/**
|
|
8937
|
+
* Error if number of mics is less than 2 or microphone is already used by other application
|
|
8938
|
+
* @event CAN_NOT_SWITCH_MIC
|
|
8939
|
+
* @memberOf Flashphoner.constants.ERROR_INFO
|
|
8940
|
+
*/
|
|
8941
|
+
CAN_NOT_SWITCH_MIC: 'Number of mics is less than 2 or microphone is already used by other application',
|
|
8942
|
+
/**
|
|
8943
|
+
* Local browser error detected
|
|
8944
|
+
* @event LOCAL_ERROR
|
|
8945
|
+
* @memberOf Flashphoner.constants.ERROR_INFO
|
|
8946
|
+
*/
|
|
8947
|
+
LOCAL_ERROR: 'Local error'
|
|
8948
|
+
});
|
|
8927
8949
|
|
|
8928
8950
|
/**
|
|
8929
|
-
*
|
|
8930
|
-
* @
|
|
8931
|
-
* @memberof Flashphoner.constants.ERROR_INFO
|
|
8951
|
+
* Local media devices type
|
|
8952
|
+
* @namespace Flashphoner.constants.MEDIA_DEVICE_KIND
|
|
8932
8953
|
*/
|
|
8933
|
-
|
|
8954
|
+
const MEDIA_DEVICE_KIND = Object.freeze({
|
|
8955
|
+
/**
|
|
8956
|
+
* List local media output devices
|
|
8957
|
+
* @see Flashphoner.getMediaDevices
|
|
8958
|
+
* @memberOf Flashphoner.constants.MEDIA_DEVICE_KIND
|
|
8959
|
+
*/
|
|
8960
|
+
OUTPUT: 'output',
|
|
8961
|
+
/**
|
|
8962
|
+
* List local media input devices
|
|
8963
|
+
* @see Flashphoner.getMediaDevices
|
|
8964
|
+
* @memberOf Flashphoner.constants.MEDIA_DEVICE_KIND
|
|
8965
|
+
*/
|
|
8966
|
+
INPUT: 'input',
|
|
8967
|
+
/**
|
|
8968
|
+
* List local media devices
|
|
8969
|
+
* @see Flashphoner.getMediaDevices
|
|
8970
|
+
* @memberOf Flashphoner.constants.MEDIA_DEVICE_KIND
|
|
8971
|
+
*/
|
|
8972
|
+
ALL: 'all'
|
|
8973
|
+
});
|
|
8934
8974
|
|
|
8935
8975
|
/**
|
|
8936
|
-
*
|
|
8937
|
-
* @
|
|
8938
|
-
* @memberof Flashphoner.constants.ERROR_INFO
|
|
8976
|
+
* WebRTC transport type
|
|
8977
|
+
* @namespace Flashphoner.constants.TRANSPORT_TYPE
|
|
8939
8978
|
*/
|
|
8940
|
-
|
|
8979
|
+
const TRANSPORT_TYPE = Object.freeze({
|
|
8980
|
+
/**
|
|
8981
|
+
* WebRTC RTP traffic goes over UDP (default)
|
|
8982
|
+
* @see Stream
|
|
8983
|
+
* @memberOf Flashphoner.constants.TRANSPORT_TYPE
|
|
8984
|
+
*/
|
|
8985
|
+
UDP: 'UDP',
|
|
8986
|
+
/**
|
|
8987
|
+
* WebRTC RTP traffic goes over TCP
|
|
8988
|
+
* @see Stream
|
|
8989
|
+
* @memberOf Flashphoner.constants.TRANSPORT_TYPE
|
|
8990
|
+
*/
|
|
8991
|
+
TCP: 'TCP'
|
|
8992
|
+
});
|
|
8941
8993
|
|
|
8942
8994
|
/**
|
|
8943
|
-
*
|
|
8944
|
-
* @
|
|
8945
|
-
* @memberof Flashphoner.constants.ERROR_INFO
|
|
8995
|
+
* WebRTC connection quality type
|
|
8996
|
+
* @namespace Flashphoner.constants.CONNECTION_QUALITY
|
|
8946
8997
|
*/
|
|
8947
|
-
|
|
8998
|
+
const CONNECTION_QUALITY = Object.freeze({
|
|
8999
|
+
/**
|
|
9000
|
+
* Channel bandwidth is perfect
|
|
9001
|
+
* @see Stream
|
|
9002
|
+
* @memberOf Flashphoner.constants.CONNECTION_QUALITY
|
|
9003
|
+
*/
|
|
9004
|
+
PERFECT: 'PERFECT',
|
|
9005
|
+
/**
|
|
9006
|
+
* Channel bandwidth is good
|
|
9007
|
+
* @see Stream
|
|
9008
|
+
* @memberOf Flashphoner.constants.CONNECTION_QUALITY
|
|
9009
|
+
*/
|
|
9010
|
+
GOOD: 'GOOD',
|
|
9011
|
+
/**
|
|
9012
|
+
* Channel bandwidth is bad
|
|
9013
|
+
* @see Stream
|
|
9014
|
+
* @memberOf Flashphoner.constants.CONNECTION_QUALITY
|
|
9015
|
+
*/
|
|
9016
|
+
BAD: 'BAD',
|
|
9017
|
+
/**
|
|
9018
|
+
* Channel bandwidth is unknown (initial state)
|
|
9019
|
+
* @see Stream
|
|
9020
|
+
* @memberOf Flashphoner.constants.CONNECTION_QUALITY
|
|
9021
|
+
*/
|
|
9022
|
+
UNKNOWN: 'UNKNOWN',
|
|
9023
|
+
/**
|
|
9024
|
+
* Channel bandwidth is updating
|
|
9025
|
+
* @see Stream
|
|
9026
|
+
* @memberOf Flashphoner.constants.CONNECTION_QUALITY
|
|
9027
|
+
*/
|
|
9028
|
+
UPDATE: 'UPDATE'
|
|
9029
|
+
});
|
|
8948
9030
|
|
|
8949
9031
|
/**
|
|
8950
|
-
*
|
|
8951
|
-
* @
|
|
8952
|
-
* @memberOf Flashphoner.constants
|
|
9032
|
+
* Websocket signaling stream event
|
|
9033
|
+
* @see Stream
|
|
9034
|
+
* @memberOf Flashphoner.constants
|
|
8953
9035
|
*/
|
|
8954
|
-
|
|
9036
|
+
const STREAM_EVENT = 'STREAM_EVENT';
|
|
8955
9037
|
|
|
8956
9038
|
/**
|
|
8957
|
-
*
|
|
8958
|
-
* @
|
|
8959
|
-
* @memberOf Flashphoner.constants.ERROR_INFO
|
|
9039
|
+
* Websocket signaling stream event type
|
|
9040
|
+
* @namespace Flashphoner.constants.STREAM_EVENT_TYPE
|
|
8960
9041
|
*/
|
|
8961
|
-
|
|
9042
|
+
const STREAM_EVENT_TYPE = Object.freeze({
|
|
9043
|
+
/**
|
|
9044
|
+
* Stream audio is muted
|
|
9045
|
+
* @see Stream
|
|
9046
|
+
* @memberOf Flashphoner.constants.STREAM_EVENT_TYPE
|
|
9047
|
+
*/
|
|
9048
|
+
AUDIO_MUTED: 'audioMuted',
|
|
9049
|
+
/**
|
|
9050
|
+
* Stream audio is unmuted
|
|
9051
|
+
* @see Stream
|
|
9052
|
+
* @memberOf Flashphoner.constants.STREAM_EVENT_TYPE
|
|
9053
|
+
*/
|
|
9054
|
+
AUDIO_UNMUTED: 'audioUnmuted',
|
|
9055
|
+
/**
|
|
9056
|
+
* Stream video is muted
|
|
9057
|
+
* @see Stream
|
|
9058
|
+
* @memberOf Flashphoner.constants.STREAM_EVENT_TYPE
|
|
9059
|
+
*/
|
|
9060
|
+
VIDEO_MUTED: 'videoMuted',
|
|
9061
|
+
/**
|
|
9062
|
+
* Stream videoo is unmuted
|
|
9063
|
+
* @see Stream
|
|
9064
|
+
* @memberOf Flashphoner.constants.STREAM_EVENT_TYPE
|
|
9065
|
+
*/
|
|
9066
|
+
VIDEO_UNMUTED: 'videoUnmuted',
|
|
9067
|
+
/**
|
|
9068
|
+
* Data bound to the stream are received
|
|
9069
|
+
* @see Stream
|
|
9070
|
+
* @memberOf Flashphoner.constants.STREAM_EVENT_TYPE
|
|
9071
|
+
*/
|
|
9072
|
+
DATA: 'data'
|
|
9073
|
+
});
|
|
8962
9074
|
|
|
8963
9075
|
/**
|
|
8964
|
-
*
|
|
8965
|
-
* @
|
|
8966
|
-
* @memberOf Flashphoner.constants.ERROR_INFO
|
|
9076
|
+
* WebRTC video content hint type
|
|
9077
|
+
* @namespace Flashphoner.constants.CONTENT_HINT_TYPE
|
|
8967
9078
|
*/
|
|
8968
|
-
|
|
8969
|
-
|
|
8970
|
-
|
|
8971
|
-
|
|
8972
|
-
|
|
8973
|
-
|
|
8974
|
-
|
|
8975
|
-
|
|
8976
|
-
|
|
8977
|
-
|
|
8978
|
-
|
|
8979
|
-
|
|
8980
|
-
|
|
8981
|
-
|
|
8982
|
-
|
|
8983
|
-
|
|
8984
|
-
|
|
8985
|
-
|
|
8986
|
-
|
|
8987
|
-
|
|
8988
|
-
define(connectionQuality, 'BAD', 'BAD');
|
|
8989
|
-
define(connectionQuality, 'UNKNOWN', 'UNKNOWN');
|
|
8990
|
-
define(connectionQuality, 'UPDATE', 'UPDATE');
|
|
8991
|
-
|
|
8992
|
-
var streamEventType = {};
|
|
8993
|
-
|
|
8994
|
-
define(streamEventType, 'AUDIO_MUTED', 'audioMuted');
|
|
8995
|
-
define(streamEventType, 'AUDIO_UNMUTED', 'audioUnmuted');
|
|
8996
|
-
define(streamEventType, 'VIDEO_MUTED', 'videoMuted');
|
|
8997
|
-
define(streamEventType, 'VIDEO_UNMUTED', 'videoUnmuted');
|
|
8998
|
-
define(streamEventType, 'DATA', 'data');
|
|
8999
|
-
|
|
9000
|
-
var contentHintType = {};
|
|
9001
|
-
define(contentHintType, 'MOTION', 'motion');
|
|
9002
|
-
define(contentHintType, 'DETAIL', 'detail');
|
|
9003
|
-
define(contentHintType, 'TEXT', 'text');
|
|
9004
|
-
|
|
9005
|
-
var constants = {};
|
|
9006
|
-
define(constants, 'SESSION_STATUS', sessionStatus);
|
|
9007
|
-
define(constants, 'STREAM_EVENT_TYPE', streamEventType);
|
|
9008
|
-
define(constants, 'STREAM_EVENT', 'STREAM_EVENT');
|
|
9009
|
-
define(constants, 'STREAM_STATUS', streamStatus);
|
|
9010
|
-
define(constants, 'CALL_STATUS', callStatus);
|
|
9011
|
-
define(constants, 'STREAM_STATUS_INFO', streamStatusInfo);
|
|
9012
|
-
define(constants, 'CALL_STATUS_INFO', callStatusInfo);
|
|
9013
|
-
define(constants, 'ERROR_INFO', errorInfo);
|
|
9014
|
-
define(constants, 'MEDIA_DEVICE_KIND', mediaDeviceKind);
|
|
9015
|
-
define(constants, 'TRANSPORT_TYPE', transportType);
|
|
9016
|
-
define(constants, 'CONNECTION_QUALITY', connectionQuality);
|
|
9017
|
-
define(constants, 'CONTENT_HINT_TYPE', contentHintType);
|
|
9018
|
-
|
|
9019
|
-
//define helper
|
|
9020
|
-
function define(obj, name, value) {
|
|
9021
|
-
Object.defineProperty(obj, name, {
|
|
9022
|
-
value: value,
|
|
9023
|
-
enumerable: true
|
|
9024
|
-
});
|
|
9025
|
-
}
|
|
9079
|
+
const CONTENT_HINT_TYPE = Object.freeze({
|
|
9080
|
+
/**
|
|
9081
|
+
* Video content is motion (webcam case): keep FPS, resolution and bitrate may change
|
|
9082
|
+
* @see Stream
|
|
9083
|
+
* @memberOf Flashphoner.constants.CONTENT_HINT_TYPE
|
|
9084
|
+
*/
|
|
9085
|
+
MOTION: 'motion',
|
|
9086
|
+
/**
|
|
9087
|
+
* Video content is detail (sreen sharing case): keep resolution, bitrate may change, FPS may drop
|
|
9088
|
+
* @see Stream
|
|
9089
|
+
* @memberOf Flashphoner.constants.CONTENT_HINT_TYPE
|
|
9090
|
+
*/
|
|
9091
|
+
DETAIL: 'detail',
|
|
9092
|
+
/**
|
|
9093
|
+
* Video content is text (sreen sharing case): keep resolution and bitrate, FPS may drop
|
|
9094
|
+
* @see Stream
|
|
9095
|
+
* @memberOf Flashphoner.constants.CONTENT_HINT_TYPE
|
|
9096
|
+
*/
|
|
9097
|
+
TEXT: 'text'
|
|
9098
|
+
});
|
|
9026
9099
|
|
|
9027
|
-
module.exports =
|
|
9100
|
+
module.exports = {
|
|
9101
|
+
SESSION_STATUS,
|
|
9102
|
+
STREAM_STATUS,
|
|
9103
|
+
CALL_STATUS,
|
|
9104
|
+
STREAM_STATUS_INFO,
|
|
9105
|
+
CALL_STATUS_INFO,
|
|
9106
|
+
ERROR_INFO,
|
|
9107
|
+
MEDIA_DEVICE_KIND,
|
|
9108
|
+
TRANSPORT_TYPE,
|
|
9109
|
+
CONNECTION_QUALITY,
|
|
9110
|
+
STREAM_EVENT,
|
|
9111
|
+
STREAM_EVENT_TYPE,
|
|
9112
|
+
CONTENT_HINT_TYPE
|
|
9113
|
+
};
|
|
9028
9114
|
|
|
9029
9115
|
},{}],41:[function(require,module,exports){
|
|
9030
9116
|
'use strict';
|
|
@@ -10198,7 +10284,7 @@ var createSession = function (options) {
|
|
|
10198
10284
|
mediaProviders: Object.keys(MediaProvider),
|
|
10199
10285
|
keepAlive: keepAlive,
|
|
10200
10286
|
authToken:authToken,
|
|
10201
|
-
clientVersion: "2.0.
|
|
10287
|
+
clientVersion: "2.0.217",
|
|
10202
10288
|
clientOSVersion: window.navigator.appVersion,
|
|
10203
10289
|
clientBrowserVersion: window.navigator.userAgent,
|
|
10204
10290
|
msePacketizationVersion: 2,
|