larksr_websdk 3.2.334 → 3.2.337
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/dist/doc/functions.md +34 -0
- package/dist/doc/update.md +5 -0
- package/dist/larksr-web-sdk.min.js +1 -1
- package/dist/types/lark/application.d.ts +3 -0
- package/dist/types/lark/media_share_interface.d.ts +2 -0
- package/dist/types/lark/message.d.ts +1 -1
- package/dist/types/lark/peer_connection.d.ts +4 -1
- package/dist/types/lark/peer_connection_media_share.d.ts +7 -2
- package/dist/types/larksr.d.ts +18 -0
- package/dist/types/protobuf/cloudlark.d.ts +210 -0
- package/dist/types/utils/unit.d.ts +6 -0
- package/package.json +1 -1
- package/types/lark/application.d.ts +3 -0
- package/types/lark/media_share_interface.d.ts +2 -0
- package/types/lark/message.d.ts +1 -1
- package/types/lark/peer_connection.d.ts +4 -1
- package/types/lark/peer_connection_media_share.d.ts +7 -2
- package/types/larksr.d.ts +18 -0
- package/types/protobuf/cloudlark.d.ts +210 -0
- package/types/utils/unit.d.ts +6 -0
|
@@ -64,12 +64,15 @@ export default class Application extends EventBase<APP_EVENT_TYPE, AppEvent> {
|
|
|
64
64
|
get audioTrack(): MediaStreamTrack | null | undefined;
|
|
65
65
|
get videoDeviceId(): string | null | undefined;
|
|
66
66
|
get videoTrack(): MediaStreamTrack | null | undefined;
|
|
67
|
+
get audioPaused(): boolean | undefined;
|
|
68
|
+
get videoPaused(): boolean | undefined;
|
|
67
69
|
private get sharePeerConnection();
|
|
68
70
|
private retryTime;
|
|
69
71
|
private larksr;
|
|
70
72
|
get voiceId(): number;
|
|
71
73
|
get recodeState(): RECORDER_STATE;
|
|
72
74
|
private recoder;
|
|
75
|
+
private rtcConfig;
|
|
73
76
|
constructor(larksr: LarkSR);
|
|
74
77
|
init(): void;
|
|
75
78
|
initSharePc(): void;
|
|
@@ -14,6 +14,8 @@ export interface MediaShareInterface {
|
|
|
14
14
|
audioTrack: MediaStreamTrack | undefined | null;
|
|
15
15
|
videoDeviceId: string | undefined | null;
|
|
16
16
|
videoTrack: MediaStreamTrack | undefined | null;
|
|
17
|
+
audioPaused: boolean;
|
|
18
|
+
videoPaused: boolean;
|
|
17
19
|
setAudioEnable(enable: boolean): any;
|
|
18
20
|
setVideoEnable(enable: boolean): any;
|
|
19
21
|
setShareEnable(enable: boolean): any;
|
|
@@ -9,7 +9,7 @@ export default class Message {
|
|
|
9
9
|
static startStreamReqeuest(request: Msg.CloudLark.IStartStreamRequest, isPixelStreaming: boolean): Msg.CloudLark.ToServerMessage;
|
|
10
10
|
static startMonitorStreamReqeuest(request: Msg.CloudLark.IVrMonitorRequest): Msg.CloudLark.ToServerMessage;
|
|
11
11
|
static rtcOfferMsg(type: string, sdp: string): Msg.CloudLark.ToServerMessage;
|
|
12
|
-
static iceMsg(sdpmid: string, sdpMlineindex: number, candidate: string): Msg.CloudLark.ToServerMessage;
|
|
12
|
+
static iceMsg(sdpmid: string, sdpMlineindex: number, candidate: string, username: string | null | undefined): Msg.CloudLark.ToServerMessage;
|
|
13
13
|
static mediaShareRtcOfferMsg(type: string, sdp: string): Msg.CloudLark.ToServerMessage;
|
|
14
14
|
static mediaShareIceMsg(sdpmid: string, sdpMlineindex: number, candidate: string): Msg.CloudLark.ToServerMessage;
|
|
15
15
|
static restartApp(): Msg.CloudLark.ToServerMessage;
|
|
@@ -2,6 +2,7 @@ import { EventBase, LocalEvent } from '../event/event_base';
|
|
|
2
2
|
import * as Input from '../protobuf/cloudlark';
|
|
3
3
|
import { LarkSR } from '../larksr';
|
|
4
4
|
import { MediaShareInterface, RTCMediaTrackBinding } from './media_share_interface';
|
|
5
|
+
import { CloudLark } from '@/protobuf/cloudlark';
|
|
5
6
|
export declare enum IceState {
|
|
6
7
|
DISCONNECT = 1,
|
|
7
8
|
BAD = 2,
|
|
@@ -99,12 +100,14 @@ export default class PeerConnection extends EventBase<WEBRTC_EVENT_TYPE, WebRTCE
|
|
|
99
100
|
get audioTrack(): MediaStreamTrack | undefined;
|
|
100
101
|
get videoDeviceId(): string | undefined;
|
|
101
102
|
get videoTrack(): MediaStreamTrack | undefined;
|
|
103
|
+
get audioPaused(): boolean;
|
|
104
|
+
get videoPaused(): boolean;
|
|
102
105
|
private audioBinding;
|
|
103
106
|
private videoBinding;
|
|
104
107
|
private readonly sendStream;
|
|
105
108
|
private sdpCreateSuccess;
|
|
106
109
|
constructor(larksr: LarkSR, config: WebRTCConfig);
|
|
107
|
-
create(streams?: MediaStream | undefined | null): Promise<void>;
|
|
110
|
+
create(streams?: MediaStream | undefined | null, config?: CloudLark.IRTCConfiguration | null | undefined): Promise<void>;
|
|
108
111
|
createOffer(): void;
|
|
109
112
|
close(): void;
|
|
110
113
|
setAudioEnable(enable: boolean): void;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { EventBase, LocalEvent } from '../event/event_base';
|
|
2
2
|
import { LarkSR } from '../larksr';
|
|
3
3
|
import { MediaShareInterface, RTCMediaTrackBinding } from './media_share_interface';
|
|
4
|
+
import { CloudLark } from '@/protobuf/cloudlark';
|
|
4
5
|
export declare enum WEBRTC_MEDIA_SHARE_EVENT_TYPE {
|
|
5
6
|
RTC_SDP = 0,
|
|
6
7
|
RTC_ICECANDIDATE = 1,
|
|
@@ -20,15 +21,19 @@ export default class PeerConnectionMediaShare extends EventBase<WEBRTC_MEDIA_SHA
|
|
|
20
21
|
get audioTrack(): MediaStreamTrack | undefined;
|
|
21
22
|
get videoDeviceId(): string | undefined;
|
|
22
23
|
get videoTrack(): MediaStreamTrack | undefined;
|
|
24
|
+
get audioPaused(): boolean;
|
|
25
|
+
get videoPaused(): boolean;
|
|
23
26
|
private larksr;
|
|
24
27
|
private offerOptions;
|
|
25
|
-
private
|
|
28
|
+
private _pcConfig;
|
|
29
|
+
set pcConfig(config: CloudLark.IRTCConfiguration | null | undefined);
|
|
30
|
+
get pcConfig(): CloudLark.IRTCConfiguration | null | undefined;
|
|
26
31
|
private pc;
|
|
27
32
|
private audioBinding;
|
|
28
33
|
private videoBinding;
|
|
29
34
|
private readonly sendStream;
|
|
30
35
|
constructor(larksr: LarkSR);
|
|
31
|
-
create(): Promise<void>;
|
|
36
|
+
create(config?: CloudLark.IRTCConfiguration | null | undefined): Promise<void>;
|
|
32
37
|
createOffer(): void;
|
|
33
38
|
close(): void;
|
|
34
39
|
setAudioEnable(enable: boolean): void;
|
package/dist/types/larksr.d.ts
CHANGED
|
@@ -568,6 +568,16 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
|
|
|
568
568
|
*/
|
|
569
569
|
set isEnableTouchPonit(enable: boolean);
|
|
570
570
|
set isEnableTouchPoint(enable: boolean);
|
|
571
|
+
/**
|
|
572
|
+
* 设置是否使用canvas渲染画面。
|
|
573
|
+
* iOS/Mac下默认开启.在 iOS/Mac下关闭canvas渲染可能导致样式问题异常显示。
|
|
574
|
+
*/
|
|
575
|
+
set enableCanvasRender(enable: boolean);
|
|
576
|
+
/**
|
|
577
|
+
* 获取是否使用canvas渲染画面。
|
|
578
|
+
* iOS/Mac下默认开启.在 iOS/Mac下关闭canvas渲染可能导致样式问题异常显示。
|
|
579
|
+
*/
|
|
580
|
+
get enableCanvasRender(): boolean;
|
|
571
581
|
/**
|
|
572
582
|
* 虚拟鼠标的当前位置,相对于整体容器
|
|
573
583
|
*/
|
|
@@ -629,6 +639,14 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
|
|
|
629
639
|
* 当前打开视频track对象,未打开状态为空
|
|
630
640
|
*/
|
|
631
641
|
get videoTrack(): MediaStreamTrack | null | undefined;
|
|
642
|
+
/**
|
|
643
|
+
* 音频通道是否暂停
|
|
644
|
+
*/
|
|
645
|
+
get audioPaused(): boolean | undefined;
|
|
646
|
+
/**
|
|
647
|
+
* 视频通道是否暂停
|
|
648
|
+
*/
|
|
649
|
+
get videoPaused(): boolean | undefined;
|
|
632
650
|
/**
|
|
633
651
|
* LarkSR 客户端。所有操作和事件通过该类传递
|
|
634
652
|
* @param config 本地配置,优先级最高
|
|
@@ -1399,11 +1399,212 @@ export namespace CloudLark {
|
|
|
1399
1399
|
public toJSON(): { [k: string]: any };
|
|
1400
1400
|
}
|
|
1401
1401
|
|
|
1402
|
+
/** Properties of an IceServer. */
|
|
1403
|
+
interface IIceServer {
|
|
1404
|
+
|
|
1405
|
+
/** IceServer uri */
|
|
1406
|
+
uri?: (string|null);
|
|
1407
|
+
|
|
1408
|
+
/** IceServer username */
|
|
1409
|
+
username?: (string|null);
|
|
1410
|
+
|
|
1411
|
+
/** IceServer password */
|
|
1412
|
+
password?: (string|null);
|
|
1413
|
+
}
|
|
1414
|
+
|
|
1415
|
+
/** Represents an IceServer. */
|
|
1416
|
+
class IceServer implements IIceServer {
|
|
1417
|
+
|
|
1418
|
+
/**
|
|
1419
|
+
* Constructs a new IceServer.
|
|
1420
|
+
* @param [properties] Properties to set
|
|
1421
|
+
*/
|
|
1422
|
+
constructor(properties?: CloudLark.IIceServer);
|
|
1423
|
+
|
|
1424
|
+
/** IceServer uri. */
|
|
1425
|
+
public uri: string;
|
|
1426
|
+
|
|
1427
|
+
/** IceServer username. */
|
|
1428
|
+
public username: string;
|
|
1429
|
+
|
|
1430
|
+
/** IceServer password. */
|
|
1431
|
+
public password: string;
|
|
1432
|
+
|
|
1433
|
+
/**
|
|
1434
|
+
* Creates a new IceServer instance using the specified properties.
|
|
1435
|
+
* @param [properties] Properties to set
|
|
1436
|
+
* @returns IceServer instance
|
|
1437
|
+
*/
|
|
1438
|
+
public static create(properties?: CloudLark.IIceServer): CloudLark.IceServer;
|
|
1439
|
+
|
|
1440
|
+
/**
|
|
1441
|
+
* Encodes the specified IceServer message. Does not implicitly {@link CloudLark.IceServer.verify|verify} messages.
|
|
1442
|
+
* @param message IceServer message or plain object to encode
|
|
1443
|
+
* @param [writer] Writer to encode to
|
|
1444
|
+
* @returns Writer
|
|
1445
|
+
*/
|
|
1446
|
+
public static encode(message: CloudLark.IIceServer, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
1447
|
+
|
|
1448
|
+
/**
|
|
1449
|
+
* Encodes the specified IceServer message, length delimited. Does not implicitly {@link CloudLark.IceServer.verify|verify} messages.
|
|
1450
|
+
* @param message IceServer message or plain object to encode
|
|
1451
|
+
* @param [writer] Writer to encode to
|
|
1452
|
+
* @returns Writer
|
|
1453
|
+
*/
|
|
1454
|
+
public static encodeDelimited(message: CloudLark.IIceServer, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
1455
|
+
|
|
1456
|
+
/**
|
|
1457
|
+
* Decodes an IceServer message from the specified reader or buffer.
|
|
1458
|
+
* @param reader Reader or buffer to decode from
|
|
1459
|
+
* @param [length] Message length if known beforehand
|
|
1460
|
+
* @returns IceServer
|
|
1461
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
1462
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
1463
|
+
*/
|
|
1464
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): CloudLark.IceServer;
|
|
1465
|
+
|
|
1466
|
+
/**
|
|
1467
|
+
* Decodes an IceServer message from the specified reader or buffer, length delimited.
|
|
1468
|
+
* @param reader Reader or buffer to decode from
|
|
1469
|
+
* @returns IceServer
|
|
1470
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
1471
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
1472
|
+
*/
|
|
1473
|
+
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): CloudLark.IceServer;
|
|
1474
|
+
|
|
1475
|
+
/**
|
|
1476
|
+
* Verifies an IceServer message.
|
|
1477
|
+
* @param message Plain object to verify
|
|
1478
|
+
* @returns `null` if valid, otherwise the reason why it is not
|
|
1479
|
+
*/
|
|
1480
|
+
public static verify(message: { [k: string]: any }): (string|null);
|
|
1481
|
+
|
|
1482
|
+
/**
|
|
1483
|
+
* Creates an IceServer message from a plain object. Also converts values to their respective internal types.
|
|
1484
|
+
* @param object Plain object
|
|
1485
|
+
* @returns IceServer
|
|
1486
|
+
*/
|
|
1487
|
+
public static fromObject(object: { [k: string]: any }): CloudLark.IceServer;
|
|
1488
|
+
|
|
1489
|
+
/**
|
|
1490
|
+
* Creates a plain object from an IceServer message. Also converts values to other types if specified.
|
|
1491
|
+
* @param message IceServer
|
|
1492
|
+
* @param [options] Conversion options
|
|
1493
|
+
* @returns Plain object
|
|
1494
|
+
*/
|
|
1495
|
+
public static toObject(message: CloudLark.IceServer, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
1496
|
+
|
|
1497
|
+
/**
|
|
1498
|
+
* Converts this IceServer to JSON.
|
|
1499
|
+
* @returns JSON object
|
|
1500
|
+
*/
|
|
1501
|
+
public toJSON(): { [k: string]: any };
|
|
1502
|
+
}
|
|
1503
|
+
|
|
1504
|
+
/** Properties of a RTCConfiguration. */
|
|
1505
|
+
interface IRTCConfiguration {
|
|
1506
|
+
|
|
1507
|
+
/** RTCConfiguration servers */
|
|
1508
|
+
servers?: (CloudLark.IIceServer[]|null);
|
|
1509
|
+
|
|
1510
|
+
/** RTCConfiguration type */
|
|
1511
|
+
type?: (number|null);
|
|
1512
|
+
}
|
|
1513
|
+
|
|
1514
|
+
/** Represents a RTCConfiguration. */
|
|
1515
|
+
class RTCConfiguration implements IRTCConfiguration {
|
|
1516
|
+
|
|
1517
|
+
/**
|
|
1518
|
+
* Constructs a new RTCConfiguration.
|
|
1519
|
+
* @param [properties] Properties to set
|
|
1520
|
+
*/
|
|
1521
|
+
constructor(properties?: CloudLark.IRTCConfiguration);
|
|
1522
|
+
|
|
1523
|
+
/** RTCConfiguration servers. */
|
|
1524
|
+
public servers: CloudLark.IIceServer[];
|
|
1525
|
+
|
|
1526
|
+
/** RTCConfiguration type. */
|
|
1527
|
+
public type: number;
|
|
1528
|
+
|
|
1529
|
+
/**
|
|
1530
|
+
* Creates a new RTCConfiguration instance using the specified properties.
|
|
1531
|
+
* @param [properties] Properties to set
|
|
1532
|
+
* @returns RTCConfiguration instance
|
|
1533
|
+
*/
|
|
1534
|
+
public static create(properties?: CloudLark.IRTCConfiguration): CloudLark.RTCConfiguration;
|
|
1535
|
+
|
|
1536
|
+
/**
|
|
1537
|
+
* Encodes the specified RTCConfiguration message. Does not implicitly {@link CloudLark.RTCConfiguration.verify|verify} messages.
|
|
1538
|
+
* @param message RTCConfiguration message or plain object to encode
|
|
1539
|
+
* @param [writer] Writer to encode to
|
|
1540
|
+
* @returns Writer
|
|
1541
|
+
*/
|
|
1542
|
+
public static encode(message: CloudLark.IRTCConfiguration, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
1543
|
+
|
|
1544
|
+
/**
|
|
1545
|
+
* Encodes the specified RTCConfiguration message, length delimited. Does not implicitly {@link CloudLark.RTCConfiguration.verify|verify} messages.
|
|
1546
|
+
* @param message RTCConfiguration message or plain object to encode
|
|
1547
|
+
* @param [writer] Writer to encode to
|
|
1548
|
+
* @returns Writer
|
|
1549
|
+
*/
|
|
1550
|
+
public static encodeDelimited(message: CloudLark.IRTCConfiguration, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
1551
|
+
|
|
1552
|
+
/**
|
|
1553
|
+
* Decodes a RTCConfiguration message from the specified reader or buffer.
|
|
1554
|
+
* @param reader Reader or buffer to decode from
|
|
1555
|
+
* @param [length] Message length if known beforehand
|
|
1556
|
+
* @returns RTCConfiguration
|
|
1557
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
1558
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
1559
|
+
*/
|
|
1560
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): CloudLark.RTCConfiguration;
|
|
1561
|
+
|
|
1562
|
+
/**
|
|
1563
|
+
* Decodes a RTCConfiguration message from the specified reader or buffer, length delimited.
|
|
1564
|
+
* @param reader Reader or buffer to decode from
|
|
1565
|
+
* @returns RTCConfiguration
|
|
1566
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
1567
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
1568
|
+
*/
|
|
1569
|
+
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): CloudLark.RTCConfiguration;
|
|
1570
|
+
|
|
1571
|
+
/**
|
|
1572
|
+
* Verifies a RTCConfiguration message.
|
|
1573
|
+
* @param message Plain object to verify
|
|
1574
|
+
* @returns `null` if valid, otherwise the reason why it is not
|
|
1575
|
+
*/
|
|
1576
|
+
public static verify(message: { [k: string]: any }): (string|null);
|
|
1577
|
+
|
|
1578
|
+
/**
|
|
1579
|
+
* Creates a RTCConfiguration message from a plain object. Also converts values to their respective internal types.
|
|
1580
|
+
* @param object Plain object
|
|
1581
|
+
* @returns RTCConfiguration
|
|
1582
|
+
*/
|
|
1583
|
+
public static fromObject(object: { [k: string]: any }): CloudLark.RTCConfiguration;
|
|
1584
|
+
|
|
1585
|
+
/**
|
|
1586
|
+
* Creates a plain object from a RTCConfiguration message. Also converts values to other types if specified.
|
|
1587
|
+
* @param message RTCConfiguration
|
|
1588
|
+
* @param [options] Conversion options
|
|
1589
|
+
* @returns Plain object
|
|
1590
|
+
*/
|
|
1591
|
+
public static toObject(message: CloudLark.RTCConfiguration, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
1592
|
+
|
|
1593
|
+
/**
|
|
1594
|
+
* Converts this RTCConfiguration to JSON.
|
|
1595
|
+
* @returns JSON object
|
|
1596
|
+
*/
|
|
1597
|
+
public toJSON(): { [k: string]: any };
|
|
1598
|
+
}
|
|
1599
|
+
|
|
1402
1600
|
/** Properties of a StartStreamResponse. */
|
|
1403
1601
|
interface IStartStreamResponse {
|
|
1404
1602
|
|
|
1405
1603
|
/** StartStreamResponse response */
|
|
1406
1604
|
response?: (CloudLark.StartStreamResponse.Response|null);
|
|
1605
|
+
|
|
1606
|
+
/** StartStreamResponse configuration */
|
|
1607
|
+
configuration?: (CloudLark.IRTCConfiguration|null);
|
|
1407
1608
|
}
|
|
1408
1609
|
|
|
1409
1610
|
/** Represents a StartStreamResponse. */
|
|
@@ -1418,6 +1619,9 @@ export namespace CloudLark {
|
|
|
1418
1619
|
/** StartStreamResponse response. */
|
|
1419
1620
|
public response: CloudLark.StartStreamResponse.Response;
|
|
1420
1621
|
|
|
1622
|
+
/** StartStreamResponse configuration. */
|
|
1623
|
+
public configuration?: (CloudLark.IRTCConfiguration|null);
|
|
1624
|
+
|
|
1421
1625
|
/**
|
|
1422
1626
|
* Creates a new StartStreamResponse instance using the specified properties.
|
|
1423
1627
|
* @param [properties] Properties to set
|
|
@@ -1716,6 +1920,9 @@ export namespace CloudLark {
|
|
|
1716
1920
|
|
|
1717
1921
|
/** WebrtcIceCandidate candidate */
|
|
1718
1922
|
candidate?: (string|null);
|
|
1923
|
+
|
|
1924
|
+
/** WebrtcIceCandidate username */
|
|
1925
|
+
username?: (string|null);
|
|
1719
1926
|
}
|
|
1720
1927
|
|
|
1721
1928
|
/** Represents a WebrtcIceCandidate. */
|
|
@@ -1736,6 +1943,9 @@ export namespace CloudLark {
|
|
|
1736
1943
|
/** WebrtcIceCandidate candidate. */
|
|
1737
1944
|
public candidate: string;
|
|
1738
1945
|
|
|
1946
|
+
/** WebrtcIceCandidate username. */
|
|
1947
|
+
public username: string;
|
|
1948
|
+
|
|
1739
1949
|
/**
|
|
1740
1950
|
* Creates a new WebrtcIceCandidate instance using the specified properties.
|
|
1741
1951
|
* @param [properties] Properties to set
|
|
@@ -139,4 +139,10 @@ export default class Unit {
|
|
|
139
139
|
*/
|
|
140
140
|
static getMobliePixelWidth(px: number, mobilePixelUnit: number): number;
|
|
141
141
|
static IsIframe(): boolean;
|
|
142
|
+
/**
|
|
143
|
+
* 向上为整数并且 向上计算为偶数
|
|
144
|
+
* @param n
|
|
145
|
+
* @returns
|
|
146
|
+
*/
|
|
147
|
+
static evenNumber(n: number): number;
|
|
142
148
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "larksr_websdk",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.337",
|
|
4
4
|
"description": "Larksr websdk. Easy to build a cloud render client for larksr system or ue4 pixelstreaming.docs: https://pingxingyun.github.io/webclient_sdk/",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pingxingyun",
|
|
@@ -64,12 +64,15 @@ export default class Application extends EventBase<APP_EVENT_TYPE, AppEvent> {
|
|
|
64
64
|
get audioTrack(): MediaStreamTrack | null | undefined;
|
|
65
65
|
get videoDeviceId(): string | null | undefined;
|
|
66
66
|
get videoTrack(): MediaStreamTrack | null | undefined;
|
|
67
|
+
get audioPaused(): boolean | undefined;
|
|
68
|
+
get videoPaused(): boolean | undefined;
|
|
67
69
|
private get sharePeerConnection();
|
|
68
70
|
private retryTime;
|
|
69
71
|
private larksr;
|
|
70
72
|
get voiceId(): number;
|
|
71
73
|
get recodeState(): RECORDER_STATE;
|
|
72
74
|
private recoder;
|
|
75
|
+
private rtcConfig;
|
|
73
76
|
constructor(larksr: LarkSR);
|
|
74
77
|
init(): void;
|
|
75
78
|
initSharePc(): void;
|
|
@@ -14,6 +14,8 @@ export interface MediaShareInterface {
|
|
|
14
14
|
audioTrack: MediaStreamTrack | undefined | null;
|
|
15
15
|
videoDeviceId: string | undefined | null;
|
|
16
16
|
videoTrack: MediaStreamTrack | undefined | null;
|
|
17
|
+
audioPaused: boolean;
|
|
18
|
+
videoPaused: boolean;
|
|
17
19
|
setAudioEnable(enable: boolean): any;
|
|
18
20
|
setVideoEnable(enable: boolean): any;
|
|
19
21
|
setShareEnable(enable: boolean): any;
|
package/types/lark/message.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export default class Message {
|
|
|
9
9
|
static startStreamReqeuest(request: Msg.CloudLark.IStartStreamRequest, isPixelStreaming: boolean): Msg.CloudLark.ToServerMessage;
|
|
10
10
|
static startMonitorStreamReqeuest(request: Msg.CloudLark.IVrMonitorRequest): Msg.CloudLark.ToServerMessage;
|
|
11
11
|
static rtcOfferMsg(type: string, sdp: string): Msg.CloudLark.ToServerMessage;
|
|
12
|
-
static iceMsg(sdpmid: string, sdpMlineindex: number, candidate: string): Msg.CloudLark.ToServerMessage;
|
|
12
|
+
static iceMsg(sdpmid: string, sdpMlineindex: number, candidate: string, username: string | null | undefined): Msg.CloudLark.ToServerMessage;
|
|
13
13
|
static mediaShareRtcOfferMsg(type: string, sdp: string): Msg.CloudLark.ToServerMessage;
|
|
14
14
|
static mediaShareIceMsg(sdpmid: string, sdpMlineindex: number, candidate: string): Msg.CloudLark.ToServerMessage;
|
|
15
15
|
static restartApp(): Msg.CloudLark.ToServerMessage;
|
|
@@ -2,6 +2,7 @@ import { EventBase, LocalEvent } from '../event/event_base';
|
|
|
2
2
|
import * as Input from '../protobuf/cloudlark';
|
|
3
3
|
import { LarkSR } from '../larksr';
|
|
4
4
|
import { MediaShareInterface, RTCMediaTrackBinding } from './media_share_interface';
|
|
5
|
+
import { CloudLark } from '@/protobuf/cloudlark';
|
|
5
6
|
export declare enum IceState {
|
|
6
7
|
DISCONNECT = 1,
|
|
7
8
|
BAD = 2,
|
|
@@ -99,12 +100,14 @@ export default class PeerConnection extends EventBase<WEBRTC_EVENT_TYPE, WebRTCE
|
|
|
99
100
|
get audioTrack(): MediaStreamTrack | undefined;
|
|
100
101
|
get videoDeviceId(): string | undefined;
|
|
101
102
|
get videoTrack(): MediaStreamTrack | undefined;
|
|
103
|
+
get audioPaused(): boolean;
|
|
104
|
+
get videoPaused(): boolean;
|
|
102
105
|
private audioBinding;
|
|
103
106
|
private videoBinding;
|
|
104
107
|
private readonly sendStream;
|
|
105
108
|
private sdpCreateSuccess;
|
|
106
109
|
constructor(larksr: LarkSR, config: WebRTCConfig);
|
|
107
|
-
create(streams?: MediaStream | undefined | null): Promise<void>;
|
|
110
|
+
create(streams?: MediaStream | undefined | null, config?: CloudLark.IRTCConfiguration | null | undefined): Promise<void>;
|
|
108
111
|
createOffer(): void;
|
|
109
112
|
close(): void;
|
|
110
113
|
setAudioEnable(enable: boolean): void;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { EventBase, LocalEvent } from '../event/event_base';
|
|
2
2
|
import { LarkSR } from '../larksr';
|
|
3
3
|
import { MediaShareInterface, RTCMediaTrackBinding } from './media_share_interface';
|
|
4
|
+
import { CloudLark } from '@/protobuf/cloudlark';
|
|
4
5
|
export declare enum WEBRTC_MEDIA_SHARE_EVENT_TYPE {
|
|
5
6
|
RTC_SDP = 0,
|
|
6
7
|
RTC_ICECANDIDATE = 1,
|
|
@@ -20,15 +21,19 @@ export default class PeerConnectionMediaShare extends EventBase<WEBRTC_MEDIA_SHA
|
|
|
20
21
|
get audioTrack(): MediaStreamTrack | undefined;
|
|
21
22
|
get videoDeviceId(): string | undefined;
|
|
22
23
|
get videoTrack(): MediaStreamTrack | undefined;
|
|
24
|
+
get audioPaused(): boolean;
|
|
25
|
+
get videoPaused(): boolean;
|
|
23
26
|
private larksr;
|
|
24
27
|
private offerOptions;
|
|
25
|
-
private
|
|
28
|
+
private _pcConfig;
|
|
29
|
+
set pcConfig(config: CloudLark.IRTCConfiguration | null | undefined);
|
|
30
|
+
get pcConfig(): CloudLark.IRTCConfiguration | null | undefined;
|
|
26
31
|
private pc;
|
|
27
32
|
private audioBinding;
|
|
28
33
|
private videoBinding;
|
|
29
34
|
private readonly sendStream;
|
|
30
35
|
constructor(larksr: LarkSR);
|
|
31
|
-
create(): Promise<void>;
|
|
36
|
+
create(config?: CloudLark.IRTCConfiguration | null | undefined): Promise<void>;
|
|
32
37
|
createOffer(): void;
|
|
33
38
|
close(): void;
|
|
34
39
|
setAudioEnable(enable: boolean): void;
|
package/types/larksr.d.ts
CHANGED
|
@@ -568,6 +568,16 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
|
|
|
568
568
|
*/
|
|
569
569
|
set isEnableTouchPonit(enable: boolean);
|
|
570
570
|
set isEnableTouchPoint(enable: boolean);
|
|
571
|
+
/**
|
|
572
|
+
* 设置是否使用canvas渲染画面。
|
|
573
|
+
* iOS/Mac下默认开启.在 iOS/Mac下关闭canvas渲染可能导致样式问题异常显示。
|
|
574
|
+
*/
|
|
575
|
+
set enableCanvasRender(enable: boolean);
|
|
576
|
+
/**
|
|
577
|
+
* 获取是否使用canvas渲染画面。
|
|
578
|
+
* iOS/Mac下默认开启.在 iOS/Mac下关闭canvas渲染可能导致样式问题异常显示。
|
|
579
|
+
*/
|
|
580
|
+
get enableCanvasRender(): boolean;
|
|
571
581
|
/**
|
|
572
582
|
* 虚拟鼠标的当前位置,相对于整体容器
|
|
573
583
|
*/
|
|
@@ -629,6 +639,14 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
|
|
|
629
639
|
* 当前打开视频track对象,未打开状态为空
|
|
630
640
|
*/
|
|
631
641
|
get videoTrack(): MediaStreamTrack | null | undefined;
|
|
642
|
+
/**
|
|
643
|
+
* 音频通道是否暂停
|
|
644
|
+
*/
|
|
645
|
+
get audioPaused(): boolean | undefined;
|
|
646
|
+
/**
|
|
647
|
+
* 视频通道是否暂停
|
|
648
|
+
*/
|
|
649
|
+
get videoPaused(): boolean | undefined;
|
|
632
650
|
/**
|
|
633
651
|
* LarkSR 客户端。所有操作和事件通过该类传递
|
|
634
652
|
* @param config 本地配置,优先级最高
|