I've been researching the video playback function recently. I used VideoView before. I looked it up online and it didn't seem very good. It supported relatively few formats. Nowadays, there are various formats of online videos. I felt that using VideoView to play them was very limited. We found a suitable player, the Github address is https://github.com/xiaomo/AndroidPlayerLibrary. This player is based on the vlc software. After importing our demo into Eclipse, we can find a libvlc folder. In the Media class, we can find that there are quite a lot of supported formats.
In this example, it writes a PlayerActivity and PlayerView by itself, and implements the IVideoPlayer interface in libvlc in PlayerView Implement the PlayerView class in PlayerActivity to control the interface and process.
How to use this library The library can be used in two ways: *** Type, directly create a new PlayerView or embed the view in the xml of the layout file. The second method is to jump to a pre-written playback page PlayerActivity (local file parameter format: file:///sacard/test.rmvb.) Here I chose the second method
Select 1.2JDK download.mp4 from the list There is no problem switching between horizontal and vertical screens. |
<<: The third lecture on application performance management of Tingyun shared practical experience
>>: What improvements did I make when I was refining an old project from a few years ago?
Autonomous driving = no accidents? After NIO'...
South American lungfish (Image credit: Katherine ...
Core Tips 1. International crude oil market In Ap...
Since last year, 4G RAM capacity has gradually bec...
"Since my own app has few downloads and comm...
Friends, Double Eleven is coming soon, which is a...
[Must-have course for moms] 20 lessons on childre...
The new coronavirus pandemic is not over yet. In ...
What I want to share today is how to do a good jo...
Reporter Weng Danni Photographer Jin Jingxin Publ...
Generally speaking, the more complex the function...
The transmission is a very critical component of ...
Every time there is a holiday, every time a star ...
A design change can increase website click-throug...
In the morning, walk through the foggy Chaotianme...