Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvements allowing cast to embedded touch screen device #261

Closed
urbanekpj opened this issue Mar 24, 2023 · 6 comments
Closed

Improvements allowing cast to embedded touch screen device #261

urbanekpj opened this issue Mar 24, 2023 · 6 comments

Comments

@urbanekpj
Copy link

urbanekpj commented Mar 24, 2023

Hi.
i try using neko in specific configuration:
i'm trying cast video to separate embedded device with touch screen with implicit control and ?cast=true.
I have some issues to discuss.

  1. ?cast=true don't hide overlay buttons, eg full screen. i assume that if cast flag is enabled and implicit control is set then all buttons can be hidden. i handle full screen on browser level(--kiosk mode). it easy to fix this but maybe im missing some use case.
  2. i disabled security option for requiring user interaction for playing audio on browser level. if cast option is set i don't mute audio, but then when security option is enabled then no video is started so i changed video.play() to retry with mute if cast is set
        try {
          await this._video.play()
        } catch (err: any) {
            try {
              this.$accessor.video.setMuted(true)
              this._video.muted = true
              await this._video.play()
            } catch (err: any) {
              this.$accessor.video.pause()
            }
        }
  1. on my touch device i can't 'drag' (eg. select text). i added onTouch events to onMouse events and it is working now. but im not sure if it is relay not working or it should work but my setup is broken. i did not test mobile devices.
  2. i also consider option to disable audio at all on client side. stat muted but also don't show muteOverlay, audio will be played on different device.

for first 3 items i have code ready so i can provide PR but first i want some comments if this have any sense and can be include it in main repo.

can anyone share your thoughts?

@m1k1o
Copy link
Owner

m1k1o commented Mar 24, 2023

Hi, for the first point, it was originally without those controls. Just recently they have been added. So there seems to be multiple usecases that are trying to fit under ?cast=1 feature.

  1. Hiding everything and showing only video (original usecase).
  2. Hiding GUI, only showing video but still providing control settings (to take control and go fullscreen, clipboard on unsupported browsers).

We could revert the usecase for ?cast=1 to be again, video only. And add new ?embed=1 when someone wants to embed neko. That would mean all controls would be collaped but they still could be accessed. That sould split both usecases.

For the point 2, that could be generally used in all cases. If the browsers support it.

3, we don't have touch support yet. Thanks for adding it!

For the point 4, there could be rather more generic flags that can be passed down in URL e.g. ?flags=disable_audio.

@urbanekpj
Copy link
Author

i submitted PR based on your comment.

  1. add embed mode and cast mode,
  2. autoplay with audio if possible, then fallback to muted, then fallback to paused
  3. i added disable_audio=1 i don't know what good practice is for flags in url query.

if more changes are needed please let me know.

@m1k1o
Copy link
Owner

m1k1o commented Mar 24, 2023

Thank you very much. It looks good. I'll review and test this tomorrow evening.

@m1k1o
Copy link
Owner

m1k1o commented Mar 25, 2023

@urbanekpj I merged two PRs. And there are some missing points for the remaining two PRs.

  1. disable_audio shoud actually disable audio, or we rename it to muted or voulme=<number>
  2. touch events use deprecated function and according to stack overflow should use { passive: false } attribute.

@urbanekpj
Copy link
Author

Hi i have other issue with reconnecting after server restart.
if url with user password was provided i expect that client will auto login without login form.

see #268 for proposed changes and discussion

@m1k1o
Copy link
Owner

m1k1o commented Mar 30, 2023

So i think this can be closed as other PRs have been merged.

@m1k1o m1k1o closed this as completed Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants