@coze/realtime-api 1.0.2 → 1.0.3-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {"version":"5.6.3"}
@@ -1,4 +1,5 @@
1
1
  import { type AudioPropertiesConfig } from '@volcengine/rtc';
2
+ import { type GetToken } from '@coze/api';
2
3
  import * as RealtimeUtils from './utils';
3
4
  import { RealtimeEventHandler, EventNames } from './event-handler';
4
5
  import { RealtimeAPIError, RealtimeError } from './error';
@@ -7,7 +8,7 @@ export interface VideoConfig {
7
8
  renderDom?: string /** optional, The DOM element to render the video stream to */;
8
9
  }
9
10
  export interface RealtimeClientConfig {
10
- accessToken: string /** required, Access Token */;
11
+ accessToken: GetToken /** required, Access Token */;
11
12
  botId: string /** required, Bot Id */;
12
13
  voiceId?: string /** optional, Voice Id */;
13
14
  conversationId?: string /** optional, Conversation Id */;
@@ -6,12 +6,19 @@
6
6
  + */
7
7
  export declare const sleep: (milliseconds: number) => Promise<void>;
8
8
  /**
9
+ * @deprecated use checkDevicePermission instead
9
10
  * Check microphone permission,return boolean
10
11
  */
11
12
  export declare const checkPermission: ({ audio, video, }?: {
12
13
  audio?: boolean;
13
14
  video?: boolean;
14
15
  }) => Promise<boolean>;
16
+ export declare const checkDevicePermission: (checkVideo?: boolean) => Promise<{
17
+ video: boolean;
18
+ audio: boolean;
19
+ videoExceptionError?: DOMException | undefined;
20
+ audioExceptionError?: DOMException | undefined;
21
+ }>;
15
22
  /**
16
23
  * Get audio devices
17
24
  * @returns Promise<AudioDevices> Object containing arrays of audio input and output devices