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?
"On the eve of the Qingming Festival, parts ...
15-Day Short Video Gold Rush Camp: Uncover the se...
gossip "Bisphenol A in machine-printed recei...
According to the technology blog VentureBeat, Chi...
On October 28, Chukong Technology announced at th...
In the current era of self-media, information int...
BYD's strength is obvious to all. It has won ...
The gap between WP and Android and iOS market sha...
If you are a bidding veteran, you should know tha...
A training method that gets rid of dependence on ...
The advent of DNA profiling has greatly improved ...
Nowadays, when it comes to Internet thinking, mor...
Are there still many people using excessive websi...
At present, the Internet of Things has entered a ...