Methods Summary |
---|
public static android.graphics.Bitmap | createVideoThumbnail(android.content.Context context, android.net.Uri uri)
Bitmap bitmap = null;
MediaMetadataRetriever retriever = new MediaMetadataRetriever();
try {
retriever.setMode(MediaMetadataRetriever.MODE_CAPTURE_FRAME_ONLY);
retriever.setDataSource(context, uri);
bitmap = retriever.captureFrame();
} catch (RuntimeException ex) {
// Assume this is a corrupt video file.
} finally {
try {
retriever.release();
} catch (RuntimeException ex) {
// Ignore failures while cleaning up.
}
}
return bitmap;
|
protected void | onFinishInflate()
mThumbnailView = (ImageView) findViewById(R.id.video_thumbnail);
|
public void | pauseAudio()
// TODO Auto-generated method stub
|
public void | pauseVideo()
// TODO Auto-generated method stub
|
public void | reset()
// TODO Auto-generated method stub
|
public void | seekAudio(int seekTo)
// TODO Auto-generated method stub
|
public void | seekVideo(int seekTo)
// TODO Auto-generated method stub
|
public void | setAudio(android.net.Uri audio, java.lang.String name, java.util.Map extras)
// TODO Auto-generated method stub
|
public void | setImage(java.lang.String name, android.graphics.Bitmap bitmap)
// TODO Auto-generated method stub
|
public void | setImageRegionFit(java.lang.String fit)
// TODO Auto-generated method stub
|
public void | setImageVisibility(boolean visible)
// TODO Auto-generated method stub
|
public void | setText(java.lang.String name, java.lang.String text)
// TODO Auto-generated method stub
|
public void | setTextVisibility(boolean visible)
// TODO Auto-generated method stub
|
public void | setVideo(java.lang.String name, android.net.Uri video)
Bitmap bitmap = createVideoThumbnail(mContext, video);
if (null == bitmap) {
bitmap = BitmapFactory.decodeResource(getResources(),
R.drawable.ic_missing_thumbnail_video);
}
mThumbnailView.setImageBitmap(bitmap);
|
public void | setVideoVisibility(boolean visible)
// TODO Auto-generated method stub
|
public void | setVisibility(boolean visible)
// TODO Auto-generated method stub
|
public void | startAudio()
// TODO Auto-generated method stub
|
public void | startVideo()
// TODO Auto-generated method stub
|
public void | stopAudio()
// TODO Auto-generated method stub
|
public void | stopVideo()
// TODO Auto-generated method stub
|