ue-softphone-sdk 4.0.4 → 4.0.5
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/lib/types/lib/sip.js/api/ack.d.ts +12 -0
- package/dist/lib/types/lib/sip.js/api/bye.d.ts +16 -0
- package/dist/lib/types/lib/sip.js/api/dtmf.d.ts +15 -0
- package/dist/lib/types/lib/sip.js/api/emitter.d.ts +88 -0
- package/dist/lib/types/lib/sip.js/api/exceptions/content-type-unsupported.d.ts +8 -0
- package/dist/lib/types/lib/sip.js/api/exceptions/index.d.ts +5 -0
- package/dist/lib/types/lib/sip.js/api/exceptions/request-pending.d.ts +9 -0
- package/dist/lib/types/lib/sip.js/api/exceptions/session-description-handler.d.ts +8 -0
- package/dist/lib/types/lib/sip.js/api/exceptions/session-terminated.d.ts +8 -0
- package/dist/lib/types/lib/sip.js/api/exceptions/state-transition.d.ts +8 -0
- package/dist/lib/types/lib/sip.js/api/index.d.ts +59 -0
- package/dist/lib/types/lib/sip.js/api/info.d.ts +16 -0
- package/dist/lib/types/lib/sip.js/api/invitation-accept-options.d.ts +19 -0
- package/dist/lib/types/lib/sip.js/api/invitation-progress-options.d.ts +38 -0
- package/dist/lib/types/lib/sip.js/api/invitation-reject-options.d.ts +25 -0
- package/dist/lib/types/lib/sip.js/api/invitation.d.ts +179 -0
- package/dist/lib/types/lib/sip.js/api/inviter-cancel-options.d.ts +9 -0
- package/dist/lib/types/lib/sip.js/api/inviter-invite-options.d.ts +28 -0
- package/dist/lib/types/lib/sip.js/api/inviter-options.d.ts +43 -0
- package/dist/lib/types/lib/sip.js/api/inviter.d.ts +236 -0
- package/dist/lib/types/lib/sip.js/api/message.d.ts +16 -0
- package/dist/lib/types/lib/sip.js/api/messager-message-options.d.ts +11 -0
- package/dist/lib/types/lib/sip.js/api/messager-options.d.ts +17 -0
- package/dist/lib/types/lib/sip.js/api/messager.d.ts +26 -0
- package/dist/lib/types/lib/sip.js/api/notification.d.ts +16 -0
- package/dist/lib/types/lib/sip.js/api/notifier.d.ts +8 -0
- package/dist/lib/types/lib/sip.js/api/publisher-options.d.ts +33 -0
- package/dist/lib/types/lib/sip.js/api/publisher-publish-options.d.ts +6 -0
- package/dist/lib/types/lib/sip.js/api/publisher-state.d.ts +21 -0
- package/dist/lib/types/lib/sip.js/api/publisher-unpublish-options.d.ts +6 -0
- package/dist/lib/types/lib/sip.js/api/publisher.d.ts +65 -0
- package/dist/lib/types/lib/sip.js/api/referral.d.ts +38 -0
- package/dist/lib/types/lib/sip.js/api/registerer-options.d.ts +46 -0
- package/dist/lib/types/lib/sip.js/api/registerer-register-options.d.ts +11 -0
- package/dist/lib/types/lib/sip.js/api/registerer-state.d.ts +21 -0
- package/dist/lib/types/lib/sip.js/api/registerer-unregister-options.d.ts +16 -0
- package/dist/lib/types/lib/sip.js/api/registerer.d.ts +144 -0
- package/dist/lib/types/lib/sip.js/api/session-bye-options.d.ts +11 -0
- package/dist/lib/types/lib/sip.js/api/session-delegate.d.ts +79 -0
- package/dist/lib/types/lib/sip.js/api/session-description-handler-factory.d.ts +15 -0
- package/dist/lib/types/lib/sip.js/api/session-description-handler.d.ts +74 -0
- package/dist/lib/types/lib/sip.js/api/session-info-options.d.ts +11 -0
- package/dist/lib/types/lib/sip.js/api/session-invite-options.d.ts +28 -0
- package/dist/lib/types/lib/sip.js/api/session-message-options.d.ts +11 -0
- package/dist/lib/types/lib/sip.js/api/session-options.d.ts +8 -0
- package/dist/lib/types/lib/sip.js/api/session-refer-options.d.ts +14 -0
- package/dist/lib/types/lib/sip.js/api/session-state.d.ts +45 -0
- package/dist/lib/types/lib/sip.js/api/session.d.ts +359 -0
- package/dist/lib/types/lib/sip.js/api/subscriber-options.d.ts +11 -0
- package/dist/lib/types/lib/sip.js/api/subscriber-subscribe-options.d.ts +6 -0
- package/dist/lib/types/lib/sip.js/api/subscriber.d.ts +94 -0
- package/dist/lib/types/lib/sip.js/api/subscription-delegate.d.ts +12 -0
- package/dist/lib/types/lib/sip.js/api/subscription-options.d.ts +8 -0
- package/dist/lib/types/lib/sip.js/api/subscription-state.d.ts +19 -0
- package/dist/lib/types/lib/sip.js/api/subscription-subscribe-options.d.ts +6 -0
- package/dist/lib/types/lib/sip.js/api/subscription-unsubscribe-options.d.ts +6 -0
- package/dist/lib/types/lib/sip.js/api/subscription.d.ts +84 -0
- package/dist/lib/types/lib/sip.js/api/transport-state.d.ts +37 -0
- package/dist/lib/types/lib/sip.js/api/transport.d.ts +159 -0
- package/dist/lib/types/lib/sip.js/api/user-agent-delegate.d.ts +84 -0
- package/dist/lib/types/lib/sip.js/api/user-agent-options.d.ts +253 -0
- package/dist/lib/types/lib/sip.js/api/user-agent-state.d.ts +14 -0
- package/dist/lib/types/lib/sip.js/api/user-agent.d.ts +200 -0
- package/dist/lib/types/lib/sip.js/core/dialogs/dialog-state.d.ts +34 -0
- package/dist/lib/types/lib/sip.js/core/dialogs/dialog.d.ts +161 -0
- package/dist/lib/types/lib/sip.js/core/dialogs/index.d.ts +4 -0
- package/dist/lib/types/lib/sip.js/core/dialogs/session-dialog.d.ts +196 -0
- package/dist/lib/types/lib/sip.js/core/dialogs/subscription-dialog.d.ts +120 -0
- package/dist/lib/types/lib/sip.js/core/exceptions/exception.d.ts +8 -0
- package/dist/lib/types/lib/sip.js/core/exceptions/index.d.ts +3 -0
- package/dist/lib/types/lib/sip.js/core/exceptions/transaction-state-error.d.ts +8 -0
- package/dist/lib/types/lib/sip.js/core/exceptions/transport-error.d.ts +8 -0
- package/dist/lib/types/lib/sip.js/core/index.d.ts +15 -0
- package/dist/lib/types/lib/sip.js/core/log/index.d.ts +3 -0
- package/dist/lib/types/lib/sip.js/core/log/levels.d.ts +10 -0
- package/dist/lib/types/lib/sip.js/core/log/logger-factory.d.ts +21 -0
- package/dist/lib/types/lib/sip.js/core/log/logger.d.ts +19 -0
- package/dist/lib/types/lib/sip.js/core/messages/body.d.ts +64 -0
- package/dist/lib/types/lib/sip.js/core/messages/digest-authentication.d.ts +51 -0
- package/dist/lib/types/lib/sip.js/core/messages/incoming-message.d.ts +79 -0
- package/dist/lib/types/lib/sip.js/core/messages/incoming-request-message.d.ts +10 -0
- package/dist/lib/types/lib/sip.js/core/messages/incoming-request.d.ts +67 -0
- package/dist/lib/types/lib/sip.js/core/messages/incoming-response-message.d.ts +10 -0
- package/dist/lib/types/lib/sip.js/core/messages/incoming-response.d.ts +12 -0
- package/dist/lib/types/lib/sip.js/core/messages/index.d.ts +13 -0
- package/dist/lib/types/lib/sip.js/core/messages/md5.d.ts +32 -0
- package/dist/lib/types/lib/sip.js/core/messages/methods/ack.d.ts +18 -0
- package/dist/lib/types/lib/sip.js/core/messages/methods/bye.d.ts +21 -0
- package/dist/lib/types/lib/sip.js/core/messages/methods/cancel.d.ts +21 -0
- package/dist/lib/types/lib/sip.js/core/messages/methods/constants.d.ts +20 -0
- package/dist/lib/types/lib/sip.js/core/messages/methods/index.d.ts +13 -0
- package/dist/lib/types/lib/sip.js/core/messages/methods/info.d.ts +21 -0
- package/dist/lib/types/lib/sip.js/core/messages/methods/invite.d.ts +86 -0
- package/dist/lib/types/lib/sip.js/core/messages/methods/message.d.ts +21 -0
- package/dist/lib/types/lib/sip.js/core/messages/methods/notify.d.ts +21 -0
- package/dist/lib/types/lib/sip.js/core/messages/methods/prack.d.ts +21 -0
- package/dist/lib/types/lib/sip.js/core/messages/methods/publish.d.ts +21 -0
- package/dist/lib/types/lib/sip.js/core/messages/methods/refer.d.ts +21 -0
- package/dist/lib/types/lib/sip.js/core/messages/methods/register.d.ts +21 -0
- package/dist/lib/types/lib/sip.js/core/messages/methods/subscribe.d.ts +54 -0
- package/dist/lib/types/lib/sip.js/core/messages/outgoing-request-message.d.ts +94 -0
- package/dist/lib/types/lib/sip.js/core/messages/outgoing-request.d.ts +67 -0
- package/dist/lib/types/lib/sip.js/core/messages/outgoing-response.d.ts +42 -0
- package/dist/lib/types/lib/sip.js/core/messages/parser.d.ts +14 -0
- package/dist/lib/types/lib/sip.js/core/messages/utils.d.ts +24 -0
- package/dist/lib/types/lib/sip.js/core/session/index.d.ts +2 -0
- package/dist/lib/types/lib/sip.js/core/session/session-delegate.d.ts +70 -0
- package/dist/lib/types/lib/sip.js/core/session/session.d.ts +134 -0
- package/dist/lib/types/lib/sip.js/core/subscription/index.d.ts +2 -0
- package/dist/lib/types/lib/sip.js/core/subscription/subscription-delegate.d.ts +27 -0
- package/dist/lib/types/lib/sip.js/core/subscription/subscription.d.ts +55 -0
- package/dist/lib/types/lib/sip.js/core/timers.d.ts +20 -0
- package/dist/lib/types/lib/sip.js/core/transactions/client-transaction.d.ts +45 -0
- package/dist/lib/types/lib/sip.js/core/transactions/index.d.ts +10 -0
- package/dist/lib/types/lib/sip.js/core/transactions/invite-client-transaction.d.ts +116 -0
- package/dist/lib/types/lib/sip.js/core/transactions/invite-server-transaction.d.ts +127 -0
- package/dist/lib/types/lib/sip.js/core/transactions/non-invite-client-transaction.d.ts +69 -0
- package/dist/lib/types/lib/sip.js/core/transactions/non-invite-server-transaction.d.ts +57 -0
- package/dist/lib/types/lib/sip.js/core/transactions/server-transaction.d.ts +35 -0
- package/dist/lib/types/lib/sip.js/core/transactions/transaction-state.d.ts +13 -0
- package/dist/lib/types/lib/sip.js/core/transactions/transaction-user.d.ts +72 -0
- package/dist/lib/types/lib/sip.js/core/transactions/transaction.d.ts +79 -0
- package/dist/lib/types/lib/sip.js/core/transport.d.ts +31 -0
- package/dist/lib/types/lib/sip.js/core/user-agent-core/allowed-methods.d.ts +4 -0
- package/dist/lib/types/lib/sip.js/core/user-agent-core/index.d.ts +3 -0
- package/dist/lib/types/lib/sip.js/core/user-agent-core/user-agent-core-configuration.d.ts +99 -0
- package/dist/lib/types/lib/sip.js/core/user-agent-core/user-agent-core-delegate.d.ts +37 -0
- package/dist/lib/types/lib/sip.js/core/user-agent-core/user-agent-core.d.ts +179 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/bye-user-agent-client.d.ts +10 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/bye-user-agent-server.d.ts +10 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/cancel-user-agent-client.d.ts +10 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/index.d.ts +26 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/info-user-agent-client.d.ts +10 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/info-user-agent-server.d.ts +10 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/invite-user-agent-client.d.ts +35 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/invite-user-agent-server.d.ts +77 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/message-user-agent-client.d.ts +10 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/message-user-agent-server.d.ts +10 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/notify-user-agent-client.d.ts +10 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/notify-user-agent-server.d.ts +16 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/prack-user-agent-client.d.ts +10 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/prack-user-agent-server.d.ts +16 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/publish-user-agent-client.d.ts +10 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/re-invite-user-agent-client.d.ts +18 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/re-invite-user-agent-server.d.ts +41 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/re-subscribe-user-agent-client.d.ts +17 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/re-subscribe-user-agent-server.d.ts +10 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/refer-user-agent-client.d.ts +10 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/refer-user-agent-server.d.ts +16 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/register-user-agent-client.d.ts +10 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/register-user-agent-server.d.ts +11 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/subscribe-user-agent-client.d.ts +65 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/subscribe-user-agent-server.d.ts +11 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/user-agent-client.d.ts +103 -0
- package/dist/lib/types/lib/sip.js/core/user-agents/user-agent-server.d.ts +79 -0
- package/dist/lib/types/lib/sip.js/grammar/grammar.d.ts +26 -0
- package/dist/lib/types/lib/sip.js/grammar/index.d.ts +4 -0
- package/dist/lib/types/lib/sip.js/grammar/name-addr-header.d.ts +24 -0
- package/dist/lib/types/lib/sip.js/grammar/parameters.d.ts +16 -0
- package/dist/lib/types/lib/sip.js/grammar/pegjs/dist/grammar.d.ts +50 -0
- package/dist/lib/types/lib/sip.js/grammar/uri.d.ts +62 -0
- package/dist/lib/types/lib/sip.js/index.d.ts +9 -0
- package/dist/lib/types/lib/sip.js/platform/web/index.d.ts +4 -0
- package/dist/lib/types/lib/sip.js/platform/web/modifiers/index.d.ts +5 -0
- package/dist/lib/types/lib/sip.js/platform/web/modifiers/modifiers.d.ts +41 -0
- package/dist/lib/types/lib/sip.js/platform/web/session-description-handler/index.d.ts +14 -0
- package/dist/lib/types/lib/sip.js/platform/web/session-description-handler/media-stream-factory-default.d.ts +6 -0
- package/dist/lib/types/lib/sip.js/platform/web/session-description-handler/media-stream-factory.d.ts +6 -0
- package/dist/lib/types/lib/sip.js/platform/web/session-description-handler/peer-connection-configuration-default.d.ts +5 -0
- package/dist/lib/types/lib/sip.js/platform/web/session-description-handler/peer-connection-delegate.d.ts +63 -0
- package/dist/lib/types/lib/sip.js/platform/web/session-description-handler/session-description-handler-configuration.d.ts +16 -0
- package/dist/lib/types/lib/sip.js/platform/web/session-description-handler/session-description-handler-factory-default.d.ts +11 -0
- package/dist/lib/types/lib/sip.js/platform/web/session-description-handler/session-description-handler-factory-options.d.ts +9 -0
- package/dist/lib/types/lib/sip.js/platform/web/session-description-handler/session-description-handler-factory.d.ts +16 -0
- package/dist/lib/types/lib/sip.js/platform/web/session-description-handler/session-description-handler-options.d.ts +47 -0
- package/dist/lib/types/lib/sip.js/platform/web/session-description-handler/session-description-handler.d.ts +212 -0
- package/dist/lib/types/lib/sip.js/platform/web/simple-user/index.d.ts +7 -0
- package/dist/lib/types/lib/sip.js/platform/web/simple-user/simple-user-delegate.d.ts +72 -0
- package/dist/lib/types/lib/sip.js/platform/web/simple-user/simple-user-options.d.ts +90 -0
- package/dist/lib/types/lib/sip.js/platform/web/simple-user/simple-user.d.ts +226 -0
- package/dist/lib/types/lib/sip.js/platform/web/transport/index.d.ts +6 -0
- package/dist/lib/types/lib/sip.js/platform/web/transport/transport-options.d.ts +30 -0
- package/dist/lib/types/lib/sip.js/platform/web/transport/transport.d.ts +125 -0
- package/dist/lib/types/lib/sip.js/version.d.ts +1 -0
- package/dist/lib/types/webrtc/webrtc-method.d.ts +2 -0
- package/dist/lib/types/webrtc/webrtc.d.ts +38 -0
- package/dist/lib/ue-soft-phone.min.js +1 -1
- package/dist/ue-softphone-sdk.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Parameters } from "./parameters";
|
|
2
|
+
import { URI } from "./uri";
|
|
3
|
+
/**
|
|
4
|
+
* Name Address SIP header.
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export declare class NameAddrHeader extends Parameters {
|
|
8
|
+
uri: URI;
|
|
9
|
+
private _displayName;
|
|
10
|
+
/**
|
|
11
|
+
* Constructor
|
|
12
|
+
* @param uri -
|
|
13
|
+
* @param displayName -
|
|
14
|
+
* @param parameters -
|
|
15
|
+
*/
|
|
16
|
+
constructor(uri: URI, displayName: string, parameters: {
|
|
17
|
+
[name: string]: string;
|
|
18
|
+
});
|
|
19
|
+
get friendlyName(): string;
|
|
20
|
+
get displayName(): string;
|
|
21
|
+
set displayName(value: string);
|
|
22
|
+
clone(): NameAddrHeader;
|
|
23
|
+
toString(): string;
|
|
24
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
*/
|
|
4
|
+
export declare class Parameters {
|
|
5
|
+
parameters: {
|
|
6
|
+
[name: string]: string | null;
|
|
7
|
+
};
|
|
8
|
+
constructor(parameters: {
|
|
9
|
+
[name: string]: string | number | null | undefined;
|
|
10
|
+
});
|
|
11
|
+
setParam(key: string, value: string | number | null | undefined): void;
|
|
12
|
+
getParam(key: string): string | null | undefined;
|
|
13
|
+
hasParam(key: string): boolean;
|
|
14
|
+
deleteParam(key: string): string | null | undefined;
|
|
15
|
+
clearParams(): void;
|
|
16
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export interface IFilePosition {
|
|
2
|
+
offset: number;
|
|
3
|
+
line: number;
|
|
4
|
+
column: number;
|
|
5
|
+
}
|
|
6
|
+
export interface IFileRange {
|
|
7
|
+
start: IFilePosition;
|
|
8
|
+
end: IFilePosition;
|
|
9
|
+
}
|
|
10
|
+
export interface ILiteralExpectation {
|
|
11
|
+
type: "literal";
|
|
12
|
+
text: string;
|
|
13
|
+
ignoreCase: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface IClassParts extends Array<string | IClassParts> {
|
|
16
|
+
}
|
|
17
|
+
export interface IClassExpectation {
|
|
18
|
+
type: "class";
|
|
19
|
+
parts: IClassParts;
|
|
20
|
+
inverted: boolean;
|
|
21
|
+
ignoreCase: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface IAnyExpectation {
|
|
24
|
+
type: "any";
|
|
25
|
+
}
|
|
26
|
+
export interface IEndExpectation {
|
|
27
|
+
type: "end";
|
|
28
|
+
}
|
|
29
|
+
export interface IOtherExpectation {
|
|
30
|
+
type: "other";
|
|
31
|
+
description: string;
|
|
32
|
+
}
|
|
33
|
+
export type Expectation = ILiteralExpectation | IClassExpectation | IAnyExpectation | IEndExpectation | IOtherExpectation;
|
|
34
|
+
export declare class SyntaxError extends Error {
|
|
35
|
+
static buildMessage(expected: Expectation[], found: string | null): string;
|
|
36
|
+
message: string;
|
|
37
|
+
expected: Expectation[];
|
|
38
|
+
found: string | null;
|
|
39
|
+
location: IFileRange;
|
|
40
|
+
name: string;
|
|
41
|
+
constructor(message: string, expected: Expectation[], found: string | null, location: IFileRange);
|
|
42
|
+
}
|
|
43
|
+
export interface IParseOptions {
|
|
44
|
+
filename?: string;
|
|
45
|
+
startRule?: string;
|
|
46
|
+
tracer?: any;
|
|
47
|
+
[key: string]: any;
|
|
48
|
+
}
|
|
49
|
+
export type ParseFunction = (input: string, options?: IParseOptions) => any;
|
|
50
|
+
export declare const parse: ParseFunction;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Parameters } from "./parameters";
|
|
2
|
+
/**
|
|
3
|
+
* URI.
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export declare class URI extends Parameters {
|
|
7
|
+
headers: {
|
|
8
|
+
[name: string]: Array<string>;
|
|
9
|
+
};
|
|
10
|
+
private normal;
|
|
11
|
+
private raw;
|
|
12
|
+
/**
|
|
13
|
+
* Constructor
|
|
14
|
+
* @param scheme -
|
|
15
|
+
* @param user -
|
|
16
|
+
* @param host -
|
|
17
|
+
* @param port -
|
|
18
|
+
* @param parameters -
|
|
19
|
+
* @param headers -
|
|
20
|
+
*/
|
|
21
|
+
constructor(scheme: string, user: string, host: string, port?: number, parameters?: {
|
|
22
|
+
[name: string]: string | number | null;
|
|
23
|
+
}, headers?: {
|
|
24
|
+
[name: string]: Array<string>;
|
|
25
|
+
});
|
|
26
|
+
get scheme(): string;
|
|
27
|
+
set scheme(value: string);
|
|
28
|
+
get user(): string | undefined;
|
|
29
|
+
set user(value: string | undefined);
|
|
30
|
+
get host(): string;
|
|
31
|
+
set host(value: string);
|
|
32
|
+
get aor(): string;
|
|
33
|
+
get port(): number | undefined;
|
|
34
|
+
set port(value: number | undefined);
|
|
35
|
+
setHeader(name: string, value: Array<string> | string): void;
|
|
36
|
+
getHeader(name: string): Array<string> | undefined;
|
|
37
|
+
hasHeader(name: string): boolean;
|
|
38
|
+
deleteHeader(header: string): Array<string> | undefined;
|
|
39
|
+
clearHeaders(): void;
|
|
40
|
+
clone(): URI;
|
|
41
|
+
toRaw(): string;
|
|
42
|
+
toString(): string;
|
|
43
|
+
private get _normal();
|
|
44
|
+
private get _raw();
|
|
45
|
+
private _toString;
|
|
46
|
+
private escapeUser;
|
|
47
|
+
private headerize;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Returns true if URIs are equivalent per RFC 3261 Section 19.1.4.
|
|
51
|
+
* @param a URI to compare
|
|
52
|
+
* @param b URI to compare
|
|
53
|
+
*
|
|
54
|
+
* @remarks
|
|
55
|
+
* 19.1.4 URI Comparison
|
|
56
|
+
* Some operations in this specification require determining whether two
|
|
57
|
+
* SIP or SIPS URIs are equivalent.
|
|
58
|
+
*
|
|
59
|
+
* https://tools.ietf.org/html/rfc3261#section-19.1.4
|
|
60
|
+
* @internal
|
|
61
|
+
*/
|
|
62
|
+
export declare function equivalentURI(a: URI, b: URI): boolean;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { SessionDescriptionHandlerModifier } from "../../../api";
|
|
2
|
+
/**
|
|
3
|
+
* Modifier.
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export declare function stripTcpCandidates(description: RTCSessionDescriptionInit): Promise<RTCSessionDescriptionInit>;
|
|
7
|
+
/**
|
|
8
|
+
* Modifier.
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
export declare function stripTelephoneEvent(description: RTCSessionDescriptionInit): Promise<RTCSessionDescriptionInit>;
|
|
12
|
+
/**
|
|
13
|
+
* Modifier.
|
|
14
|
+
* @public
|
|
15
|
+
*/
|
|
16
|
+
export declare function cleanJitsiSdpImageattr(description: RTCSessionDescriptionInit): Promise<RTCSessionDescriptionInit>;
|
|
17
|
+
/**
|
|
18
|
+
* Modifier.
|
|
19
|
+
* @public
|
|
20
|
+
*/
|
|
21
|
+
export declare function stripG722(description: RTCSessionDescriptionInit): Promise<RTCSessionDescriptionInit>;
|
|
22
|
+
/**
|
|
23
|
+
* Modifier.
|
|
24
|
+
* @public
|
|
25
|
+
*/
|
|
26
|
+
export declare function stripRtpPayload(payload: string): SessionDescriptionHandlerModifier;
|
|
27
|
+
/**
|
|
28
|
+
* Modifier.
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
export declare function stripVideo(description: RTCSessionDescriptionInit): Promise<RTCSessionDescriptionInit>;
|
|
32
|
+
/**
|
|
33
|
+
* Modifier.
|
|
34
|
+
* @public
|
|
35
|
+
*/
|
|
36
|
+
export declare function addMidLines(description: RTCSessionDescriptionInit): Promise<RTCSessionDescriptionInit>;
|
|
37
|
+
/**
|
|
38
|
+
* The modifier that should be used when the session would like to place the call on hold.
|
|
39
|
+
* @param description - The description that will be modified.
|
|
40
|
+
*/
|
|
41
|
+
export declare function holdModifier(description: RTCSessionDescriptionInit): Promise<RTCSessionDescriptionInit>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A SessionDescriptionHandler for web browsers.
|
|
3
|
+
* @packageDocumentation
|
|
4
|
+
*/
|
|
5
|
+
export * from "./media-stream-factory-default";
|
|
6
|
+
export * from "./media-stream-factory";
|
|
7
|
+
export * from "./peer-connection-configuration-default";
|
|
8
|
+
export * from "./peer-connection-delegate";
|
|
9
|
+
export * from "./session-description-handler-configuration";
|
|
10
|
+
export * from "./session-description-handler-factory-default";
|
|
11
|
+
export * from "./session-description-handler-factory-options";
|
|
12
|
+
export * from "./session-description-handler-factory";
|
|
13
|
+
export * from "./session-description-handler-options";
|
|
14
|
+
export * from "./session-description-handler";
|
package/dist/lib/types/lib/sip.js/platform/web/session-description-handler/media-stream-factory.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SessionDescriptionHandler } from "./session-description-handler";
|
|
2
|
+
/**
|
|
3
|
+
* Interface of factory function which produces a MediaStream.
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export type MediaStreamFactory = (constraints: MediaStreamConstraints, sessionDescriptionHandler: SessionDescriptionHandler) => Promise<MediaStream>;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Delegate to handle PeerConnection state changes.
|
|
3
|
+
* @public
|
|
4
|
+
*/
|
|
5
|
+
export interface PeerConnectionDelegate {
|
|
6
|
+
/**
|
|
7
|
+
* This happens whenever the aggregate state of the connection changes.
|
|
8
|
+
* The aggregate state is a combination of the states of all of the
|
|
9
|
+
* individual network transports being used by the connection.
|
|
10
|
+
* @param event - Event.
|
|
11
|
+
*/
|
|
12
|
+
onconnectionstatechange?(event: Event): void;
|
|
13
|
+
/**
|
|
14
|
+
* Triggered when an RTCDataChannel is added to the connection by the
|
|
15
|
+
* remote peer calling createDataChannel().
|
|
16
|
+
* @param event - RTCDataChannelEvent.
|
|
17
|
+
*/
|
|
18
|
+
ondatachannel?(event: RTCDataChannelEvent): void;
|
|
19
|
+
/**
|
|
20
|
+
* Triggered when a new ICE candidate has been found.
|
|
21
|
+
* @param event - RTCPeerConnectionIceEvent.
|
|
22
|
+
*/
|
|
23
|
+
onicecandidate?(event: RTCPeerConnectionIceEvent): void;
|
|
24
|
+
/**
|
|
25
|
+
* Triggered when an error occurred during ICE candidate gathering.
|
|
26
|
+
* @param event - RTCPeerConnectionIceErrorEvent.
|
|
27
|
+
*/
|
|
28
|
+
onicecandidateerror?(event: RTCPeerConnectionIceErrorEvent): void;
|
|
29
|
+
/**
|
|
30
|
+
* This happens whenever the local ICE agent needs to deliver a message to
|
|
31
|
+
* the other peer through the signaling server. This lets the ICE agent
|
|
32
|
+
* perform negotiation with the remote peer without the browser itself
|
|
33
|
+
* needing to know any specifics about the technology being used for
|
|
34
|
+
* signalingTriggered when the IceConnectionState changes.
|
|
35
|
+
* @param event - Event.
|
|
36
|
+
*/
|
|
37
|
+
oniceconnectionstatechange?(event: Event): void;
|
|
38
|
+
/**
|
|
39
|
+
* Triggered when the ICE gathering state changes.
|
|
40
|
+
* @param event - Event.
|
|
41
|
+
*/
|
|
42
|
+
onicegatheringstatechange?(event: Event): void;
|
|
43
|
+
/**
|
|
44
|
+
* Triggered when renegotiation is necessary.
|
|
45
|
+
* @param event - Event.
|
|
46
|
+
*/
|
|
47
|
+
onnegotiationneeded?(event: Event): void;
|
|
48
|
+
/**
|
|
49
|
+
* Triggered when the SignalingState changes.
|
|
50
|
+
* @param event - Event.
|
|
51
|
+
*/
|
|
52
|
+
onsignalingstatechange?(event: Event): void;
|
|
53
|
+
/**
|
|
54
|
+
* Triggered when when a statistics object being monitored is deleted.
|
|
55
|
+
* @param event - Event.
|
|
56
|
+
*/
|
|
57
|
+
onstatsended?(event: Event): void;
|
|
58
|
+
/**
|
|
59
|
+
* Triggered when a new track is signaled by the remote peer, as a result of setRemoteDescription.
|
|
60
|
+
* @param event - Event.
|
|
61
|
+
*/
|
|
62
|
+
ontrack?(event: Event): void;
|
|
63
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration for SessionDescriptionHandler.
|
|
3
|
+
* @public
|
|
4
|
+
*/
|
|
5
|
+
export interface SessionDescriptionHandlerConfiguration {
|
|
6
|
+
/**
|
|
7
|
+
* The maximum duration to wait in ms for ICE gathering to complete.
|
|
8
|
+
* If undefined, implementation dependent.
|
|
9
|
+
* If zero, no timeout.
|
|
10
|
+
*/
|
|
11
|
+
iceGatheringTimeout?: number;
|
|
12
|
+
/**
|
|
13
|
+
* Peer connection options.
|
|
14
|
+
*/
|
|
15
|
+
peerConnectionConfiguration?: RTCConfiguration;
|
|
16
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SessionDescriptionHandler } from "./session-description-handler";
|
|
2
|
+
import { SessionDescriptionHandlerFactory } from "./session-description-handler-factory";
|
|
3
|
+
/**
|
|
4
|
+
* Function which returns a SessionDescriptionHandlerFactory.
|
|
5
|
+
* @remarks
|
|
6
|
+
* See {@link defaultPeerConnectionConfiguration} for the default peer connection configuration.
|
|
7
|
+
* The ICE gathering timeout defaults to 5000ms.
|
|
8
|
+
* @param mediaStreamFactory - MediaStream factory.
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
export declare function defaultSessionDescriptionHandlerFactory(mediaStreamFactory?: (constraints: MediaStreamConstraints, sessionDescriptionHandler: SessionDescriptionHandler) => Promise<MediaStream>): SessionDescriptionHandlerFactory;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SessionDescriptionHandlerConfiguration } from "./session-description-handler-configuration";
|
|
2
|
+
/**
|
|
3
|
+
* Options for SessionDescriptionHandlerFactory.
|
|
4
|
+
* @remarks
|
|
5
|
+
* The "options" are provided as part of the UserAgent configuration and passed through
|
|
6
|
+
* on every call to SessionDescriptionHandlerFactory's constructor.
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export type SessionDescriptionHandlerFactoryOptions = SessionDescriptionHandlerConfiguration;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Session, SessionDescriptionHandlerFactory as SessionDescriptionHandlerFactoryDefinition } from "../../../api";
|
|
2
|
+
import { SessionDescriptionHandler } from "./session-description-handler";
|
|
3
|
+
import { SessionDescriptionHandlerFactoryOptions } from "./session-description-handler-factory-options";
|
|
4
|
+
/**
|
|
5
|
+
* Factory for {@link SessionDescriptionHandler}.
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export interface SessionDescriptionHandlerFactory extends SessionDescriptionHandlerFactoryDefinition {
|
|
9
|
+
/**
|
|
10
|
+
* SessionDescriptionHandler factory function.
|
|
11
|
+
* @remarks
|
|
12
|
+
* The `options` are provided as part of the UserAgent configuration
|
|
13
|
+
* and passed through on every call to SessionDescriptionHandlerFactory's constructor.
|
|
14
|
+
*/
|
|
15
|
+
(session: Session, options?: SessionDescriptionHandlerFactoryOptions): SessionDescriptionHandler;
|
|
16
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { SessionDescriptionHandlerOptions as SessionDescriptionHandlerOptionsDefinition } from "../../../api";
|
|
2
|
+
/**
|
|
3
|
+
* Options for {@link SessionDescriptionHandler}.
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export interface SessionDescriptionHandlerOptions extends SessionDescriptionHandlerOptionsDefinition {
|
|
7
|
+
/**
|
|
8
|
+
* Answer options to use when creating an answer.
|
|
9
|
+
*/
|
|
10
|
+
answerOptions?: RTCAnswerOptions;
|
|
11
|
+
/**
|
|
12
|
+
* Constraints to use when creating local media stream.
|
|
13
|
+
* @remarks
|
|
14
|
+
* If undefined, defaults to audio true and video false.
|
|
15
|
+
* If audio and video are false, media stream will have no tracks.
|
|
16
|
+
*/
|
|
17
|
+
constraints?: MediaStreamConstraints;
|
|
18
|
+
/**
|
|
19
|
+
* If true, create a data channel when making initial offer.
|
|
20
|
+
*/
|
|
21
|
+
dataChannel?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* A human-readable name to use when creating the data channel.
|
|
24
|
+
*/
|
|
25
|
+
dataChannelLabel?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Configuration options for creating the data channel.
|
|
28
|
+
*/
|
|
29
|
+
dataChannelOptions?: RTCDataChannelInit;
|
|
30
|
+
/**
|
|
31
|
+
* If true, offer and answer directions will be set to place peer on hold.
|
|
32
|
+
*/
|
|
33
|
+
hold?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* The maximum duration to wait in ms for ICE gathering to complete.
|
|
36
|
+
* No timeout if undefined or zero.
|
|
37
|
+
*/
|
|
38
|
+
iceGatheringTimeout?: number;
|
|
39
|
+
/**
|
|
40
|
+
* Offer options to use when creating an offer.
|
|
41
|
+
*/
|
|
42
|
+
offerOptions?: RTCOfferOptions;
|
|
43
|
+
/**
|
|
44
|
+
* Called upon creating a data channel.
|
|
45
|
+
*/
|
|
46
|
+
onDataChannel?: (dataChannel: RTCDataChannel) => void;
|
|
47
|
+
}
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import { BodyAndContentType, SessionDescriptionHandler as SessionDescriptionHandlerDefinition, SessionDescriptionHandlerModifier } from '../../../api';
|
|
2
|
+
import { Logger } from '../../../core';
|
|
3
|
+
import { MediaStreamFactory } from './media-stream-factory';
|
|
4
|
+
import { SessionDescriptionHandlerConfiguration } from './session-description-handler-configuration';
|
|
5
|
+
import { SessionDescriptionHandlerOptions } from './session-description-handler-options';
|
|
6
|
+
import { PeerConnectionDelegate } from './peer-connection-delegate';
|
|
7
|
+
/**
|
|
8
|
+
* A base class implementing a WebRTC session description handler for sip.js.
|
|
9
|
+
* @remarks
|
|
10
|
+
* It is expected/intended to be extended by specific WebRTC based applications.
|
|
11
|
+
* @privateRemarks
|
|
12
|
+
* So do not put application specific implementation in here.
|
|
13
|
+
* @public
|
|
14
|
+
*/
|
|
15
|
+
export declare class SessionDescriptionHandler implements SessionDescriptionHandlerDefinition {
|
|
16
|
+
/** Logger. */
|
|
17
|
+
protected logger: Logger;
|
|
18
|
+
/** Media stream factory. */
|
|
19
|
+
protected mediaStreamFactory: MediaStreamFactory;
|
|
20
|
+
/** Configuration options. */
|
|
21
|
+
protected sessionDescriptionHandlerConfiguration?: SessionDescriptionHandlerConfiguration;
|
|
22
|
+
/** The local media stream. */
|
|
23
|
+
protected _localMediaStream: MediaStream;
|
|
24
|
+
/** The remote media stream. */
|
|
25
|
+
protected _remoteMediaStream: MediaStream;
|
|
26
|
+
/** The data channel. Undefined before created. */
|
|
27
|
+
protected _dataChannel: RTCDataChannel | undefined;
|
|
28
|
+
/** The peer connection. Undefined after SessionDescriptionHandler.close(). */
|
|
29
|
+
protected _peerConnection: RTCPeerConnection | undefined;
|
|
30
|
+
/** The peer connection delegate. */
|
|
31
|
+
protected _peerConnectionDelegate: PeerConnectionDelegate | undefined;
|
|
32
|
+
private iceGatheringCompletePromise;
|
|
33
|
+
private iceGatheringCompleteTimeoutId;
|
|
34
|
+
private iceGatheringCompleteResolve;
|
|
35
|
+
private iceGatheringCompleteReject;
|
|
36
|
+
private localMediaStreamConstraints;
|
|
37
|
+
private onDataChannel;
|
|
38
|
+
/**
|
|
39
|
+
* Constructor
|
|
40
|
+
* @param logger - A logger
|
|
41
|
+
* @param mediaStreamFactory - A factory to provide a MediaStream
|
|
42
|
+
* @param options - Options passed from the SessionDescriptionHandleFactory
|
|
43
|
+
*/
|
|
44
|
+
constructor(logger: Logger, mediaStreamFactory: MediaStreamFactory, sessionDescriptionHandlerConfiguration?: SessionDescriptionHandlerConfiguration);
|
|
45
|
+
/**
|
|
46
|
+
* The local media stream currently being sent.
|
|
47
|
+
*
|
|
48
|
+
* @remarks
|
|
49
|
+
* The local media stream initially has no tracks, so the presence of tracks
|
|
50
|
+
* should not be assumed. Furthermore, tracks may be added or removed if the
|
|
51
|
+
* local media changes - for example, on upgrade from audio only to a video session.
|
|
52
|
+
* At any given time there will be at most one audio track and one video track
|
|
53
|
+
* (it's possible that this restriction may not apply to sub-classes).
|
|
54
|
+
* Use `MediaStream.onaddtrack` or add a listener for the `addtrack` event
|
|
55
|
+
* to detect when a new track becomes available:
|
|
56
|
+
* https://developer.mozilla.org/en-US/docs/Web/API/MediaStream/onaddtrack
|
|
57
|
+
*/
|
|
58
|
+
get localMediaStream(): MediaStream;
|
|
59
|
+
/**
|
|
60
|
+
* The remote media stream currently being received.
|
|
61
|
+
*
|
|
62
|
+
* @remarks
|
|
63
|
+
* The remote media stream initially has no tracks, so the presence of tracks
|
|
64
|
+
* should not be assumed. Furthermore, tracks may be added or removed if the
|
|
65
|
+
* remote media changes - for example, on upgrade from audio only to a video session.
|
|
66
|
+
* At any given time there will be at most one audio track and one video track
|
|
67
|
+
* (it's possible that this restriction may not apply to sub-classes).
|
|
68
|
+
* Use `MediaStream.onaddtrack` or add a listener for the `addtrack` event
|
|
69
|
+
* to detect when a new track becomes available:
|
|
70
|
+
* https://developer.mozilla.org/en-US/docs/Web/API/MediaStream/onaddtrack
|
|
71
|
+
*/
|
|
72
|
+
get remoteMediaStream(): MediaStream;
|
|
73
|
+
/**
|
|
74
|
+
* The data channel. Undefined before it is created.
|
|
75
|
+
*/
|
|
76
|
+
get dataChannel(): RTCDataChannel | undefined;
|
|
77
|
+
/**
|
|
78
|
+
* The peer connection. Undefined if peer connection has closed.
|
|
79
|
+
*
|
|
80
|
+
* @remarks
|
|
81
|
+
* While access to the underlying `RTCPeerConnection` is provided, note that
|
|
82
|
+
* using methods with modify it may break the operation of this class.
|
|
83
|
+
* In particular, this class depends on exclusive access to the
|
|
84
|
+
* event handler properties. If you need access to the peer connection
|
|
85
|
+
* events, either register for events using `addEventListener()` on
|
|
86
|
+
* the `RTCPeerConnection` or set the `peerConnectionDelegate` on
|
|
87
|
+
* this `SessionDescriptionHandler`.
|
|
88
|
+
*/
|
|
89
|
+
get peerConnection(): RTCPeerConnection | undefined;
|
|
90
|
+
/**
|
|
91
|
+
* A delegate which provides access to the peer connection event handlers.
|
|
92
|
+
*
|
|
93
|
+
* @remarks
|
|
94
|
+
* Setting the peer connection event handlers directly is not supported
|
|
95
|
+
* and may break this class. As this class depends on exclusive access
|
|
96
|
+
* to them, a delegate may be set which provides alternative access to
|
|
97
|
+
* the event handlers in a fashion which is supported.
|
|
98
|
+
*/
|
|
99
|
+
get peerConnectionDelegate(): PeerConnectionDelegate | undefined;
|
|
100
|
+
set peerConnectionDelegate(delegate: PeerConnectionDelegate | undefined);
|
|
101
|
+
private static dispatchAddTrackEvent;
|
|
102
|
+
private static dispatchRemoveTrackEvent;
|
|
103
|
+
/**
|
|
104
|
+
* Stop tracks and close peer connection.
|
|
105
|
+
*/
|
|
106
|
+
close(): void;
|
|
107
|
+
/**
|
|
108
|
+
* Creates an offer or answer.
|
|
109
|
+
* @param options - Options bucket.
|
|
110
|
+
* @param modifiers - Modifiers.
|
|
111
|
+
*/
|
|
112
|
+
getDescription(options?: SessionDescriptionHandlerOptions, modifiers?: Array<SessionDescriptionHandlerModifier>): Promise<BodyAndContentType>;
|
|
113
|
+
/**
|
|
114
|
+
* Returns true if the SessionDescriptionHandler can handle the Content-Type described by a SIP message.
|
|
115
|
+
* @param contentType - The content type that is in the SIP Message.
|
|
116
|
+
*/
|
|
117
|
+
hasDescription(contentType: string): boolean;
|
|
118
|
+
/**
|
|
119
|
+
* Send DTMF via RTP (RFC 4733).
|
|
120
|
+
* Returns true if DTMF send is successful, false otherwise.
|
|
121
|
+
* @param tones - A string containing DTMF digits.
|
|
122
|
+
* @param options - Options object to be used by sendDtmf.
|
|
123
|
+
*/
|
|
124
|
+
sendDtmf(tones: string, options?: {
|
|
125
|
+
duration: number;
|
|
126
|
+
interToneGap: number;
|
|
127
|
+
}): boolean;
|
|
128
|
+
/**
|
|
129
|
+
* Sets an offer or answer.
|
|
130
|
+
* @param sdp - The session description.
|
|
131
|
+
* @param options - Options bucket.
|
|
132
|
+
* @param modifiers - Modifiers.
|
|
133
|
+
*/
|
|
134
|
+
setDescription(sdp: string, options?: SessionDescriptionHandlerOptions, modifiers?: Array<SessionDescriptionHandlerModifier>): Promise<void>;
|
|
135
|
+
/**
|
|
136
|
+
* Applies modifiers to SDP prior to setting the local or remote description.
|
|
137
|
+
* @param sdp - SDP to modify.
|
|
138
|
+
* @param modifiers - Modifiers to apply.
|
|
139
|
+
*/
|
|
140
|
+
protected applyModifiers(sdp: RTCSessionDescriptionInit, modifiers?: Array<SessionDescriptionHandlerModifier>): Promise<RTCSessionDescriptionInit>;
|
|
141
|
+
/**
|
|
142
|
+
* Create a data channel.
|
|
143
|
+
* @remarks
|
|
144
|
+
* Only creates a data channel if SessionDescriptionHandlerOptions.dataChannel is true.
|
|
145
|
+
* Only creates a data channel if creating a local offer.
|
|
146
|
+
* Only if one does not already exist.
|
|
147
|
+
* @param options - Session description handler options.
|
|
148
|
+
*/
|
|
149
|
+
protected createDataChannel(options?: SessionDescriptionHandlerOptions): Promise<void>;
|
|
150
|
+
/**
|
|
151
|
+
* Depending on current signaling state, create a local offer or answer.
|
|
152
|
+
* @param options - Session description handler options.
|
|
153
|
+
*/
|
|
154
|
+
protected createLocalOfferOrAnswer(options?: SessionDescriptionHandlerOptions): Promise<RTCSessionDescriptionInit>;
|
|
155
|
+
/**
|
|
156
|
+
* Get a media stream from the media stream factory and set the local media stream.
|
|
157
|
+
* @param options - Session description handler options.
|
|
158
|
+
*/
|
|
159
|
+
protected getLocalMediaStream(options?: SessionDescriptionHandlerOptions): Promise<void>;
|
|
160
|
+
/**
|
|
161
|
+
* Sets the peer connection's sender tracks and local media stream tracks.
|
|
162
|
+
*
|
|
163
|
+
* @remarks
|
|
164
|
+
* Only the first audio and video tracks of the provided MediaStream are utilized.
|
|
165
|
+
* Adds tracks if audio and/or video tracks are not already present, otherwise replaces tracks.
|
|
166
|
+
*
|
|
167
|
+
* @param stream - Media stream containing tracks to be utilized.
|
|
168
|
+
*/
|
|
169
|
+
protected setLocalMediaStream(stream: MediaStream): Promise<void>;
|
|
170
|
+
/**
|
|
171
|
+
* Gets the peer connection's local session description.
|
|
172
|
+
*/
|
|
173
|
+
protected getLocalSessionDescription(): Promise<RTCSessionDescription>;
|
|
174
|
+
/**
|
|
175
|
+
* Sets the peer connection's local session description.
|
|
176
|
+
* @param sessionDescription - sessionDescription The session description.
|
|
177
|
+
*/
|
|
178
|
+
protected setLocalSessionDescription(sessionDescription: RTCSessionDescriptionInit): Promise<void>;
|
|
179
|
+
/**
|
|
180
|
+
* Sets the peer connection's remote session description.
|
|
181
|
+
* @param sessionDescription - The session description.
|
|
182
|
+
*/
|
|
183
|
+
protected setRemoteSessionDescription(sessionDescription: RTCSessionDescriptionInit): Promise<void>;
|
|
184
|
+
/**
|
|
185
|
+
* Sets a remote media stream track.
|
|
186
|
+
*
|
|
187
|
+
* @remarks
|
|
188
|
+
* Adds tracks if audio and/or video tracks are not already present, otherwise replaces tracks.
|
|
189
|
+
*
|
|
190
|
+
* @param track - Media stream track to be utilized.
|
|
191
|
+
*/
|
|
192
|
+
protected setRemoteTrack(track: MediaStreamTrack): void;
|
|
193
|
+
/**
|
|
194
|
+
* Depending on the current signaling state and the session hold state, update transceiver direction.
|
|
195
|
+
* @param options - Session description handler options.
|
|
196
|
+
*/
|
|
197
|
+
protected updateDirection(options?: SessionDescriptionHandlerOptions): Promise<void>;
|
|
198
|
+
/**
|
|
199
|
+
* Called when ICE gathering completes and resolves any waiting promise.
|
|
200
|
+
*/
|
|
201
|
+
protected iceGatheringComplete(): void;
|
|
202
|
+
/**
|
|
203
|
+
* Wait for ICE gathering to complete.
|
|
204
|
+
* @param restart - If true, waits if current state is "complete" (waits for transition to "complete").
|
|
205
|
+
* @param timeout - Milliseconds after which waiting times out. No timeout if 0.
|
|
206
|
+
*/
|
|
207
|
+
protected waitForIceGatheringComplete(restart?: boolean, timeout?: number): Promise<void>;
|
|
208
|
+
/**
|
|
209
|
+
* Initializes the peer connection event handlers
|
|
210
|
+
*/
|
|
211
|
+
private initPeerConnectionEventHandlers;
|
|
212
|
+
}
|