tas-uell-sdk 0.0.5 → 0.0.6
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/README.md +94 -53
- package/esm2020/lib/components/tas-avatar/tas-avatar.component.mjs +75 -0
- package/esm2020/lib/components/tas-btn/tas-btn.component.mjs +156 -63
- package/esm2020/lib/components/tas-floating-call/tas-floating-call.component.mjs +48 -23
- package/esm2020/lib/components/tas-videocall/tas-videocall.component.mjs +109 -18
- package/esm2020/lib/components/tas-waiting-room/tas-waiting-room.component.mjs +158 -150
- package/esm2020/lib/config/tas.config.mjs +1 -1
- package/esm2020/lib/interfaces/tas.interfaces.mjs +39 -2
- package/esm2020/lib/services/tas.service.mjs +363 -34
- package/esm2020/lib/tas-uell-sdk.module.mjs +19 -21
- package/esm2020/public-api.mjs +2 -1
- package/fesm2015/tas-uell-sdk.mjs +945 -292
- package/fesm2015/tas-uell-sdk.mjs.map +1 -1
- package/fesm2020/tas-uell-sdk.mjs +940 -290
- package/fesm2020/tas-uell-sdk.mjs.map +1 -1
- package/lib/components/tas-avatar/tas-avatar.component.d.ts +9 -0
- package/lib/components/tas-btn/tas-btn.component.d.ts +33 -15
- package/lib/components/tas-floating-call/tas-floating-call.component.d.ts +5 -1
- package/lib/components/tas-videocall/tas-videocall.component.d.ts +23 -2
- package/lib/components/tas-waiting-room/tas-waiting-room.component.d.ts +28 -34
- package/lib/config/tas.config.d.ts +4 -0
- package/lib/interfaces/tas.interfaces.d.ts +103 -35
- package/lib/services/tas.service.d.ts +86 -9
- package/lib/tas-uell-sdk.module.d.ts +4 -3
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/src/lib/styles/tas-global.scss +27 -28
- package/INSTALL_AND_TEST.md +0 -427
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
import { OnInit, OnDestroy } from '@angular/core';
|
|
2
|
+
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
|
|
2
3
|
import { TasService } from '../../services/tas.service';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
export declare class TasFloatingCallComponent implements OnInit, OnDestroy {
|
|
5
6
|
private tasService;
|
|
7
|
+
private modalService;
|
|
6
8
|
isVisible: boolean;
|
|
7
9
|
isMuted: boolean;
|
|
8
10
|
private subscriptions;
|
|
9
|
-
|
|
11
|
+
private videoCallModalRef;
|
|
12
|
+
constructor(tasService: TasService, modalService: NgbModal);
|
|
10
13
|
ngOnInit(): void;
|
|
11
14
|
ngOnDestroy(): void;
|
|
12
15
|
onExpand(): void;
|
|
13
16
|
onHangUp(): void;
|
|
14
17
|
toggleMute(): void;
|
|
15
18
|
private setupSubscriptions;
|
|
19
|
+
private openVideoCallModal;
|
|
16
20
|
private readonly PIP_MARGIN;
|
|
17
21
|
private initInteract;
|
|
18
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<TasFloatingCallComponent, never>;
|
|
@@ -1,19 +1,28 @@
|
|
|
1
1
|
import { OnInit, OnDestroy, ElementRef, AfterViewInit } from '@angular/core';
|
|
2
2
|
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
|
|
3
3
|
import { TasService } from '../../services/tas.service';
|
|
4
|
-
import { CallState } from '../../interfaces/tas.interfaces';
|
|
4
|
+
import { CallState, TasBusinessRole, WaitingRoomUser } from '../../interfaces/tas.interfaces';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class TasVideocallComponent implements OnInit, OnDestroy, AfterViewInit {
|
|
7
7
|
activeModal: NgbActiveModal;
|
|
8
8
|
private tasService;
|
|
9
9
|
sessionId: string;
|
|
10
10
|
token: string;
|
|
11
|
+
appointmentId?: number;
|
|
12
|
+
videoCallId?: number;
|
|
13
|
+
participantName: string;
|
|
14
|
+
tenant: string;
|
|
15
|
+
businessRole: TasBusinessRole;
|
|
11
16
|
isReturningFromPip: boolean;
|
|
12
17
|
publisherContainer: ElementRef;
|
|
13
18
|
subscriberContainer: ElementRef;
|
|
14
19
|
isPublisherSmall: boolean;
|
|
15
20
|
callState: CallState;
|
|
16
21
|
isMuted: boolean;
|
|
22
|
+
waitingRoomUsers: WaitingRoomUser[];
|
|
23
|
+
ownerHasJoined: boolean;
|
|
24
|
+
hasVideoStream: boolean;
|
|
25
|
+
dismissedUsers: number[];
|
|
17
26
|
private subscriptions;
|
|
18
27
|
constructor(activeModal: NgbActiveModal, tasService: TasService);
|
|
19
28
|
ngOnInit(): void;
|
|
@@ -24,10 +33,22 @@ export declare class TasVideocallComponent implements OnInit, OnDestroy, AfterVi
|
|
|
24
33
|
minimize(): void;
|
|
25
34
|
toggleSwap(): void;
|
|
26
35
|
onDoubleClick(): void;
|
|
36
|
+
/**
|
|
37
|
+
* Check if current user can admit others (OWNER, BACKOFFICE, or MODERATOR)
|
|
38
|
+
*/
|
|
39
|
+
get canAdmitUsers(): boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Admit a user from the waiting room
|
|
42
|
+
*/
|
|
43
|
+
admitUser(userId: number): void;
|
|
44
|
+
/**
|
|
45
|
+
* Dismiss the waiting room notification for a user
|
|
46
|
+
*/
|
|
47
|
+
dismissWaitingNotification(userId: number): void;
|
|
27
48
|
private setupSubscriptions;
|
|
28
49
|
private initializeCall;
|
|
29
50
|
private resetVideoPositions;
|
|
30
51
|
private initInteract;
|
|
31
52
|
static ɵfac: i0.ɵɵFactoryDeclaration<TasVideocallComponent, never>;
|
|
32
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TasVideocallComponent, "tas-videocall", never, { "sessionId": "sessionId"; "token": "token"; "isReturningFromPip": "isReturningFromPip"; }, {}, never, never>;
|
|
53
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TasVideocallComponent, "tas-videocall", never, { "sessionId": "sessionId"; "token": "token"; "appointmentId": "appointmentId"; "videoCallId": "videoCallId"; "participantName": "participantName"; "tenant": "tenant"; "businessRole": "businessRole"; "isReturningFromPip": "isReturningFromPip"; }, {}, never, never>;
|
|
33
54
|
}
|
|
@@ -1,61 +1,57 @@
|
|
|
1
|
-
import { OnInit, OnDestroy } from '@angular/core';
|
|
1
|
+
import { OnInit, OnDestroy, ChangeDetectorRef } from '@angular/core';
|
|
2
2
|
import { NgbActiveModal, NgbModal } from '@ng-bootstrap/ng-bootstrap';
|
|
3
3
|
import { TasService } from '../../services/tas.service';
|
|
4
|
-
import { TasCurrentUser } from '../../interfaces/tas.interfaces';
|
|
4
|
+
import { TasCurrentUser, TasRoomType, TasBusinessRole } from '../../interfaces/tas.interfaces';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare enum WaitingRoomState {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
GETTING_TOKEN = "GETTING_TOKEN",
|
|
7
|
+
CHECKING_STATUS = "CHECKING_STATUS",
|
|
8
|
+
WAITING_FOR_OWNER = "WAITING_FOR_OWNER",
|
|
10
9
|
READY = "READY",
|
|
10
|
+
GETTING_TOKEN = "GETTING_TOKEN",
|
|
11
11
|
ERROR = "ERROR"
|
|
12
12
|
}
|
|
13
13
|
export declare class TasWaitingRoomComponent implements OnInit, OnDestroy {
|
|
14
14
|
activeModal: NgbActiveModal;
|
|
15
15
|
private tasService;
|
|
16
16
|
private modalService;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
private cdr;
|
|
18
|
+
roomType: TasRoomType;
|
|
19
|
+
entityId: number;
|
|
20
|
+
tenant: string;
|
|
21
|
+
businessRole: TasBusinessRole;
|
|
20
22
|
currentUser: TasCurrentUser;
|
|
21
|
-
ownerUserIds: number[];
|
|
22
|
-
regularUserIds: number[];
|
|
23
|
-
moderatorUserIds: number[];
|
|
24
|
-
/** Optional: If provided, skips room creation and goes directly to getting a token */
|
|
25
|
-
existingSessionId: string;
|
|
26
23
|
state: WaitingRoomState;
|
|
27
24
|
WaitingRoomState: typeof WaitingRoomState;
|
|
28
25
|
errorMessage: string;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
/** UI toggle: show "Join Existing" input vs "Create New" */
|
|
32
|
-
showJoinExistingUI: boolean;
|
|
33
|
-
/** Manual session ID input by user */
|
|
34
|
-
manualSessionId: string;
|
|
35
|
-
/** Track if we're joining an existing session (for UI display) */
|
|
36
|
-
isJoiningExisting: boolean;
|
|
37
|
-
private sessionId;
|
|
26
|
+
private resolvedSessionId;
|
|
27
|
+
private resolvedAppointmentId;
|
|
38
28
|
private token;
|
|
39
|
-
private
|
|
29
|
+
private videoCallId;
|
|
40
30
|
private subscriptions;
|
|
41
31
|
private videoCallModalRef;
|
|
42
|
-
|
|
32
|
+
/** Whether current user is an owner */
|
|
33
|
+
get isOwner(): boolean;
|
|
34
|
+
constructor(activeModal: NgbActiveModal, tasService: TasService, modalService: NgbModal, cdr: ChangeDetectorRef);
|
|
43
35
|
ngOnInit(): void;
|
|
44
36
|
ngOnDestroy(): void;
|
|
45
37
|
/**
|
|
46
|
-
*
|
|
38
|
+
* Check status to get session info
|
|
39
|
+
*/
|
|
40
|
+
private checkStatus;
|
|
41
|
+
/**
|
|
42
|
+
* Handle changes to joinable status
|
|
47
43
|
*/
|
|
48
|
-
|
|
44
|
+
private handleJoinableChange;
|
|
49
45
|
/**
|
|
50
|
-
*
|
|
46
|
+
* Check if user has owner/backoffice role
|
|
51
47
|
*/
|
|
52
|
-
|
|
48
|
+
private get isBackoffice();
|
|
53
49
|
/**
|
|
54
|
-
*
|
|
50
|
+
* Get token for owner/backoffice - call /start endpoint
|
|
55
51
|
*/
|
|
56
|
-
|
|
52
|
+
private getTokenForOwner;
|
|
57
53
|
/**
|
|
58
|
-
*
|
|
54
|
+
* Join the session - token already obtained
|
|
59
55
|
*/
|
|
60
56
|
joinSession(): void;
|
|
61
57
|
/**
|
|
@@ -66,9 +62,7 @@ export declare class TasWaitingRoomComponent implements OnInit, OnDestroy {
|
|
|
66
62
|
* Retry after an error
|
|
67
63
|
*/
|
|
68
64
|
retry(): void;
|
|
69
|
-
private buildUsersArray;
|
|
70
|
-
private setupViewModeSubscription;
|
|
71
65
|
private openVideoCallModal;
|
|
72
66
|
static ɵfac: i0.ɵɵFactoryDeclaration<TasWaitingRoomComponent, never>;
|
|
73
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TasWaitingRoomComponent, "tas-waiting-room", never, { "
|
|
67
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TasWaitingRoomComponent, "tas-waiting-room", never, { "roomType": "roomType"; "entityId": "entityId"; "tenant": "tenant"; "businessRole": "businessRole"; "currentUser": "currentUser"; }, {}, never, never>;
|
|
74
68
|
}
|
|
@@ -17,6 +17,10 @@ export interface TasHttpClient {
|
|
|
17
17
|
body: any;
|
|
18
18
|
headers?: Record<string, string>;
|
|
19
19
|
}): Observable<T>;
|
|
20
|
+
patch<T>(url: string, options: {
|
|
21
|
+
body: any;
|
|
22
|
+
headers?: Record<string, string>;
|
|
23
|
+
}): Observable<T>;
|
|
20
24
|
}
|
|
21
25
|
/**
|
|
22
26
|
* Injection token for TAS configuration
|
|
@@ -1,32 +1,8 @@
|
|
|
1
|
-
export interface CreateRoomUser {
|
|
2
|
-
userExternalId: number;
|
|
3
|
-
rol: TasUserRole;
|
|
4
|
-
}
|
|
5
|
-
export interface CreateRoomRequest {
|
|
6
|
-
roomType: TasRoomType;
|
|
7
|
-
type: TasSessionType;
|
|
8
|
-
utcScheduled?: string;
|
|
9
|
-
product: string;
|
|
10
|
-
tenant: string;
|
|
11
|
-
appointmentId: number;
|
|
12
|
-
users: CreateRoomUser[];
|
|
13
|
-
}
|
|
14
|
-
export interface CreateRoomResponse {
|
|
15
|
-
content: {
|
|
16
|
-
roomType: string | null;
|
|
17
|
-
tenant: string | null;
|
|
18
|
-
user_id: string | null;
|
|
19
|
-
product: string | null;
|
|
20
|
-
record: boolean | null;
|
|
21
|
-
sessionId: string;
|
|
22
|
-
roomId: number;
|
|
23
|
-
status: TasSessionType;
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
1
|
export declare enum TasRoomType {
|
|
27
2
|
TAS = "TAS",
|
|
28
3
|
JM = "JM",
|
|
29
|
-
WEBINAR = "WEBINAR"
|
|
4
|
+
WEBINAR = "WEBINAR",
|
|
5
|
+
WELLNESS_MANAGER = "WELLNESS_MANAGER"
|
|
30
6
|
}
|
|
31
7
|
export declare enum TasSessionType {
|
|
32
8
|
SPONTANEOUS = "SPONTANEOUS",
|
|
@@ -37,11 +13,68 @@ export declare enum TasUserRole {
|
|
|
37
13
|
USER = "USER",
|
|
38
14
|
MODERATOR = "MODERATOR"
|
|
39
15
|
}
|
|
16
|
+
export declare enum TasBusinessRole {
|
|
17
|
+
ADMIN_MANAGER = "ADMIN_MANAGER",
|
|
18
|
+
MANAGER = "MANAGER",
|
|
19
|
+
BACKOFFICE = "BACKOFFICE",
|
|
20
|
+
USER = "USER"
|
|
21
|
+
}
|
|
22
|
+
export declare enum VideoSessionStatus {
|
|
23
|
+
ACTIVE = "ACTIVE",
|
|
24
|
+
INACTIVE = "INACTIVE",
|
|
25
|
+
PENDING = "PENDING",
|
|
26
|
+
SCHEDULED = "SCHEDULED"
|
|
27
|
+
}
|
|
28
|
+
export declare enum UserStatus {
|
|
29
|
+
ACTIVE = "ACTIVE",
|
|
30
|
+
INACTIVE = "INACTIVE",
|
|
31
|
+
ASSIGNED = "ASSIGNED"
|
|
32
|
+
}
|
|
33
|
+
export declare enum UserCallAction {
|
|
34
|
+
WAITING_ROOM_ENTER = "WAITING_ROOM_ENTER",
|
|
35
|
+
WAITING_ROOM_LEAVE = "WAITING_ROOM_LEAVE",
|
|
36
|
+
BAN = "BAN",
|
|
37
|
+
CHANGE_STATUS = "CHANGE_STATUS",
|
|
38
|
+
REQUEST_GEOLOCALIZATION = "REQUEST_GEOLOCALIZATION",
|
|
39
|
+
ACTIVATE_GEOLOCATION = "ACTIVATE_GEOLOCATION"
|
|
40
|
+
}
|
|
41
|
+
export declare enum RoomUserStatus {
|
|
42
|
+
ASSIGNED = "ASSIGNED",
|
|
43
|
+
WAITING = "WAITING",
|
|
44
|
+
JOINED = "JOINED",
|
|
45
|
+
FINISHED = "FINISHED"
|
|
46
|
+
}
|
|
47
|
+
export declare enum CallState {
|
|
48
|
+
IDLE = "IDLE",
|
|
49
|
+
CONNECTING = "CONNECTING",
|
|
50
|
+
CONNECTED = "CONNECTED",
|
|
51
|
+
DISCONNECTED = "DISCONNECTED",
|
|
52
|
+
ERROR = "ERROR"
|
|
53
|
+
}
|
|
54
|
+
export declare enum ViewMode {
|
|
55
|
+
FULLSCREEN = "FULLSCREEN",
|
|
56
|
+
PIP = "PIP"
|
|
57
|
+
}
|
|
40
58
|
export interface TasCurrentUser {
|
|
41
59
|
name: string;
|
|
42
60
|
lastname: string;
|
|
43
61
|
role: TasUserRole;
|
|
44
62
|
}
|
|
63
|
+
/** Input configuration for the TAS video call library */
|
|
64
|
+
export interface TasCallConfig {
|
|
65
|
+
appointmentId?: number;
|
|
66
|
+
sessionId?: string;
|
|
67
|
+
roomType: TasRoomType;
|
|
68
|
+
entityId: number;
|
|
69
|
+
tenant: string;
|
|
70
|
+
businessRole: TasBusinessRole;
|
|
71
|
+
currentUser: TasCurrentUser;
|
|
72
|
+
}
|
|
73
|
+
export interface StartSessionRequest {
|
|
74
|
+
sessionId: string;
|
|
75
|
+
name: string;
|
|
76
|
+
lastname: string;
|
|
77
|
+
}
|
|
45
78
|
export interface GenerateTokenRequest {
|
|
46
79
|
sessionId: string;
|
|
47
80
|
name: string;
|
|
@@ -53,14 +86,49 @@ export interface GenerateTokenResponse {
|
|
|
53
86
|
token: string;
|
|
54
87
|
};
|
|
55
88
|
}
|
|
56
|
-
export
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
89
|
+
export interface ProxyVideoStatusRequest {
|
|
90
|
+
appointmentId?: number;
|
|
91
|
+
businessRole?: TasBusinessRole;
|
|
92
|
+
tenant?: string;
|
|
93
|
+
sessionId?: string;
|
|
94
|
+
roomType?: TasRoomType;
|
|
95
|
+
entityId?: number;
|
|
62
96
|
}
|
|
63
|
-
export
|
|
64
|
-
|
|
65
|
-
|
|
97
|
+
export interface ProxyVideoStatusUser {
|
|
98
|
+
userId: number;
|
|
99
|
+
rol: TasUserRole;
|
|
100
|
+
status: UserStatus;
|
|
101
|
+
}
|
|
102
|
+
export interface ProxyVideoStatusResponse {
|
|
103
|
+
content: {
|
|
104
|
+
videoCallId: number;
|
|
105
|
+
sessionId: string;
|
|
106
|
+
statusVL: VideoSessionStatus;
|
|
107
|
+
joinable: boolean;
|
|
108
|
+
waitingRoomAvailable: boolean;
|
|
109
|
+
appointmentId: number;
|
|
110
|
+
activateGeo: boolean;
|
|
111
|
+
users: ProxyVideoStatusUser[];
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
export interface ProxyVideoFinishRequest {
|
|
115
|
+
sessionId: string;
|
|
116
|
+
businessRole: TasBusinessRole;
|
|
117
|
+
}
|
|
118
|
+
export interface FinishSessionResponse {
|
|
119
|
+
content: {
|
|
120
|
+
message: string;
|
|
121
|
+
callStatus: string;
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
export interface ProxyVideoUserModifyRequest {
|
|
125
|
+
userId: number;
|
|
126
|
+
videoCallId: number;
|
|
127
|
+
action: UserCallAction;
|
|
128
|
+
newStatus?: RoomUserStatus;
|
|
129
|
+
}
|
|
130
|
+
export interface WaitingRoomUser {
|
|
131
|
+
userId: number;
|
|
132
|
+
name: string;
|
|
133
|
+
status: RoomUserStatus;
|
|
66
134
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Observable } from
|
|
2
|
-
import * as OT from
|
|
3
|
-
import {
|
|
4
|
-
import { TasConfig, TasHttpClient } from
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import * as OT from '@opentok/client';
|
|
3
|
+
import { GenerateTokenResponse, StartSessionRequest, FinishSessionResponse, ProxyVideoStatusRequest, ProxyVideoStatusResponse, ProxyVideoFinishRequest, ProxyVideoUserModifyRequest, UserCallAction, RoomUserStatus, TasBusinessRole, CallState, ViewMode, WaitingRoomUser } from '../interfaces/tas.interfaces';
|
|
4
|
+
import { TasConfig, TasHttpClient } from '../config/tas.config';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
export { CallState, ViewMode };
|
|
6
|
+
export { CallState, ViewMode, TasBusinessRole, UserCallAction, RoomUserStatus };
|
|
7
7
|
export declare class TasService {
|
|
8
8
|
private httpClient;
|
|
9
9
|
private config;
|
|
@@ -18,12 +18,49 @@ export declare class TasService {
|
|
|
18
18
|
isMuted$: Observable<boolean>;
|
|
19
19
|
private currentSessionId;
|
|
20
20
|
private currentToken;
|
|
21
|
+
private readonly STORAGE_KEY;
|
|
22
|
+
private readonly DISCONNECTED_FLAG_KEY;
|
|
23
|
+
private isFinishingSession;
|
|
24
|
+
private proxyVideoSessionId;
|
|
25
|
+
private proxyVideoToken;
|
|
26
|
+
private currentBusinessRole;
|
|
27
|
+
private waitingRoomUsersSubject;
|
|
28
|
+
waitingRoomUsers$: Observable<WaitingRoomUser[]>;
|
|
29
|
+
private ownerHasJoinedSubject;
|
|
30
|
+
ownerHasJoined$: Observable<boolean>;
|
|
31
|
+
private ownerHasLeftSubject;
|
|
32
|
+
ownerHasLeft$: Observable<boolean>;
|
|
33
|
+
private joinableSubject;
|
|
34
|
+
joinable$: Observable<boolean>;
|
|
35
|
+
private statusPollingInterval;
|
|
36
|
+
private readonly DEFAULT_POLL_INTERVAL_MS;
|
|
37
|
+
private wasOwnerPresent;
|
|
38
|
+
private currentAppointmentId;
|
|
39
|
+
private currentVideoCallId;
|
|
40
|
+
private currentTenant;
|
|
21
41
|
constructor(httpClient: TasHttpClient, config: TasConfig);
|
|
42
|
+
/**
|
|
43
|
+
* Start automatic status polling for the current session.
|
|
44
|
+
* Status is polled every intervalMs (default 30s).
|
|
45
|
+
*/
|
|
46
|
+
startStatusPolling(params: ProxyVideoStatusRequest, intervalMs?: number): void;
|
|
47
|
+
/**
|
|
48
|
+
* Stop automatic status polling.
|
|
49
|
+
*/
|
|
50
|
+
stopStatusPolling(): void;
|
|
51
|
+
/**
|
|
52
|
+
* Reset polling state (waiting room, owner status, etc)
|
|
53
|
+
* Call this when completely exiting the flow
|
|
54
|
+
*/
|
|
55
|
+
resetPollingState(): void;
|
|
22
56
|
get currentSession(): OT.Session | null;
|
|
23
57
|
get currentPublisher(): OT.Publisher | null;
|
|
24
58
|
get currentSubscribers(): OT.Subscriber[];
|
|
25
59
|
get sessionId(): string | null;
|
|
26
60
|
get token(): string | null;
|
|
61
|
+
get proxySessionId(): string | null;
|
|
62
|
+
get proxyToken(): string | null;
|
|
63
|
+
get businessRole(): TasBusinessRole;
|
|
27
64
|
get isMuted(): boolean;
|
|
28
65
|
setViewMode(mode: ViewMode): void;
|
|
29
66
|
enterPipMode(): void;
|
|
@@ -31,14 +68,54 @@ export declare class TasService {
|
|
|
31
68
|
isPipMode(): boolean;
|
|
32
69
|
toggleMute(): void;
|
|
33
70
|
setMute(muted: boolean): void;
|
|
34
|
-
disconnectSession(): void;
|
|
71
|
+
disconnectSession(clearStorage?: boolean): void;
|
|
35
72
|
isCallActive(): boolean;
|
|
36
|
-
|
|
37
|
-
|
|
73
|
+
private saveSessionState;
|
|
74
|
+
private clearSessionState;
|
|
75
|
+
canRestoreSession(): boolean;
|
|
76
|
+
restoreSession(containerId: string): void;
|
|
77
|
+
/**
|
|
78
|
+
* PROXY circuit token: /v2/proxy/video/start
|
|
79
|
+
*/
|
|
80
|
+
startProxyVideoSession(payload: StartSessionRequest): Observable<GenerateTokenResponse>;
|
|
81
|
+
/**
|
|
82
|
+
* PROXY circuit status: /v2/proxy/video/status
|
|
83
|
+
*/
|
|
84
|
+
getProxyVideoStatus(payload: ProxyVideoStatusRequest): Observable<ProxyVideoStatusResponse>;
|
|
85
|
+
/**
|
|
86
|
+
* PROXY circuit user modification: /v2/proxy/video/user/modify
|
|
87
|
+
*/
|
|
88
|
+
modifyProxyVideoUser(payload: ProxyVideoUserModifyRequest): Observable<any>;
|
|
89
|
+
finishProxyVideoSession(payload: ProxyVideoFinishRequest): Observable<FinishSessionResponse>;
|
|
90
|
+
/**
|
|
91
|
+
* Start automatic status polling for the current session.
|
|
92
|
+
* Status is polled every STATUS_POLL_INTERVAL_MS milliseconds.
|
|
93
|
+
*/
|
|
94
|
+
/**
|
|
95
|
+
* Stop automatic status polling.
|
|
96
|
+
*/
|
|
97
|
+
/**
|
|
98
|
+
* Fetch status and process the response.
|
|
99
|
+
*/
|
|
100
|
+
private fetchAndProcessStatus;
|
|
101
|
+
/**
|
|
102
|
+
* Process status response to update waiting room users and owner join status.
|
|
103
|
+
*/
|
|
104
|
+
private processStatusResponse;
|
|
105
|
+
/**
|
|
106
|
+
* Check if at least one OWNER has joined the call.
|
|
107
|
+
*/
|
|
108
|
+
private checkIfOwnerJoined;
|
|
109
|
+
/**
|
|
110
|
+
* Admit a user from the waiting room by changing their status.
|
|
111
|
+
*/
|
|
112
|
+
admitUserFromWaitingRoom(userId: number, videoCallId: number): Observable<any>;
|
|
113
|
+
get appointmentId(): number | null;
|
|
114
|
+
get videoCallId(): number | null;
|
|
38
115
|
/**
|
|
39
116
|
* Connects to a TokBox video session
|
|
40
117
|
*/
|
|
41
|
-
connectSession(sessionId: string, token: string, publisherElement: string, subscriberElement: string): Promise<void>;
|
|
118
|
+
connectSession(sessionId: string, token: string, publisherElement: string, subscriberElement: string, businessRole?: TasBusinessRole): Promise<void>;
|
|
42
119
|
movePublisherTo(newContainerId: string): void;
|
|
43
120
|
moveSubscribersTo(newContainerId: string): void;
|
|
44
121
|
/**
|
|
@@ -5,8 +5,9 @@ import * as i1 from "./components/tas-btn/tas-btn.component";
|
|
|
5
5
|
import * as i2 from "./components/tas-videocall/tas-videocall.component";
|
|
6
6
|
import * as i3 from "./components/tas-floating-call/tas-floating-call.component";
|
|
7
7
|
import * as i4 from "./components/tas-waiting-room/tas-waiting-room.component";
|
|
8
|
-
import * as i5 from "
|
|
9
|
-
import * as i6 from "@angular/
|
|
8
|
+
import * as i5 from "./components/tas-avatar/tas-avatar.component";
|
|
9
|
+
import * as i6 from "@angular/common";
|
|
10
|
+
import * as i7 from "@angular/forms";
|
|
10
11
|
export declare class TasUellSdkModule {
|
|
11
12
|
/**
|
|
12
13
|
* Use forRoot() to configure the TAS SDK module with required dependencies.
|
|
@@ -42,6 +43,6 @@ export declare class TasUellSdkModule {
|
|
|
42
43
|
httpClient: new (...args: any[]) => TasHttpClient;
|
|
43
44
|
}): ModuleWithProviders<TasUellSdkModule>;
|
|
44
45
|
static ɵfac: i0.ɵɵFactoryDeclaration<TasUellSdkModule, never>;
|
|
45
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<TasUellSdkModule, [typeof i1.TasButtonComponent, typeof i2.TasVideocallComponent, typeof i3.TasFloatingCallComponent, typeof i4.TasWaitingRoomComponent], [typeof
|
|
46
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<TasUellSdkModule, [typeof i1.TasButtonComponent, typeof i2.TasVideocallComponent, typeof i3.TasFloatingCallComponent, typeof i4.TasWaitingRoomComponent, typeof i5.TasAvatarComponent], [typeof i6.CommonModule, typeof i7.FormsModule], [typeof i1.TasButtonComponent, typeof i2.TasVideocallComponent, typeof i3.TasFloatingCallComponent, typeof i4.TasWaitingRoomComponent, typeof i5.TasAvatarComponent]>;
|
|
46
47
|
static ɵinj: i0.ɵɵInjectorDeclaration<TasUellSdkModule>;
|
|
47
48
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tas-uell-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "TAS (Telemedicine Assistance Service) SDK for Angular applications - Video call functionality using TokBox/Vonage",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0",
|
package/public-api.d.ts
CHANGED
|
@@ -5,4 +5,5 @@ export * from './lib/components/tas-btn/tas-btn.component';
|
|
|
5
5
|
export * from './lib/components/tas-waiting-room/tas-waiting-room.component';
|
|
6
6
|
export * from './lib/components/tas-videocall/tas-videocall.component';
|
|
7
7
|
export * from './lib/components/tas-floating-call/tas-floating-call.component';
|
|
8
|
+
export * from './lib/components/tas-avatar/tas-avatar.component';
|
|
8
9
|
export * from './lib/tas-uell-sdk.module';
|
|
@@ -2,36 +2,35 @@
|
|
|
2
2
|
|
|
3
3
|
/* TAS Video Modal - global styles for NgbModal wrapper */
|
|
4
4
|
.tas-video-modal {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
5
|
+
.modal-dialog {
|
|
6
|
+
max-width: 100vw;
|
|
7
|
+
margin: 0;
|
|
8
|
+
height: 100vh;
|
|
9
|
+
}
|
|
10
|
+
.modal-content {
|
|
11
|
+
height: 100vh;
|
|
12
|
+
border: none;
|
|
13
|
+
border-radius: 0;
|
|
14
|
+
background: #000;
|
|
15
|
+
}
|
|
16
|
+
.modal-body {
|
|
17
|
+
padding: 0;
|
|
18
|
+
}
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
/* TAS Waiting Room Modal - global styles for NgbModal wrapper */
|
|
22
22
|
.tas-waiting-room-modal {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
23
|
+
.modal-dialog {
|
|
24
|
+
max-width: 480px;
|
|
25
|
+
}
|
|
26
|
+
.modal-content {
|
|
27
|
+
border: none;
|
|
28
|
+
border-radius: 5px;
|
|
29
|
+
background: #ffffff;
|
|
30
|
+
overflow: hidden;
|
|
31
|
+
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
|
|
32
|
+
}
|
|
33
|
+
.modal-body {
|
|
34
|
+
padding: 0;
|
|
35
|
+
}
|
|
36
36
|
}
|
|
37
|
-
|