提交 bf484d89 编写于 作者: R RayShih

add API 9 Canary to RN

Signed-off-by: NRayShih <shirui721@huawei.com>
上级 43782170
# 包管理子系统JS API变更
OpenHarmony 3.2 Canary1版本相较于OpenHarmony 3.1 Release版本,包管理子系统的API变更如下:
## 接口变更
| 模块名 | 类名 | 方法/属性/枚举/常量 | 变更类型 |
|---|---|---|---|
| bundleInfo | BundleInfo | readonly extensionAbilityInfo: Array<ExtensionAbilityInfo>; | 新增 |
| hapModuleInfo | HapModuleInfo | readonly metadata: Array<Metadata>; | 新增 |
| hapModuleInfo | HapModuleInfo | readonly extensionAbilityInfo: Array<ExtensionAbilityInfo>; | 新增 |
| hapModuleInfo | HapModuleInfo | readonly mainElementName: string; | 新增 |
| metadata | Metadata | resource: string; | 新增 |
| metadata | Metadata | value: string; | 新增 |
| metadata | Metadata | name: string; | 新增 |
| ohos.bundle | bundle | function queryExtensionAbilityInfosByWant(want: Want, extensionFlags: number, userId: number, callback: AsyncCallback<Array<ExtensionAbilityInfo>>): void;<br>function queryExtensionAbilityInfosByWant(want: Want, extensionFlags: number, callback: AsyncCallback<Array<ExtensionAbilityInfo>>): void;<br>function queryExtensionAbilityInfosByWant(want: Want, extensionFlags: number, userId?: number): Promise<Array<ExtensionAbilityInfo>>; | 新增 |
| ohos.bundle | ExtensionAbilityType | UNSPECIFIED = 9 | 新增 |
| ohos.bundle | ExtensionAbilityType | WALLPAPER = 8 | 新增 |
| ohos.bundle | ExtensionAbilityType | STATIC_SUBSCRIBER = 7 | 新增 |
| ohos.bundle | ExtensionAbilityType | FILE_SHARE = 6 | 新增 |
| ohos.bundle | ExtensionAbilityType | DATA_SHARE = 5 | 新增 |
| ohos.bundle | ExtensionAbilityType | ACCESSIBILITY = 4 | 新增 |
| ohos.bundle | ExtensionAbilityType | SERVICE = 3 | 新增 |
| ohos.bundle | ExtensionAbilityType | INPUT_METHOD = 2 | 新增 |
| ohos.bundle | ExtensionAbilityType | WORK_SCHEDULER = 1 | 新增 |
| ohos.bundle | ExtensionAbilityType | FORM = 0 | 新增 |
| ohos.bundle | ExtensionFlag | GET_EXTENSION_INFO_WITH_METADATA = 0x00000020 | 新增 |
| ohos.bundle | ExtensionFlag | GET_EXTENSION_INFO_WITH_APPLICATION = 0x00000004 | 新增 |
| ohos.bundle | ExtensionFlag | GET_EXTENSION_INFO_WITH_PERMISSION = 0x00000002 | 新增 |
| ohos.bundle | ExtensionFlag | GET_EXTENSION_INFO_DEFAULT = 0x00000000 | 新增 |
| ohos.bundle | BundleFlag | GET_BUNDLE_WITH_EXTENSION_ABILITY = 0x00000020 | 新增 |
# 分布式数据管理子系统JS API变更
OpenHarmony 3.2 Canary1版本相较于OpenHarmony 3.1 Release版本,分布式数据管理子系统的API变更如下:
## 接口变更
| 模块名 | 类名 | 方法/属性/枚举/常量 | 变更类型 |
|---|---|---|---|
| ohos.data.dataShare | DataShareHelper | notifyChange(uri: string, callback: AsyncCallback<void>): void;<br>notifyChange(uri: string): Promise<void>; | 新增 |
| ohos.data.dataShare | DataShareHelper | denormalizeUri(uri: string, callback: AsyncCallback<string>): void;<br>denormalizeUri(uri: string): Promise<string>; | 新增 |
| ohos.data.dataShare | DataShareHelper | normalizeUri(uri: string, callback: AsyncCallback<string>): void;<br>normalizeUri(uri: string): Promise<string>; | 新增 |
| ohos.data.dataShare | DataShareHelper | getFileTypes(uri: string, mimeTypeFilter:string, callback: AsyncCallback<Array<string>>): void;<br>getFileTypes(uri: string, mimeTypeFilter: string): Promise<Array<string>>; | 新增 |
| ohos.data.dataShare | DataShareHelper | getType(uri: string, callback: AsyncCallback<string>): void;<br>getType(uri: string): Promise<string>; | 新增 |
| ohos.data.dataShare | DataShareHelper | batchInsert(uri: string, values: Array<rdb.ValuesBucket>, callback: AsyncCallback<number>): void;<br>batchInsert(uri: string, values: Array<rdb.ValuesBucket>): Promise<number>; | 新增 |
| ohos.data.dataShare | DataShareHelper | update(uri: string, value: rdb.ValuesBucket, predicates: dataAbility.DataAbilityPredicates, callback: AsyncCallback<number>): void;<br>update(uri: string, value: rdb.ValuesBucket, predicates: dataAbility.DataAbilityPredicates): Promise<number>; | 新增 |
| ohos.data.dataShare | DataShareHelper | query(uri: string, columns: Array<string>, predicates: dataAbility.DataAbilityPredicates, callback: AsyncCallback<ResultSet>): void;<br>query(uri: string, columns: Array<string>, predicates: dataAbility.DataAbilityPredicates): Promise<ResultSet>; | 新增 |
| ohos.data.dataShare | DataShareHelper | delete(uri: string, predicates: dataAbility.DataAbilityPredicates, callback: AsyncCallback<number>): void;<br>delete(uri: string, predicates: dataAbility.DataAbilityPredicates): Promise<number>; | 新增 |
| ohos.data.dataShare | DataShareHelper | insert(uri: string, value: rdb.ValuesBucket, callback: AsyncCallback<number>): void;<br>insert(uri: string, value: rdb.ValuesBucket): Promise<number>; | 新增 |
| ohos.data.dataShare | DataShareHelper | off(type: 'dataChange', uri: string, callback?: AsyncCallback<void>): void; | 新增 |
| ohos.data.dataShare | DataShareHelper | on(type: 'dataChange', uri: string, callback: AsyncCallback<void>): void; | 新增 |
| ohos.data.dataShare | dataShare | function createDataShareHelper(context: Context, want: Want, uri: string): DataShareHelper; | 新增 |
# 事件通知子系统JS API变更
OpenHarmony 3.2 Canary1版本相较于OpenHarmony 3.1 Release版本,事件通知子系统的API变更如下:
## 接口变更
| 模块名 | 类名 | 方法/属性/枚举/常量 | 变更类型 |
|---|---|---|---|
| commonEventSubscriber | CommonEventSubscriber | finishCommonEvent(callback: AsyncCallback<void>): void;<br>finishCommonEvent(): Promise<void>; | 新增 |
| ohos.commonEvent | Support | COMMON_EVENT_VOLUME_EJECT = "usual.event.data.VOLUME_EJECT" | 新增 |
| ohos.commonEvent | Support | COMMON_EVENT_VOLUME_BAD_REMOVAL = "usual.event.data.VOLUME_BAD_REMOVAL" | 新增 |
| ohos.commonEvent | Support | COMMON_EVENT_VOLUME_MOUNTED = "usual.event.data.VOLUME_MOUNTED" | 新增 |
| ohos.commonEvent | Support | COMMON_EVENT_VOLUME_UNMOUNTED = "usual.event.data.VOLUME_UNMOUNTED" | 新增 |
| ohos.commonEvent | Support | COMMON_EVENT_VOLUME_REMOVED = "usual.event.data.VOLUME_REMOVED" | 新增 |
# 文件管理子系统JS API变更
OpenHarmony 3.2 Canary1版本相较于OpenHarmony 3.1 Release版本,文件管理子系统的API变更如下:
## 接口变更
| 模块名 | 类名 | 方法/属性/枚举/常量 | 变更类型 |
|---|---|---|---|
| ohos.storageStatistics | storageStatistics | function getBundleStats(packageName: string, callback: AsyncCallback<BundleStats>): void;<br>function getBundleStats(packageName: string): Promise<BundleStats>; | 新增 |
| ohos.storageStatistics | BundleStats | dataSize: number; | 新增 |
| ohos.storageStatistics | BundleStats | cacheSize: number; | 新增 |
| ohos.storageStatistics | BundleStats | appSize: number; | 新增 |
| ohos.volumeManager | volumeManager | function unmount(volumeId: string, callback: AsyncCallback<boolean>): void;<br>function unmount(volumeId: string): Promise<boolean>; | 新增 |
| ohos.volumeManager | volumeManager | function mount(volumeId: string, callback: AsyncCallback<boolean>): void;<br>function mount(volumeId: string): Promise<boolean>; | 新增 |
| ohos.volumeManager | volumeManager | function getAllVolumes(callback: AsyncCallback<Array<Volume>>): void;<br>function getAllVolumes(): Promise<Array<Volume>>; | 新增 |
| ohos.volumeManager | Volume | path: string; | 新增 |
| ohos.volumeManager | Volume | state: number; | 新增 |
| ohos.volumeManager | Volume | removable: boolean; | 新增 |
| ohos.volumeManager | Volume | description: string; | 新增 |
| ohos.volumeManager | Volume | uuid: string; | 新增 |
| ohos.volumeManager | Volume | id: string; | 新增 |
# 杂散软件服务子系统JS API变更
OpenHarmony 3.2 Canary1版本相较于OpenHarmony 3.1 Release版本,杂散软件服务子系统的API变更如下:
## 接口变更
| 模块名* | 类名 | 函数* | 变更类型 |
|---|---|---|---|
| ohos.screenLock | screenLock | function sendScreenLockEvent(event: String, parameter: number, callback: AsyncCallback<boolean>): void;<br>function sendScreenLockEvent(event: String, parameter: number): Promise<boolean>; | 新增 |
| ohos.screenLock | screenLock | "function off(type: 'beginWakeUp' \| 'endWakeUp' \| 'beginScreenOn' \| 'endScreenOn' \| 'beginScreenOff' \| 'endScreenOff' \| 'unlockScreen' \| 'beginExitAnimation' \| 'screenlockEnabled' \| 'beginSleep' \| 'endSleep' \| 'changeUser', callback: Callback<void>): void;" | 新增 |
| ohos.screenLock | screenLock | "function off(type: 'beginWakeUp' \| 'endWakeUp' \| 'beginScreenOn' \| 'endScreenOn' \| 'beginScreenOff' \| 'endScreenOff' \| 'unlockScreen' \| 'beginExitAnimation' \| 'screenlockEnabled' \| 'beginSleep' \| 'endSleep' \| 'changeUser', callback: Callback<void>): void;" | 新增 |
| ohos.screenLock | screenLock | "function off(type: 'beginWakeUp' \| 'endWakeUp' \| 'beginScreenOn' \| 'endScreenOn' \| 'beginScreenOff' \| 'endScreenOff' \| 'unlockScreen' \| 'beginExitAnimation' \| 'screenlockEnabled' \| 'beginSleep' \| 'endSleep' \| 'changeUser', callback: Callback<void>): void;" | 新增 |
| ohos.screenLock | screenLock | "function off(type: 'beginWakeUp' \| 'endWakeUp' \| 'beginScreenOn' \| 'endScreenOn' \| 'beginScreenOff' \| 'endScreenOff' \| 'unlockScreen' \| 'beginExitAnimation' \| 'screenlockEnabled' \| 'beginSleep' \| 'endSleep' \| 'changeUser', callback: Callback<void>): void;" | 新增 |
| ohos.screenLock | screenLock | "function off(type: 'beginWakeUp' \| 'endWakeUp' \| 'beginScreenOn' \| 'endScreenOn' \| 'beginScreenOff' \| 'endScreenOff' \| 'unlockScreen' \| 'beginExitAnimation' \| 'screenlockEnabled' \| 'beginSleep' \| 'endSleep' \| 'changeUser', callback: Callback<void>): void;" | 新增 |
| ohos.screenLock | screenLock | "function off(type: 'beginWakeUp' \| 'endWakeUp' \| 'beginScreenOn' \| 'endScreenOn' \| 'beginScreenOff' \| 'endScreenOff' \| 'unlockScreen' \| 'beginExitAnimation' \| 'screenlockEnabled' \| 'beginSleep' \| 'endSleep' \| 'changeUser', callback: Callback<void>): void;" | 新增 |
| ohos.screenLock | screenLock | "function off(type: 'beginWakeUp' \| 'endWakeUp' \| 'beginScreenOn' \| 'endScreenOn' \| 'beginScreenOff' \| 'endScreenOff' \| 'unlockScreen' \| 'beginExitAnimation' \| 'screenlockEnabled' \| 'beginSleep' \| 'endSleep' \| 'changeUser', callback: Callback<void>): void;" | 新增 |
| ohos.screenLock | screenLock | "function off(type: 'beginWakeUp' \| 'endWakeUp' \| 'beginScreenOn' \| 'endScreenOn' \| 'beginScreenOff' \| 'endScreenOff' \| 'unlockScreen' \| 'beginExitAnimation' \| 'screenlockEnabled' \| 'beginSleep' \| 'endSleep' \| 'changeUser', callback: Callback<void>): void;" | 新增 |
| ohos.screenLock | screenLock | "function off(type: 'beginWakeUp' \| 'endWakeUp' \| 'beginScreenOn' \| 'endScreenOn' \| 'beginScreenOff' \| 'endScreenOff' \| 'unlockScreen' \| 'beginExitAnimation' \| 'screenlockEnabled' \| 'beginSleep' \| 'endSleep' \| 'changeUser', callback: Callback<void>): void;" | 新增 |
| ohos.screenLock | screenLock | "function off(type: 'beginWakeUp' \| 'endWakeUp' \| 'beginScreenOn' \| 'endScreenOn' \| 'beginScreenOff' \| 'endScreenOff' \| 'unlockScreen' \| 'beginExitAnimation' \| 'screenlockEnabled' \| 'beginSleep' \| 'endSleep' \| 'changeUser', callback: Callback<void>): void;" | 新增 |
| ohos.screenLock | screenLock | "function off(type: 'beginWakeUp' \| 'endWakeUp' \| 'beginScreenOn' \| 'endScreenOn' \| 'beginScreenOff' \| 'endScreenOff' \| 'unlockScreen' \| 'beginExitAnimation' \| 'screenlockEnabled' \| 'beginSleep' \| 'endSleep' \| 'changeUser', callback: Callback<void>): void;" | 新增 |
| ohos.screenLock | screenLock | "function off(type: 'beginWakeUp' \| 'endWakeUp' \| 'beginScreenOn' \| 'endScreenOn' \| 'beginScreenOff' \| 'endScreenOff' \| 'unlockScreen' \| 'beginExitAnimation' \| 'screenlockEnabled' \| 'beginSleep' \| 'endSleep' \| 'changeUser', callback: Callback<void>): void;" | 新增 |
| ohos.screenLock | screenLock | function on(type: 'screenlockEnabled', callback: Callback<boolean>): void; | 新增 |
| ohos.screenLock | screenLock | function on(type: 'beginSleep' \| 'endSleep' \| 'changeUser', callback: Callback<number>): void; | 新增 |
| ohos.screenLock | screenLock | function on(type: 'beginSleep' \| 'endSleep' \| 'changeUser', callback: Callback<number>): void; | 新增 |
| ohos.screenLock | screenLock | function on(type: 'beginSleep' \| 'endSleep' \| 'changeUser', callback: Callback<number>): void; | 新增 |
| ohos.screenLock | screenLock | function on(type: 'beginWakeUp' \| 'endWakeUp' \| 'beginScreenOn' \| 'endScreenOn' \| 'beginScreenOff' \| 'endScreenOff' \| 'unlockScreen' \| 'beginExitAnimation', callback: Callback<void>): void; | 新增 |
| ohos.screenLock | screenLock | function on(type: 'beginWakeUp' \| 'endWakeUp' \| 'beginScreenOn' \| 'endScreenOn' \| 'beginScreenOff' \| 'endScreenOff' \| 'unlockScreen' \| 'beginExitAnimation', callback: Callback<void>): void; | 新增 |
| ohos.screenLock | screenLock | function on(type: 'beginWakeUp' \| 'endWakeUp' \| 'beginScreenOn' \| 'endScreenOn' \| 'beginScreenOff' \| 'endScreenOff' \| 'unlockScreen' \| 'beginExitAnimation', callback: Callback<void>): void; | 新增 |
| ohos.screenLock | screenLock | function on(type: 'beginWakeUp' \| 'endWakeUp' \| 'beginScreenOn' \| 'endScreenOn' \| 'beginScreenOff' \| 'endScreenOff' \| 'unlockScreen' \| 'beginExitAnimation', callback: Callback<void>): void; | 新增 |
| ohos.screenLock | screenLock | function on(type: 'beginWakeUp' \| 'endWakeUp' \| 'beginScreenOn' \| 'endScreenOn' \| 'beginScreenOff' \| 'endScreenOff' \| 'unlockScreen' \| 'beginExitAnimation', callback: Callback<void>): void; | 新增 |
| ohos.screenLock | screenLock | function on(type: 'beginWakeUp' \| 'endWakeUp' \| 'beginScreenOn' \| 'endScreenOn' \| 'beginScreenOff' \| 'endScreenOff' \| 'unlockScreen' \| 'beginExitAnimation', callback: Callback<void>): void; | 新增 |
| ohos.screenLock | screenLock | function on(type: 'beginWakeUp' \| 'endWakeUp' \| 'beginScreenOn' \| 'endScreenOn' \| 'beginScreenOff' \| 'endScreenOff' \| 'unlockScreen' \| 'beginExitAnimation', callback: Callback<void>): void; | 新增 |
| ohos.screenLock | screenLock | function on(type: 'beginWakeUp' \| 'endWakeUp' \| 'beginScreenOn' \| 'endScreenOn' \| 'beginScreenOff' \| 'endScreenOff' \| 'unlockScreen' \| 'beginExitAnimation', callback: Callback<void>): void; | 新增 |
# 媒体子系统JS API变更
OpenHarmony 3.2 Canary1版本相较于OpenHarmony 3.1 Release版本,媒体子系统的API变更如下:
## 接口变更
| 模块名 | 类名 | 方法/属性/枚举/常量 | 变更类型 |
|---|---|---|---|
| ohos.multimedia.audio | AudioRenderer | on(type: 'interrupt', callback: Callback<InterruptEvent>): void; | 新增 |
| ohos.multimedia.audio | InterruptEvent | hintType: InterruptHint; | 新增 |
| ohos.multimedia.audio | InterruptEvent | forceType: InterruptForceType; | 新增 |
| ohos.multimedia.audio | InterruptEvent | eventType: InterruptType; | 新增 |
| ohos.multimedia.audio | InterruptForceType | INTERRUPT_SHARE | 新增 |
| ohos.multimedia.audio | InterruptForceType | INTERRUPT_FORCE = 0 | 新增 |
| ohos.multimedia.camera | VideoOutputError | code: VideoOutputErrorCode; | 新增 |
| ohos.multimedia.camera | VideoOutputErrorCode | ERROR_UNKNOWN = -1 | 新增 |
| ohos.multimedia.camera | VideoOutput | on(type: 'error', callback: ErrorCallback<VideoOutputError>): void; | 新增 |
| ohos.multimedia.camera | VideoOutput | on(type: 'frameEnd', callback: AsyncCallback<void>): void; | 新增 |
| ohos.multimedia.camera | VideoOutput | on(type: 'frameStart', callback: AsyncCallback<void>): void; | 新增 |
| ohos.multimedia.camera | VideoOutput | release(callback: AsyncCallback<void>): void;<br>release(): Promise<void>; | 新增 |
| ohos.multimedia.camera | VideoOutput | stop(callback: AsyncCallback<void>): void;<br>stop(): Promise<void>; | 新增 |
| ohos.multimedia.camera | VideoOutput | start(callback: AsyncCallback<void>): void;<br>start(): Promise<void>; | 新增 |
| ohos.multimedia.camera | camera | function createVideoOutput(surfaceId: string, callback: AsyncCallback<VideoOutput>): void;<br>function createVideoOutput(surfaceId: string): Promise<VideoOutput>; | 新增 |
| ohos.multimedia.camera | PhotoOutputError | code: PhotoOutputErrorCode; | 新增 |
| ohos.multimedia.camera | PhotoOutputErrorCode | ERROR_UNKNOWN = -1 | 新增 |
| ohos.multimedia.camera | CaptureEndInfo | frameCount: number; | 新增 |
| ohos.multimedia.camera | CaptureEndInfo | captureId: number; | 新增 |
| ohos.multimedia.camera | FrameShutterInfo | timestamp: number; | 新增 |
| ohos.multimedia.camera | FrameShutterInfo | captureId: number; | 新增 |
| ohos.multimedia.camera | PhotoOutput | on(type: 'error', callback: ErrorCallback<PhotoOutputError>): void; | 新增 |
| ohos.multimedia.camera | PhotoOutput | on(type: 'captureEnd', callback: AsyncCallback<CaptureEndInfo>): void; | 新增 |
| ohos.multimedia.camera | PhotoOutput | on(type: 'frameShutter', callback: AsyncCallback<FrameShutterInfo>): void; | 新增 |
| ohos.multimedia.camera | PhotoOutput | on(type: 'captureStart', callback: AsyncCallback<number>): void; | 新增 |
| ohos.multimedia.camera | PhotoOutput | release(callback: AsyncCallback<void>): void;<br>release(): Promise<void>; | 新增 |
| ohos.multimedia.camera | PhotoOutput | capture(callback: AsyncCallback<void>): void;<br>capture(setting: PhotoCaptureSetting, callback: AsyncCallback<void>): void;<br>capture(setting?: PhotoCaptureSetting): Promise<void>; | 新增 |
| ohos.multimedia.camera | PhotoCaptureSetting | rotation?: ImageRotation; | 新增 |
| ohos.multimedia.camera | PhotoCaptureSetting | quality?: QualityLevel; | 新增 |
| ohos.multimedia.camera | QualityLevel | QUALITY_LEVEL_LOW | 新增 |
| ohos.multimedia.camera | QualityLevel | QUALITY_LEVEL_MEDIUM | 新增 |
| ohos.multimedia.camera | QualityLevel | QUALITY_LEVEL_HIGH = 0 | 新增 |
| ohos.multimedia.camera | ImageRotation | ROTATION_270 = 270 | 新增 |
| ohos.multimedia.camera | ImageRotation | ROTATION_180 = 180 | 新增 |
| ohos.multimedia.camera | ImageRotation | ROTATION_90 = 90 | 新增 |
| ohos.multimedia.camera | ImageRotation | ROTATION_0 = 0 | 新增 |
| ohos.multimedia.camera | camera | function createPhotoOutput(surfaceId: string, callback: AsyncCallback<PhotoOutput>): void;<br>function createPhotoOutput(surfaceId: string): Promise<PhotoOutput>; | 新增 |
| ohos.multimedia.camera | PreviewOutputError | code: PreviewOutputErrorCode; | 新增 |
| ohos.multimedia.camera | PreviewOutputErrorCode | ERROR_UNKNOWN = -1 | 新增 |
| ohos.multimedia.camera | PreviewOutput | on(type: 'error', callback: ErrorCallback<PreviewOutputError>): void; | 新增 |
| ohos.multimedia.camera | PreviewOutput | on(type: 'frameEnd', callback: AsyncCallback<void>): void; | 新增 |
| ohos.multimedia.camera | PreviewOutput | on(type: 'frameStart', callback: AsyncCallback<void>): void; | 新增 |
| ohos.multimedia.camera | PreviewOutput | release(callback: AsyncCallback<void>): void;<br>release(): Promise<void>; | 新增 |
| ohos.multimedia.camera | camera | function createPreviewOutput(surfaceId: string, callback: AsyncCallback<PreviewOutput>): void;<br>function createPreviewOutput(surfaceId: string): Promise<PreviewOutput>; | 新增 |
| ohos.multimedia.camera | CaptureSessionError | code: CaptureSessionErrorCode; | 新增 |
| ohos.multimedia.camera | CaptureSessionErrorCode | ERROR_UNKNOWN = -1 | 新增 |
| ohos.multimedia.camera | CaptureSession | on(type: 'error', callback: ErrorCallback<CaptureSessionError>): void; | 新增 |
| ohos.multimedia.camera | CaptureSession | release(callback: AsyncCallback<void>): void;<br>release(): Promise<void>; | 新增 |
| ohos.multimedia.camera | CaptureSession | stop(callback: AsyncCallback<void>): void;<br>stop(): Promise<void>; | 新增 |
| ohos.multimedia.camera | CaptureSession | start(callback: AsyncCallback<void>): void;<br>start(): Promise<void>; | 新增 |
| ohos.multimedia.camera | CaptureSession | removeOutput(previewOutput: PreviewOutput, callback: AsyncCallback<void>): void;<br>removeOutput(previewOutput: PreviewOutput): Promise<void>;<br>removeOutput(photoOutput: PhotoOutput, callback: AsyncCallback<void>): void;<br>removeOutput(photoOutput: PhotoOutput): Promise<void>;<br>removeOutput(videoOutput: VideoOutput, callback: AsyncCallback<void>): void;<br>removeOutput(videoOutput: VideoOutput): Promise<void>; | 新增 |
| ohos.multimedia.camera | CaptureSession | removeInput(cameraInput: CameraInput, callback: AsyncCallback<void>): void;<br>removeInput(cameraInput: CameraInput): Promise<void>; | 新增 |
| ohos.multimedia.camera | CaptureSession | addOutput(previewOutput: PreviewOutput, callback: AsyncCallback<void>): void;<br>addOutput(previewOutput: PreviewOutput): Promise<void>;<br>addOutput(photoOutput: PhotoOutput, callback: AsyncCallback<void>): void;<br>addOutput(photoOutput: PhotoOutput): Promise<void>;<br>addOutput(videoOutput: VideoOutput, callback: AsyncCallback<void>): void;<br>addOutput(videoOutput: VideoOutput): Promise<void>; | 新增 |
| ohos.multimedia.camera | CaptureSession | addInput(cameraInput: CameraInput, callback: AsyncCallback<void>): void;<br>addInput(cameraInput: CameraInput): Promise<void>; | 新增 |
| ohos.multimedia.camera | CaptureSession | commitConfig(callback: AsyncCallback<void>): void;<br>commitConfig(): Promise<void>; | 新增 |
| ohos.multimedia.camera | CaptureSession | beginConfig(callback: AsyncCallback<void>): void;<br>beginConfig(): Promise<void>; | 新增 |
| ohos.multimedia.camera | camera | function createCaptureSession(context: Context, callback: AsyncCallback<CaptureSession>): void;<br>function createCaptureSession(context: Context): Promise<CaptureSession>; | 新增 |
| ohos.multimedia.camera | FocusState | FOCUS_STATE_UNFOCUSED | 新增 |
| ohos.multimedia.camera | FocusState | FOCUS_STATE_FOCUSED | 新增 |
| ohos.multimedia.camera | FocusState | FOCUS_STATE_SCAN = 0 | 新增 |
| ohos.multimedia.camera | FocusMode | FOCUS_MODE_LOCKED | 新增 |
| ohos.multimedia.camera | FocusMode | FOCUS_MODE_AUTO | 新增 |
| ohos.multimedia.camera | FocusMode | FOCUS_MODE_CONTINUOUS_AUTO | 新增 |
| ohos.multimedia.camera | FocusMode | FOCUS_MODE_MANUAL = 0 | 新增 |
| ohos.multimedia.camera | FlashMode | FLASH_MODE_ALWAYS_OPEN | 新增 |
| ohos.multimedia.camera | FlashMode | FLASH_MODE_AUTO | 新增 |
| ohos.multimedia.camera | FlashMode | FLASH_MODE_OPEN | 新增 |
| ohos.multimedia.camera | FlashMode | FLASH_MODE_CLOSE = 0 | 新增 |
| ohos.multimedia.camera | CameraInputError | code: CameraInputErrorCode; | 新增 |
| ohos.multimedia.camera | CameraInputErrorCode | ERROR_UNKNOWN = -1 | 新增 |
| ohos.multimedia.camera | CameraInput | on(type: 'error', callback: ErrorCallback<CameraInputError>): void; | 新增 |
| ohos.multimedia.camera | CameraInput | on(type: 'focusStateChange', callback: AsyncCallback<FocusState>): void; | 新增 |
| ohos.multimedia.camera | CameraInput | release(callback: AsyncCallback<void>): void;<br>release(): Promise<void>; | 新增 |
| ohos.multimedia.camera | CameraInput | setZoomRatio(zoomRatio: number, callback: AsyncCallback<void>): void;<br>setZoomRatio(zoomRatio: number): Promise<void>; | 新增 |
| ohos.multimedia.camera | CameraInput | getZoomRatio(callback: AsyncCallback<number>): void;<br>getZoomRatio(): Promise<number>; | 新增 |
| ohos.multimedia.camera | CameraInput | getZoomRatioRange(callback: AsyncCallback<Array<number>>): void;<br>getZoomRatioRange(): Promise<Array<number>>; | 新增 |
| ohos.multimedia.camera | CameraInput | setFocusMode(afMode: FocusMode, callback: AsyncCallback<void>): void;<br>setFocusMode(afMode: FocusMode): Promise<void>; | 新增 |
| ohos.multimedia.camera | CameraInput | getFocusMode(callback: AsyncCallback<FocusMode>): void;<br>getFocusMode(): Promise<FocusMode>; | 新增 |
| ohos.multimedia.camera | CameraInput | isFocusModeSupported(afMode: FocusMode, callback: AsyncCallback<boolean>): void;<br>isFocusModeSupported(afMode: FocusMode): Promise<boolean>; | 新增 |
| ohos.multimedia.camera | CameraInput | setFlashMode(flashMode: FlashMode, callback: AsyncCallback<void>): void;<br>setFlashMode(flashMode: FlashMode): Promise<void>; | 新增 |
| ohos.multimedia.camera | CameraInput | getFlashMode(callback: AsyncCallback<FlashMode>): void;<br>getFlashMode(): Promise<FlashMode>; | 新增 |
| ohos.multimedia.camera | CameraInput | isFlashModeSupported(flashMode: FlashMode, callback: AsyncCallback<boolean>): void;<br>isFlashModeSupported(flashMode: FlashMode): Promise<boolean>; | 新增 |
| ohos.multimedia.camera | CameraInput | hasFlash(callback: AsyncCallback<boolean>): void;<br>hasFlash(): Promise<boolean>; | 新增 |
| ohos.multimedia.camera | CameraInput | getCameraId(callback: AsyncCallback<string>): void;<br>getCameraId(): Promise<string>; | 新增 |
| ohos.multimedia.camera | Size | width: number; | 新增 |
| ohos.multimedia.camera | Size | height: number; | 新增 |
| ohos.multimedia.camera | Camera | readonly connectionType: ConnectionType; | 新增 |
| ohos.multimedia.camera | Camera | readonly cameraType: CameraType; | 新增 |
| ohos.multimedia.camera | Camera | readonly cameraPosition: CameraPosition; | 新增 |
| ohos.multimedia.camera | Camera | readonly cameraId: string; | 新增 |
| ohos.multimedia.camera | ConnectionType | CAMERA_CONNECTION_REMOTE | 新增 |
| ohos.multimedia.camera | ConnectionType | CAMERA_CONNECTION_USB_PLUGIN | 新增 |
| ohos.multimedia.camera | ConnectionType | CAMERA_CONNECTION_BUILT_IN = 0 | 新增 |
| ohos.multimedia.camera | CameraType | CAMERA_TYPE_TRUE_DEPTH | 新增 |
| ohos.multimedia.camera | CameraType | CAMERA_TYPE_TELEPHOTO | 新增 |
| ohos.multimedia.camera | CameraType | CAMERA_TYPE_ULTRA_WIDE | 新增 |
| ohos.multimedia.camera | CameraType | CAMERA_TYPE_WIDE_ANGLE | 新增 |
| ohos.multimedia.camera | CameraType | CAMERA_TYPE_UNSPECIFIED = 0 | 新增 |
| ohos.multimedia.camera | CameraPosition | CAMERA_POSITION_FRONT | 新增 |
| ohos.multimedia.camera | CameraPosition | CAMERA_POSITION_BACK | 新增 |
| ohos.multimedia.camera | CameraPosition | CAMERA_POSITION_UNSPECIFIED = 0 | 新增 |
| ohos.multimedia.camera | CameraStatusInfo | status: CameraStatus; | 新增 |
| ohos.multimedia.camera | CameraStatusInfo | camera: Camera; | 新增 |
| ohos.multimedia.camera | CameraManager | on(type: 'cameraStatus', callback: AsyncCallback<CameraStatusInfo>): void; | 新增 |
| ohos.multimedia.camera | CameraManager | createCameraInput(cameraId: string, callback: AsyncCallback<CameraInput>): void;<br>createCameraInput(cameraId: string): Promise<CameraInput>;<br>createCameraInput(position: CameraPosition, type: CameraType, callback: AsyncCallback<CameraInput>): void;<br>createCameraInput(position: CameraPosition, type: CameraType): Promise<CameraInput>; | 新增 |
| ohos.multimedia.camera | CameraManager | getCameras(callback: AsyncCallback<Array<Camera>>): void;<br>getCameras(): Promise<Array<Camera>>; | 新增 |
| ohos.multimedia.camera | CameraStatus | CAMERA_STATUS_UNAVAILABLE | 新增 |
| ohos.multimedia.camera | CameraStatus | CAMERA_STATUS_AVAILABLE | 新增 |
| ohos.multimedia.camera | CameraStatus | CAMERA_STATUS_DISAPPEAR | 新增 |
| ohos.multimedia.camera | CameraStatus | CAMERA_STATUS_APPEAR = 0 | 新增 |
| ohos.multimedia.camera | camera | function getCameraManager(context: Context, callback: AsyncCallback<CameraManager>): void;<br>function getCameraManager(context: Context): Promise<CameraManager>; | 新增 |
| ohos.multimedia.image | ImageReceiver | release(callback: AsyncCallback<void>): void;<br>release(): Promise<void>; | 新增 |
| ohos.multimedia.image | ImageReceiver | on(type: 'imageArrival', callback: AsyncCallback<void>): void; | 新增 |
| ohos.multimedia.image | ImageReceiver | readNextImage(callback: AsyncCallback<Image>): void;<br>readNextImage(): Promise<Image>; | 新增 |
| ohos.multimedia.image | ImageReceiver | readLatestImage(callback: AsyncCallback<Image>): void;<br>readLatestImage(): Promise<Image>; | 新增 |
| ohos.multimedia.image | ImageReceiver | getReceivingSurfaceId(callback: AsyncCallback<string>): void;<br>getReceivingSurfaceId(): Promise<string>; | 新增 |
| ohos.multimedia.image | ImageReceiver | readonly format: ImageFormat; | 新增 |
| ohos.multimedia.image | ImageReceiver | readonly capacity: number; | 新增 |
| ohos.multimedia.image | ImageReceiver | readonly size: Size; | 新增 |
| ohos.multimedia.image | Image | release(callback: AsyncCallback<void>): void;<br>release(): Promise<void>; | 新增 |
| ohos.multimedia.image | Image | getComponent(componentType: ComponentType, callback: AsyncCallback<Component>): void;<br>getComponent(componentType: ComponentType): Promise<Component>; | 新增 |
| ohos.multimedia.image | Image | readonly format: number; | 新增 |
| ohos.multimedia.image | Image | readonly size: Size; | 新增 |
| ohos.multimedia.image | Image | clipRect: Region; | 新增 |
| ohos.multimedia.image | image | function createImageReceiver(width: number, height: number, format: number, capacity: number): ImageReceiver; | 新增 |
| ohos.multimedia.image | Component | readonly byteBuffer: ArrayBuffer; | 新增 |
| ohos.multimedia.image | Component | readonly pixelStride: number; | 新增 |
| ohos.multimedia.image | Component | readonly rowStride: number; | 新增 |
| ohos.multimedia.image | Component | readonly componentType: ComponentType; | 新增 |
| ohos.multimedia.image | ComponentType | JPEG = 4 | 新增 |
| ohos.multimedia.image | ComponentType | YUV_V = 3 | 新增 |
| ohos.multimedia.image | ComponentType | YUV_U = 2 | 新增 |
| ohos.multimedia.image | ComponentType | YUV_Y = 1 | 新增 |
| ohos.multimedia.image | ImageFormat | JPEG = 2000 | 新增 |
| ohos.multimedia.image | ImageFormat | YCBCR_422_SP = 1000 | 新增 |
| ohos.multimedia.media | VideoRecorderConfig | location?: Location; | 新增 |
| ohos.multimedia.media | VideoRecorderConfig | rotation?: number; | 新增 |
| ohos.multimedia.media | VideoRecorderConfig | url: string; | 新增 |
| ohos.multimedia.media | VideoRecorderConfig | profile: VideoRecorderProfile; | 新增 |
| ohos.multimedia.media | VideoRecorderConfig | videoSourceType: VideoSourceType; | 新增 |
| ohos.multimedia.media | VideoRecorderConfig | audioSourceType: AudioSourceType; | 新增 |
| ohos.multimedia.media | VideoSourceType | VIDEO_SOURCE_TYPE_SURFACE_ES = 1 | 新增 |
| ohos.multimedia.media | VideoSourceType | VIDEO_SOURCE_TYPE_SURFACE_YUV = 0 | 新增 |
| ohos.multimedia.media | AudioSourceType | AUDIO_SOURCE_TYPE_MIC = 1 | 新增 |
| ohos.multimedia.media | AudioSourceType | AUDIO_SOURCE_TYPE_DEFAULT = 0 | 新增 |
| ohos.multimedia.media | VideoRecorderProfile | readonly videoFrameRate: number; | 新增 |
| ohos.multimedia.media | VideoRecorderProfile | readonly videoFrameHeight: number; | 新增 |
| ohos.multimedia.media | VideoRecorderProfile | readonly videoFrameWidth: number; | 新增 |
| ohos.multimedia.media | VideoRecorderProfile | readonly videoCodec: CodecMimeType; | 新增 |
| ohos.multimedia.media | VideoRecorderProfile | readonly videoBitrate: number; | 新增 |
| ohos.multimedia.media | VideoRecorderProfile | readonly fileFormat: ContainerFormatType; | 新增 |
| ohos.multimedia.media | VideoRecorderProfile | readonly audioSampleRate: number; | 新增 |
| ohos.multimedia.media | VideoRecorderProfile | readonly audioCodec: CodecMimeType; | 新增 |
| ohos.multimedia.media | VideoRecorderProfile | readonly audioChannels: number; | 新增 |
| ohos.multimedia.media | VideoRecorderProfile | readonly audioBitrate: number; | 新增 |
| ohos.multimedia.media | VideoRecorder | readonly state: VideoRecordState; | 新增 |
| ohos.multimedia.media | VideoRecorder | on(type: 'error', callback: ErrorCallback): void; | 新增 |
| ohos.multimedia.media | VideoRecorder | reset(callback: AsyncCallback<void>): void;<br>reset(): Promise<void>; | 新增 |
| ohos.multimedia.media | VideoRecorder | release(callback: AsyncCallback<void>): void;<br>release(): Promise<void>; | 新增 |
| ohos.multimedia.media | VideoRecorder | stop(callback: AsyncCallback<void>): void;<br>stop(): Promise<void>; | 新增 |
| ohos.multimedia.media | VideoRecorder | resume(callback: AsyncCallback<void>): void;<br>resume(): Promise<void>; | 新增 |
| ohos.multimedia.media | VideoRecorder | pause(callback: AsyncCallback<void>): void;<br>pause(): Promise<void>; | 新增 |
| ohos.multimedia.media | VideoRecorder | start(callback: AsyncCallback<void>): void;<br>start(): Promise<void>; | 新增 |
| ohos.multimedia.media | VideoRecorder | getInputSurface(callback: AsyncCallback<string>): void;<br>getInputSurface(): Promise<string>; | 新增 |
| ohos.multimedia.media | VideoRecorder | prepare(config: VideoRecorderConfig, callback: AsyncCallback<void>): void;<br>prepare(config: VideoRecorderConfig): Promise<void>; | 新增 |
| ohos.multimedia.media | media | function createVideoRecorder(callback: AsyncCallback<VideoRecorder>): void;<br>function createVideoRecorder(): Promise<VideoRecorder>; | 新增 |
# 资源调度子系统JS API变更
OpenHarmony 3.2 Canary1版本相较于OpenHarmony 3.1 Release版本,资源调度子系统的API变更如下:
## 接口变更
| 模块名 | 类名 | 方法/属性/枚举/常量 | 变更类型 |
|---|---|---|---|
| ohos.workScheduler | StorageRequest | STORAGE_LEVEL_LOW_OR_OKAY | 新增 |
| ohos.workScheduler | StorageRequest | STORAGE_LEVEL_OKAY | 新增 |
| ohos.workScheduler | StorageRequest | STORAGE_LEVEL_LOW = 0 | 新增 |
| ohos.workScheduler | BatteryStatus | BATTERY_STATUS_LOW_OR_OKAY | 新增 |
| ohos.workScheduler | BatteryStatus | BATTERY_STATUS_OKAY | 新增 |
| ohos.workScheduler | BatteryStatus | BATTERY_STATUS_LOW = 0 | 新增 |
| ohos.workScheduler | ChargingType | CHARGING_PLUGGED_WIRELESS | 新增 |
| ohos.workScheduler | ChargingType | CHARGING_PLUGGED_USB | 新增 |
| ohos.workScheduler | ChargingType | CHARGING_PLUGGED_AC | 新增 |
| ohos.workScheduler | ChargingType | CHARGING_PLUGGED_ANY = 0 | 新增 |
| ohos.workScheduler | NetworkType | NETWORK_TYPE_ETHERNET | 新增 |
| ohos.workScheduler | NetworkType | NETWORK_TYPE_WIFI_P2P | 新增 |
| ohos.workScheduler | NetworkType | NETWORK_TYPE_BLUETOOTH | 新增 |
| ohos.workScheduler | NetworkType | NETWORK_TYPE_WIFI | 新增 |
| ohos.workScheduler | NetworkType | NETWORK_TYPE_MOBILE | 新增 |
| ohos.workScheduler | NetworkType | NETWORK_TYPE_ANY = 0 | 新增 |
| ohos.workScheduler | workScheduler | function isLastWorkTimeOut(workId: number, callback: AsyncCallback<void>): boolean;<br>function isLastWorkTimeOut(workId: number): Promise<boolean>; | 新增 |
| ohos.workScheduler | workScheduler | function stopAndClearWorks(): boolean; | 新增 |
| ohos.workScheduler | workScheduler | function obtainAllWorks(callback: AsyncCallback<void>): Array<WorkInfo>;<br>function obtainAllWorks(): Promise<Array<WorkInfo>>; | 新增 |
| ohos.workScheduler | workScheduler | function getWorkStatus(workId: number, callback: AsyncCallback<WorkInfo>): void;<br>function getWorkStatus(workId: number): Promise<WorkInfo>; | 新增 |
| ohos.workScheduler | workScheduler | function stopWork(work: WorkInfo, needCancel?: boolean): boolean; | 新增 |
| ohos.workScheduler | workScheduler | function startWork(work: WorkInfo): boolean; | 新增 |
| ohos.workScheduler | WorkInfo | idleWaitTime?: number; | 新增 |
| ohos.workScheduler | WorkInfo | isDeepIdle?: boolean; | 新增 |
| ohos.workScheduler | WorkInfo | repeatCount?: number; | 新增 |
| ohos.workScheduler | WorkInfo | isRepeat?: boolean; | 新增 |
| ohos.workScheduler | WorkInfo | repeatCycleTime?: number; | 新增 |
| ohos.workScheduler | WorkInfo | storageRequest?: StorageRequest; | 新增 |
| ohos.workScheduler | WorkInfo | batteryStatus?: BatteryStatus; | 新增 |
| ohos.workScheduler | WorkInfo | batteryLevel?: number; | 新增 |
| ohos.workScheduler | WorkInfo | chargerType?: ChargingType; | 新增 |
| ohos.workScheduler | WorkInfo | isCharging?: boolean; | 新增 |
| ohos.workScheduler | WorkInfo | networkType?: NetworkType; | 新增 |
| ohos.workScheduler | WorkInfo | isPersisted?: boolean; | 新增 |
| ohos.workScheduler | WorkInfo | abilityName: string; | 新增 |
| ohos.workScheduler | WorkInfo | bundleName: string; | 新增 |
| ohos.workScheduler | WorkInfo | workId: number; | 新增 |
| ohos.WorkSchedulerExtensionAbility | WorkSchedulerExtensionAbility | onWorkStop(work: workScheduler.WorkInfo): void; | 新增 |
| ohos.WorkSchedulerExtensionAbility | WorkSchedulerExtensionAbility | onWorkStart(work: workScheduler.WorkInfo): void; | 新增 |
# JS API Diff (API Version 9 Canary)
OpenHarmony 3.2 Canary版本在OpenHarmony 3.1 Release版本的基础上,变更的接口清单如下:
- [元能力](js-apidiff-ability_api-9-canary.md)
- [包管理](js-apidiff-bundle_api-9-canary.md)
- [分布式数据管理](js-apidiff-distributed-data_api-9-canary.md)
- [事件通知](js-apidiff-event-and-notification_api-9-canary.md)
- [文件管理](js-apidiff-file-management_api-9-canary.md)
- [Misc软件服务](js-apidiff-misc_api-9-canary.md)
- [OS媒体软件](js-apidiff-multimedia_api-9-canary.md)
- [资源调度](js-apidiff-resource-scheduler_api-9-canary.md)
- [窗口管理](js-apidiff-window_api-9-canary.md)
# 窗口管理子系统JS API变更
OpenHarmony 3.2 Canary1版本相较于OpenHarmony 3.1 Release版本,窗口管理子系统的API变更如下:
## 接口变更
| 模块名 | 类名 | 方法/属性/枚举/常量 | 变更类型 |
|---|---|---|---|
| ohos.window | WindowStage | loadContent(path: string, storage: ContentStorage, callback: AsyncCallback<void>): void;<br>loadContent(path: string, storage?: ContentStorage): Promise<void>;<br>loadContent(path: string, callback: AsyncCallback<void>): void; | 新增 |
| ohos.window | WindowStage | getSubWindow(): Promise<Array<Window>>;<br>getSubWindow(callback: AsyncCallback<Array<Window>>): void; | 新增 |
| ohos.window | WindowStage | createSubWindow(name: string): Promise<Window>;<br>createSubWindow(name: string, callback: AsyncCallback<Window>): void; | 新增 |
| ohos.window | WindowStage | getMainWindow(): Promise<Window>;<br>getMainWindow(callback: AsyncCallback<Window>): void; | 新增 |
| ohos.window | WindowStageEventType | BACKGROUND | 新增 |
| ohos.window | WindowStageEventType | INACTIVE | 新增 |
| ohos.window | WindowStageEventType | ACTIVE | 新增 |
| ohos.window | WindowStageEventType | FOREGROUND = 1 | 新增 |
......@@ -4,3 +4,7 @@
- [JS API差异报告](js-apidiff-v3.1-release.md)
- [Native API差异报告](native-apidiff-v3.1-release.md)
此外,本次还发布了OpenHarmony 3.2 Canary (API Version 9 Canary)版本:
[JS API差异报告(API Version 9 Canary)](js-apidiff-v3.2-canary.md)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册