3.1 Is it possible to play the audio content without a popup ? What do we do with the popup ?
This depends on the service. I guess the 'popup' you're referring is a embedded iframe of Youtube video, right? There are metadata extractors that are used for apps like NewPipe or frrontends like Invidious or Piped could be a reference on how to extract an audio URL from a Youtube video.
Google tends to fight mentioned apps and frontend by banning their official sites from the search results and changing Youtube API quite frequently so I'd stick away from integrating it that way.
3.2 Can we control third party playback with our current player ?
Yes and no. Current player wasn't designed to control third party streams but it is doable quite easily. I've created an internal
Sound interface that could be implemented however one wants. This is an interface between our audio player and the underlying audio backend implemented by the interface implementation.
A reference implementation should be the
HTMLSound that uses a virtual
<audio> element (actually WebAudioAPI but it's basically the same) as the audio backend.
I've added it to allow us to create a native audio backend in our Tauri app in the future. Currently, when JS exceeds the memory limit provided by the browser or clogs the CPU, the audio can stutter and we cannot do much about it.
As this interface implements all methods like
seekTo, ... one could create a plugin that utilizes it to control external audio streams. In fact, I wanted to create a third-party client that would run on a server and create a userscript that implements
Sound interface as
RemoteSound class and passes all methods to the remote client so that the official UI is used to remotely control this third party client.
However for the usecase we've here, I'd rather create yet another layer. If we had
HTMLSound that uses
<audio> element and
TauriSound that sends commands to the Tauri app, if we implemented the controls for 3rd party streams there, we'd need to implement both
YoutubeTauriSound to allow for the best playback quality on PWA and native app.
3.3 Is it possible to add to queue fw tracks and third party tracks ?
Sound interface allows it as it is basically the controller of how the audio is being played.
3.4 Is there privacy concern ?
Of course. I and many like me do not like to use Google/M$ services. As I've mentioned I extensively use Invidious and Piped. Not only a Youtube integration would mean that my data would be sent to Google but also services like Bandcamp, Spotify, Deezer and stuff would require an API key to be able to use them. That means that whatever I search for or listen to (using their providers) would be registered by them.