jackcho / androidvideoview Goto Github PK
View Code? Open in Web Editor NEWAndroid Custom VideoView
Android Custom VideoView
Your formatTime method return wrong information. I use of this method instead of yours:
in MainActivity class define these two:
StringBuilder mFormatBuilder;
Formatter mFormatter;
in onCreate defined these two like this:
mFormatBuilder = new StringBuilder();
mFormatter = new Formatter(mFormatBuilder, Locale.getDefault());
and finally new formatTime method:
private String formatTime(int timeMs) {
int totalSeconds = timeMs / 1000;
int seconds = totalSeconds % 60;
int minutes = (totalSeconds / 60) % 60;
int hours = totalSeconds / 3600;
mFormatBuilder.setLength(0);
if (hours > 0) {
return mFormatter.format("%d:%02d:%02d", hours, minutes, seconds).toString();
} else {
return mFormatter.format("%02d:%02d", minutes, seconds).toString();
}
}
this new formatTime return right infromation to us :)
Do you have any solution to preventing lose buffered portion when activity come back to resume after goes to pause?!
Thank for sharing your library.
Now, I have been creating my own Videoview using your sample code.
All are OK , but mPlayTime shows wrong time.
My test url is ''http://smf.blob.core.windows.net/samples/videos/bigbuck.mp4".
Please help me.
Thank for sharing your library.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.