ubuntu-phone team mailing list archive
-
ubuntu-phone team
-
Mailing list archive
-
Message #22758
Re: WebContext.default[Audio | Video]CaptureDeviceId howto
Hi Olivier,
I added the mediaAccessPermissionRequested signal handler and now my
Audio/Video is working without having to deal with the properties directly.
Now I'm getting the Audio output on the loudspeaker (Rear Speaker) of the
phone (mako) but I would like to change it to the earspeaker (front).
Any hints on how to change that behavior? (note: When I used the
web-container approach I observed the same behavior)
Thanks!
Best Regards,
Felipe.
On Wed, Nov 2, 2016 at 3:29 PM, Felipe De La Puente <fdelapuente@xxxxxxxxx>
wrote:
> Hi Olivier,
>
> Thanks a lot for the help! I wasn't aware of these documentation pages, I
> was checking the webbrowser-app code to findout the properties that might
> be of help for my purpose...
>
> I definitely did nothing related to permissions so that's probably the
> root cause and my next step.
>
> I thought it was similar to C++ apps where I just used the location
> service and at the first attempt to use it the permissions popup appeared...
>
> I'll give it a try and come back with more details if it doesn't work.
>
> Best Regards,
> Felipe.
>
> On Wed, Nov 2, 2016 at 3:21 PM, Olivier Tilloy <
> olivier.tilloy@xxxxxxxxxxxxx> wrote:
>
>> On Tue, Nov 1, 2016 at 9:20 PM, Felipe De La Puente
>> <fdelapuente@xxxxxxxxx> wrote:
>> > Hi,
>> >
>> > I have been trying to create a minimal web-app by creating a Qml WebView
>> > using the default shared context plus some customization.
>> >
>> > My problem is that I can't make the Microphone nor Camera work.
>> >
>> > I have observed the following:
>> >
>> > 1. The defaultAudioCaptureDeviceId is empty by default
>> > 2. The defaultVideoCaptureDeviceId is empty by default
>> > 3. Independent of the Ids I set, I always get a Warning saying audio is
>> not
>> > implemented (see below)
>> > 4. The web-container is able to use the microphone and camera without
>> > issues, so there is a way to make it work, I just don't know how.
>> > 5. There are apparmor violations which could be related to the issue
>> > 6. I'm using the following policies: networking, audio, camera,
>> microphone,
>> > push-notification-client, video.
>> >
>> > So, the question is: What would be the recommended way to make it work?
>> >
>> >
>> > Thannks a lot for your help!
>> >
>> > Best Regards,
>> > Felipe.
>> >
>> > PS:
>> > The following is the debug output:
>> >
>> > Loading module: 'libubuntu_application_api_touch_mirclient.so.3.0.0'
>> >
>> > shm_open() failed: Permission denied
>> >
>> > qml: Loaded 11 UA override(s) from
>> > file:///usr/lib/arm-linux-gnueabihf/qt5/qml/Ubuntu/Web/ua-
>> overrides-mobile.js
>> >
>> > qml: Completed wv1
>> >
>> > qml: context.userAgent: Mozilla/5.0 (X11; Linux x86_64)
>> AppleWebKit/537.36
>> > (KHTML, like Gecko) Ubuntu Chromium/52.0.2743.116 Chrome/52.0.2743.116
>> > Safari/537.36
>> >
>> > qml: context.dataPath:
>> > file:///home/phablet/.local/share/wire-qmlweb.fdelapuente
>> >
>> > qml: context.cachePath: file:///home/phablet/.cache/wi
>> re-qmlweb.fdelapuente
>> >
>> > qml: context.defaultAudioCaptureDeviceId:
>> >
>> > qml: context.defaultVideoCaptureDeviceId:
>> >
>> > OxideQQuickWebContext: Cannot set hostMappingRules once the context is
>> in
>> > use
>> >
>> > OxideQQuickWebContext: devtoolsBindIp was set to an invalid value. It
>> must
>> > be set to a valid IPv4 or IPv6 address
>> >
>> > OxideQQuickWebContext: devtoolsPort was set to an invalid value. It
>> must be
>> > set between 1024 and 65535
>> >
>> > OxideQQuickUserScript: url is a construct-only parameter
>> >
>> > OxideQQuickUserScript: url is a construct-only parameter
>> >
>> > OxideQQuickUserScript: url is a construct-only parameter
>> >
>> > OxideQQuickUserScript: url is a construct-only parameter
>> >
>> > OxideQQuickWebContext::Cannot set sessionCookieMode once the context is
>> in
>> > use
>> >
>> > OxideQQuickWebContext: Cannot set maxCacheSizeHint once the context is
>> in
>> > use
>> >
>> > OxideQQuickWebContext:: Cannot set cachePath once the context is in use
>> >
>> > OxideQQuickWebContext: Cannot set dataPath once the context is in use
>> >
>> > [1101/170239:ERROR:layer_tree_host_impl.cc(2233)] Forcing zero-copy
>> tile
>> > initialization as worker context is missing
>> >
>> > Sdk-Launcher> There has been a AppArmor denial for your application.
>> >
>> > Sdk-Launcher> Most likely it is missing a policy in the AppArmor file.
>> >
>> > Syslog> Nov 1 17:02:39 ubuntu-phablet kernel: [28682.928291] type=1400
>> > audit(1478030559.561:439): apparmor="DENIED" operation="open"
>> > profile="wire-qmlweb.fdelapuente_Wire-qmlweb_0.1"
>> > name="/sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/reset_count"
>> pid=17581
>> > comm="Chrome_InProcGp" requested_mask="r" denied_mask="r" fsuid=32011
>> ouid=0
>> >
>> > Sdk-Launcher> There has been a AppArmor denial for your application.
>> >
>> > Sdk-Launcher> Most likely it is missing a policy in the AppArmor file.
>> >
>> > Syslog> Nov 1 17:02:39 ubuntu-phablet kernel: [28682.930489] type=1400
>> > audit(1478030559.561:440): apparmor="DENIED" operation="open"
>> > profile="wire-qmlweb.fdelapuente_Wire-qmlweb_0.1"
>> > name="/sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/reset_count"
>> pid=17581
>> > comm="Chrome_InProcGp" requested_mask="r" denied_mask="r" fsuid=32011
>> ouid=0
>> >
>> > Sdk-Launcher> There has been a AppArmor denial for your application.
>> >
>> > Sdk-Launcher> Most likely it is missing a policy in the AppArmor file.
>> >
>> > Syslog> Nov 1 17:02:39 ubuntu-phablet kernel: [28683.065572] type=1400
>> > audit(1478030559.701:441): apparmor="DENIED" operation="open"
>> > profile="wire-qmlweb.fdelapuente_Wire-qmlweb_0.1"
>> > name="/sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/reset_count"
>> pid=17581
>> > comm="Chrome_InProcGp" requested_mask="r" denied_mask="r" fsuid=32011
>> ouid=0
>> >
>> > Sdk-Launcher> There has been a AppArmor denial for your application.
>> >
>> > Sdk-Launcher> Most likely it is missing a policy in the AppArmor file.
>> >
>> > Syslog> Nov 1 17:02:39 ubuntu-phablet kernel: [28683.068410] type=1400
>> > audit(1478030559.701:442): apparmor="DENIED" operation="open"
>> > profile="wire-qmlweb.fdelapuente_Wire-qmlweb_0.1"
>> > name="/sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/reset_count"
>> pid=17581
>> > comm="Chrome_InProcGp" requested_mask="r" denied_mask="r" fsuid=32011
>> ouid=0
>> >
>> > Sdk-Launcher> There has been a AppArmor denial for your application.
>> >
>> > Sdk-Launcher> Most likely it is missing a policy in the AppArmor file.
>> >
>> > Syslog> Nov 1 17:02:39 ubuntu-phablet kernel: [28683.081168] type=1400
>> > audit(1478030559.711:443): apparmor="DENIED" operation="open"
>> > profile="wire-qmlweb.fdelapuente_Wire-qmlweb_0.1"
>> > name="/sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/reset_count"
>> pid=17581
>> > comm="Chrome_InProcGp" requested_mask="r" denied_mask="r" fsuid=32011
>> ouid=0
>> >
>> > Sdk-Launcher> There has been a AppArmor denial for your application.
>> >
>> > Sdk-Launcher> Most likely it is missing a policy in the AppArmor file.
>> >
>> > Syslog> Nov 1 17:02:39 ubuntu-phablet kernel: [28683.081381] type=1400
>> > audit(1478030559.711:444): apparmor="DENIED" operation="open"
>> > profile="wire-qmlweb.fdelapuente_Wire-qmlweb_0.1"
>> > name="/sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/reset_count"
>> pid=17581
>> > comm="Chrome_InProcGp" requested_mask="r" denied_mask="r" fsuid=32011
>> ouid=0
>> >
>> > ubuntumirclient: Attempted to deliver an event to a non-existent window,
>> > ignoring.
>> >
>> > Sdk-Launcher> Stopping Application
>>
>> Hi Felipe,
>>
>> It would be useful if we could see your code.
>>
>> You might want to check the documentation for the
>> 'defaultAudioCaptureDeviceId' property at
>> http://people.canonical.com/~chrisccoulson/oxide-documentati
>> on/qml-com-canonical-oxide-webcontext.html#defaultAudioCa
>> ptureDeviceId-prop.
>>
>> In theory there is no need to set the default capture device.
>>
>> Could it be that you didn’t wire up the mediaAccessPermissionRequested
>> signal on your webview? This is required to allow camera/microphone
>> capture in the first place. See
>> http://people.canonical.com/~chrisccoulson/oxide-documentati
>> on/qml-com-canonical-oxide-webview.html#mediaAccessPermis
>> sionRequested-signal
>> for documentation.
>>
>> HTH,
>>
>> Olivier
>>
>
>
Follow ups
References