nova-video-player / aos-AVP

NOVA opeN sOurce Video plAyer: main repository to build them all
Apache License 2.0
3.13k stars 188 forks source link

Not work volume indicator #493

Closed wsnake65 closed 3 days ago

wsnake65 commented 2 years ago

Not work volume indicator on Android TV (Android 9, Amlogic s922x)

Not work volume indicator_2

courville commented 2 years ago

Could you please disclose the tv box hardware you are using? It appears to me that it is not detected as and android TV box.

wsnake65 commented 2 years ago

Could you please disclose the tv box hardware you are using? It appears to me that it is not detected as and android TV box.

Box Zoomtak King S22 on Amlogic-S922X Initially firmware android 9 pie. Now modified firmware and added mod for Android TV (Loncher ATV, Google Market ATV and applications). But apparently still identified as ordinary android 9, not ATV. Although Google Market ATV understands the device as ATV and applications offer appropriate.

18-10-2021 13-04-33_2

18-10-2021 14-21-14_3

18-10-2021 14-27-54_2

wsnake65 commented 2 years ago

As an option: Can you add the device type selection in the application settings? Or selection interface TV / tablet / smartphone.

arikoza commented 2 years ago

Problem only 320 dpi

wsnake65 commented 2 years ago

Please fix it. 320dpi is standart resolution for Android TV interface (for tvbox and TV 1920*1080).

courville commented 2 years ago

Why do you state that the problem is 320dpi? This tests determines if this is indeed an AndroidTV:

    public static boolean isAndroidTV(Context ct) {
        // false on chromeos
        UiModeManager uiModeManager = (UiModeManager) ct.getSystemService(Context.UI_MODE_SERVICE);
        boolean isATV = (uiModeManager.getCurrentModeType() == Configuration.UI_MODE_TYPE_TELEVISION);
        if (DBG) Log.d(TAG, "isAndroidTV: " + isATV);
        return isATV;
    }

My current understanding is that the modded firmware used does not comply entirely in the UI mode type television... Please correct me if I am wrong.

courville commented 2 years ago

Can you please detail how you launch the video (inside nova, from a file browser, provide video if not clear)? Are you using CEC to control the TV volume (grayed volume bar would be a symptom)? Presence of volume bar come from non certified android TV box probably.

wsnake65 commented 2 years ago

With resolutions below or above 320dpi slider volume control appears. The switching on or off CEC does not affect it. My tvbox - non certified android TV box. My modded firmware comply entirely (I think so) in the UI mode type TV box with Android TV 9. I have an android TV box with android TV 9 - not TV. The volume slider does not work only in Nova 320 dpi (for example, in VLC or VIMU players, their volume slider works). If it is so difficult to fix it, you will have to use the built-in android TV slider volume :-)

ydrob commented 2 years ago

I can confirm, I have redbox 6 mini and the same behavior with volume slider on the latest version (v6.0.65)

courville commented 1 year ago

I can reproduce the issue on the emulator (mac M1 arm64 one API31) now. It happens indeed on 320dpi.

adb shell wm size
-> Physical size: 1920x1080
adb shell wm density
-> Physical density: 320

It is linked on layout-sw500dp-notouch assets not matched.

PlayerController: getResources().getConfiguration()={1.0 ?mcc?mnc [en_US] ldltr sw540dp w960dp h540dp 320dpi lrg long land television night finger qwerty/v/v dpad/v winConfig={ mBounds=Rect(0, 0 - 1920, 1080) mAppBounds=Rect(0, 0 - 1920, 1080) mMaxBounds=Rect(0, 0 - 1920, 1080) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=standard mAlwaysOnTop=undefined mRotation=ROTATION_0} s.2 fontWeightAdjustment=0}

cf. https://developer.android.com/guide/topics/resources/providing-resources#AlternativeResources

yaoyao5128 commented 7 months ago

I may have encountered the same problem. The volume bar does not display properly during video playback. However, the volume bar that comes with the TV can be displayed normally on the nova main interface and file information interface. Please see screenshot.

MITVScreenshot_630_1701147188053-org courville nova-com archos mediacenter video player PlayerActivity-33e2526097123c0599c3a2afd131fd82

MITVScreenshot_630_1701147210547-org courville nova-com archos mediacenter video leanback details VideoDetailsOverlayActivity-0f0708f2d39f762ef924219e22cc3add

My device model: MiTV4A on Android 6.0

courville commented 7 months ago

Volume on AndroidTV can be different from a phone. Nova displays the "soft volume". On AndroidTV, volume from the box can be always 100% and managed through the tv master volume (using sometimes CEC with visual feedback).

The nova volume slider should not be displayed.

Sadly with the emulator I cannot reproduce anymore.

yaoyao5128 commented 6 months ago

The volume bar can be displayed normally on 6.2.44 (〃'▽'〃).

courville commented 6 months ago

Can the issue be closed then?

yaoyao5128 commented 6 months ago

Yes, I think it can be closed.