Skip to content

Commit

Permalink
auto unmute on any control attempt #65.
Browse files Browse the repository at this point in the history
  • Loading branch information
m1k1o committed Jun 7, 2021
1 parent 3052719 commit 29359ba
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -69,7 +69,7 @@ For n.eko room management software visit https://github.com/m1k1o/neko-rooms.
- Added HEALTHCHECK to Dockerfile.
- Arguments in broadcast pipeline are optional, not positional and can be repeated `{url} {device} {display}`.
- Chat messages are dense, when repeated, they are joined together.
- Start unmuted on reconnects.
- Start unmuted on reconnects and auto unmute on any control attempt.

### Roadmap & TODOs
- Catch errors from gst pipeline, tell user if broadcast failed.
Expand Down
12 changes: 9 additions & 3 deletions client/src/app.vue
Expand Up @@ -187,10 +187,16 @@
}
controlAttempt() {
if (this.shakeKbd || this.$accessor.remote.hosted) return
// auto unmute on any control attempt
if (this.$accessor.video.muted) {
this.$accessor.video.setMuted(false)
}
this.shakeKbd = true
setTimeout(() => (this.shakeKbd = false), 5000)
// shake keyboard if not hosting
if (!this.shakeKbd && !this.$accessor.remote.hosted) {
this.shakeKbd = true
setTimeout(() => (this.shakeKbd = false), 5000)
}
}
get about() {
Expand Down

3 comments on commit 29359ba

@mbattista
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this really necessary?

https://github.com/m1k1o/neko/blob/dev/client/src/main.ts#L39

here it already adds an click event, which un-mutes the video on the next click.

@mbattista
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps you wanted to control the video while it is muted?
it seems like a change which I would love to see reverted.

@m1k1o
Copy link
Owner Author

@m1k1o m1k1o commented on 29359ba Jun 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this really necessary?

https://github.com/m1k1o/neko/blob/dev/client/src/main.ts#L39

here it already adds an click event, which un-mutes the video on the next click.

That click event is not propagated inside control canvas, because that is stopping all events propagation (so that other keys don't get interpreted by browser but are sent to the remote one). Therefore, I needed to add extra event.

perhaps you wanted to control the video while it is muted?
it seems like a change which I would love to see reverted.

I see now, that is disables the usage of muted completly, because it unmutes on each click. Didn't realize that first, but I'd like to keep this feature, so that it unmutes only on initial click.

Please sign in to comment.