[英]I want my application's user to play every video with MyVideoPLayer
I had developed a video player which is working fine. 我已经开发了一个视频播放器,可以正常工作。 Now i want from user to play every song with it. 现在,我希望用户播放每首歌曲。 I mean whenever user clicks a video file, it should play with my video player
or how can I add my video player to the alert dialog which appears when a video file is clicked? 我的意思是,每当用户单击视频文件时,它都应与my video player
一起my video player
或者如何将我的视频播放器添加到单击视频文件时出现的警报对话框中?
Add the following intent-filters to your video player activity: 将以下意图过滤器添加到视频播放器活动中:
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="rtsp" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="video/*" />
<data android:mimeType="application/sdp" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http" />
<data android:mimeType="video/*" />
</intent-filter>
This will add your app to the list of apps that can play Videos and RTSP streams from the internet (remove the first filter if you don't want to support streaming). 这会将您的应用程序添加到可以播放来自互联网的视频和RTSP流的应用程序列表中(如果您不想支持流式传输,请删除第一个过滤器)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.