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

Android stops background audio when any video stream loads #1720

Open
Loic691 opened this issue Dec 9, 2024 · 5 comments
Open

Android stops background audio when any video stream loads #1720

Loic691 opened this issue Dec 9, 2024 · 5 comments
Labels
question Further information is requested

Comments

@Loic691
Copy link

Loic691 commented Dec 9, 2024

Checklist:

[REQUIRED] Card diagnostic information:

card_version: 6.0.0
browser: >-
  Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like
  Gecko) Chrome/131.0.0.0 Safari/537.36
date: 2024-12-09T07:57:27.346Z
lang: fr
timezone: Europe/Paris
git:
  hash: '4590558'
  build_date: Mon, 09 Dec 2024 00:16:17 GMT
  commit_date: Sun, 8 Dec 2024 16:05:13 -0800
ha_version: 2024.12.1
integrations:
  reolink:
    detected: true
  frigate:
    detected: true
    version: 5.5.1
    devices:
      772d8e2890c52f6f536c5cbe86b1c920: 5.5.1/0.14.1-f4f3cfa
  hass_web_proxy:
    detected: false
  motioneye:
    detected: true
config:
  type: custom:frigate-card
  cameras:
    - camera_entity: camera.frigate_doorbird
      live_provider: go2rtc
      go2rtc:
        modes:
          - webrtc
        stream: interphone-webrtc
      image: {}
  live:
    preload: true
    controls:
      thumbnails:
        mode: none
      builtin: false
    show_image_during_load: true
  view:
    default: live
    interaction_seconds: 120
  menu:
    style: overlay
    buttons:
      frigate:
        enabled: true
      cameras:
        enabled: false
      substreams:
        enabled: false
      live:
        enabled: false
      clips:
        enabled: false
      timeline:
        enabled: false
      snapshots:
        enabled: false
      microphone:
        enabled: false
      mute:
        enabled: false
    position: right
  media_gallery:
    controls:
      filter:
        mode: left
  media_viewer:
    controls:
      builtin: false

and

card_version: 6.0.0
browser: >-
  Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like
  Gecko) Chrome/131.0.0.0 Safari/537.36
date: 2024-12-09T08:00:28.949Z
lang: fr
timezone: Europe/Paris
git:
  hash: '4590558'
  build_date: Mon, 09 Dec 2024 00:16:17 GMT
  commit_date: Sun, 8 Dec 2024 16:05:13 -0800
ha_version: 2024.12.1
integrations:
  reolink:
    detected: true
  frigate:
    detected: true
    version: 5.5.1
    devices:
      772d8e2890c52f6f536c5cbe86b1c920: 5.5.1/0.14.1-f4f3cfa
  hass_web_proxy:
    detected: false
  motioneye:
    detected: true
config:
  type: custom:frigate-card
  cameras:
    - camera_entity: camera.frigate_cour
      live_provider: go2rtc
      go2rtc:
        modes:
          - webrtc
        stream: cour-webrtc-sub
      webrtc_card: {}
    - go2rtc:
        modes:
          - webrtc
        stream: cour-est-webrtc-sub
      dependencies:
        all_cameras: false
      camera_entity: camera.frigate_cour_est
      live_provider: go2rtc
    - camera_entity: camera.frigate_terrasse
      go2rtc:
        modes:
          - webrtc
        stream: terrasse-webrtc-sub
      live_provider: go2rtc
  view:
    default: live
    interaction_seconds: 120
    triggers:
      actions:
        trigger: live
      filter_selected_camera: false
    default_cycle_camera: true
    default_reset:
      every_seconds: 3
  menu:
    style: overlay
    buttons:
      frigate:
        enabled: true
      cameras:
        enabled: false
      substreams:
        enabled: false
      live:
        enabled: false
      clips:
        enabled: false
      timeline:
        enabled: false
      snapshots:
        enabled: false
      mute:
        enabled: true
    position: right
  media_gallery:
    controls:
      thumbnails:
        size: 160
        show_details: false
  live:
    preload: true
    controls:
      thumbnails:
        mode: none
      builtin: false
  media_viewer:
    controls:
      builtin: false

[REQUIRED] Description of problem:

On Android Device, when I launch Dashbord with these two frigate cards, Audio of other applications (Deezer, Spotify or all others one) are shutted off while camera are muted. So I have to re launch my other audio Application (eg Deezer).
I'm not understanding why music audio stream are replaced by HA Frigate Audio; The camera are all muted.
Strange things, the real streams of the camera are been muted because I heared no sounds from the camera. I have to click on the unmute button off frigate card to hear the sound...

[OPTIONAL] Last working release (if known):
No last working.
If I'm using standard viewer (no webrtc), audio music app are not shut while launching HA frigate Dahsboard

@Loic691 Loic691 added the bug Something isn't working label Dec 9, 2024
@dermotduffy
Copy link
Owner

[REQUIRED] Description of problem:

Would you mind including a description of the problem? Specifically what you expect to happen, and what you see happening. Right now, can't tell what the issue is.

@dermotduffy dermotduffy added question Further information is requested and removed bug Something isn't working labels Dec 10, 2024
@Loic691
Copy link
Author

Loic691 commented Dec 10, 2024

[REQUIRED] Description of problem:

Would you mind including a description of the problem? Specifically what you expect to happen, and what you see happening. Right now, can't tell what the issue is.

Oh sorry, the description was commented on the ticket. Right now

@dermotduffy
Copy link
Owner

The card does not control what Android chooses to do -- at most it can influence it.

I just tested this out with an empty dashboard, a standard picture-glance card (i.e. not this card) and my own Android device -- once there is a video stream, Android will pause background music automatically. If it's a stream of images (e.g. live_provider: image in this card) it will not pause the audio, perhaps that is a workaround. But so far, I'm not sure this is a problem the card can do anything about. Have you ever seen this work otherwise in a HA dashboard? Perhaps there is something we can learn.

@dermotduffy dermotduffy changed the title Frigate Card shutting off music audio on Android Device Android stops background audio when any video stream loads Dec 10, 2024
@Loic691
Copy link
Author

Loic691 commented Dec 10, 2024

Thanks,
My previous dashboard use standard card (not frigate card) and the video stream was ok with default mute audio. So dashboard not pause background audio (ie music).
With frigate card, the video stream with webrtc is ok and the camera are all mute. But the dashboard pause the audio background music in 100% of cases. I so have a blank sound because camera are muted.
It's binding because launching HA app cause playback music off.... (my Default dashboard have a frigate card... wich switch all cameras) in the house but in the car also.

@dermotduffy
Copy link
Owner

dermotduffy commented Dec 10, 2024

My previous dashboard use standard card (not frigate card) and the video stream was ok with default mute audio.

I tested this today. The background music was also paused even with the standard picture-glance card, when the glance card is configured to play the video stream (and not just show images).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants