Skip to content

video element from camera not in focus #7355

Description

@Crivella

Home Assistant Android app version(s):

2026.6.5-full

Android version(s):

12

Device model(s):

Galaxy S10e

Home Assistant version:

2026.5.4

Last working Home Assistant release (if known):

Description of problem, include YAML if issue is related to notifications:

Sorry in advance if the issue is not with the app.
I am trying to debug why the barcode reader implemented in https://github.com/blaineventurine/simple-inventory-card is not properly focusing.

The reason i suspect the app's WebView being involved is that the the camera stream works fine if i open it from the browser (both on desktop with a webcam and on the phone) but from the app i get a blurry image (still visible but not focused enough for the barcode reader to do its job).

i repost here my attempt to debug this from blaineventurine/simple-inventory-card#59 (comment) where i see that in the videoElement.srcObject.getVideoTracks()[0].getCapabilities() only the manual is advertised as a focusMode

video element details

> ({
  resolution: [$0.videoWidth, $0.videoHeight],
  settings: $0.srcObject.getVideoTracks()[0].getSettings()
})

{
    "resolution": [
        1080,
        1920
    ],
    "settings": {
        "aspectRatio": 0.5625,
        "colorTemperature": 0,
        "deviceId": "33732aea93b8dfdcccc4e12808ee6ab86afa7c2e2053e867ebd89448ccdb8750",
        "exposureCompensation": 0,
        "exposureMode": "continuous",
        "exposureTime": 0,
        "facingMode": "environment",
        "focusDistance": 0,
        "focusMode": "continuous",
        "frameRate": 10,
        "groupId": "58cbef99395df8b9e30ed27dabca4efdda44e98993409325d3d2687ea8eb7802",
        "height": 1920,
        "iso": 0,
        "resizeMode": "none",
        "whiteBalanceMode": "continuous",
        "width": 1080
    }
}

video element capabilities

> $0.srcObject.getVideoTracks()[0].getCapabilities()

{
    "aspectRatio": {
        "max": 4608,
        "min": 0.00028935185185185184
    },
    "colorTemperature": {
        "max": 7000,
        "min": 2850,
        "step": 50
    },
    "deviceId": "444a21636d3ee0d41f1e2325d24b610c9b4876400035bdd1655287370ac706dc",
    "exposureCompensation": {
        "max": 2,
        "min": -2,
        "step": 0.10000000149011612
    },
    "exposureMode": [
        "continuous",
        "manual"
    ],
    "exposureTime": {
        "max": 1000,
        "min": 0.6,
        "step": 0.1
    },
    "facingMode": [
        "environment"
    ],
    "focusDistance": {
        "max": 9223372036854776000,
        "min": 0,
        "step": 0.009999999776482582
    },
    "focusMode": [
        "manual"
    ],
    "frameRate": {
        "max": 60,
        "min": 0
    },
    "groupId": "13c7b9cbaef3bbc60a4de22ab4a4cb322e57771aa50cac086b4b07add6359e4b",
    "height": {
        "max": 3456,
        "min": 1
    },
    "iso": {
        "max": 800,
        "min": 40,
        "step": 1
    },
    "resizeMode": [
        "none",
        "crop-and-scale"
    ],
    "whiteBalanceMode": [
        "continuous",
        "manual"
    ],
    "width": {
        "max": 4608,
        "min": 1
    }
}

Companion App Logs:

Screenshot or video of problem:

Additional information:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingwebview

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions