未验证 提交 9f0ae499 编写于 作者: O openharmony_ci 提交者: Gitee

!2439 媒体API修改

Merge pull request !2439 from zengyawen/master
......@@ -127,7 +127,7 @@ import mediaLibrary from '@ohos.multimedia.mediaLibrary'
let testFdNumber;
function SetCallBack(audioPlayer) {
function SetCallBack(audioRecorder) {
audioRecorder.on('prepare', () => { // 设置'prepare'事件回调
console.log('prepare success');
// 录制界面可切换至已准备好,可点击录制按钮进行录制
......
......@@ -567,7 +567,7 @@ setFlashMode(flashMode: FlashMode): Promise<void\>
**示例:**
```
cameraInput.setFlashMode((flashMode).then() => {
cameraInput.setFlashMode(flashMode).then(() => {
console.log('Promise returned with the successful execution of setFlashMode.');
})
```
......
图片处理
==========
# 图片处理
> **说明:**
> 本模块首批接口从API version 6开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
导入模块
---------
## 导入模块
```
import image from '@ohos.multimedia.image';
......@@ -663,7 +661,7 @@ imageSourceApi.getImageProperty("BitsPerSample",property,(error,data) => {})
### createPixelMap<sup>7+</sup>
createPixelMap(options?: DecodingOptions): Promise<PixelMap>;
createPixelMap(options?: DecodingOptions): Promise\<PixelMap>
通过图片解码参数创建PixelMap对象。
......@@ -671,10 +669,15 @@ createPixelMap(options?: DecodingOptions): Promise<PixelMap>;
**参数:**
| 名称 | 类型 | 必填 | 说明 |
| ------------- | ------------------------------------- | ---- | -------------------------- |
| options | [DecodingOptions](#decodingoptions7) | 否 | 解码参数。 |
| AsyncCallback | AsyncCallback<[PixelMap](#pixelmap7)> | 是 | 通过回调返回PixelMap对象。 |
| 名称 | 类型 | 必填 | 说明 |
| ------- | ------------------------------------ | ---- | ---------- |
| options | [DecodingOptions](#decodingoptions7) | 否 | 解码参数。 |
**返回值:**
| 类型 | 说明 |
| -------------------------------- | --------------------- |
| Promise\<[PixelMap](#pixelmap7)> | 异步返回Promise对象。 |
**示例:**
......@@ -685,7 +688,7 @@ imageSourceApi.createPixelMap().then(pixelmap => {})
### createPixelMap<sup>7+</sup>
createPixelMap(callback: AsyncCallback<PixelMap>): void;
createPixelMap(callback: AsyncCallback\<PixelMap>): void
通过默认参数创建PixelMap对象,使用callback形式返回结果。
......@@ -705,9 +708,9 @@ imageSourceApi.createPixelMap(pixelmap => {})
### createPixelMap<sup>7+</sup>
createPixelMap(options: DecodingOptions, callback: AsyncCallback<PixelMap>): void;
createPixelMap(options: DecodingOptions, callback: AsyncCallback\<PixelMap>): void
通过图片解码参数创建pixelmap对象。
通过图片解码参数创建PixelMap对象。
**系统能力:** SystemCapability.Multimedia.Image
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册