The application of android's video playback system VideoView and custom VideoView control

Android plays video, including the built-in VideoView control of the system, and the custom VideoView control, which can be played in full screen. The case includes local video and network video.

 

1: Custom VideoView control

 

 

2: Layout code

 

 

3: Activity code:

 

 

4: Network permissions

 

 

5: renderings

5: renderings

 

 

Summary: Uri mUri = Uri.parse("android.resource://" + getPackageName() +"/"+ R.raw.qiche);//local video

 

It is a loaded local video. You can download a video, create a folder raw in the res directory, and put it in it.

 

Source code click to download

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326314131&siteId=291194637