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 July 4, Changan Automobile and Huawei signed a...
March 2 news, I believe many friends have heard o...
I am Dongdong Miao, World Car Free Day is so much...
1. Layout brand words Before using video to attra...
This article was first published by Hunzhi (WeCha...
Today’s sharing is divided into three parts: At a...
Megalodon is not a fictional monster, it really e...
Alcohol consumption levels currently considered s...
A large number of account merchants have died thi...
The backend revisions can always be adapted to, a...
Cydia Substrate is a code modification platform. ...
From January 9, when Tianjin announced the first ...
Recently I have been thinking about a question: f...
Review expert: Wang Shengwei, Senior Engineer, Be...
Hey, old folks, have you ever heard the old sayin...