Fixing some stuff
parent
3675aa98e6
commit
180ac54813
|
@ -2,76 +2,20 @@
|
|||
<project version="4">
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="978d055d-27d3-431a-bd34-e5e79bb273b3" name="Default" comment="">
|
||||
<change beforePath="" afterPath="$PROJECT_DIR$/.idea/dictionaries/wolverindev.xml" />
|
||||
<change beforePath="" afterPath="$PROJECT_DIR$/.idea/inspectionProfiles/Project_Default.xml" />
|
||||
<change beforePath="" afterPath="$PROJECT_DIR$/js/ui/modal/ModalConnect.ts" />
|
||||
<change beforePath="" afterPath="$PROJECT_DIR$/js/ui/modal/ModalCreateChannel.ts" />
|
||||
<change beforePath="" afterPath="$PROJECT_DIR$/js/ui/modal/ModalSettings.ts" />
|
||||
<change beforePath="" afterPath="$PROJECT_DIR$/js/voice/AudioController.ts" />
|
||||
<change beforePath="" afterPath="$PROJECT_DIR$/js/voice/AudioResampler.ts" />
|
||||
<change beforePath="" afterPath="$PROJECT_DIR$/js/voice/VoiceHandler.js.map" />
|
||||
<change beforePath="" afterPath="$PROJECT_DIR$/js/voice/VoiceRecorder.ts" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/Web-Client.iml" afterPath="$PROJECT_DIR$/.idea/Web-Client.iml" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/jsLibraryMappings.xml" afterPath="$PROJECT_DIR$/.idea/jsLibraryMappings.xml" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
|
||||
<change beforePath="$PROJECT_DIR$/asm/generated/TeaWeb-Native.js" afterPath="$PROJECT_DIR$/asm/generated/TeaWeb-Native.js" />
|
||||
<change beforePath="$PROJECT_DIR$/asm/generated/libopus.js" afterPath="$PROJECT_DIR$/asm/generated/libopus.js" />
|
||||
<change beforePath="$PROJECT_DIR$/asm/src/WebASMTest.cpp" afterPath="$PROJECT_DIR$/asm/src/WebASMTest.cpp" />
|
||||
<change beforePath="$PROJECT_DIR$/css/general.css" afterPath="$PROJECT_DIR$/css/general.css" />
|
||||
<change beforePath="$PROJECT_DIR$/css/ts/icons.css" afterPath="$PROJECT_DIR$/css/ts/icons.css" />
|
||||
<change beforePath="$PROJECT_DIR$/css/ts/tab.css" afterPath="$PROJECT_DIR$/css/ts/tab.css" />
|
||||
<change beforePath="$PROJECT_DIR$/index.html" afterPath="$PROJECT_DIR$/index.html" />
|
||||
<change beforePath="$PROJECT_DIR$/js/FileManager.js" afterPath="$PROJECT_DIR$/js/FileManager.js" />
|
||||
<change beforePath="$PROJECT_DIR$/js/FileManager.js.map" afterPath="$PROJECT_DIR$/js/FileManager.js.map" />
|
||||
<change beforePath="$PROJECT_DIR$/js/FileManager.ts" afterPath="$PROJECT_DIR$/js/FileManager.ts" />
|
||||
<change beforePath="$PROJECT_DIR$/js/InfoBar.js" afterPath="$PROJECT_DIR$/js/InfoBar.js" />
|
||||
<change beforePath="$PROJECT_DIR$/js/InfoBar.js.map" afterPath="$PROJECT_DIR$/js/InfoBar.js.map" />
|
||||
<change beforePath="$PROJECT_DIR$/js/InfoBar.ts" afterPath="$PROJECT_DIR$/js/InfoBar.ts" />
|
||||
<change beforePath="$PROJECT_DIR$/js/chat.js" afterPath="$PROJECT_DIR$/js/chat.js" />
|
||||
<change beforePath="$PROJECT_DIR$/js/chat.js.map" afterPath="$PROJECT_DIR$/js/chat.js.map" />
|
||||
<change beforePath="$PROJECT_DIR$/js/chat.ts" afterPath="$PROJECT_DIR$/js/chat.ts" />
|
||||
<change beforePath="$PROJECT_DIR$/js/client.js" afterPath="$PROJECT_DIR$/js/client.js" />
|
||||
<change beforePath="$PROJECT_DIR$/js/client.js.map" afterPath="$PROJECT_DIR$/js/client.js.map" />
|
||||
<change beforePath="$PROJECT_DIR$/js/client.ts" afterPath="$PROJECT_DIR$/js/client.ts" />
|
||||
<change beforePath="$PROJECT_DIR$/js/codec/Codec.js" afterPath="$PROJECT_DIR$/js/codec/Codec.js" />
|
||||
<change beforePath="$PROJECT_DIR$/js/codec/Codec.js.map" afterPath="$PROJECT_DIR$/js/codec/Codec.js.map" />
|
||||
<change beforePath="$PROJECT_DIR$/js/codec/Codec.ts" afterPath="$PROJECT_DIR$/js/codec/Codec.ts" />
|
||||
<change beforePath="$PROJECT_DIR$/js/connection.js" afterPath="$PROJECT_DIR$/js/connection.js" />
|
||||
<change beforePath="$PROJECT_DIR$/js/connection.js.map" afterPath="$PROJECT_DIR$/js/connection.js.map" />
|
||||
<change beforePath="$PROJECT_DIR$/js/connection.ts" afterPath="$PROJECT_DIR$/js/connection.ts" />
|
||||
<change beforePath="$PROJECT_DIR$/js/contextMenu.js" afterPath="$PROJECT_DIR$/js/contextMenu.js" />
|
||||
<change beforePath="$PROJECT_DIR$/js/contextMenu.js.map" afterPath="$PROJECT_DIR$/js/contextMenu.js.map" />
|
||||
<change beforePath="$PROJECT_DIR$/js/contextMenu.ts" afterPath="$PROJECT_DIR$/js/contextMenu.ts" />
|
||||
<change beforePath="$PROJECT_DIR$/js/main.js" afterPath="$PROJECT_DIR$/js/main.js" />
|
||||
<change beforePath="$PROJECT_DIR$/js/main.js.map" afterPath="$PROJECT_DIR$/js/main.js.map" />
|
||||
<change beforePath="$PROJECT_DIR$/js/main.ts" afterPath="$PROJECT_DIR$/js/main.ts" />
|
||||
<change beforePath="$PROJECT_DIR$/js/settings.js" afterPath="$PROJECT_DIR$/js/settings.js" />
|
||||
<change beforePath="$PROJECT_DIR$/js/settings.js.map" afterPath="$PROJECT_DIR$/js/settings.js.map" />
|
||||
<change beforePath="$PROJECT_DIR$/js/settings.ts" afterPath="$PROJECT_DIR$/js/settings.ts" />
|
||||
<change beforePath="$PROJECT_DIR$/js/ui/ControlBar.js" afterPath="$PROJECT_DIR$/js/ui/ControlBar.js" />
|
||||
<change beforePath="$PROJECT_DIR$/js/ui/ControlBar.js.map" afterPath="$PROJECT_DIR$/js/ui/ControlBar.js.map" />
|
||||
<change beforePath="$PROJECT_DIR$/js/ui/ControlBar.ts" afterPath="$PROJECT_DIR$/js/ui/ControlBar.ts" />
|
||||
<change beforePath="$PROJECT_DIR$/js/ui/channel.js" afterPath="$PROJECT_DIR$/js/ui/channel.js" />
|
||||
<change beforePath="$PROJECT_DIR$/js/ui/channel.js.map" afterPath="$PROJECT_DIR$/js/ui/channel.js.map" />
|
||||
<change beforePath="$PROJECT_DIR$/js/ui/channel.ts" afterPath="$PROJECT_DIR$/js/ui/channel.ts" />
|
||||
<change beforePath="$PROJECT_DIR$/js/ui/client.js" afterPath="$PROJECT_DIR$/js/ui/client.js" />
|
||||
<change beforePath="$PROJECT_DIR$/js/ui/client.js.map" afterPath="$PROJECT_DIR$/js/ui/client.js.map" />
|
||||
<change beforePath="$PROJECT_DIR$/js/ui/client.ts" afterPath="$PROJECT_DIR$/js/ui/client.ts" />
|
||||
<change beforePath="$PROJECT_DIR$/js/ui/server.js" afterPath="$PROJECT_DIR$/js/ui/server.js" />
|
||||
<change beforePath="$PROJECT_DIR$/js/ui/server.js.map" afterPath="$PROJECT_DIR$/js/ui/server.js.map" />
|
||||
<change beforePath="$PROJECT_DIR$/js/ui/server.ts" afterPath="$PROJECT_DIR$/js/ui/server.ts" />
|
||||
<change beforePath="$PROJECT_DIR$/js/ui/view.js" afterPath="$PROJECT_DIR$/js/ui/view.js" />
|
||||
<change beforePath="$PROJECT_DIR$/js/ui/view.js.map" afterPath="$PROJECT_DIR$/js/ui/view.js.map" />
|
||||
<change beforePath="$PROJECT_DIR$/js/ui/view.ts" afterPath="$PROJECT_DIR$/js/ui/view.ts" />
|
||||
<change beforePath="$PROJECT_DIR$/js/utils/modal.js" afterPath="$PROJECT_DIR$/js/utils/modal.js" />
|
||||
<change beforePath="$PROJECT_DIR$/js/utils/modal.js.map" afterPath="$PROJECT_DIR$/js/utils/modal.js.map" />
|
||||
<change beforePath="$PROJECT_DIR$/js/utils/modal.ts" afterPath="$PROJECT_DIR$/js/utils/modal.ts" />
|
||||
<change beforePath="$PROJECT_DIR$/js/utils/tab.js" afterPath="$PROJECT_DIR$/js/utils/tab.js" />
|
||||
<change beforePath="$PROJECT_DIR$/js/utils/tab.js.map" afterPath="$PROJECT_DIR$/js/utils/tab.js.map" />
|
||||
<change beforePath="$PROJECT_DIR$/js/utils/tab.ts" afterPath="$PROJECT_DIR$/js/utils/tab.ts" />
|
||||
<change beforePath="$PROJECT_DIR$/js/voice.js" afterPath="$PROJECT_DIR$/js/voice/VoiceHandler.js" />
|
||||
<change beforePath="$PROJECT_DIR$/js/voice.js.map" afterPath="" />
|
||||
<change beforePath="$PROJECT_DIR$/js/voice.ts" afterPath="$PROJECT_DIR$/js/voice/VoiceHandler.ts" />
|
||||
<change beforePath="$PROJECT_DIR$/vendor/aurora/aurora.js" afterPath="$PROJECT_DIR$/vendor/aurora/aurora.js" />
|
||||
<change beforePath="$PROJECT_DIR$/vendor/bootstrap/js/bootstrap.bundle.js" afterPath="$PROJECT_DIR$/vendor/bootstrap/js/bootstrap.bundle.js" />
|
||||
<change beforePath="$PROJECT_DIR$/vendor/opus/opus_to_pcm.js" afterPath="$PROJECT_DIR$/vendor/opus/opus_to_pcm.js" />
|
||||
<change beforePath="$PROJECT_DIR$/js/voice/AudioController.ts" afterPath="$PROJECT_DIR$/js/voice/AudioController.ts" />
|
||||
<change beforePath="$PROJECT_DIR$/js/voice/VoiceHandler.js" afterPath="$PROJECT_DIR$/js/voice/VoiceHandler.js" />
|
||||
<change beforePath="$PROJECT_DIR$/js/voice/VoiceHandler.js.map" afterPath="$PROJECT_DIR$/js/voice/VoiceHandler.js.map" />
|
||||
<change beforePath="$PROJECT_DIR$/js/voice/VoiceHandler.ts" afterPath="$PROJECT_DIR$/js/voice/VoiceHandler.ts" />
|
||||
</list>
|
||||
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
||||
<option name="TRACKING_ENABLED" value="true" />
|
||||
|
@ -82,21 +26,11 @@
|
|||
</component>
|
||||
<component name="FileEditorManager">
|
||||
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
|
||||
<file leaf-file-name="Codec.ts" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/js/codec/Codec.ts">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="501">
|
||||
<caret line="204" column="34" lean-forward="true" selection-start-line="204" selection-start-column="34" selection-end-line="204" selection-end-column="34" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="VoiceHandler.ts" pinned="false" current-in-tab="true">
|
||||
<file leaf-file-name="VoiceHandler.ts" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/js/voice/VoiceHandler.ts">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="-1506">
|
||||
<caret line="48" column="43" lean-forward="false" selection-start-line="48" selection-start-column="43" selection-end-line="48" selection-end-column="43" />
|
||||
<state relative-caret-position="330">
|
||||
<caret line="140" column="44" lean-forward="false" selection-start-line="140" selection-start-column="44" selection-end-line="140" selection-end-column="44" />
|
||||
<folding>
|
||||
<element signature="n#!!doc" expanded="true" />
|
||||
</folding>
|
||||
|
@ -107,28 +41,68 @@
|
|||
<file leaf-file-name="client.ts" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/js/client.ts">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="267">
|
||||
<caret line="117" column="42" lean-forward="true" selection-start-line="117" selection-start-column="42" selection-end-line="117" selection-end-column="42" />
|
||||
<state relative-caret-position="442">
|
||||
<caret line="120" column="42" lean-forward="false" selection-start-line="120" selection-start-column="42" selection-end-line="120" selection-end-column="42" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="ModalSettings.ts" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/js/ui/modal/ModalSettings.ts">
|
||||
<file leaf-file-name="chat.css" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/css/ts/chat.css">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="-198">
|
||||
<caret line="12" column="31" lean-forward="false" selection-start-line="12" selection-start-column="23" selection-end-line="12" selection-end-column="31" />
|
||||
<state relative-caret-position="-1056">
|
||||
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="connection.ts" pinned="false" current-in-tab="false">
|
||||
<file leaf-file-name="client.css" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/css/ts/client.css">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="414">
|
||||
<caret line="23" column="51" lean-forward="false" selection-start-line="23" selection-start-column="51" selection-end-line="23" selection-end-column="51" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="general.css" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/css/general.css">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="1854">
|
||||
<caret line="103" column="0" lean-forward="true" selection-start-line="103" selection-start-column="0" selection-end-line="103" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="tab.css" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/css/ts/tab.css">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="666">
|
||||
<caret line="37" column="14" lean-forward="true" selection-start-line="37" selection-start-column="14" selection-end-line="37" selection-end-column="14" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="ControlBar.ts" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/js/ui/ControlBar.ts">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="298">
|
||||
<caret line="27" column="4" lean-forward="false" selection-start-line="27" selection-start-column="4" selection-end-line="27" selection-end-column="4" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="connection.ts" pinned="false" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/js/connection.ts">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="408">
|
||||
<caret line="302" column="36" lean-forward="false" selection-start-line="302" selection-start-column="24" selection-end-line="302" selection-end-column="36" />
|
||||
<state relative-caret-position="326">
|
||||
<caret line="488" column="25" lean-forward="false" selection-start-line="488" selection-start-column="25" selection-end-line="488" selection-end-column="25" />
|
||||
<folding>
|
||||
<element signature="n#!!doc" expanded="true" />
|
||||
</folding>
|
||||
|
@ -136,64 +110,28 @@
|
|||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="channel.ts" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/js/ui/channel.ts">
|
||||
<file leaf-file-name="view.ts" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/js/ui/view.ts">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="263">
|
||||
<caret line="278" column="50" lean-forward="false" selection-start-line="278" selection-start-column="46" selection-end-line="278" selection-end-column="50" />
|
||||
<state relative-caret-position="298">
|
||||
<caret line="154" column="4" lean-forward="false" selection-start-line="154" selection-start-column="4" selection-end-line="154" selection-end-column="4" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="chat.ts" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/js/chat.ts">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="308">
|
||||
<caret line="181" column="36" lean-forward="false" selection-start-line="181" selection-start-column="36" selection-end-line="181" selection-end-column="36" />
|
||||
<folding>
|
||||
<marker date="1520366277688" expanded="true" signature="3766:3823" ph="..." />
|
||||
<marker date="1520366277688" expanded="true" signature="3897:3954" ph="..." />
|
||||
<marker date="1520448117338" expanded="true" signature="1900:1910" ph="..." />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="main.ts" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/js/main.ts">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="234">
|
||||
<caret line="16" column="24" lean-forward="true" selection-start-line="16" selection-start-column="24" selection-end-line="16" selection-end-column="24" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="InfoBar.ts" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/js/InfoBar.ts">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="-262">
|
||||
<caret line="57" column="25" lean-forward="false" selection-start-line="57" selection-start-column="25" selection-end-line="57" selection-end-column="25" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="index.html" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/index.html">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="-90">
|
||||
<caret line="28" column="87" lean-forward="true" selection-start-line="28" selection-start-column="87" selection-end-line="28" selection-end-column="87" />
|
||||
<folding>
|
||||
<element signature="n#style#0;n#div#0;n#body#0;n#html#0;n#!!top" expanded="true" />
|
||||
<element signature="n#style#0;n#div#1;n#div#0;n#div#1;n#div#0;n#body#0;n#html#0;n#!!top" expanded="true" />
|
||||
<element signature="n#style#0;n#div#0;n#x-content#0;n#x-entry#0;n#x-tab#0;n#template#0;n#body#0;n#html#0;n#!!top" expanded="true" />
|
||||
<element signature="n#style#0;n#div#0;n#div#0;n#x-content#0;n#x-entry#0;n#x-tab#0;n#template#0;n#body#0;n#html#0;n#!!top" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="VoiceRecorder.ts" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/js/voice/VoiceRecorder.ts">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="192">
|
||||
<caret line="15" column="11" lean-forward="false" selection-start-line="15" selection-start-column="4" selection-end-line="15" selection-end-column="11" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
</leaf>
|
||||
</component>
|
||||
<component name="FileTemplateManagerImpl">
|
||||
|
@ -215,8 +153,8 @@
|
|||
<find>channelTree</find>
|
||||
<find>channel</find>
|
||||
<find>update</find>
|
||||
<find>on_connected</find>
|
||||
<find>on_data</find>
|
||||
<find>on_connected</find>
|
||||
</findStrings>
|
||||
</component>
|
||||
<component name="Git.Settings">
|
||||
|
@ -238,7 +176,6 @@
|
|||
<option value="$PROJECT_DIR$/css/ts/client.css" />
|
||||
<option value="$PROJECT_DIR$/js/ui/ControlBar.ts" />
|
||||
<option value="$PROJECT_DIR$/js/voice/VoiceRecorder.ts" />
|
||||
<option value="$PROJECT_DIR$/js/voice/AudioController.ts" />
|
||||
<option value="$PROJECT_DIR$/js/ui/server.ts" />
|
||||
<option value="$PROJECT_DIR$/js/ui/view.ts" />
|
||||
<option value="$PROJECT_DIR$/js/settings.ts" />
|
||||
|
@ -249,13 +186,15 @@
|
|||
<option value="$PROJECT_DIR$/css/ts/icons.css" />
|
||||
<option value="$PROJECT_DIR$/js/FileManager.ts" />
|
||||
<option value="$PROJECT_DIR$/js/ui/modal/ModalCreateChannel.ts" />
|
||||
<option value="$PROJECT_DIR$/js/connection.ts" />
|
||||
<option value="$PROJECT_DIR$/css/general.css" />
|
||||
<option value="$PROJECT_DIR$/index.html" />
|
||||
<option value="$PROJECT_DIR$/js/client.ts" />
|
||||
<option value="$PROJECT_DIR$/js/InfoBar.ts" />
|
||||
<option value="$PROJECT_DIR$/js/codec/Codec.ts" />
|
||||
<option value="$PROJECT_DIR$/js/voice/VoiceHandler.ts" />
|
||||
<option value="$PROJECT_DIR$/js/voice/AudioController.ts" />
|
||||
<option value="$PROJECT_DIR$/js/chat.ts" />
|
||||
<option value="$PROJECT_DIR$/js/connection.ts" />
|
||||
<option value="$PROJECT_DIR$/js/client.ts" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
|
@ -421,12 +360,20 @@
|
|||
<updated>1519749313999</updated>
|
||||
<workItem from="1519749316100" duration="9698000" />
|
||||
<workItem from="1520012895408" duration="13944000" />
|
||||
<workItem from="1520175420796" duration="52205000" />
|
||||
<workItem from="1520175420796" duration="55488000" />
|
||||
</task>
|
||||
<task id="LOCAL-00001" summary="A lot of updates :)">
|
||||
<created>1520446012318</created>
|
||||
<option name="number" value="00001" />
|
||||
<option name="presentableId" value="LOCAL-00001" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1520446012319</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="2" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TimeTrackingManager">
|
||||
<option name="totallyTimeSpent" value="75847000" />
|
||||
<option name="totallyTimeSpent" value="79130000" />
|
||||
</component>
|
||||
<component name="ToolWindowManager">
|
||||
<frame x="65" y="-4" width="1215" height="1028" extended-state="6" />
|
||||
|
@ -437,7 +384,7 @@
|
|||
<window_info id="npm" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
|
||||
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="TypeScript" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.2483731" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="TypeScript" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.2483731" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.23045267" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
|
||||
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.14320987" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
|
||||
<window_info id="Docker" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||
|
@ -513,6 +460,12 @@
|
|||
<component name="VcsContentAnnotationSettings">
|
||||
<option name="myLimit" value="2678400000" />
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="false" />
|
||||
<option name="CHECK_NEW_TODO" value="false" />
|
||||
<MESSAGE value="A lot of updates :)" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="A lot of updates :)" />
|
||||
</component>
|
||||
<component name="XDebuggerManager">
|
||||
<breakpoint-manager>
|
||||
<option name="time" value="3" />
|
||||
|
@ -520,16 +473,6 @@
|
|||
<watches-manager />
|
||||
</component>
|
||||
<component name="editorHistoryManager">
|
||||
<entry file="file://$PROJECT_DIR$/js/connection.ts">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="0">
|
||||
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
<folding>
|
||||
<element signature="n#!!doc" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/node_modules/@types/emscripten/index.d.ts">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="1764">
|
||||
|
@ -577,6 +520,9 @@
|
|||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="90">
|
||||
<caret line="7" column="0" lean-forward="false" selection-start-line="7" selection-start-column="0" selection-end-line="7" selection-end-column="0" />
|
||||
<folding>
|
||||
<element signature="n#!!doc" expanded="false" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
|
@ -613,14 +559,6 @@
|
|||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/js/chat.ts">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="576">
|
||||
<caret line="32" column="41" lean-forward="false" selection-start-line="32" selection-start-column="41" selection-end-line="32" selection-end-column="41" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/js/ui/modal/ModalConnect.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="0">
|
||||
|
@ -672,14 +610,6 @@
|
|||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/js/voice/AudioController.ts">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="522">
|
||||
<caret line="29" column="31" lean-forward="true" selection-start-line="29" selection-start-column="31" selection-end-line="29" selection-end-column="31" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/js/ui/server.ts">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="341">
|
||||
|
@ -688,14 +618,6 @@
|
|||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/js/ui/view.ts">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="270">
|
||||
<caret line="20" column="18" lean-forward="false" selection-start-line="20" selection-start-column="4" selection-end-line="20" selection-end-column="18" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/js/utils/tab.ts">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="316">
|
||||
|
@ -728,14 +650,6 @@
|
|||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/js/ui/ControlBar.ts">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="204">
|
||||
<caret line="29" column="38" lean-forward="true" selection-start-line="29" selection-start-column="38" selection-end-line="29" selection-end-column="38" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/js/permission/GroupManager.ts">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="33">
|
||||
|
@ -762,14 +676,6 @@
|
|||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/css/ts/client.css">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="-1026">
|
||||
<caret line="12" column="0" lean-forward="true" selection-start-line="12" selection-start-column="0" selection-end-line="12" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/img/client_icon_sprite.svg">
|
||||
<provider selected="true" editor-type-id="images">
|
||||
<state />
|
||||
|
@ -815,14 +721,6 @@
|
|||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/css/ts/tab.css">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="186">
|
||||
<caret line="34" column="0" lean-forward="true" selection-start-line="34" selection-start-column="0" selection-end-line="34" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/css/ts/icons.css">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="198">
|
||||
|
@ -831,14 +729,6 @@
|
|||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/css/general.css">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="429">
|
||||
<caret line="103" column="0" lean-forward="true" selection-start-line="103" selection-start-column="0" selection-end-line="103" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/js/ui/modal/ModalSettings.ts">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="-198">
|
||||
|
@ -858,24 +748,6 @@
|
|||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/js/connection.ts">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="408">
|
||||
<caret line="302" column="36" lean-forward="false" selection-start-line="302" selection-start-column="24" selection-end-line="302" selection-end-column="36" />
|
||||
<folding>
|
||||
<element signature="n#!!doc" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/js/client.ts">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="267">
|
||||
<caret line="117" column="42" lean-forward="true" selection-start-line="117" selection-start-column="42" selection-end-line="117" selection-end-column="42" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/js/InfoBar.ts">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="-262">
|
||||
|
@ -897,14 +769,6 @@
|
|||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/js/voice/VoiceRecorder.ts">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="192">
|
||||
<caret line="15" column="11" lean-forward="false" selection-start-line="15" selection-start-column="4" selection-end-line="15" selection-end-column="11" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/js/codec/Codec.ts">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="501">
|
||||
|
@ -921,10 +785,102 @@
|
|||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/js/voice/VoiceRecorder.ts">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="192">
|
||||
<caret line="15" column="11" lean-forward="false" selection-start-line="15" selection-start-column="4" selection-end-line="15" selection-end-column="11" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/js/voice/AudioController.ts">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="496">
|
||||
<caret line="99" column="5" lean-forward="true" selection-start-line="99" selection-start-column="5" selection-end-line="99" selection-end-column="5" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/js/ui/ControlBar.ts">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="298">
|
||||
<caret line="27" column="4" lean-forward="false" selection-start-line="27" selection-start-column="4" selection-end-line="27" selection-end-column="4" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/js/ui/view.ts">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="298">
|
||||
<caret line="154" column="4" lean-forward="false" selection-start-line="154" selection-start-column="4" selection-end-line="154" selection-end-column="4" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/js/chat.ts">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="308">
|
||||
<caret line="181" column="36" lean-forward="false" selection-start-line="181" selection-start-column="36" selection-end-line="181" selection-end-column="36" />
|
||||
<folding>
|
||||
<marker date="1520448117338" expanded="true" signature="1900:1910" ph="..." />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/css/ts/chat.css">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="-1056">
|
||||
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/css/general.css">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="1854">
|
||||
<caret line="103" column="0" lean-forward="true" selection-start-line="103" selection-start-column="0" selection-end-line="103" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/css/ts/tab.css">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="666">
|
||||
<caret line="37" column="14" lean-forward="true" selection-start-line="37" selection-start-column="14" selection-end-line="37" selection-end-column="14" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/css/ts/client.css">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="414">
|
||||
<caret line="23" column="51" lean-forward="false" selection-start-line="23" selection-start-column="51" selection-end-line="23" selection-end-column="51" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/js/voice/VoiceHandler.ts">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="-1506">
|
||||
<caret line="48" column="43" lean-forward="false" selection-start-line="48" selection-start-column="43" selection-end-line="48" selection-end-column="43" />
|
||||
<state relative-caret-position="330">
|
||||
<caret line="140" column="44" lean-forward="false" selection-start-line="140" selection-start-column="44" selection-end-line="140" selection-end-column="44" />
|
||||
<folding>
|
||||
<element signature="n#!!doc" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/js/client.ts">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="442">
|
||||
<caret line="120" column="42" lean-forward="false" selection-start-line="120" selection-start-column="42" selection-end-line="120" selection-end-column="42" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/js/connection.ts">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="326">
|
||||
<caret line="488" column="25" lean-forward="false" selection-start-line="488" selection-start-column="25" selection-end-line="488" selection-end-column="25" />
|
||||
<folding>
|
||||
<element signature="n#!!doc" expanded="true" />
|
||||
</folding>
|
||||
|
|
|
@ -19,13 +19,13 @@ class ChatMessage {
|
|||
get htmlTag() {
|
||||
if (this._htmlTag)
|
||||
return this._htmlTag;
|
||||
var tag = $("<div></div>");
|
||||
let tag = $.spawn("div");
|
||||
tag.addClass("message");
|
||||
var dateTag = $("<div></div>");
|
||||
let dateTag = $.spawn("div");
|
||||
dateTag.text("<" + this.num(this.date.getUTCHours()) + ":" + this.num(this.date.getUTCMinutes()) + ":" + this.num(this.date.getUTCSeconds()) + "> ");
|
||||
dateTag.css("margin-right", "4px");
|
||||
dateTag.css("color", "dodgerblue");
|
||||
var messageTag = $("<div></div>");
|
||||
let messageTag = $.spawn("div");
|
||||
messageTag.html(this.message);
|
||||
messageTag.css("color", "blue");
|
||||
this._htmlTag = tag;
|
||||
|
@ -145,6 +145,7 @@ class ChatEntry {
|
|||
return tag;
|
||||
}
|
||||
set name(newName) {
|
||||
console.log("Change name!");
|
||||
this._name = newName;
|
||||
this.htmlTag.find(".name").text(this._name);
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -26,15 +26,15 @@ class ChatMessage {
|
|||
get htmlTag() {
|
||||
if(this._htmlTag) return this._htmlTag;
|
||||
|
||||
var tag = $("<div></div>") as JQuery<HTMLElement>;
|
||||
let tag = $.spawn("div");
|
||||
tag.addClass("message");
|
||||
|
||||
var dateTag = $("<div></div>") as JQuery<HTMLElement>;
|
||||
let dateTag = $.spawn("div");
|
||||
dateTag.text("<" + this.num(this.date.getUTCHours()) + ":" + this.num(this.date.getUTCMinutes()) + ":" + this.num(this.date.getUTCSeconds()) + "> ");
|
||||
dateTag.css("margin-right", "4px");
|
||||
dateTag.css("color", "dodgerblue");
|
||||
|
||||
var messageTag = $("<div></div>") as JQuery<HTMLElement>;
|
||||
let messageTag = $.spawn("div");
|
||||
messageTag.html(this.message);
|
||||
messageTag.css("color", "blue");
|
||||
|
||||
|
@ -179,6 +179,7 @@ class ChatEntry {
|
|||
}
|
||||
|
||||
set name(newName : string) {
|
||||
console.log("Change name!");
|
||||
this._name = newName;
|
||||
this.htmlTag.find(".name").text(this._name);
|
||||
}
|
||||
|
|
25
js/client.js
25
js/client.js
|
@ -9,14 +9,15 @@
|
|||
/// <reference path="ui/ControlBar.ts" />
|
||||
var DisconnectReason;
|
||||
(function (DisconnectReason) {
|
||||
DisconnectReason[DisconnectReason["CONNECT_FAILURE"] = 0] = "CONNECT_FAILURE";
|
||||
DisconnectReason[DisconnectReason["CONNECTION_CLOSED"] = 1] = "CONNECTION_CLOSED";
|
||||
DisconnectReason[DisconnectReason["CONNECTION_FATAL_ERROR"] = 2] = "CONNECTION_FATAL_ERROR";
|
||||
DisconnectReason[DisconnectReason["CONNECTION_PING_TIMEOUT"] = 3] = "CONNECTION_PING_TIMEOUT";
|
||||
DisconnectReason[DisconnectReason["CLIENT_KICKED"] = 4] = "CLIENT_KICKED";
|
||||
DisconnectReason[DisconnectReason["CLIENT_BANNED"] = 5] = "CLIENT_BANNED";
|
||||
DisconnectReason[DisconnectReason["SERVER_CLOSED"] = 6] = "SERVER_CLOSED";
|
||||
DisconnectReason[DisconnectReason["UNKNOWN"] = 7] = "UNKNOWN";
|
||||
DisconnectReason[DisconnectReason["REQUESTED"] = 0] = "REQUESTED";
|
||||
DisconnectReason[DisconnectReason["CONNECT_FAILURE"] = 1] = "CONNECT_FAILURE";
|
||||
DisconnectReason[DisconnectReason["CONNECTION_CLOSED"] = 2] = "CONNECTION_CLOSED";
|
||||
DisconnectReason[DisconnectReason["CONNECTION_FATAL_ERROR"] = 3] = "CONNECTION_FATAL_ERROR";
|
||||
DisconnectReason[DisconnectReason["CONNECTION_PING_TIMEOUT"] = 4] = "CONNECTION_PING_TIMEOUT";
|
||||
DisconnectReason[DisconnectReason["CLIENT_KICKED"] = 5] = "CLIENT_KICKED";
|
||||
DisconnectReason[DisconnectReason["CLIENT_BANNED"] = 6] = "CLIENT_BANNED";
|
||||
DisconnectReason[DisconnectReason["SERVER_CLOSED"] = 7] = "SERVER_CLOSED";
|
||||
DisconnectReason[DisconnectReason["UNKNOWN"] = 8] = "UNKNOWN";
|
||||
})(DisconnectReason || (DisconnectReason = {}));
|
||||
var ConnectionState;
|
||||
(function (ConnectionState) {
|
||||
|
@ -61,6 +62,8 @@ class TSClient {
|
|||
this.serverConnection.on_connected = this.onConnected.bind(this);
|
||||
}
|
||||
startConnection(addr) {
|
||||
if (this.serverConnection)
|
||||
this.handleDisconnect(DisconnectReason.REQUESTED);
|
||||
let idx = addr.lastIndexOf(':');
|
||||
let port;
|
||||
let host;
|
||||
|
@ -91,6 +94,7 @@ class TSClient {
|
|||
*/
|
||||
onConnected() {
|
||||
console.log("Client connected!");
|
||||
this.channelTree.registerClient(this._ownEntry);
|
||||
this.settings.loadServer();
|
||||
chat.serverChat().appendMessage("Connected");
|
||||
this.serverConnection.sendCommand("channelsubscribeall");
|
||||
|
@ -102,6 +106,8 @@ class TSClient {
|
|||
//Sould be triggered by `notifyclientleftview`
|
||||
handleDisconnect(type, data = {}) {
|
||||
switch (type) {
|
||||
case DisconnectReason.REQUESTED:
|
||||
break;
|
||||
case DisconnectReason.CONNECT_FAILURE:
|
||||
console.error("Could not connect to remote host! Exception");
|
||||
console.error(data);
|
||||
|
@ -129,7 +135,8 @@ class TSClient {
|
|||
this.selectInfo.currentSelected = null;
|
||||
this.channelTree.reset();
|
||||
this.voiceConnection.dropSession();
|
||||
this.serverConnection.disconnect();
|
||||
if (this.serverConnection)
|
||||
this.serverConnection.disconnect();
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=client.js.map
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"client.js","sourceRoot":"","sources":["client.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,mCAAmC;AACnC,sCAAsC;AACtC,oCAAoC;AACpC,mCAAmC;AACnC,uCAAuC;AACvC,wDAAwD;AACxD,mDAAmD;AACnD,yCAAyC;AAEzC,IAAK,gBASJ;AATD,WAAK,gBAAgB;IACjB,6EAAe,CAAA;IACf,iFAAiB,CAAA;IACjB,2FAAsB,CAAA;IACtB,6FAAuB,CAAA;IACvB,yEAAa,CAAA;IACb,yEAAa,CAAA;IACb,yEAAa,CAAA;IACb,6DAAO,CAAA;AACX,CAAC,EATI,gBAAgB,KAAhB,gBAAgB,QASpB;AAED,IAAK,eAMJ;AAND,WAAK,eAAe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AAgB,CAAC,UAAU,EAAE,CAAC;IACjE,CAAC;CACJ"}
|
|
@ -9,6 +9,7 @@
|
|||
/// <reference path="ui/ControlBar.ts" />
|
||||
|
||||
enum DisconnectReason {
|
||||
REQUESTED,
|
||||
CONNECT_FAILURE,
|
||||
CONNECTION_CLOSED,
|
||||
CONNECTION_FATAL_ERROR,
|
||||
|
@ -77,6 +78,9 @@ class TSClient {
|
|||
}
|
||||
|
||||
startConnection(addr: string) {
|
||||
if(this.serverConnection)
|
||||
this.handleDisconnect(DisconnectReason.REQUESTED);
|
||||
|
||||
let idx = addr.lastIndexOf(':');
|
||||
|
||||
let port: number;
|
||||
|
@ -114,6 +118,7 @@ class TSClient {
|
|||
*/
|
||||
onConnected() {
|
||||
console.log("Client connected!");
|
||||
this.channelTree.registerClient(this._ownEntry);
|
||||
this.settings.loadServer();
|
||||
chat.serverChat().appendMessage("Connected");
|
||||
this.serverConnection.sendCommand("channelsubscribeall");
|
||||
|
@ -126,6 +131,8 @@ class TSClient {
|
|||
//Sould be triggered by `notifyclientleftview`
|
||||
handleDisconnect(type: DisconnectReason, data: any = {}) {
|
||||
switch (type) {
|
||||
case DisconnectReason.REQUESTED:
|
||||
break;
|
||||
case DisconnectReason.CONNECT_FAILURE:
|
||||
console.error("Could not connect to remote host! Exception");
|
||||
console.error(data);
|
||||
|
@ -167,6 +174,6 @@ class TSClient {
|
|||
this.selectInfo.currentSelected = null;
|
||||
this.channelTree.reset();
|
||||
this.voiceConnection.dropSession();
|
||||
this.serverConnection.disconnect();
|
||||
if(this.serverConnection) this.serverConnection.disconnect();
|
||||
}
|
||||
}
|
|
@ -49,21 +49,30 @@ class ServerConnection {
|
|||
this._socket = new WebSocket('ws:' + this._remoteHost + ":" + this._remotePort);
|
||||
clearTimeout(this._connectTimeoutHandler);
|
||||
this._connectTimeoutHandler = null;
|
||||
this._socket.onopen = function () {
|
||||
self.on_connect();
|
||||
const _socketCpy = this._socket;
|
||||
this._socket.onopen = () => {
|
||||
if (this._socket != _socketCpy)
|
||||
return;
|
||||
this.on_connect();
|
||||
};
|
||||
this._socket.onclose = event => {
|
||||
if (this._socket != _socketCpy)
|
||||
return;
|
||||
this._client.handleDisconnect(DisconnectReason.CONNECTION_CLOSED, {
|
||||
code: event.code,
|
||||
reason: event.reason,
|
||||
event: event
|
||||
});
|
||||
};
|
||||
this._socket.onerror = function (e) {
|
||||
this._socket.onerror = e => {
|
||||
if (this._socket != _socketCpy)
|
||||
return;
|
||||
console.log("Got error: (" + self._socket.readyState + ")");
|
||||
console.log(e);
|
||||
};
|
||||
this._socket.onmessage = function (msg) {
|
||||
this._socket.onmessage = msg => {
|
||||
if (this._socket != _socketCpy)
|
||||
return;
|
||||
self.handleWebSocketMessage(msg.data);
|
||||
};
|
||||
this.updateConnectionState(ConnectionState.INITIALISING);
|
||||
|
@ -78,15 +87,16 @@ class ServerConnection {
|
|||
}
|
||||
disconnect() {
|
||||
if (this._connectionState == ConnectionState.UNCONNECTED)
|
||||
return;
|
||||
if (this._socket)
|
||||
this._socket.close();
|
||||
this._socket = null;
|
||||
return false;
|
||||
this.updateConnectionState(ConnectionState.UNCONNECTED);
|
||||
if (this._socket)
|
||||
this._socket.close(3000 + 0xFF, "request disconnect");
|
||||
this._socket = null;
|
||||
for (let future of this._retListener)
|
||||
future.reject("Connection closed");
|
||||
this._retListener = [];
|
||||
this._retCodeIdx = 0;
|
||||
return true;
|
||||
}
|
||||
handleWebSocketMessage(data) {
|
||||
if (typeof (data) === "string") {
|
||||
|
@ -323,9 +333,8 @@ class ConnectionCommandHandler {
|
|||
client = tree.insertClient(client, channel);
|
||||
}
|
||||
else {
|
||||
if (client === this.connection._client.getClient()) {
|
||||
if (client == this.connection._client.getClient())
|
||||
chat.channelChat().name = channel.channelName();
|
||||
}
|
||||
tree.moveClient(client, channel);
|
||||
}
|
||||
if (json["reasonid"] == ViewReasonId.VREASON_USER_ACTION) {
|
||||
|
@ -409,6 +418,8 @@ class ConnectionCommandHandler {
|
|||
if (!channel_from)
|
||||
console.error("Unknown client move (Channel from)!");
|
||||
tree.moveClient(client, channel_to);
|
||||
if (client instanceof LocalClientEntry)
|
||||
chat.channelChat().name = channel_to.channelName();
|
||||
if (json["reasonid"] == ViewReasonId.VREASON_MOVED) {
|
||||
chat.serverChat().appendMessage("{0} was moved from channel {1} to {2} by {3}", true, client.createChatTag(true), channel_from ? channel_from.createChatTag(true) : undefined, channel_to.createChatTag(true), ClientEntry.chatTag(json["invokerid"], json["invokername"], json["invokeruid"]));
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -81,11 +81,15 @@ class ServerConnection {
|
|||
this._socket = new WebSocket('ws:' + this._remoteHost + ":" + this._remotePort);
|
||||
clearTimeout(this._connectTimeoutHandler);
|
||||
this._connectTimeoutHandler = null;
|
||||
this._socket.onopen = function () {
|
||||
self.on_connect();
|
||||
|
||||
const _socketCpy = this._socket;
|
||||
this._socket.onopen = () => {
|
||||
if(this._socket != _socketCpy) return;
|
||||
this.on_connect();
|
||||
};
|
||||
|
||||
this._socket.onclose = event => {
|
||||
if(this._socket != _socketCpy) return;
|
||||
this._client.handleDisconnect(DisconnectReason.CONNECTION_CLOSED, {
|
||||
code: event.code,
|
||||
reason: event.reason,
|
||||
|
@ -93,12 +97,14 @@ class ServerConnection {
|
|||
});
|
||||
};
|
||||
|
||||
this._socket.onerror = function (e) {
|
||||
this._socket.onerror = e => {
|
||||
if(this._socket != _socketCpy) return;
|
||||
console.log("Got error: (" + self._socket.readyState + ")");
|
||||
console.log(e);
|
||||
};
|
||||
|
||||
this._socket.onmessage = function (msg) {
|
||||
this._socket.onmessage = msg => {
|
||||
if(this._socket != _socketCpy) return;
|
||||
self.handleWebSocketMessage(msg.data);
|
||||
};
|
||||
this.updateConnectionState(ConnectionState.INITIALISING);
|
||||
|
@ -112,16 +118,17 @@ class ServerConnection {
|
|||
this._connectionState = state;
|
||||
}
|
||||
|
||||
disconnect() {
|
||||
if(this._connectionState == ConnectionState.UNCONNECTED) return;
|
||||
|
||||
if(this._socket) this._socket.close();
|
||||
this._socket = null;
|
||||
disconnect() : boolean {
|
||||
if(this._connectionState == ConnectionState.UNCONNECTED) return false;
|
||||
this.updateConnectionState(ConnectionState.UNCONNECTED);
|
||||
|
||||
if(this._socket) this._socket.close(3000 + 0xFF, "request disconnect");
|
||||
this._socket = null;
|
||||
for(let future of this._retListener)
|
||||
future.reject("Connection closed");
|
||||
this._retListener = [];
|
||||
this._retCodeIdx = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
private handleWebSocketMessage(data) {
|
||||
|
@ -382,9 +389,8 @@ class ConnectionCommandHandler {
|
|||
client = new ClientEntry(json["clid"], json["client_nickname"]);
|
||||
client = tree.insertClient(client, channel);
|
||||
} else {
|
||||
if(client === this.connection._client.getClient()) {
|
||||
if(client == this.connection._client.getClient())
|
||||
chat.channelChat().name = channel.channelName();
|
||||
}
|
||||
tree.moveClient(client, channel);
|
||||
}
|
||||
|
||||
|
@ -480,6 +486,9 @@ class ConnectionCommandHandler {
|
|||
|
||||
tree.moveClient(client, channel_to);
|
||||
|
||||
if(client instanceof LocalClientEntry)
|
||||
chat.channelChat().name = channel_to.channelName();
|
||||
|
||||
if(json["reasonid"] == ViewReasonId.VREASON_MOVED) {
|
||||
chat.serverChat().appendMessage("{0} was moved from channel {1} to {2} by {3}", true,
|
||||
client.createChatTag(true),
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
enum PlayerState {
|
||||
PREBUFFERING,
|
||||
PLAYING,
|
||||
BUFFERING,
|
||||
STOPPED
|
||||
}
|
||||
|
||||
class AudioController {
|
||||
private static _globalContext;
|
||||
static get globalContext() : AudioContext {
|
||||
|
@ -7,52 +14,62 @@ class AudioController {
|
|||
}
|
||||
|
||||
speakerContext: AudioContext;
|
||||
nextTime: number;
|
||||
last: number;
|
||||
audioCache: AudioBuffer[];
|
||||
init: boolean;
|
||||
private _audioStopped: boolean = true;
|
||||
private timeIndex: number = 0;
|
||||
private playerState: PlayerState = PlayerState.STOPPED;
|
||||
private audioCache: AudioBuffer[];
|
||||
private _playingSources: AudioBufferSourceNode[] = [];
|
||||
allowBuffering: boolean = false;
|
||||
|
||||
//Events
|
||||
onSpeaking: () => void;
|
||||
onSilence: () => void;
|
||||
|
||||
constructor() {
|
||||
this.speakerContext = AudioController.globalContext;
|
||||
this.nextTime = 0;
|
||||
this.last = 0;
|
||||
this.audioCache = [];
|
||||
this.init = false;
|
||||
|
||||
this.onSpeaking = function () { };
|
||||
this.onSilence = function () { };
|
||||
}
|
||||
|
||||
play(buffer: AudioBuffer) {
|
||||
playBuffer(buffer: AudioBuffer) {
|
||||
if (buffer.sampleRate != this.speakerContext.sampleRate)
|
||||
console.warn("[AudioController] Source sample rate isn't equal to playback sample rate!");
|
||||
this.audioCache.push(buffer);
|
||||
|
||||
let currentTime = new Date().getTime();
|
||||
if (this._audioStopped && !this.init) {
|
||||
this.nextTime = 0;
|
||||
this.init = true;
|
||||
console.log("[Audio] New data");
|
||||
if(this.playerState == PlayerState.STOPPED) {
|
||||
console.log("[Audio] Starting new playback");
|
||||
this.playerState = PlayerState.PREBUFFERING;
|
||||
//New audio
|
||||
}
|
||||
this.last = currentTime;
|
||||
|
||||
|
||||
if (this.init && this.audioCache.length > 5) {
|
||||
this.onSpeaking();
|
||||
this.playCache(this.audioCache);
|
||||
this.init = false;
|
||||
console.log("[Audio] Prebuffering succeeded (Replaying now)");
|
||||
} else if (!this.init) {
|
||||
this.playCache(this.audioCache);
|
||||
switch (this.playerState) {
|
||||
case PlayerState.PREBUFFERING:
|
||||
case PlayerState.BUFFERING:
|
||||
if(this.audioCache.length < 5) {
|
||||
if(this.playerState == PlayerState.BUFFERING) {
|
||||
if(this.allowBuffering) break;
|
||||
} else break;
|
||||
}
|
||||
if(this.playerState == PlayerState.PREBUFFERING) {
|
||||
console.log("[Audio] Prebuffering succeeded (Replaying now)");
|
||||
this.onSpeaking();
|
||||
} else {
|
||||
if(this.allowBuffering)
|
||||
console.log("[Audio] Buffering succeeded (Replaying now)");
|
||||
}
|
||||
this.timeIndex = 0; //Instant replay
|
||||
this.playerState = PlayerState.PLAYING;
|
||||
case PlayerState.PLAYING:
|
||||
this.playCache(this.audioCache);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private _playingSources: AudioBufferSourceNode[] = [];
|
||||
playCache(cache) {
|
||||
private playCache(cache) {
|
||||
while (cache.length) {
|
||||
let buffer = cache.shift();
|
||||
let source = this.speakerContext.createBufferSource();
|
||||
|
@ -61,32 +78,37 @@ class AudioController {
|
|||
source.connect(this.speakerContext.destination);
|
||||
source.onended = () => {
|
||||
this._playingSources.remove(source);
|
||||
this.testPlayback();
|
||||
this.testBufferQueue();
|
||||
};
|
||||
if (this.nextTime == 0) {
|
||||
this._audioStopped = false;
|
||||
this.nextTime = this.speakerContext.currentTime;
|
||||
if (this.timeIndex == 0) {
|
||||
this.timeIndex = this.speakerContext.currentTime;
|
||||
console.log("New next time!");
|
||||
}
|
||||
source.start(this.nextTime);
|
||||
this.nextTime += source.buffer.duration;
|
||||
source.start(this.timeIndex);
|
||||
this.timeIndex += source.buffer.duration;
|
||||
this._playingSources.push(source);
|
||||
}
|
||||
};
|
||||
|
||||
stopAudio(now: boolean = false) {
|
||||
this.playerState = PlayerState.STOPPED;
|
||||
if(now) {
|
||||
for(let e of this._playingSources)
|
||||
e.stop();
|
||||
this._playingSources = [];
|
||||
this.testPlayback();
|
||||
}
|
||||
}
|
||||
|
||||
private testPlayback() {
|
||||
private testBufferQueue() {
|
||||
if(this._playingSources.length == 0) {
|
||||
this.onSilence();
|
||||
this._audioStopped = true;
|
||||
|
||||
|
||||
if(this.playerState != PlayerState.STOPPED) {
|
||||
this.playerState = PlayerState.BUFFERING;
|
||||
if(!this.allowBuffering)
|
||||
console.warn("[Audi] Detected a buffer underflow!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -118,11 +118,16 @@ class VoiceConnection {
|
|||
encodedData = message.data.subarray(5);
|
||||
else
|
||||
encodedData = new Uint8Array(message.data, 5);
|
||||
this.codecs[codec].decodeSamples(encodedData).then(buffer => {
|
||||
client.getAudioController().play(buffer);
|
||||
}).catch(error => {
|
||||
console.error("Could not playback client's (" + clientId + ") audio (" + error + ")");
|
||||
});
|
||||
if (encodedData.length == 0) {
|
||||
client.getAudioController().stopAudio();
|
||||
}
|
||||
else {
|
||||
this.codecs[codec].decodeSamples(encodedData).then(buffer => {
|
||||
client.getAudioController().playBuffer(buffer);
|
||||
}).catch(error => {
|
||||
console.error("Could not playback client's (" + clientId + ") audio (" + error + ")");
|
||||
});
|
||||
}
|
||||
}
|
||||
handleVoiceData(data, head) {
|
||||
if (head) {
|
||||
|
@ -135,7 +140,7 @@ class VoiceConnection {
|
|||
handleVoiceEnded() {
|
||||
console.log("Voice ended");
|
||||
this.client.getClient().speaking = false;
|
||||
//TODO!
|
||||
this.sendVoicePacket(new Uint8Array(0), 4); //TODO Use channel codec!
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=VoiceHandler.js.map
|
File diff suppressed because one or more lines are too long
|
@ -136,11 +136,16 @@ class VoiceConnection {
|
|||
if(message.data.subarray)
|
||||
encodedData = message.data.subarray(5);
|
||||
else encodedData = new Uint8Array(message.data, 5);
|
||||
this.codecs[codec].decodeSamples(encodedData).then(buffer => {
|
||||
client.getAudioController().play(buffer);
|
||||
}).catch(error => {
|
||||
console.error("Could not playback client's (" + clientId + ") audio (" + error + ")");
|
||||
});
|
||||
|
||||
if(encodedData.length == 0) {
|
||||
client.getAudioController().stopAudio();
|
||||
} else {
|
||||
this.codecs[codec].decodeSamples(encodedData).then(buffer => {
|
||||
client.getAudioController().playBuffer(buffer);
|
||||
}).catch(error => {
|
||||
console.error("Could not playback client's (" + clientId + ") audio (" + error + ")");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private handleVoiceData(data: AudioBuffer, head: boolean) {
|
||||
|
@ -155,6 +160,6 @@ class VoiceConnection {
|
|||
private handleVoiceEnded() {
|
||||
console.log("Voice ended");
|
||||
this.client.getClient().speaking = false;
|
||||
//TODO!
|
||||
this.sendVoicePacket(new Uint8Array(0), 4); //TODO Use channel codec!
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue