ViMusic icon indicating copy to clipboard operation
ViMusic copied to clipboard

Cast audio

Open Reed-Schimmel opened this issue 2 years ago • 6 comments

Feature description

Add functionality to cast music to devices like smart TVs. I use SmartTube on my smartTV so that could grab the YouTube music link without needing a YouTube music account.

Why do you want this feature?

Required to reach feature parity with standard music streaming apps. I also want to play music on my TV.

Additional information

No response

Reed-Schimmel avatar Aug 02 '22 18:08 Reed-Schimmel

Unfortunately I won't implement that. Please read #38

vfsfitvnm avatar Aug 02 '22 18:08 vfsfitvnm

Why not implement it for KODI? That's FOSS.

Jak2k avatar Aug 02 '22 19:08 Jak2k

@Jak2k Do you have some resources for that? Also, I don't have such device so I couldn't implement it anyway

vfsfitvnm avatar Aug 02 '22 19:08 vfsfitvnm

In NewPipe it's handeled by the Kore-App:

public static void playWithKore(final Context context, final Uri videoURL) {
        final Intent intent = new Intent(Intent.ACTION_VIEW);
        intent.setPackage(context.getString(R.string.kore_package));
        intent.setData(videoURL);
        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        context.startActivity(intent);
    }

You can download Kodi on: https://kodi.tv/download It even runs on Windows.

Jak2k avatar Aug 03 '22 08:08 Jak2k

@Jak2k That's not casting. It just forwards the casting problem to a third party app. Moreover, it requires a video url, which I don't necessarily have as the playback often relies on the cache (i.e. private disk files).

vfsfitvnm avatar Aug 10 '22 08:08 vfsfitvnm

I use AirMusic app to play from my Android to my Apple HomePod. Maybe it'll work to play on your TV.

caveman1973 avatar Aug 13 '22 06:08 caveman1973

There is a MicroG version of the API

https://github.com/microg/GmsCore/tree/master/play-services-cast-api

CrepeTF avatar Oct 30 '22 22:10 CrepeTF

@CrepeTF Thanks, I will take a look.

vfsfitvnm avatar Oct 31 '22 05:10 vfsfitvnm

I'm leaving here other resources I found for general purpose casting (google cast excluded).

https://developer.android.com/training/connect-devices-wirelessly/wifi-direct https://github.com/android/media-samples https://developer.android.com/guide/topics/media/mediarouter https://android-doc.github.io/guide/topics/media/mediarouter.html https://github.com/aabaker/controldlna

Keywords: upnp, dlna.

vfsfitvnm avatar Oct 31 '22 18:10 vfsfitvnm

I would personally be against implementing anything that has to do with MicroG. It's a niche thing that has a lot of issues. One thing I love about this app is that it doesn't try to implement every little thing that people want, and as a result, the app is simple, clean and effective.

matchboxbananasynergy avatar Oct 31 '22 18:10 matchboxbananasynergy

microG or third party libraries won't be used. If it can be done using the android sdk, I'm not personally against it

vfsfitvnm avatar Oct 31 '22 19:10 vfsfitvnm

That said, I have zero knowledge in this field and I never used it once in my life, so I will implement it only if it requires zero effort

vfsfitvnm avatar Oct 31 '22 19:10 vfsfitvnm

Tracking in #597

vfsfitvnm avatar Nov 08 '22 13:11 vfsfitvnm