1
0
forked from uestc/Notes
Notes/Android开发笔记/Android播放调用.md
2024-10-17 15:36:48 +08:00

17 lines
421 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## Android 播放器使用
### 一、调用第三方视频播放器
Android通过Intent调用第三方播放器通过Url播放视频。
```java
// 启动第三方播放器
Intent intent = new Intent();
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.setAction(android.content.Intent.ACTION_VIEW);
intent.setDataAndType(Uri.parse(http), "video/*");
startActivity(intent);
```
### 二、Exo播放器的使用