未验证 提交 e2859dcc 编写于 作者: S shuboxu 提交者: Gitee

update en/application-dev/media/video-recording.md.

Signed-off-by: Nshuboxu <xushubo1@huawei.com>
上级 4566c774
...@@ -70,14 +70,12 @@ Read [AVRecorder](../reference/apis/js-apis-media.md#avrecorder9) for the API re ...@@ -70,14 +70,12 @@ Read [AVRecorder](../reference/apis/js-apis-media.md#avrecorder9) for the API re
videoFrameHeight: number; videoFrameHeight: number;
videoFrameRate: number; videoFrameRate: number;
} }
class AVConfig { class AVConfig {
videoSourceType: media.VideoSourceType; videoSourceType: media.VideoSourceType;
profile: AVProfile; profile: AVProfile;
url: string; url: string;
rotation: number; rotation: number;
} }
let avProfile: AVProfile = { let avProfile: AVProfile = {
fileFormat: media.ContainerFormatType.CFT_MPEG_4, // Video file encapsulation format. Only MP4 is supported. fileFormat: media.ContainerFormatType.CFT_MPEG_4, // Video file encapsulation format. Only MP4 is supported.
videoBitrate : 100000, // Video bit rate. videoBitrate : 100000, // Video bit rate.
...@@ -92,7 +90,6 @@ Read [AVRecorder](../reference/apis/js-apis-media.md#avrecorder9) for the API re ...@@ -92,7 +90,6 @@ Read [AVRecorder](../reference/apis/js-apis-media.md#avrecorder9) for the API re
url: 'fd://35', // Create, read, and write a file by referring to the sample code in Application File Access and Management. url: 'fd://35', // Create, read, and write a file by referring to the sample code in Application File Access and Management.
rotation: 0, // Video rotation angle. The default value is 0, indicating that the video is not rotated. The value can be 0, 90, 180, or 270. rotation: 0, // Video rotation angle. The default value is 0, indicating that the video is not rotated. The value can be 0, 90, 180, or 270.
} }
avRecorder.prepare(avConfig).then(() => { avRecorder.prepare(avConfig).then(() => {
console.info('avRecorder prepare success') console.info('avRecorder prepare success')
}, (error: Error) => { }, (error: Error) => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册