1
0
Fork 0
NotesUESTC/Android开发笔记/Android播放调用.md

17 lines
421 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

## 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播放器的使用