Skip to content

Commit

Permalink
docs: update streamType detail info
Browse files Browse the repository at this point in the history
  • Loading branch information
ForeverSc committed Jul 16, 2024
1 parent f375371 commit dce0a93
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ Returns a `ReadableStream` for streaming packet data.
Parameters:
- `start`: The start time for reading, in seconds, defaults to 0, reading packets from the beginning.
- `end`: The end time for reading, in seconds, defaults to 0, reading until the end of the file.
- `streamType`: The type of media stream, defaults to 0, which is the video stream.
- `streamType`: The type of media stream, defaults to 0, which is the video stream. 1 is audio stream. See `AVMediaType` for more details.
- `streamIndex`: The index of the media stream, defaults to -1, which is to automatically select.

```typescript
Expand All @@ -127,7 +127,7 @@ getAVStream(streamType?: AVMediaType, streamIndex?: number): Promise<WebAVStream
Gets information about a specified stream in the media file.

Parameters:
- `streamType`: The type of media stream, defaults to 0, which is the video stream.
- `streamType`: The type of media stream, defaults to 0, which is the video stream. 1 is audio stream. See `AVMediaType` for more details.
- `streamIndex`: The index of the media stream, defaults to -1, which is to automatically select.

Simplified methods based on the semantics of `getAVStream`:
Expand All @@ -146,7 +146,7 @@ Gets the data at a specified time point in the media file.

Parameters:
- `time`: Required, in seconds.
- `streamType`: The type of media stream, defaults to 0, which is the video stream.
- `streamType`: The type of media stream, defaults to 0, which is the video stream. 1 is audio stream. See `AVMediaType` for more details.
- `streamIndex`: The index of the media stream, defaults to -1, which is to automatically select.

Simplified methods based on the semantics of `getAVPacket`:
Expand Down
6 changes: 3 additions & 3 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ readAVPacket(start?: number, end?: number, streamType?: AVMediaType, streamIndex
参数:
- `start`: 读取开始时间点,单位为s,默认值为0,从头开始读取packet
- `end`: 读取结束时间点,单位为s, 默认值为0,读取到文件末尾
- `streamType`: 媒体流类型,默认值为0, 即视频流
- `streamType`: 媒体流类型,默认值为0, 即视频流,1为音频流。其他具体见`AVMediaType`
- `streamIndex`: 媒体流索引,默认值为-1,即自动选择

```typescript
Expand All @@ -126,7 +126,7 @@ getAVStream(streamType?: AVMediaType, streamIndex?: number): Promise<WebAVStream
获取媒体文件中指定stream的信息

参数:
- `streamType`: 媒体流类型,默认值为0, 即视频流
- `streamType`: 媒体流类型,默认值为0, 即视频流,1为音频流。其他具体见`AVMediaType`
- `streamIndex`: 媒体流索引,默认值为-1,即自动选择

基于`getAVStream`的语义简化方法:
Expand All @@ -145,7 +145,7 @@ getAVPacket(time: number, streamType?: AVMediaType, streamIndex?: number): Promi

参数:
- `time`: 必填,单位为s
- `streamType`: 媒体流类型,默认值为0, 即视频流
- `streamType`: 媒体流类型,默认值为0, 即视频流,1为音频流。其他具体见`AVMediaType`
- `streamIndex`: 媒体流索引,默认值为-1,即自动选择

基于`getAVPacket`的语义简化方法:
Expand Down

0 comments on commit dce0a93

Please sign in to comment.