Autoconnect for UltraStar WorldParty

Hi! I want to request all connections for the game UltraStar WorldParty
Only 5 of 14 connections have a slot but all of them are nedded

Interfaz           Enchufe                                 Ranura           Notas
alsa               ultrastar-worldparty:alsa               -                -
audio-playback     ultrastar-worldparty:audio-playback     :audio-playback  -
audio-record       ultrastar-worldparty:audio-record       -                -
bluetooth-control  ultrastar-worldparty:bluetooth-control  -                -
bluez              ultrastar-worldparty:bluez              -                -
camera             ultrastar-worldparty:camera             -                -
home               ultrastar-worldparty:home               :home            -
joystick           ultrastar-worldparty:joystick           -                -
network            ultrastar-worldparty:network            :network         -
opengl             ultrastar-worldparty:opengl             :opengl          -
pulseaudio         ultrastar-worldparty:pulseaudio         -                -
raw-usb            ultrastar-worldparty:raw-usb            -                -
removable-media    ultrastar-worldparty:removable-media    -                -
x11                ultrastar-worldparty:x11                :x11             -

It’s a karaoke similar to SingStar of PlayStation, that use songs stored in any place of the hard disk, need record the audio to know if the player are singing good or not, can be used with a usb or bluetooth joystick and the camera image can be use as background intead of video song.
Internet connection are used to connect to the official website to send and receive scores.
Tell me if you need more info.

@TeLiXj apologies for the delay in responding to this request.

Can you detail more why alsa and pulseaudio are needed when the snap already plugs audio-playback and audio-record?

Based on the description of this snap, it is obvious that it would require audio-record and the idea of using a joystick for control seems reasonable given the TV experience this snap aims to offer, so +1 from me on these.

Is it common for users to use a bluetooth joystick? If I were installing this snap I think I would be surprised to see that it automatically had control over the whole bluetooth stack - so -1 from me for that.

Finally, I also don’t see a good reason for this snap to require camera as no-where in the description is this mentioned about using the camera. And lastly, can you details more why you think raw-usb or removable-media are required?

Hi Alex!

alsa and pulseaudio are needed simply because audio record don’t work in all cases without them. This program is usually used with external microphones and have a not very good implementation of sound capture in Object Pascal and SDL2, many parts are mixed with SDL and old Portaudio libraries. I changed it to use only a FFMpeg layer to do it and now works fine in most cases.

It’s common to use a Wiimote, XBOX, PSX or Steam Controller with a bluetooth keyboard to play in parties. The raw-usb is needed to use this controllers connected with a USB cable, at least I tried with a Nintendo Switch and a PS3 controllers.

I described the camera use in my first message: in every song you have a video on the background, but you can change it to see your camera. In future releases we will introduce more uses for it, for example to take avatar photo for the players.

And finally the removable-media is used to load songs from a removable device. It’s very common that have all songs in a external hard disk because they take many GB. It’s fails too loading songs from a NFS folder, but I didn’t find what I need to add to allow it.

Thanks for your time.

the audio-playback and audio-record interfaces are simply the deprecated pulseaudio interface split in two halves, having the audio-* ones and pulseaudio is redundant …

regarding alsa, did you try ? that should help having alsa transparently routed though the audio-* interfaces so you do not need the plug (in the majority of cases at least)

it might work through removable-media if you mount it under /mnt or /media…

Hi @TeLiXj, thanks for the extra information provided.

Regarding pulseaudio, the explanation provided by @ogra (i.e. the interface is deprecated and should not be needed) is also documented here in case you have further questions. And regarding alsa, I will add that the auto-connection is limited to snaps requiring low-level, direct access to audio devices (which is not this case) as explained here and here as well. Thus, I am -1 to auto-connect pulseaudio and alsa. But, could you please try again using a clean environment where only audio-* interfaces are used and let us know if you still experience issues?.

I am also -1 for auto-connect removable-media and bluetooth-control. If auto-connect for removable-media is granted, this snap will have unrestricted access to all data from any plugged media. I believe the user voice on granting such access is very important due to the sensitiveness of the documents he/she might store there (and also the snap can keep working normally without it). And as also explained by @alexmurray, auto-connecting bluetooth-control allows managing the kernel Bluetooth stack which is a capability not really needed by this snap. Your snap can guide the users to manually connect these interfaces by using snapctl is_connected <iface> to check to see if it is connected and appropriately prompt them with instructions if needed. Further information can be found here

+1 for me for auto-connect of raw-usb to be able to use USB controllers while playing this karaoke snap. And I am also +1 for auto-connect of camera but could you please update your snap description so the user is aware of such access?

+1 from me for also auto-connect of audio-record and joystick for ultrastar-worldparty since are clearly needed for the snap to properly operate. +2 votes for, 0 votes against. Since we have enough votes for these 2, granting auto-connect of audio-record and joystick to ultrastar-worldparty snap. This is now live.

Hi again! Sorry for my delayed answer.

I’ve tried removing alsa and pulseaudio and seems work fine only with audio-* plugs because I’ve been using alsa-mixin before my first message and have doing his jobs as expected.

I’ve removed too bluetooth-control because isn’t necessary as you say.

The camera and joystick use are now in the description to give more info to users.

Finally, the removable-media is allowed in this case:

media (eg, sound, photo, video) players/viewers (rationale: the software is very often used to import/preview/playback files on external devices)

that is just the case of this game that play video and audio files to sing.
The songs are composed by a folder with a info txt that contains the name of the audio, video and cover sources in the same route. Example song folder:

artist - song
  | artist - song.txt
  | artist - song.mp3
  | artist - song.mp4
  | artist - song.jpg

