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?
Why do I operate Weibo? Because browsing Weibo is...
Bees are important resource insects that not only...
When junior operators are asked to organize an ev...
Recently, an XDA expert showed that he successful...
The day before yesterday, the WeChat report was f...
◎ Written by: Science and Technology Daily report...
Since I often write about App promotion, friends o...
With the arrival of Teachers' Day, there must...
In recent years, the incidence of cervical spondy...
It has been a long time since I have seen a manuf...
A senior who works in operations said that event ...
There are 15 days left until the opening of the B...
Review of this article: Pang Zhihao, Chief Scient...
Xiaohongshu has accumulated a user word-of-mouth ...
The red envelope activities for products worth hu...