1# 媒体子系统JS API变更 2 3OpenHarmony 3.1 Release版本相较于OpenHarmony 3.0 LTS版本,媒体子系统的API变更如下: 4 5## 接口变更 6 7| 模块名 | 类名 | 方法/属性/枚举/常量 | 变更类型 | 8|---|---|---|---| 9| ohos.multimedia.mediaLibrary | Size | height: number; | 新增 | 10| ohos.multimedia.mediaLibrary | Size | width: number; | 新增 | 11| ohos.multimedia.mediaLibrary | MediaLibrary | release(callback: AsyncCallback\<void>): void;<br>release(): Promise\<void>; | 新增 | 12| ohos.multimedia.mediaLibrary | MediaLibrary | startMediaSelect(option: MediaSelectOption, callback: AsyncCallback\<Array\<string>>): void;<br>startMediaSelect(option: MediaSelectOption): Promise\<Array\<string>>; | 新增 | 13| ohos.multimedia.mediaLibrary | MediaLibrary | startImagePreview(images: Array\<string>, index: number, callback: AsyncCallback\<void>): void;<br>startImagePreview(images: Array\<string>, callback: AsyncCallback\<void>): void;<br>startImagePreview(images: Array\<string>, index?: number): Promise\<void>; | 新增 | 14| ohos.multimedia.mediaLibrary | MediaLibrary | storeMediaAsset(option: MediaAssetOption, callback: AsyncCallback\<string>): void;<br>storeMediaAsset(option: MediaAssetOption): Promise\<string>; | 新增 | 15| ohos.multimedia.mediaLibrary | MediaLibrary | getAlbums(options: MediaFetchOptions, callback: AsyncCallback\<Array\<Album>>): void;<br>getAlbums(options: MediaFetchOptions): Promise\<Array\<Album>>; | 新增 | 16| ohos.multimedia.mediaLibrary | MediaLibrary | createAsset(mediaType: MediaType, displayName: string, relativePath: string, callback: AsyncCallback\<FileAsset>): void;<br>createAsset(mediaType: MediaType, displayName: string, relativePath: string): Promise\<FileAsset>; | 新增 | 17| ohos.multimedia.mediaLibrary | MediaLibrary | off(type: 'deviceChange'\|'albumChange'\|'imageChange'\|'audioChange'\|'videoChange'\|'fileChange'\|'remoteFileChange', callback?: Callback\<void>): void; | 新增 | 18| ohos.multimedia.mediaLibrary | MediaLibrary | off(type: 'deviceChange'\|'albumChange'\|'imageChange'\|'audioChange'\|'videoChange'\|'fileChange'\|'remoteFileChange', callback?: Callback\<void>): void; | 新增 | 19| ohos.multimedia.mediaLibrary | MediaLibrary | off(type: 'deviceChange'\|'albumChange'\|'imageChange'\|'audioChange'\|'videoChange'\|'fileChange'\|'remoteFileChange', callback?: Callback\<void>): void; | 新增 | 20| ohos.multimedia.mediaLibrary | MediaLibrary | off(type: 'deviceChange'\|'albumChange'\|'imageChange'\|'audioChange'\|'videoChange'\|'fileChange'\|'remoteFileChange', callback?: Callback\<void>): void; | 新增 | 21| ohos.multimedia.mediaLibrary | MediaLibrary | off(type: 'deviceChange'\|'albumChange'\|'imageChange'\|'audioChange'\|'videoChange'\|'fileChange'\|'remoteFileChange', callback?: Callback\<void>): void; | 新增 | 22| ohos.multimedia.mediaLibrary | MediaLibrary | off(type: 'deviceChange'\|'albumChange'\|'imageChange'\|'audioChange'\|'videoChange'\|'fileChange'\|'remoteFileChange', callback?: Callback\<void>): void; | 新增 | 23| ohos.multimedia.mediaLibrary | MediaLibrary | off(type: 'deviceChange'\|'albumChange'\|'imageChange'\|'audioChange'\|'videoChange'\|'fileChange'\|'remoteFileChange', callback?: Callback\<void>): void; | 新增 | 24| ohos.multimedia.mediaLibrary | MediaLibrary | on(type: 'deviceChange'\|'albumChange'\|'imageChange'\|'audioChange'\|'videoChange'\|'fileChange'\|'remoteFileChange', callback: Callback\<void>): void; | 新增 | 25| ohos.multimedia.mediaLibrary | MediaLibrary | on(type: 'deviceChange'\|'albumChange'\|'imageChange'\|'audioChange'\|'videoChange'\|'fileChange'\|'remoteFileChange', callback: Callback\<void>): void; | 新增 | 26| ohos.multimedia.mediaLibrary | MediaLibrary | on(type: 'deviceChange'\|'albumChange'\|'imageChange'\|'audioChange'\|'videoChange'\|'fileChange'\|'remoteFileChange', callback: Callback\<void>): void; | 新增 | 27| ohos.multimedia.mediaLibrary | MediaLibrary | on(type: 'deviceChange'\|'albumChange'\|'imageChange'\|'audioChange'\|'videoChange'\|'fileChange'\|'remoteFileChange', callback: Callback\<void>): void; | 新增 | 28| ohos.multimedia.mediaLibrary | MediaLibrary | on(type: 'deviceChange'\|'albumChange'\|'imageChange'\|'audioChange'\|'videoChange'\|'fileChange'\|'remoteFileChange', callback: Callback\<void>): void; | 新增 | 29| ohos.multimedia.mediaLibrary | MediaLibrary | on(type: 'deviceChange'\|'albumChange'\|'imageChange'\|'audioChange'\|'videoChange'\|'fileChange'\|'remoteFileChange', callback: Callback\<void>): void; | 新增 | 30| ohos.multimedia.mediaLibrary | MediaLibrary | on(type: 'deviceChange'\|'albumChange'\|'imageChange'\|'audioChange'\|'videoChange'\|'fileChange'\|'remoteFileChange', callback: Callback\<void>): void; | 新增 | 31| ohos.multimedia.mediaLibrary | MediaLibrary | getFileAssets(options: MediaFetchOptions, callback: AsyncCallback\<FetchFileResult>): void;<br>getFileAssets(options: MediaFetchOptions): Promise\<FetchFileResult>; | 新增 | 32| ohos.multimedia.mediaLibrary | MediaLibrary | getPublicDirectory(type: DirectoryType, callback: AsyncCallback\<string>): void;<br>getPublicDirectory(type: DirectoryType): Promise\<string>; | 新增 | 33| ohos.multimedia.mediaLibrary | DirectoryType | DIR_DOWNLOAD | 新增 | 34| ohos.multimedia.mediaLibrary | DirectoryType | DIR_DOCUMENTS | 新增 | 35| ohos.multimedia.mediaLibrary | DirectoryType | DIR_AUDIO | 新增 | 36| ohos.multimedia.mediaLibrary | DirectoryType | DIR_IMAGE | 新增 | 37| ohos.multimedia.mediaLibrary | DirectoryType | DIR_VIDEO | 新增 | 38| ohos.multimedia.mediaLibrary | DirectoryType | DIR_CAMERA = 0 | 新增 | 39| ohos.multimedia.mediaLibrary | Album | getFileAssets(callback: AsyncCallback\<FetchFileResult>): void;<br>getFileAssets(options: MediaFetchOptions, callback: AsyncCallback\<FetchFileResult>): void;<br>getFileAssets(options?: MediaFetchOptions): Promise\<FetchFileResult>; | 新增 | 40| ohos.multimedia.mediaLibrary | Album | commitModify(callback: AsyncCallback\<void>): void;<br>commitModify(): Promise\<void>; | 新增 | 41| ohos.multimedia.mediaLibrary | Album | readonly coverUri: string; | 新增 | 42| ohos.multimedia.mediaLibrary | Album | readonly relativePath: string; | 新增 | 43| ohos.multimedia.mediaLibrary | Album | readonly count: number; | 新增 | 44| ohos.multimedia.mediaLibrary | Album | readonly dateModified: number; | 新增 | 45| ohos.multimedia.mediaLibrary | Album | readonly albumUri: string; | 新增 | 46| ohos.multimedia.mediaLibrary | Album | albumName: string; | 新增 | 47| ohos.multimedia.mediaLibrary | Album | readonly albumId: number; | 新增 | 48| ohos.multimedia.mediaLibrary | FetchFileResult | getAllObject(callback: AsyncCallback\<Array\<FileAsset>>): void;<br>getAllObject(): Promise\<Array\<FileAsset>>; | 新增 | 49| ohos.multimedia.mediaLibrary | FetchFileResult | getPositionObject(index: number, callback: AsyncCallback\<FileAsset>): void;<br>getPositionObject(index: number): Promise\<FileAsset>; | 新增 | 50| ohos.multimedia.mediaLibrary | FetchFileResult | getLastObject(callback: AsyncCallback\<FileAsset>): void;<br>getLastObject(): Promise\<FileAsset>; | 新增 | 51| ohos.multimedia.mediaLibrary | FetchFileResult | getNextObject(callback: AsyncCallback\<FileAsset>): void;<br>getNextObject(): Promise\<FileAsset>; | 新增 | 52| ohos.multimedia.mediaLibrary | FetchFileResult | getFirstObject(callback: AsyncCallback\<FileAsset>): void;<br>getFirstObject(): Promise\<FileAsset>; | 新增 | 53| ohos.multimedia.mediaLibrary | FetchFileResult | close(): void; | 新增 | 54| ohos.multimedia.mediaLibrary | FetchFileResult | isAfterLast(): boolean; | 新增 | 55| ohos.multimedia.mediaLibrary | FetchFileResult | getCount(): number; | 新增 | 56| ohos.multimedia.mediaLibrary | MediaFetchOptions | extendArgs?: string; | 新增 | 57| ohos.multimedia.mediaLibrary | MediaFetchOptions | networkId?: string; | 新增 | 58| ohos.multimedia.mediaLibrary | MediaFetchOptions | uri?: string; | 新增 | 59| ohos.multimedia.mediaLibrary | MediaFetchOptions | order?: string; | 新增 | 60| ohos.multimedia.mediaLibrary | MediaFetchOptions | selectionArgs: Array\<string>; | 新增 | 61| ohos.multimedia.mediaLibrary | MediaFetchOptions | selections: string; | 新增 | 62| ohos.multimedia.mediaLibrary | FileKey | ALBUM_NAME = "bucket_display_name" | 新增 | 63| ohos.multimedia.mediaLibrary | FileKey | ALBUM_ID = "bucket_id" | 新增 | 64| ohos.multimedia.mediaLibrary | FileKey | ORIENTATION = "orientation" | 新增 | 65| ohos.multimedia.mediaLibrary | FileKey | HEIGHT = "height" | 新增 | 66| ohos.multimedia.mediaLibrary | FileKey | WIDTH = "width" | 新增 | 67| ohos.multimedia.mediaLibrary | FileKey | DURATION = "duration" | 新增 | 68| ohos.multimedia.mediaLibrary | FileKey | AUDIOALBUM = "audio_album" | 新增 | 69| ohos.multimedia.mediaLibrary | FileKey | ARTIST = "artist" | 新增 | 70| ohos.multimedia.mediaLibrary | FileKey | TITLE = "title" | 新增 | 71| ohos.multimedia.mediaLibrary | FileKey | DATE_TAKEN = "date_taken" | 新增 | 72| ohos.multimedia.mediaLibrary | FileKey | DATE_MODIFIED = "date_modified" | 新增 | 73| ohos.multimedia.mediaLibrary | FileKey | DATE_ADDED = "date_added" | 新增 | 74| ohos.multimedia.mediaLibrary | FileKey | SIZE = "size" | 新增 | 75| ohos.multimedia.mediaLibrary | FileKey | MEDIA_TYPE = "media_type" | 新增 | 76| ohos.multimedia.mediaLibrary | FileKey | MIME_TYPE = "mime_type" | 新增 | 77| ohos.multimedia.mediaLibrary | FileKey | PARENT = "parent" | 新增 | 78| ohos.multimedia.mediaLibrary | FileKey | DISPLAY_NAME = "display_name" | 新增 | 79| ohos.multimedia.mediaLibrary | FileKey | RELATIVE_PATH = "relative_path" | 新增 | 80| ohos.multimedia.mediaLibrary | FileKey | ID = "file_id" | 新增 | 81| ohos.multimedia.mediaLibrary | FileAsset | isTrash(callback: AsyncCallback\<boolean>): void;<br>isTrash():Promise\<boolean>; | 新增 | 82| ohos.multimedia.mediaLibrary | FileAsset | trash(isTrash: boolean, callback: AsyncCallback\<void>): void;<br>trash(isTrash: boolean): Promise\<void>; | 新增 | 83| ohos.multimedia.mediaLibrary | FileAsset | isFavorite(callback: AsyncCallback\<boolean>): void;<br>isFavorite():Promise\<boolean>; | 新增 | 84| ohos.multimedia.mediaLibrary | FileAsset | favorite(isFavorite: boolean, callback: AsyncCallback\<void>): void;<br>favorite(isFavorite: boolean): Promise\<void>; | 新增 | 85| ohos.multimedia.mediaLibrary | FileAsset | getThumbnail(callback: AsyncCallback\<image.PixelMap>): void;<br>getThumbnail(size: Size, callback: AsyncCallback\<image.PixelMap>): void;<br>getThumbnail(size?: Size): Promise\<image.PixelMap>; | 新增 | 86| ohos.multimedia.mediaLibrary | FileAsset | close(fd: number, callback: AsyncCallback\<void>): void;<br>close(fd: number): Promise\<void>; | 新增 | 87| ohos.multimedia.mediaLibrary | FileAsset | open(mode: string, callback: AsyncCallback\<number>): void;<br>open(mode: string): Promise\<number>; | 新增 | 88| ohos.multimedia.mediaLibrary | FileAsset | commitModify(callback: AsyncCallback\<void>): void;<br>commitModify(): Promise\<void>; | 新增 | 89| ohos.multimedia.mediaLibrary | FileAsset | isDirectory(callback: AsyncCallback\<boolean>): void;<br>isDirectory():Promise\<boolean>; | 新增 | 90| ohos.multimedia.mediaLibrary | FileAsset | readonly albumName: string; | 新增 | 91| ohos.multimedia.mediaLibrary | FileAsset | readonly albumUri: string; | 新增 | 92| ohos.multimedia.mediaLibrary | FileAsset | readonly albumId: number; | 新增 | 93| ohos.multimedia.mediaLibrary | FileAsset | readonly duration: number; | 新增 | 94| ohos.multimedia.mediaLibrary | FileAsset | orientation: number; | 新增 | 95| ohos.multimedia.mediaLibrary | FileAsset | readonly height: number; | 新增 | 96| ohos.multimedia.mediaLibrary | FileAsset | readonly width: number; | 新增 | 97| ohos.multimedia.mediaLibrary | FileAsset | readonly audioAlbum: string; | 新增 | 98| ohos.multimedia.mediaLibrary | FileAsset | readonly artist: string; | 新增 | 99| ohos.multimedia.mediaLibrary | FileAsset | readonly dateTaken: number; | 新增 | 100| ohos.multimedia.mediaLibrary | FileAsset | readonly dateModified: number; | 新增 | 101| ohos.multimedia.mediaLibrary | FileAsset | readonly dateAdded: number; | 新增 | 102| ohos.multimedia.mediaLibrary | FileAsset | readonly size: number; | 新增 | 103| ohos.multimedia.mediaLibrary | FileAsset | readonly parent: number; | 新增 | 104| ohos.multimedia.mediaLibrary | FileAsset | relativePath: string; | 新增 | 105| ohos.multimedia.mediaLibrary | FileAsset | title: string; | 新增 | 106| ohos.multimedia.mediaLibrary | FileAsset | displayName: string; | 新增 | 107| ohos.multimedia.mediaLibrary | FileAsset | readonly mediaType: MediaType; | 新增 | 108| ohos.multimedia.mediaLibrary | FileAsset | readonly mimeType: string; | 新增 | 109| ohos.multimedia.mediaLibrary | FileAsset | readonly uri: string; | 新增 | 110| ohos.multimedia.mediaLibrary | FileAsset | readonly id: number; | 新增 | 111| ohos.multimedia.mediaLibrary | MediaSelectOption | count: number; | 新增 | 112| ohos.multimedia.mediaLibrary | MediaSelectOption | type: 'image' \| 'video' \| 'media'; | 新增 | 113| ohos.multimedia.mediaLibrary | MediaAssetOption | relativePath?: string; | 新增 | 114| ohos.multimedia.mediaLibrary | MediaAssetOption | mimeType: string; | 新增 | 115| ohos.multimedia.mediaLibrary | MediaAssetOption | src: string; | 新增 | 116| ohos.multimedia.mediaLibrary | MediaType | AUDIO | 新增 | 117| ohos.multimedia.mediaLibrary | MediaType | VIDEO | 新增 | 118| ohos.multimedia.mediaLibrary | MediaType | IMAGE | 新增 | 119| ohos.multimedia.mediaLibrary | MediaType | FILE = 0 | 新增 | 120| ohos.multimedia.mediaLibrary | mediaLibrary | getMediaLibrary(): MediaLibrary;<br>getMediaLibrary(context: Context): MediaLibrary; | 新增 | 121| ohos.multimedia.media | CodecMimeType | AUDIO_FLAC = 'audio/flac' | 新增 | 122| ohos.multimedia.media | CodecMimeType | AUDIO_VORBIS = 'audio/vorbis' | 新增 | 123| ohos.multimedia.media | CodecMimeType | AUDIO_AAC = 'audio/mp4a-latm' | 新增 | 124| ohos.multimedia.media | CodecMimeType | VIDEO_VP8 = 'video/x-vnd.on2.vp8' | 新增 | 125| ohos.multimedia.media | CodecMimeType | VIDEO_MPEG4 = 'video/mp4v-es' | 新增 | 126| ohos.multimedia.media | CodecMimeType | VIDEO_MPEG2 = 'video/mpeg2' | 新增 | 127| ohos.multimedia.media | CodecMimeType | VIDEO_AVC = 'video/avc' | 新增 | 128| ohos.multimedia.media | CodecMimeType | VIDEO_H263 = 'video/h263' | 新增 | 129| ohos.multimedia.media | SeekMode | SEEK_PREV_SYNC = 1 | 新增 | 130| ohos.multimedia.media | SeekMode | SEEK_NEXT_SYNC = 0 | 新增 | 131| ohos.multimedia.media | MediaDescription | [key : string]: Object; | 新增 | 132| ohos.multimedia.media | MediaDescriptionKey | MD_KEY_AUD_SAMPLE_RATE = "sample_rate" | 新增 | 133| ohos.multimedia.media | MediaDescriptionKey | MD_KEY_AUD_CHANNEL_COUNT = "channel_count" | 新增 | 134| ohos.multimedia.media | MediaDescriptionKey | MD_KEY_FRAME_RATE = "frame_rate" | 新增 | 135| ohos.multimedia.media | MediaDescriptionKey | MD_KEY_HEIGHT = "height" | 新增 | 136| ohos.multimedia.media | MediaDescriptionKey | MD_KEY_WIDTH = "width" | 新增 | 137| ohos.multimedia.media | MediaDescriptionKey | MD_KEY_BITRATE = "bitrate" | 新增 | 138| ohos.multimedia.media | MediaDescriptionKey | MD_KEY_DURATION = "duration" | 新增 | 139| ohos.multimedia.media | MediaDescriptionKey | MD_KEY_CODEC_MIME = "codec_mime" | 新增 | 140| ohos.multimedia.media | MediaDescriptionKey | MD_KEY_TRACK_TYPE = "track_type" | 新增 | 141| ohos.multimedia.media | MediaDescriptionKey | MD_KEY_TRACK_INDEX = "track_index" | 新增 | 142| ohos.multimedia.media | MediaType | MEDIA_TYPE_VID = 1 | 新增 | 143| ohos.multimedia.media | MediaType | MEDIA_TYPE_AUD = 0 | 新增 | 144| ohos.multimedia.media | ContainerFormatType | CFT_MPEG_4A = "m4a" | 新增 | 145| ohos.multimedia.media | ContainerFormatType | CFT_MPEG_4 = "mp4" | 新增 | 146| ohos.multimedia.media | VideoPlayer | on(type: 'error', callback: ErrorCallback): void; | 新增 | 147| ohos.multimedia.media | VideoPlayer | on(type: 'videoSizeChanged', callback: (width: number, height: number) => void): void; | 新增 | 148| ohos.multimedia.media | VideoPlayer | on(type: 'startRenderFrame', callback: Callback\<void>): void; | 新增 | 149| ohos.multimedia.media | VideoPlayer | on(type: 'bufferingUpdate', callback: (infoType: BufferingInfoType, value: number) => void): void; | 新增 | 150| ohos.multimedia.media | VideoPlayer | on(type: 'playbackCompleted', callback: Callback\<void>): void; | 新增 | 151| ohos.multimedia.media | VideoPlayer | setSpeed(speed:number, callback: AsyncCallback\<number>): void;<br>setSpeed(speed:number): Promise\<number>; | 新增 | 152| ohos.multimedia.media | VideoPlayer | readonly height: number; | 新增 | 153| ohos.multimedia.media | VideoPlayer | readonly width: number; | 新增 | 154| ohos.multimedia.media | VideoPlayer | readonly state: VideoPlayState; | 新增 | 155| ohos.multimedia.media | VideoPlayer | readonly duration: number; | 新增 | 156| ohos.multimedia.media | VideoPlayer | readonly currentTime: number; | 新增 | 157| ohos.multimedia.media | VideoPlayer | loop: boolean; | 新增 | 158| ohos.multimedia.media | VideoPlayer | url: string; | 新增 | 159| ohos.multimedia.media | VideoPlayer | getTrackDescription(callback: AsyncCallback\<Array\<MediaDescription>>): void;<br>getTrackDescription() : Promise\<Array\<MediaDescription>>; | 新增 | 160| ohos.multimedia.media | VideoPlayer | release(callback: AsyncCallback\<void>): void;<br>release(): Promise\<void>; | 新增 | 161| ohos.multimedia.media | VideoPlayer | setVolume(vol: number, callback: AsyncCallback\<void>): void;<br>setVolume(vol: number): Promise\<void>; | 新增 | 162| ohos.multimedia.media | VideoPlayer | seek(timeMs: number, callback: AsyncCallback\<number>): void;<br>seek(timeMs: number, mode:SeekMode, callback: AsyncCallback\<number>): void;<br>seek(timeMs: number, mode?:SeekMode): Promise\<number>; | 新增 | 163| ohos.multimedia.media | VideoPlayer | reset(callback: AsyncCallback\<void>): void;<br>reset(): Promise\<void>; | 新增 | 164| ohos.multimedia.media | VideoPlayer | stop(callback: AsyncCallback\<void>): void;<br>stop(): Promise\<void>; | 新增 | 165| ohos.multimedia.media | VideoPlayer | pause(callback: AsyncCallback\<void>): void;<br>pause(): Promise\<void>; | 新增 | 166| ohos.multimedia.media | VideoPlayer | play(callback: AsyncCallback\<void>): void;<br>play(): Promise\<void>; | 新增 | 167| ohos.multimedia.media | VideoPlayer | prepare(callback: AsyncCallback\<void>): void;<br>prepare(): Promise\<void>; | 新增 | 168| ohos.multimedia.media | VideoPlayer | setDisplaySurface(surfaceId: string, callback: AsyncCallback\<void>): void;<br>setDisplaySurface(surfaceId: string): Promise\<void>; | 新增 | 169| ohos.multimedia.media | PlaybackSpeed | SPEED_FORWARD_2_00_X = 4 | 新增 | 170| ohos.multimedia.media | PlaybackSpeed | SPEED_FORWARD_1_75_X = 3 | 新增 | 171| ohos.multimedia.media | PlaybackSpeed | SPEED_FORWARD_1_25_X = 2 | 新增 | 172| ohos.multimedia.media | PlaybackSpeed | SPEED_FORWARD_1_00_X = 1 | 新增 | 173| ohos.multimedia.media | PlaybackSpeed | SPEED_FORWARD_0_75_X = 0 | 新增 | 174| ohos.multimedia.media | AudioRecorder | on(type: 'error', callback: ErrorCallback): void; | 新增 | 175| ohos.multimedia.media | AudioRecorder | on(type: 'prepare' \| 'start' \| 'pause' \| 'resume' \| 'stop' \| 'release' \| 'reset', callback: () => void): void; | 新增 | 176| ohos.multimedia.media | AudioRecorder | on(type: 'prepare' \| 'start' \| 'pause' \| 'resume' \| 'stop' \| 'release' \| 'reset', callback: () => void): void; | 新增 | 177| ohos.multimedia.media | AudioRecorder | on(type: 'prepare' \| 'start' \| 'pause' \| 'resume' \| 'stop' \| 'release' \| 'reset', callback: () => void): void; | 新增 | 178| ohos.multimedia.media | AudioRecorder | on(type: 'prepare' \| 'start' \| 'pause' \| 'resume' \| 'stop' \| 'release' \| 'reset', callback: () => void): void; | 新增 | 179| ohos.multimedia.media | AudioRecorder | on(type: 'prepare' \| 'start' \| 'pause' \| 'resume' \| 'stop' \| 'release' \| 'reset', callback: () => void): void; | 新增 | 180| ohos.multimedia.media | AudioRecorder | on(type: 'prepare' \| 'start' \| 'pause' \| 'resume' \| 'stop' \| 'release' \| 'reset', callback: () => void): void; | 新增 | 181| ohos.multimedia.media | AudioRecorder | on(type: 'prepare' \| 'start' \| 'pause' \| 'resume' \| 'stop' \| 'release' \| 'reset', callback: () => void): void; | 新增 | 182| ohos.multimedia.media | AudioRecorder | reset(): void; | 新增 | 183| ohos.multimedia.media | AudioRecorder | release(): void; | 新增 | 184| ohos.multimedia.media | AudioRecorder | stop(): void; | 新增 | 185| ohos.multimedia.media | AudioRecorder | resume(): void; | 新增 | 186| ohos.multimedia.media | AudioRecorder | pause(): void; | 新增 | 187| ohos.multimedia.media | AudioRecorder | start(): void; | 新增 | 188| ohos.multimedia.media | AudioRecorder | prepare(config: AudioRecorderConfig): void; | 新增 | 189| ohos.multimedia.media | AudioRecorderConfig | fileFormat?: ContainerFormatType; | 新增 | 190| ohos.multimedia.media | AudioRecorderConfig | audioEncoderMime?: CodecMimeType; | 新增 | 191| ohos.multimedia.media | AudioRecorderConfig | location?: Location; | 新增 | 192| ohos.multimedia.media | AudioRecorderConfig | uri: string; | 新增 | 193| ohos.multimedia.media | AudioRecorderConfig | format?: AudioOutputFormat; | 新增 | 194| ohos.multimedia.media | AudioRecorderConfig | numberOfChannels?: number; | 新增 | 195| ohos.multimedia.media | AudioRecorderConfig | audioSampleRate?: number; | 新增 | 196| ohos.multimedia.media | AudioRecorderConfig | audioEncodeBitRate?: number; | 新增 | 197| ohos.multimedia.media | AudioRecorderConfig | audioEncoder?: AudioEncoder; | 新增 | 198| ohos.multimedia.media | Location | longitude: number; | 新增 | 199| ohos.multimedia.media | Location | latitude: number; | 新增 | 200| ohos.multimedia.media | AudioOutputFormat | AAC_ADTS = 6 | 新增 | 201| ohos.multimedia.media | AudioOutputFormat | AMR_WB = 4 | 新增 | 202| ohos.multimedia.media | AudioOutputFormat | AMR_NB = 3 | 新增 | 203| ohos.multimedia.media | AudioOutputFormat | MPEG_4 = 2 | 新增 | 204| ohos.multimedia.media | AudioOutputFormat | DEFAULT = 0 | 新增 | 205| ohos.multimedia.media | AudioEncoder | HE_AAC = 4 | 新增 | 206| ohos.multimedia.media | AudioEncoder | AAC_LC = 3 | 新增 | 207| ohos.multimedia.media | AudioEncoder | AMR_WB = 2 | 新增 | 208| ohos.multimedia.media | AudioEncoder | AMR_NB = 1 | 新增 | 209| ohos.multimedia.media | AudioEncoder | DEFAULT = 0 | 新增 | 210| ohos.multimedia.media | AudioPlayer | on(type: 'play' \| 'pause' \| 'stop' \| 'reset' \| 'dataLoad' \| 'finish' \| 'volumeChange', callback: () => void): void; | 新增 | 211| ohos.multimedia.media | AudioPlayer | on(type: 'bufferingUpdate', callback: (infoType: BufferingInfoType, value: number) => void): void; | 新增 | 212| ohos.multimedia.media | AudioPlayer | getTrackDescription(callback: AsyncCallback\<Array\<MediaDescription>>): void;<br>getTrackDescription() : Promise\<Array\<MediaDescription>>; | 新增 | 213| ohos.multimedia.media | AudioPlayer | reset(): void; | 新增 | 214| ohos.multimedia.media | BufferingInfoType | CACHED_DURATION = 4 | 新增 | 215| ohos.multimedia.media | BufferingInfoType | BUFFERING_PERCENT = 3 | 新增 | 216| ohos.multimedia.media | BufferingInfoType | BUFFERING_END = 2 | 新增 | 217| ohos.multimedia.media | BufferingInfoType | BUFFERING_START = 1 | 新增 | 218| ohos.multimedia.media | MediaErrorCode | MSERR_UNSUPPORTED = 9 | 新增 | 219| ohos.multimedia.media | MediaErrorCode | MSERR_INVALID_STATE = 8 | 新增 | 220| ohos.multimedia.media | MediaErrorCode | MSERR_SERVICE_DIED = 7 | 新增 | 221| ohos.multimedia.media | MediaErrorCode | MSERR_UNKNOWN = 6 | 新增 | 222| ohos.multimedia.media | MediaErrorCode | MSERR_TIMEOUT = 5 | 新增 | 223| ohos.multimedia.media | MediaErrorCode | MSERR_IO = 4 | 新增 | 224| ohos.multimedia.media | MediaErrorCode | MSERR_INVALID_VAL = 3 | 新增 | 225| ohos.multimedia.media | MediaErrorCode | MSERR_OPERATION_NOT_PERMIT = 2 | 新增 | 226| ohos.multimedia.media | MediaErrorCode | MSERR_NO_MEMORY = 1 | 新增 | 227| ohos.multimedia.media | MediaErrorCode | MSERR_OK = 0 | 新增 | 228| ohos.multimedia.media | media | createVideoPlayer(callback: AsyncCallback\<VideoPlayer>): void;<br>createVideoPlayer() : Promise\<VideoPlayer>; | 新增 | 229| ohos.multimedia.media | media | createAudioRecorder(): AudioRecorder; | 新增 | 230| ohos.multimedia.image | ImagePacker | readonly supportedFormats: Array\<string>; | 新增 | 231| ohos.multimedia.image | ImagePacker | release(callback: AsyncCallback\<void>): void;<br>release(): Promise\<void>; | 新增 | 232| ohos.multimedia.image | ImagePacker | packing(source: ImageSource, option: PackingOption, callback: AsyncCallback\<ArrayBuffer>): void;<br>packing(source: ImageSource, option: PackingOption): Promise\<ArrayBuffer>;<br>packing(source: PixelMap, option: PackingOption, callback: AsyncCallback\<ArrayBuffer>): void;<br>packing(source: PixelMap, option: PackingOption): Promise\<ArrayBuffer>; | 新增 | 233| ohos.multimedia.image | ImageSource | readonly supportedFormats: Array\<string>; | 新增 | 234| ohos.multimedia.image | ImageSource | release(callback: AsyncCallback\<void>): void;<br>release(): Promise\<void>; | 新增 | 235| ohos.multimedia.image | ImageSource | getImageProperty(key:string, options?: GetImagePropertyOptions): Promise\<string>;<br>getImageProperty(key:string, callback: AsyncCallback\<string>): void;<br>getImageProperty(key:string, options: GetImagePropertyOptions, callback: AsyncCallback\<string>): void; | 新增 | 236| ohos.multimedia.image | ImageSource | createPixelMap(options?: DecodingOptions): Promise\<PixelMap>;<br>createPixelMap(callback: AsyncCallback\<PixelMap>): void;<br>createPixelMap(options: DecodingOptions, callback: AsyncCallback\<PixelMap>): void; | 新增 | 237| ohos.multimedia.image | ImageSource | getImageInfo(index: number, callback: AsyncCallback\<ImageInfo>): void;<br>getImageInfo(callback: AsyncCallback\<ImageInfo>): void;<br>getImageInfo(index?: number): Promise\<ImageInfo>; | 新增 | 238| ohos.multimedia.image | PixelMap | release(callback: AsyncCallback\<void>): void;<br>release(): Promise\<void>; | 新增 | 239| ohos.multimedia.image | PixelMap | getPixelBytesNumber(): number; | 新增 | 240| ohos.multimedia.image | PixelMap | getBytesNumberPerRow(): number; | 新增 | 241| ohos.multimedia.image | PixelMap | getImageInfo(): Promise\<ImageInfo>;<br>getImageInfo(callback: AsyncCallback\<ImageInfo>): void; | 新增 | 242| ohos.multimedia.image | PixelMap | writeBufferToPixels(src: ArrayBuffer): Promise\<void>;<br>writeBufferToPixels(src: ArrayBuffer, callback: AsyncCallback\<void>): void; | 新增 | 243| ohos.multimedia.image | PixelMap | writePixels(area: PositionArea): Promise\<void>;<br>writePixels(area: PositionArea, callback: AsyncCallback\<void>): void; | 新增 | 244| ohos.multimedia.image | PixelMap | readPixels(area: PositionArea): Promise\<void>;<br>readPixels(area: PositionArea, callback: AsyncCallback\<void>): void; | 新增 | 245| ohos.multimedia.image | PixelMap | readPixelsToBuffer(dst: ArrayBuffer): Promise\<void>;<br>readPixelsToBuffer(dst: ArrayBuffer, callback: AsyncCallback\<void>): void; | 新增 | 246| ohos.multimedia.image | PixelMap | readonly isEditable: boolean; | 新增 | 247| ohos.multimedia.image | image | createImagePacker(): ImagePacker; | 新增 | 248| ohos.multimedia.image | image | createImageSource(uri: string): ImageSource;<br>createImageSource(fd: number): ImageSource; | 新增 | 249| ohos.multimedia.image | image | createPixelMap(colors: ArrayBuffer, options: InitializationOptions, callback: AsyncCallback\<PixelMap>): void;<br>createPixelMap(colors: ArrayBuffer, options: InitializationOptions): Promise\<PixelMap>; | 新增 | 250| ohos.multimedia.image | InitializationOptions | editable?: boolean; | 新增 | 251| ohos.multimedia.image | InitializationOptions | pixelFormat?: PixelMapFormat; | 新增 | 252| ohos.multimedia.image | InitializationOptions | size: Size; | 新增 | 253| ohos.multimedia.image | DecodingOptions | desiredPixelFormat?: PixelMapFormat; | 新增 | 254| ohos.multimedia.image | DecodingOptions | desiredRegion?: Region; | 新增 | 255| ohos.multimedia.image | DecodingOptions | desiredSize?: Size; | 新增 | 256| ohos.multimedia.image | DecodingOptions | editable?: boolean; | 新增 | 257| ohos.multimedia.image | DecodingOptions | rotate?: number; | 新增 | 258| ohos.multimedia.image | DecodingOptions | sampleSize?: number; | 新增 | 259| ohos.multimedia.image | DecodingOptions | index?: number; | 新增 | 260| ohos.multimedia.image | GetImagePropertyOptions | defaultValue?: string; | 新增 | 261| ohos.multimedia.image | GetImagePropertyOptions | index?: number; | 新增 | 262| ohos.multimedia.image | PackingOption | quality: number; | 新增 | 263| ohos.multimedia.image | PackingOption | format: string; | 新增 | 264| ohos.multimedia.image | ImageInfo | size: Size; | 新增 | 265| ohos.multimedia.image | PositionArea | region: Region; | 新增 | 266| ohos.multimedia.image | PositionArea | stride: number; | 新增 | 267| ohos.multimedia.image | PositionArea | offset: number; | 新增 | 268| ohos.multimedia.image | PositionArea | pixels: ArrayBuffer; | 新增 | 269| ohos.multimedia.image | Region | y: number; | 新增 | 270| ohos.multimedia.image | Region | x: number; | 新增 | 271| ohos.multimedia.image | Region | size: Size; | 新增 | 272| ohos.multimedia.image | PropertyKey | GPS_LONGITUDE_REF = "GPSLongitudeRef" | 新增 | 273| ohos.multimedia.image | PropertyKey | GPS_LATITUDE_REF = "GPSLatitudeRef" | 新增 | 274| ohos.multimedia.image | PropertyKey | GPS_LONGITUDE = "GPSLongitude" | 新增 | 275| ohos.multimedia.image | PropertyKey | GPS_LATITUDE = "GPSLatitude" | 新增 | 276| ohos.multimedia.image | PropertyKey | IMAGE_WIDTH = "ImageWidth" | 新增 | 277| ohos.multimedia.image | PropertyKey | IMAGE_LENGTH = "ImageLength" | 新增 | 278| ohos.multimedia.image | PropertyKey | ORIENTATION = "Orientation" | 新增 | 279| ohos.multimedia.image | PropertyKey | BITS_PER_SAMPLE = "BitsPerSample" | 新增 | 280| ohos.multimedia.image | Size | width: number; | 新增 | 281| ohos.multimedia.image | Size | height: number; | 新增 | 282| ohos.multimedia.image | PixelMapFormat | RGBA_8888 = 3 | 新增 | 283| ohos.multimedia.image | PixelMapFormat | RGB_565 = 2 | 新增 | 284| ohos.multimedia.image | PixelMapFormat | UNKNOWN = 0 | 新增 | 285| ohos.multimedia.audio | AudioCapturer | on(type: "stateChange", callback: Callback\<AudioState>): void; | 新增 | 286| ohos.multimedia.audio | AudioCapturer | off(type: "periodReach"): void; | 新增 | 287| ohos.multimedia.audio | AudioCapturer | on(type: "periodReach", frame: number, callback: (position: number) => {}): void; | 新增 | 288| ohos.multimedia.audio | AudioCapturer | off(type: "markReach"): void; | 新增 | 289| ohos.multimedia.audio | AudioCapturer | on(type: "markReach", frame: number, callback: (position: number) => {}): void; | 新增 | 290| ohos.multimedia.audio | AudioCapturer | getBufferSize(callback: AsyncCallback\<number>): void;<br>getBufferSize(): Promise\<number>; | 新增 | 291| ohos.multimedia.audio | AudioCapturer | release(callback: AsyncCallback\<void>): void;<br>release(): Promise\<void>; | 新增 | 292| ohos.multimedia.audio | AudioCapturer | stop(callback: AsyncCallback\<void>): void;<br>stop(): Promise\<void>; | 新增 | 293| ohos.multimedia.audio | AudioCapturer | getAudioTime(callback: AsyncCallback\<number>): void;<br>getAudioTime(): Promise\<number>; | 新增 | 294| ohos.multimedia.audio | AudioCapturer | read(size: number, isBlockingRead: boolean, callback: AsyncCallback\<ArrayBuffer>): void;<br>read(size: number, isBlockingRead: boolean): Promise\<ArrayBuffer>; | 新增 | 295| ohos.multimedia.audio | AudioCapturer | start(callback: AsyncCallback\<void>): void;<br>start(): Promise\<void>; | 新增 | 296| ohos.multimedia.audio | AudioCapturer | getStreamInfo(callback: AsyncCallback\<AudioStreamInfo>): void;<br>getStreamInfo(): Promise\<AudioStreamInfo>; | 新增 | 297| ohos.multimedia.audio | AudioCapturer | getCapturerInfo(callback: AsyncCallback\<AudioCapturerInfo>): void;<br>getCapturerInfo(): Promise\<AudioCapturerInfo>; | 新增 | 298| ohos.multimedia.audio | AudioCapturer | readonly state: AudioState; | 新增 | 299| ohos.multimedia.audio | AudioCapturerOptions | capturerInfo: AudioCapturerInfo; | 新增 | 300| ohos.multimedia.audio | AudioCapturerOptions | streamInfo: AudioStreamInfo; | 新增 | 301| ohos.multimedia.audio | AudioCapturerInfo | capturerFlags: number; | 新增 | 302| ohos.multimedia.audio | AudioCapturerInfo | source: SourceType; | 新增 | 303| ohos.multimedia.audio | SourceType | SOURCE_TYPE_VOICE_COMMUNICATION = 7 | 新增 | 304| ohos.multimedia.audio | SourceType | SOURCE_TYPE_MIC = 0 | 新增 | 305| ohos.multimedia.audio | SourceType | SOURCE_TYPE_INVALID = -1 | 新增 | 306| ohos.multimedia.audio | AudioRenderer | on(type: "stateChange", callback: Callback\<AudioState>): void; | 新增 | 307| ohos.multimedia.audio | AudioRenderer | off(type: "periodReach"): void; | 新增 | 308| ohos.multimedia.audio | AudioRenderer | on(type: "periodReach", frame: number, callback: (position: number) => {}): void; | 新增 | 309| ohos.multimedia.audio | AudioRenderer | off(type: "markReach"): void; | 新增 | 310| ohos.multimedia.audio | AudioRenderer | on(type: "markReach", frame: number, callback: (position: number) => {}): void; | 新增 | 311| ohos.multimedia.audio | AudioRenderer | getRenderRate(callback: AsyncCallback\<AudioRendererRate>): void;<br>getRenderRate(): Promise\<AudioRendererRate>; | 新增 | 312| ohos.multimedia.audio | AudioRenderer | setRenderRate(rate: AudioRendererRate, callback: AsyncCallback\<void>): void;<br>setRenderRate(rate: AudioRendererRate): Promise\<void>; | 新增 | 313| ohos.multimedia.audio | AudioRenderer | getBufferSize(callback: AsyncCallback\<number>): void;<br>getBufferSize(): Promise\<number>; | 新增 | 314| ohos.multimedia.audio | AudioRenderer | release(callback: AsyncCallback\<void>): void;<br>release(): Promise\<void>; | 新增 | 315| ohos.multimedia.audio | AudioRenderer | stop(callback: AsyncCallback\<void>): void;<br>stop(): Promise\<void>; | 新增 | 316| ohos.multimedia.audio | AudioRenderer | pause(callback: AsyncCallback\<void>): void;<br>pause(): Promise\<void>; | 新增 | 317| ohos.multimedia.audio | AudioRenderer | drain(callback: AsyncCallback\<void>): void;<br>drain(): Promise\<void>; | 新增 | 318| ohos.multimedia.audio | AudioRenderer | getAudioTime(callback: AsyncCallback\<number>): void;<br>getAudioTime(): Promise\<number>; | 新增 | 319| ohos.multimedia.audio | AudioRenderer | write(buffer: ArrayBuffer, callback: AsyncCallback\<number>): void;<br>write(buffer: ArrayBuffer): Promise\<number>; | 新增 | 320| ohos.multimedia.audio | AudioRenderer | start(callback: AsyncCallback\<void>): void;<br>start(): Promise\<void>; | 新增 | 321| ohos.multimedia.audio | AudioRenderer | getStreamInfo(callback: AsyncCallback\<AudioStreamInfo>): void;<br>getStreamInfo(): Promise\<AudioStreamInfo>; | 新增 | 322| ohos.multimedia.audio | AudioRenderer | getRendererInfo(callback: AsyncCallback\<AudioRendererInfo>): void;<br>getRendererInfo(): Promise\<AudioRendererInfo>; | 新增 | 323| ohos.multimedia.audio | AudioRenderer | readonly state: AudioState; | 新增 | 324| ohos.multimedia.audio | DeviceChangeAction | deviceDescriptors: AudioDeviceDescriptors; | 新增 | 325| ohos.multimedia.audio | DeviceChangeAction | type: DeviceChangeType; | 新增 | 326| ohos.multimedia.audio | AudioInterrupt | pauseWhenDucked: boolean; | 新增 | 327| ohos.multimedia.audio | AudioInterrupt | contentType: ContentType; | 新增 | 328| ohos.multimedia.audio | AudioInterrupt | streamUsage: StreamUsage; | 新增 | 329| ohos.multimedia.audio | InterruptAction | activated?: boolean; | 新增 | 330| ohos.multimedia.audio | InterruptAction | hint?: InterruptHint; | 新增 | 331| ohos.multimedia.audio | InterruptAction | type?: InterruptType; | 新增 | 332| ohos.multimedia.audio | InterruptAction | actionType: InterruptActionType; | 新增 | 333| ohos.multimedia.audio | AudioManager | off(type: 'interrupt', interrupt: AudioInterrupt, callback?: Callback\<InterruptAction>): void; | 新增 | 334| ohos.multimedia.audio | AudioManager | on(type: 'interrupt', interrupt: AudioInterrupt, callback: Callback\<InterruptAction>): void; | 新增 | 335| ohos.multimedia.audio | AudioManager | off(type: 'deviceChange', callback?: Callback\<DeviceChangeAction>): void; | 新增 | 336| ohos.multimedia.audio | AudioManager | on(type: 'deviceChange', callback: Callback\<DeviceChangeAction>): void; | 新增 | 337| ohos.multimedia.audio | AudioManager | getAudioScene(callback: AsyncCallback\<AudioScene>): void;<br>getAudioScene(): Promise\<AudioScene>; | 新增 | 338| ohos.multimedia.audio | AudioManager | isDeviceActive(deviceType: ActiveDeviceType, callback: AsyncCallback\<boolean>): void;<br>isDeviceActive(deviceType: ActiveDeviceType): Promise\<boolean>; | 新增 | 339| ohos.multimedia.audio | AudioManager | setDeviceActive(deviceType: ActiveDeviceType, active: boolean, callback: AsyncCallback\<void>): void;<br>setDeviceActive(deviceType: ActiveDeviceType, active: boolean): Promise\<void>; | 新增 | 340| ohos.multimedia.audio | AudioManager | getAudioParameter(key: string, callback: AsyncCallback\<string>): void;<br>getAudioParameter(key: string): Promise\<string>; | 新增 | 341| ohos.multimedia.audio | AudioManager | setAudioParameter(key: string, value: string, callback: AsyncCallback\<void>): void;<br>setAudioParameter(key: string, value: string): Promise\<void>; | 新增 | 342| ohos.multimedia.audio | AudioManager | getRingerMode(callback: AsyncCallback\<AudioRingMode>): void;<br>getRingerMode(): Promise\<AudioRingMode>; | 新增 | 343| ohos.multimedia.audio | AudioManager | setRingerMode(mode: AudioRingMode, callback: AsyncCallback\<void>): void;<br>setRingerMode(mode: AudioRingMode): Promise\<void>; | 新增 | 344| ohos.multimedia.audio | AudioManager | isMicrophoneMute(callback: AsyncCallback\<boolean>): void;<br>isMicrophoneMute(): Promise\<boolean>; | 新增 | 345| ohos.multimedia.audio | AudioManager | setMicrophoneMute(mute: boolean, callback: AsyncCallback\<void>): void;<br>setMicrophoneMute(mute: boolean): Promise\<void>; | 新增 | 346| ohos.multimedia.audio | AudioManager | isActive(volumeType: AudioVolumeType, callback: AsyncCallback\<boolean>): void;<br>isActive(volumeType: AudioVolumeType): Promise\<boolean>; | 新增 | 347| ohos.multimedia.audio | AudioManager | isMute(volumeType: AudioVolumeType, callback: AsyncCallback\<boolean>): void;<br>isMute(volumeType: AudioVolumeType): Promise\<boolean>; | 新增 | 348| ohos.multimedia.audio | AudioManager | mute(volumeType: AudioVolumeType, mute: boolean, callback: AsyncCallback\<void>): void;<br>mute(volumeType: AudioVolumeType, mute: boolean): Promise\<void>; | 新增 | 349| ohos.multimedia.audio | AudioScene | AUDIO_SCENE_VOICE_CHAT | 新增 | 350| ohos.multimedia.audio | AudioScene | AUDIO_SCENE_DEFAULT = 0 | 新增 | 351| ohos.multimedia.audio | DeviceChangeType | DISCONNECT = 1 | 新增 | 352| ohos.multimedia.audio | DeviceChangeType | CONNECT = 0 | 新增 | 353| ohos.multimedia.audio | InterruptActionType | TYPE_INTERRUPT = 1 | 新增 | 354| ohos.multimedia.audio | InterruptActionType | TYPE_ACTIVATED = 0 | 新增 | 355| ohos.multimedia.audio | InterruptHint | INTERRUPT_HINT_UNDUCK = 5 | 新增 | 356| ohos.multimedia.audio | InterruptHint | INTERRUPT_HINT_DUCK = 4 | 新增 | 357| ohos.multimedia.audio | InterruptHint | INTERRUPT_HINT_STOP = 3 | 新增 | 358| ohos.multimedia.audio | InterruptHint | INTERRUPT_HINT_PAUSE = 2 | 新增 | 359| ohos.multimedia.audio | InterruptHint | INTERRUPT_HINT_RESUME = 1 | 新增 | 360| ohos.multimedia.audio | InterruptHint | INTERRUPT_HINT_NONE = 0 | 新增 | 361| ohos.multimedia.audio | InterruptType | INTERRUPT_TYPE_END = 2 | 新增 | 362| ohos.multimedia.audio | InterruptType | INTERRUPT_TYPE_BEGIN = 1 | 新增 | 363| ohos.multimedia.audio | AudioRendererRate | RENDER_RATE_HALF = 2 | 新增 | 364| ohos.multimedia.audio | AudioRendererRate | RENDER_RATE_DOUBLE = 1 | 新增 | 365| ohos.multimedia.audio | AudioRendererRate | RENDER_RATE_NORMAL = 0 | 新增 | 366| ohos.multimedia.audio | AudioRendererOptions | rendererInfo: AudioRendererInfo; | 新增 | 367| ohos.multimedia.audio | AudioRendererOptions | streamInfo: AudioStreamInfo; | 新增 | 368| ohos.multimedia.audio | AudioRendererInfo | rendererFlags: number; | 新增 | 369| ohos.multimedia.audio | AudioRendererInfo | usage: StreamUsage; | 新增 | 370| ohos.multimedia.audio | AudioRendererInfo | content: ContentType; | 新增 | 371| ohos.multimedia.audio | AudioStreamInfo | encodingType: AudioEncodingType; | 新增 | 372| ohos.multimedia.audio | AudioStreamInfo | sampleFormat: AudioSampleFormat; | 新增 | 373| ohos.multimedia.audio | AudioStreamInfo | channels: AudioChannel; | 新增 | 374| ohos.multimedia.audio | AudioStreamInfo | samplingRate: AudioSamplingRate; | 新增 | 375| ohos.multimedia.audio | StreamUsage | STREAM_USAGE_NOTIFICATION_RINGTONE = 6 | 新增 | 376| ohos.multimedia.audio | StreamUsage | STREAM_USAGE_VOICE_COMMUNICATION = 2 | 新增 | 377| ohos.multimedia.audio | StreamUsage | STREAM_USAGE_MEDIA = 1 | 新增 | 378| ohos.multimedia.audio | StreamUsage | STREAM_USAGE_UNKNOWN = 0 | 新增 | 379| ohos.multimedia.audio | ContentType | CONTENT_TYPE_RINGTONE = 5 | 新增 | 380| ohos.multimedia.audio | ContentType | CONTENT_TYPE_SONIFICATION = 4 | 新增 | 381| ohos.multimedia.audio | ContentType | CONTENT_TYPE_MOVIE = 3 | 新增 | 382| ohos.multimedia.audio | ContentType | CONTENT_TYPE_MUSIC = 2 | 新增 | 383| ohos.multimedia.audio | ContentType | CONTENT_TYPE_SPEECH = 1 | 新增 | 384| ohos.multimedia.audio | ContentType | CONTENT_TYPE_UNKNOWN = 0 | 新增 | 385| ohos.multimedia.audio | AudioEncodingType | ENCODING_TYPE_RAW = 0 | 新增 | 386| ohos.multimedia.audio | AudioEncodingType | ENCODING_TYPE_INVALID = -1 | 新增 | 387| ohos.multimedia.audio | AudioSamplingRate | SAMPLE_RATE_96000 = 96000 | 新增 | 388| ohos.multimedia.audio | AudioSamplingRate | SAMPLE_RATE_64000 = 64000 | 新增 | 389| ohos.multimedia.audio | AudioSamplingRate | SAMPLE_RATE_48000 = 48000 | 新增 | 390| ohos.multimedia.audio | AudioSamplingRate | SAMPLE_RATE_44100 = 44100 | 新增 | 391| ohos.multimedia.audio | AudioSamplingRate | SAMPLE_RATE_32000 = 32000 | 新增 | 392| ohos.multimedia.audio | AudioSamplingRate | SAMPLE_RATE_24000 = 24000 | 新增 | 393| ohos.multimedia.audio | AudioSamplingRate | SAMPLE_RATE_22050 = 22050 | 新增 | 394| ohos.multimedia.audio | AudioSamplingRate | SAMPLE_RATE_16000 = 16000 | 新增 | 395| ohos.multimedia.audio | AudioSamplingRate | SAMPLE_RATE_12000 = 12000 | 新增 | 396| ohos.multimedia.audio | AudioSamplingRate | SAMPLE_RATE_11025 = 11025 | 新增 | 397| ohos.multimedia.audio | AudioSamplingRate | SAMPLE_RATE_8000 = 8000 | 新增 | 398| ohos.multimedia.audio | AudioChannel | CHANNEL_2 = 0x1 \<\< 1 | 新增 | 399| ohos.multimedia.audio | AudioChannel | CHANNEL_1 = 0x1 \<\< 0 | 新增 | 400| ohos.multimedia.audio | AudioSampleFormat | SAMPLE_FORMAT_S32LE = 3 | 新增 | 401| ohos.multimedia.audio | AudioSampleFormat | SAMPLE_FORMAT_S24LE = 2 | 新增 | 402| ohos.multimedia.audio | AudioSampleFormat | SAMPLE_FORMAT_S16LE = 1 | 新增 | 403| ohos.multimedia.audio | AudioSampleFormat | SAMPLE_FORMAT_U8 = 0 | 新增 | 404| ohos.multimedia.audio | AudioSampleFormat | SAMPLE_FORMAT_INVALID = -1 | 新增 | 405| ohos.multimedia.audio | AudioRingMode | RINGER_MODE_NORMAL = 2 | 新增 | 406| ohos.multimedia.audio | AudioRingMode | RINGER_MODE_VIBRATE = 1 | 新增 | 407| ohos.multimedia.audio | AudioRingMode | RINGER_MODE_SILENT = 0 | 新增 | 408| ohos.multimedia.audio | ActiveDeviceType | BLUETOOTH_SCO = 7 | 新增 | 409| ohos.multimedia.audio | ActiveDeviceType | SPEAKER = 2 | 新增 | 410| ohos.multimedia.audio | DeviceType | USB_HEADSET = 22 | 新增 | 411| ohos.multimedia.audio | DeviceType | WIRED_HEADPHONES = 4 | 新增 | 412| ohos.multimedia.audio | DeviceType | EARPIECE = 1 | 新增 | 413| ohos.multimedia.audio | AudioVolumeType | VOICE_ASSISTANT = 9 | 新增 | 414| ohos.multimedia.audio | AudioVolumeType | VOICE_CALL = 0 | 新增 | 415| ohos.multimedia.audio | AudioState | STATE_PAUSED | 新增 | 416| ohos.multimedia.audio | AudioState | STATE_RELEASED | 新增 | 417| ohos.multimedia.audio | AudioState | STATE_STOPPED | 新增 | 418| ohos.multimedia.audio | AudioState | STATE_RUNNING | 新增 | 419| ohos.multimedia.audio | AudioState | STATE_PREPARED | 新增 | 420| ohos.multimedia.audio | AudioState | STATE_NEW | 新增 | 421| ohos.multimedia.audio | AudioState | STATE_INVALID = -1 | 新增 | 422| ohos.multimedia.audio | audio | createAudioRenderer(options: AudioRendererOptions, callback: AsyncCallback\<AudioRenderer>): void;<br>createAudioRenderer(options: AudioRendererOptions): Promise\<AudioRenderer>; | 新增 | 423| ohos.multimedia.audio | audio | createAudioCapturer(options: AudioCapturerOptions, callback: AsyncCallback\<AudioCapturer>): void;<br>createAudioCapturer(options: AudioCapturerOptions): Promise\<AudioCapturer>; | 新增 | 424