← Back to team overview

ubuntu-phone team mailing list archive

Re: Browser audio will stop if screen is locked or app is switched

 

Still trying to make audio available to `qmlscene` (as alternative to
`webapp-container`).

2016-03-04 9:39 GMT+01:00 Olivier Tilloy:
> All the --enable-media-hub-audio parameter does in the webapp
> container is set the value of the OXIDE_ENABLE_MEDIA_HUB_AUDIO
> environment variable to 1. AFAIK there’s no way to do that in pure
> QML, but with a lightweight C++ wrapper for your app, you could

Is there no easier way to provide an environment variable, other than
creating a C++ binary?

I've tried the following in the web app's .desktop file, unfortunately
all without success:

   Exec=OXIDE_ENABLE_MEDIA_HUB_AUDIO=1 qmlscene %u qml/Main.qml

   Exec=bash -c "OXIDE_ENABLE_MEDIA_HUB_AUDIO=1 qmlscene %u qml/Main.qml"

   Exec=python3 -c "import
os;os.environ['OXIDE_ENABLE_MEDIA_HUB_AUDIO']='1';os.system('qmlscene
%u qml/Main.qml')"

For comparison, this is the original, working Exec line in the .desktop file:

   Exec=qmlscene %u qml/Main.qml

Do I really have to provide an (architecture dependent) binary?
Peter


Follow ups

References