准备工作:
1.需要提前上传一段音视频 我这里是随便找的音视频
在res下新建一个目录放置音视频文件,(将事先准备好的复制粘贴到该目录就可以了)
界面布局
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent