I would like an option to minimize a webxdc app to a smaller part of the screen where it stays launched instead of closing it fully when I quickly reply to a message somewhere else in the app before opening the webxdc app again.
Discord Activities are able to do this. They have two buttons, a “leave” button which closes the activity and a button to minimize which moves the activity to a small (moveable) window that is shown over the rest of the app, so you can interact with other parts of the app without closing the activity.
This is only an issue on mobile as on desktop the webxdc app pops out to a new window.
Telegram minimizes mini apps to a tab switcher on the bottom of the app screen, could be an alternative ui for this. Though pop-out ui is probably prettier and would also be nice to have for videos (depending on UI implementation we could reuse code for both features).
I was already thinking of using the native Picture in Picture api on iOS for the webxdc part and that can be used for videos too.
This adds some complication to our background logic though because PiP can continue when your app backgrounds and that is fine with videos but for webxdc apps we’d need the io to stay open for the realtime of the webxdc.
Maybe we can make it so that webxdc PiP closes when you exit the app but I’m thinking it would be kinda cool to be able to have it on the screen permanently. In that case webxdc apps could very easily do something like: Top Clock - Floating Clock on the App Store