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?
Since the development of short videos to goods, f...
[[160813]] The original author, Fred Hebert, is a...
This year's auto market can be described as &...
Today I bring you the latest traffic rankings of ...
01. Market performance 01National online car-hail...
At 07:39 on December 9, 2023, Beijing time, the S...
What should we do if our creative ideas become ho...
For many people, headphones must be an indispensa...
The European Union has issued new guidelines to i...
To make it easier to understand this article, let...
A friend told me that he was only in his early fo...
I heard that everyone has been tortured by data a...
As the Spring Festival approaches, I am reminded ...
Recently, the Beijing Science and Technology Journ...
Have you ever encountered this thing in a shoppin...