提交 bf29d6af 编写于 作者: G Gloria

Update docs against 20445+20559+19682

Signed-off-by: wusongqing<wusongqing@huawei.com>
上级 a27633f5
......@@ -4559,10 +4559,10 @@ async function getCacheDir(){
}
let filePath = path + '/StarWars10s-2C-48000-4SW.wav';
let file = fs.openSync(filePath, fs.OpenMode.READ_ONLY);
let stat = await fs.stat(path);
let buf = new ArrayBuffer(bufferSize);
let len = stat.size % bufferSize == 0 ? Math.floor(stat.size / bufferSize) : Math.floor(stat.size / bufferSize + 1);
for (let i = 0;i < len; i++) {
fs.stat(path).then((stat) => {
let buf = new ArrayBuffer(bufferSize);
let len = stat.size % bufferSize == 0 ? Math.floor(stat.size / bufferSize) : Math.floor(stat.size / bufferSize + 1);
for (let i = 0;i < len; i++) {
let options = {
offset: i * bufferSize,
length: bufferSize
......@@ -4577,7 +4577,8 @@ for (let i = 0;i < len; i++) {
}
})
})
}
}
});
```
### write<sup>8+</sup>
......@@ -4612,21 +4613,22 @@ async function getCacheDir(){
}
let filePath = path + '/StarWars10s-2C-48000-4SW.wav';
let file = fs.openSync(filePath, fs.OpenMode.READ_ONLY);
let stat = await fs.stat(path);
let buf = new ArrayBuffer(bufferSize);
let len = stat.size % bufferSize == 0 ? Math.floor(stat.size / bufferSize) : Math.floor(stat.size / bufferSize + 1);
for (let i = 0;i < len; i++) {
let options = {
offset: i * bufferSize,
length: bufferSize
}
let readsize = await fs.read(file.fd, buf, options)
try{
let writeSize = await audioRenderer.write(buf);
} catch(err) {
console.error(`audioRenderer.write err: ${err}`);
}
}
fs.stat(path).then((stat) => {
let buf = new ArrayBuffer(bufferSize);
let len = stat.size % bufferSize == 0 ? Math.floor(stat.size / bufferSize) : Math.floor(stat.size / bufferSize + 1);
for (let i = 0;i < len; i++) {
let options = {
offset: i * bufferSize,
length: bufferSize
}
let readsize = await fs.read(file.fd, buf, options)
try{
let writeSize = await audioRenderer.write(buf);
} catch(err) {
console.error(`audioRenderer.write err: ${err}`);
}
}
});
```
### getAudioTime<sup>8+</sup>
......
......@@ -1585,7 +1585,7 @@ Provides the usage duration information of an application.
**System API**: This is a system API.
| Name | Type | Mandatory | Description |
|Name | Type | Mandatory | Description |
| ------------------------------ | ---------------------------------------- | ---- | -------------- |
| [key: string] | [BundleStatsInfo](#bundlestatsinfo) | Yes | Usage duration information by application.|
......
......@@ -133,7 +133,7 @@ You can create a subwindow, such as a dialog box, and set its properties.
## Experiencing the Immersive Window Feature
To create a better video watching and gaming experience, you can use the immersive window feature to hide the system windows, including the status bar and navigation bar. To achieve this effect, you can use the immersive window feature, which is available only for the main window of an application.
To create a better video watching and gaming experience, you can use the immersive window feature to hide the system windows, including the status bar and navigation bar. This feature is available only for the main window of an application.
### How to Develop
......@@ -163,8 +163,8 @@ To create a better video watching and gaming experience, you can use the immersi
2. Implement the immersive effect. You can use either of the following methods:
- Method 1: Call **setWindowSystemBarEnable** to hide the navigation bar and status bar.
- Method 2: Call **setWindowLayoutFullScreen** to enable the full-screen mode for the main window layout. Call **setSystemProperties** to set the opacity, background color, text color, and highlighted icon of the navigation bar and status bar to ensure that their display effect is consistent with that of the main window.
- Method 1: Call **setWindowSystemBarEnable** to hide the status bar and navigation bar.
- Method 2: Call **setWindowLayoutFullScreen** to enable the full-screen mode for the main window layout. Call **setWindowSystemBarProperties** to set the opacity, background color, text color, and highlighted icon of the status bar and navigation bar to ensure that their display effect is consistent with that of the main window.
```js
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册