Skip to content

Commit

Permalink
添加两个API
Browse files Browse the repository at this point in the history
  • Loading branch information
bosscheng committed Aug 27, 2021
1 parent 35b06e5 commit 90ee52d
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 2 deletions.
21 changes: 20 additions & 1 deletion demo/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,6 @@ jessibuca.setRotate(0)

jessibuca.setRotate(90)


jessibuca.setRotate(270)
```

Expand Down Expand Up @@ -359,6 +358,26 @@ jessibuca.screenshot("test","png",0.5)

```


### isPlaying()
- **返回值**`boolean`
- **用法**
返回是否正在播放中状态。
```js
var result = jessibuca.isPlaying()
console.log(result) // true
```

### isMute()
- **返回值**`boolean`
- **用法**
返回是否静音。
```js
var result = jessibuca.isMute()
console.log(result) // true
```



### on(event, callback)
- **参数**
Expand Down
2 changes: 1 addition & 1 deletion demo/public/index.js

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions src/jessibuca.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,22 @@ class Jessibuca {
return this._recording;
}

/**
* 是否正在播放
* @returns {*}
*/
isPlaying() {
return this.playing
}

/**
* 是否静音状态
* @returns {*}
*/
isMute() {
return this.quieting;
}

/**
*
* @param value
Expand Down

0 comments on commit 90ee52d

Please sign in to comment.