mpv-android / mpv-android

#mpv-android @ libera.chat
MIT License
1.84k stars 229 forks source link

How to turn off the default UI? #923

Closed ahaoboy closed 2 weeks ago

ahaoboy commented 2 weeks ago

It seems that the default UI is not osc of mpv? Turning off osc in the mpv.conf does not take effect

osc = no
sfan5 commented 2 weeks ago

Correct, you can't turn it off.

ahaoboy commented 2 weeks ago

Correct, you can't turn it off.

Is it possible to provide a compilation option to turn it off? I am trying to use js to implement a cross-platform UI similar to uosc, so the default is not needed

sfan5 commented 2 weeks ago

You would have to remove all UI code from MPVActivity. Still then an OSC would not work because touch interactions don't get passed through to libmpv.

ahaoboy commented 2 weeks ago

touch interactions don't get passed through to libmpv.

That's a pity, only need to support touch events to achieve basic functions

ahaoboy commented 2 weeks ago

I tried running the project once and it went smoother than expected. At least the UI part can be rendered normally. It may be necessary to support the vertical preview mode. Those who are interested can download and experience it, https://github.com/mpv-easy/mpv-easy/releases/download/v0.1.6-alpha.27/mpy-easy-android.zip

The first problem I encountered was that I used a special font to display the icon, but it was obviously not found, so the anim4k shader could not be found either.

mpv-easy

d532e127018272edecbb4295efdcc33e

android mix mpv-easy

923d69724851e4f68d201657f91c9552

mpv-easy-demo

It's just a click-and-click interaction, which should do about 60% of the work. 923d69724851e4f68d201657f91c9552

ahaoboy commented 2 weeks ago

@sfan

I have two questions I would like to ask. I would be grateful if you could answer.

  1. Is it possible to turn off the ui in MPVActivity by adding a switch in the settings without deleting the code? I'm not familiar with Android, so I don't know if this configuration can modify the runtime code.
  2. Are mpv's interaction events not received by mpv because they are captured on android ? , or does mpv itself not support android click events ?
sfan5 commented 2 weeks ago
  1. Is it possible to turn off the ui in MPVActivity by adding a switch in the settings without deleting the code?

Possible, definitely. But I wouldn't say that it makes much sense in the big picture.

Are mpv's interaction events not received by mpv because they are captured on android ? , or does mpv itself not support android click events ?

libmpv does not support any kind of input events on Android. So any input events have to be passed through by adding support code to MPVActivity or MPVView.

ahaoboy commented 2 weeks ago

Thanks for the very nice project, it doesn't seem to be easy, seems like I can only wait for someone else to solve the problem