To load songs, the game only try to find the txt files that contains the info in the folders that are manually added by the user in the config. By default only check the snap game folder.
And as I said in my last message, is very very common use an external device to store all songs because it’s easy to have thousand of GB of them.

1 Like

Hey @TeLiXj,

Thanks for the update.

So the only 3 auto-connection pending requests are: raw-usb, camera and removable-media. Can other @reviewers please vote?


My votes are:
+1 for removable-media.
-1 for camera (I think for privacy reasons, users should choose to connect this if they like, especially since camera functionality is not the primary usecase for the application).
+1 for raw-usb for controllers.

The users (and me before create this snap) don’t know that snaps have permissions and now are downvoting the snap because don’t work without all of them. I need the camera too, it’s only activated after user explicit interaction setting ON in the config or pressing a key when singing.
I think that privacy reasons can’t be applied if isn’t activated automatically and are obvious that is active, because you can see the images captured in the background when you are singing.

Do you have an explicit notification or explanation to users about the camera functionality somewhere in the application startup or usage flow?

No, it’s a game. It don’t have explanations for anything and I think that isn’t needed, it’s very obvious the camera function when you play it.

Hey @TeLiXj apologize for the delay.

We understand your use case but the auto-connection of the camera means indeed a privacy concern and is one of the reasons why 1) it is not auto-connected by default 2) this process to grant it exists. I strongly believe ultrastar-worldparty snaps users will be even more happy with it if they know its publisher is taking care of their privacy :).

Thus, since the voting process is not finished yet, could you please add a further explanation in the snap description about the camera access and its usage? We can see you added something but it is still very brief. I also suggest you explain to the snap users (in case they don’t know as you are saying) how they can manually connect the interfaces and enjoy this game meanwhile we finish this discussion. The snap should always work if users manually run:

   $ sudo snap connect ultrastar-worldparty:camera
   $ snap connections ultrastar-worldparty
    Interface        Plug                                  Slot             Notes
    audio-playback   ultrastar-worldparty:audio-playback   :audio-playback  -
    audio-record     ultrastar-worldparty:audio-record     :audio-record    -
    bluez            ultrastar-worldparty:bluez            -                -
    camera           ultrastar-worldparty:camera           :camera          manual
    home             ultrastar-worldparty:home             :home            -
    joystick         ultrastar-worldparty:joystick         :joystick        -
    network          ultrastar-worldparty:network          :network         -
    opengl           ultrastar-worldparty:opengl           :opengl          -
    raw-usb          ultrastar-worldparty:raw-usb          -                -
    removable-media  ultrastar-worldparty:removable-media  -                -
    x11              ultrastar-worldparty:x11              :x11             -

I don’t know how to say this to be polite, but the process to release programs using snaps is terrible! :frowning:

If an extra explanation is needed to enable camera (or another) permission, why don’t exists a place to add it? I think that the program description isn’t the better place to do it, for this reason I only added a small description. To speed up this, can you give me an example about the text that I must to add? Or at least to have a reference, other snap that had to resolve this problem

The same day that I started this thread, I added the manually connect instructions in the github release (now with current 4 that are remaining), but only in that place because only this kind of users can know what they are doing. The rest of the users only press one button an wait to the program works, they don’t care about privacy… only want to sing!

Thanks all for your job, but this process need to be improved sometime.

There is only one place users will look to understand what a snap requires and that is the snap’s description in the store, hence why we ask that you add some mention of this for users to know that your snap will have camera access. This is the principle of least-surprise and sets an expectation for them of what the snap can do. I don’t think this is too onerous of a task and it makes the snap more descriptive for users so they are more likely to choose to use the snap if they know it’s full functinoality.

Currently the snap description does mention this in passing so whilst I would prefer this was more explicitly stated, it is mentioned in the snap description now. So +1 from me for auto-connect of camera for ultrastar-worldparty, as well as +1 for raw-usb and +1 for removable-media as well as this is a common use-case.

With the current votes, this gives:

+2 for, -1 against camera. Not granting auto-connect for this at this time. If other @reviewers can please weigh in that would be good.

+3 for, 0 against raw-usb. Granted.

+2 for, -1 against removable media. Not granting auto-connect for this at this time.

@alexmurray For now the only place to show snap’s permissions is the description, but I think that would be interesting enable other place to do it. It’s a suggestion. I suppose that the description are only this: what program does and not how.
I will add extra information about camera this week.

We forgot the bluez permission! I only removed the bluetooth-control because isn’t needed but bluez yes to connect joysticks, controllers or bluetooth keyboards.

well … you can always use snapctl is-connected ... from a command-chain script and use something like yad to display a popup on startup of your app …


(and the corresponding snapcraft.yaml apps: entry in that tree about how to integrate it)

@TeLiXj We can take your feedback to see how we can provide improved, clearer information to the user when they download and install snaps. In the end, we want the experience to be good. This includes both usability and privacy. I think we can satisfy both.

As you are well aware, the notion of cameras being misused (even if overblown in the media) is something that people care about, and knowing what an application can do goes toward building trust with the userbase. For the time being, I think it would be nice to clearly inform the user what your game does. With full description in place, I will change my vote.

Re bluez - +1 from me to auto-connect bluez.

+1 from me for auto-connect bluez to ultrastar-worldparty. +2 votes for, 0 votes against, granting auto-connect of bluez to ultrastar-worldparty.

I have also changed my vote regarding removable-media since I originally did not consider a game like this one is a common use-case, but the discussion here made me realize it is indeed. So +3 votes for, 0 votes against, granting auto-connnecto of removable-media as well to ultrastar-worldparty. This is now live.

Hi again! @ogra nice tip but too late for me. The best place of that info is the docs to use it before request the permissions.

Finally after many days I’ve updated the description adding a lot of information. I hope that now all was clear.

Thanks for your votes, only the camera is waiting :slight_smile: