Interface autoconnect "camera" request for VLC snap

Hello,

Requesting store autoconnect for “camera” interfaces for a VLC snap, since a few users complained on IRC it wasnt working for them after installing it from the store.

Thank you,

My understanding is that vlc needs the camera interface for TV capture. On the other hand, as a user it is surprising that a player would also be able to record. I suggest instead that vlc detect the situation and alert the user what needs to be done (remmina does something similar). -1 to auto-connect.

@reviewers - can some/all of you vote?

1 Like

Here’s an example of implementing such detection in a launcher:

I agree (-1 for auto-connect) however if we are going to recommend every app tries detect whether interfaces are connected on launch, and if not the app prompts the user to connect it - then why not just bake this into snapd? Otherwise every app will duplicate a bunch of code and do this in slightly different ways with different UI patterns etc - if we think this is the Right Way To Do It™ then why not have a common consistent implementation in snapd (which could also provide a command-line version of prompting for interface connection for non-gui apps too?).

However, personally I think this is not the right approach - better to have snapd watch apparmor etc for denials (currently this could be just watching syslog but in the future this could be via AppArmor notifications when that lands) and then match these denials against interfaces (in the same manner as snappy-debug) so it can know, app tried to do action X which needed interface A, so we can intelligently prompt the user in a contextually sensitive manner that a particular interface is required to be connected at the time it is needed, rather than at application launch time.

1 Like

Maybe we should force the publisher to specify the reason of connecting an interface in the snapcraft.yaml and present to the user when necessary:

plugs:
  system-observe:
    critical: yes
    reasoning: For the application to read _something_, the application will crash if this interface is not connected.
  removable-media:
    critical: no
    reasoning: For saving your file in /media or /mnt

My understanding is that vlc needs the camera interface for TV capture. On the other hand, as a user it is surprising that a player would also be able to record.

Not only a TV, but all sorts of V4L-capable devices, be it your web camera, TV dongle or a capture card.
Recording the streams wherever they come from, transcoding and re-streaming is a very popular use case for VLC, although I agree it might be unexpected for the unfamiliar crowd.

Doing the detection and showing the user yet another warning window looks like a hack at best.

Thank you Lin-Bu-Ren, but that seems excessive to show that kind of warning to every user launching VLC…

Well you can always make it an one time event by creating an ‘I showed it to you’ marker file. Also the current detection only shows the warning if the user has such kind of device connected.

0 votes for, 2 against. Not granting auto-connection at this time.

Perhaps there is a way that when trying to perform a TV capture or similar, VLC could handle the error and surface to the user that the interfaced needs to be connected?

1 Like