@arubislander From my reading of the documentations I couldn't figure out any formal way to configure the Multimedia support in "docker run" command but I did something hackish and got camera working in clickable desktop. Audio devices were already accessible in the docker.
Under by Home directory I found the place where the clickable python scripts are installed.
In there I searched further and found the script "commands/docker/multimedia_support.py"
Here I found the audio device(dev/snd) was already being made accessible to the docker container through the config hard coded here.
So I edited the code in this file, to pass my camera devices also in the key-value list passed into docker_config.volumes.update method.
Then I re-run my app and Voila! camera access started working in my app.
From clickable.log I could see the key-value pairs passed in here are coming out in the docker run
command executed while launching app as volumes to be mounted(-v arguments).
Thanks for your support.
rineez
@rineez
Software Developer since 2009
Livares Technologies
Best posts made by rineez
-
RE: Is it possible to make laptop camera available to app running in "clickable desktop"
-
RE: Is it possible to make laptop camera available to app running in "clickable desktop"
@arubislander I'm not sure. I suspect the name of video device can change for different environments. Some environments may not even have a camera, and I haven't yet tested for negative side effects of putting a non-existing device there.
I'm thinking I may have to write some additional code to detect camera devices in the environment to make it into a PR suitable for all users. I'll try to figure out though.Thanks for the encouragement
Latest posts made by rineez
-
RE: Is it possible to make laptop camera available to app running in "clickable desktop"
@arubislander I'm not sure. I suspect the name of video device can change for different environments. Some environments may not even have a camera, and I haven't yet tested for negative side effects of putting a non-existing device there.
I'm thinking I may have to write some additional code to detect camera devices in the environment to make it into a PR suitable for all users. I'll try to figure out though.Thanks for the encouragement
-
RE: Is it possible to make laptop camera available to app running in "clickable desktop"
@arubislander From my reading of the documentations I couldn't figure out any formal way to configure the Multimedia support in "docker run" command but I did something hackish and got camera working in clickable desktop. Audio devices were already accessible in the docker.
Under by Home directory I found the place where the clickable python scripts are installed.
In there I searched further and found the script "commands/docker/multimedia_support.py"
Here I found the audio device(dev/snd) was already being made accessible to the docker container through the config hard coded here.
So I edited the code in this file, to pass my camera devices also in the key-value list passed into docker_config.volumes.update method.
Then I re-run my app and Voila! camera access started working in my app.
From clickable.log I could see the key-value pairs passed in here are coming out in thedocker run
command executed while launching app as volumes to be mounted(-v arguments).
Thanks for your support. -
RE: "Unable to detect a web browser" when loading iframe in Clickable HTML app
@arubislander Ah! That makes total sense now. Thanks.
-
RE: "Unable to detect a web browser" when loading iframe in Clickable HTML app
@rineez This is now working well to load iframe.
Though I don't really understand why the HTML app was trying to find a browser to open the iframe, because I have been imagining the HTML app is actually being loaded inside some kind of WebView component(browser engine) internally.
Now I see I must have been misunderstanding how it works. So I would love to know a bit more about how the HTML app template actually works in clickable. -
RE: "Unable to detect a web browser" when loading iframe in Clickable HTML app
@arubislander Thanks a lot. I'll give it a try and come back soon
-
RE: Is it possible to make laptop camera available to app running in "clickable desktop"
@arubislander Thanks for the direction. Is there some way to customize the docker run command used by clickable to start the underlying container?
I have seen some other docker related post that suggest --device= parameter can be passed to "docker run" command to map a device of the host into the container.
For example, this SO thread https://stackoverflow.com/questions/34302096/sharing-devices-webcam-usb-drives-etc-with-docker -
Is it possible to make laptop camera available to app running in "clickable desktop"
I made an HTML+JS app that tries to access device camera. I'm trying to test this app using "clickable desktop" command. But it seems the clickable's container environment is not able to detect my laptop camera/mic etc when I query for media devices using javascript
navigator.mediaDevices.getUserMedia()
. Is it possible to test camera access in clickable desktop environment? -
"Unable to detect a web browser" when loading iframe in Clickable HTML app
I'm just getting started in ubuntu touch development and the clickable environment.
I am trying to create a React app that loads a part of its major features in an iframe.(The fact that I'm using react is probably irrelevant here because it is just static html+js when it is deployed)
Currently I'm testing it in an ubuntu desktop environment(20.04.1) using "clickable desktop" command.
I was able to compile my react app as a static HTML app and it is running as expected when I open my index.html in a normal browser.
Then I created a clickable app using the HTML option and placed my react app's build inside the www directory of the clickable app.
Then I run it using "clickable desktop" command.
The app actually loads and my normal react components are working. But the React component that loads iframe is failing. This react component basically loads another web page inside the iframe.
When my clickable app tries to load this iframe it is failing with the following error in the terminal window:
Unable to detect a web browser to launch <followed by the url being loaded in iframe>To demonstrate my case I have prepared an example code in my github repo:
https://github.com/rineez-livares/clickable-iframe-demoIt is trying to load google search in iframe as an example.
You can try opening the www/index.html file in your browser and it will work. But in "clickable desktop" environment it shows error like:
Unable to detect a web browser to launch 'https://www.google.com/search?igu=1&channel=fs&client=ubuntu&q=test'