ue-softphone-sdk-beta 3.0.16

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.
@@ -0,0 +1,60 @@
1
+ <!--
2
+ * @Author: Wangtao
3
+ * @Date: 2024-02-04 15:32:27
4
+ * @LastEditors: Wangtao
5
+ * @LastEditTime: 2024-02-05 19:32:44
6
+ -->
7
+ <!DOCTYPE html>
8
+ <html>
9
+ <script type="text/javascript"></script>
10
+ <script src="./ue-load.min.js"></script>
11
+ <!-- <script src="https://softphone.useasy.cn/ue-load.min.js"></script> -->
12
+ <!-- <script src="https://softphone-dev.useasy.cn/ue-load.min.js"></script> -->
13
+ <body>
14
+ <div>
15
+ <div id="button">
16
+ <button id="SHOP_CART_ADD_SKU" onclick="callout();">外呼</button>
17
+ <button id="SHOP_CHECKOUT_CREATE" onclick="hangup();">挂断</button>
18
+ <button id="SHOP_CHECKOUT_CREATE" onclick="loadjs();">动态加js</button>
19
+ <button id="SHOP_CHECKOUT_CREATE" onclick="init();">初始化</button>
20
+ </div>
21
+ </div>
22
+ </body>
23
+
24
+ <script type="text/javascript">
25
+ /* 动态加载js */
26
+ function loadjs() {
27
+ const script = document.createElement('script')
28
+ script.type = 'text/javascript'
29
+ script.src = 'https://softphone.useasy.cn/ue-load.min.js'
30
+ document.body.appendChild(script)
31
+ }
32
+
33
+ /* 初始化 */
34
+ function init() {
35
+ window.ueSimpleSoftphone.init({
36
+ accountId: 'yxtcs',
37
+ agentNumber: '6034',
38
+ password: 'Aa132456',
39
+ loginType: 'WEBRTC',
40
+ isOpenCallQueue: false,
41
+ isOpenNetwork: true,
42
+ // openNlsTranslation: true,
43
+ listenCallEvent: function (event) {
44
+ console.log('外部事件接收:', event)
45
+ }
46
+ })
47
+ }
48
+
49
+ /* function callout(){
50
+ ue.call.callout(Object object);
51
+ console.log("外呼");
52
+
53
+
54
+ }
55
+ function hangup(){
56
+ ue.call.hangup(Object object)
57
+ console.log("挂断");
58
+ } */
59
+ </script>
60
+ </html>
package/src/config.ts ADDED
@@ -0,0 +1,19 @@
1
+ /*
2
+ * @Author: Wangtao
3
+ * @Date: 2023-09-05 17:35:54
4
+ * @LastEditors: Wangtao
5
+ * @LastEditTime: 2023-10-11 16:59:17
6
+ */
7
+ export const NOT_OPEN_AUDIO = {
8
+ notOpenAudioMsg: '麦克风没有开启',
9
+ notOpenAudioCode: 403,
10
+ notOpenAudioMsgEn: 'Permission dismissed'
11
+ }
12
+
13
+ export const AUDIO_FORBIDDEN = {
14
+ forbiddenAudioMsg: '请先检查您的麦克风是否开启',
15
+ forbiddenAudioCode: 0,
16
+ forbiddenAudioMsgEn: 'Permission denied'
17
+ }
18
+
19
+ export const DENIED = 'denied'