Skip to content

Commit

Permalink
augments Readme with details to audio-sink-device-id and lists common…
Browse files Browse the repository at this point in the history
… events
  • Loading branch information
mheers committed Jun 20, 2022
1 parent 18af087 commit 504f56a
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 19 deletions.
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
- [Install and setup](#install-and-setup)
- [API](#api)
* [Common props](#common-props)
* [Common events](#common-events)
* [AvLine props](#avline-props)
* [AvBars props](#avbars-props)
* [AvCircle props](#avcircle-props)
Expand Down Expand Up @@ -161,6 +162,14 @@ There are props that are common for all components and special props for each co
wrapped in "div".
</td>
</tr>
<tr>
<td>audio-sink-device-id</td>
<td><code>String</code></td>
<td><code>null</code></td>
<td>
Id of the audio output device to be used as sink. When provided sets audio output device.
</td>
</tr>
<tr>
<td>ref-link</td>
<td><code>String</code></td>
Expand Down Expand Up @@ -227,6 +236,37 @@ There are props that are common for all components and special props for each co
</tbody>
</table>

### Common events

<table>
<thead>
<tr>
<th width="150">Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>playing</td>
<td>
Emitted when audio starts playing.
</td>
</tr>
<tr>
<td>paused</td>
<td>
Emitted when audio is paused.
</td>
</tr>
<tr>
<td>ended</td>
<td>
Emitted when audio is ended.
</td>
</tr>
</tbody>
</table>

### AvLine props

<table>
Expand Down
10 changes: 5 additions & 5 deletions dist/vue-audio-visual.common.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/vue-audio-visual.common.js.map

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions dist/vue-audio-visual.umd.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/vue-audio-visual.umd.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/vue-audio-visual.umd.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/vue-audio-visual.umd.min.js.map

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions src/components/AvBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ const props = {
default: null
},
/**
* prop: 'audio-sink-id'
* Audio element sink id. When provided sets audio element sink id.
* prop: 'audio-sink-device-id'
* Audio sink device id. When provided sets audio output device.
*/
audioSinkId: {
audioSinkDeviceId: {
type: String,
default: null
},
Expand Down Expand Up @@ -161,8 +161,8 @@ const methods = {

const audio = new Audio()
audio.srcObject = destination.stream
if (this.audioSinkId) {
await audio.setSinkId(this.audioSinkId)
if (this.audioSinkDeviceId) {
await audio.setSinkId(this.audioSinkDeviceId)
}
audio.play()
},
Expand Down

0 comments on commit 504f56a

Please sign in to comment.