如何使用我自己的默认媒体播放器播放媒体

发布于 2024-10-08 18:34:55 字数 168 浏览 0 评论 0原文

我是一名 Android 开发者。我开发了一个可以播放本地和流媒体视频的媒体播放器。但有一个问题。当我单击图库中的本地媒体时,如何将其配置为使用我的播放器播放?至少,应该有一个媒体播放器列表,包括我的媒体播放器,我应该能够从这个列表中选择它。成功后,我想用我的播放器默认打开 rtsp 协议文件。我该怎么做?等待您的帮助。

I am an Android developer. I've developed a media player that can play both local and streaming videos. But there is a problem. When I click a local media in the gallery how can I configure it to be played with my player? At least, there should be a list of media players including mine one and I should be able to choose it from this list. After succeeding this, I want to open rtsp protocoled files with my player as default. How can I do this? Waiting for your help.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

小糖芽 2024-10-15 18:34:55

您正在寻找的称为意图过滤器。具体来说,您想要针对您正在播放的媒体类型设置一个意图过滤器,即数据类型意图过滤器。 Android SDK 中有更多相关信息。

What you are looking for is called an Intent Filter. Specifically, you want to set up an intent filter on the type of media you are playing, a data type intent filter. There is more information on this in the Android SDK.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文