How to prevent media playback (video/audio) from pausing when Capacitor app is backgrounded?

I am building a Capacitor app that includes media playback (YouTube embeds and standard <video> tags). However, as soon as the app is minimized or the screen is locked, the playback stops immediately.

I’ve noticed this happens with both YouTube iframe embeds and local/remote files in the <video> tag.

My Questions:

  1. Is there a way to prevent the Webview from suspending when media is playing?

  2. Are there specific Capacitor plugins or native configurations (Xcode/Android Manifest) required to enable “Background Audio” or “Background Media” support?

  1. No
  2. No

you would need to create custom plugin that would sound like hell to make a WebView into a widget. to be honest, not worth time.

Here are some audio options

EDIT

Oops, didn’t read your entire OP :grimacing:. You were asking mostly about video. Not sure on that.

thanks i was able to do this with seperate webview play perfetcly in background but position the webview to display properly was not fit.