diff --git a/src/platform/web/simple-user/simple-user-options.ts b/src/platform/web/simple-user/simple-user-options.ts index fa052a2d4..5c81bca4b 100644 --- a/src/platform/web/simple-user/simple-user-options.ts +++ b/src/platform/web/simple-user/simple-user-options.ts @@ -68,6 +68,12 @@ export interface SimpleUserOptions { */ aor?: string; + /** + * If `true`, the user agent calls the `stop()` method on the window event `beforeunload`. + * @defaultValue `true` + */ + autoStop?: boolean; + /** * Delegate for SimpleUser. */ diff --git a/src/platform/web/simple-user/simple-user.ts b/src/platform/web/simple-user/simple-user.ts index 14003def3..b966f3eb6 100644 --- a/src/platform/web/simple-user/simple-user.ts +++ b/src/platform/web/simple-user/simple-user.ts @@ -44,6 +44,7 @@ export class SimpleUser { // Session manager options const sessionManagerOptions: SessionManagerOptions = { aor: this.options.aor, + autoStop: this.options.autoStop, delegate: { onCallAnswered: () => this.delegate?.onCallAnswered?.(), onCallCreated: (session: Session) => {