activity代码

package com.hck.player.ui;

import io.vov.utils.StringUtils;
import io.vov.vitamio.LibsChecker;
import io.vov.vitamio.MediaPlayer;
import io.vov.vitamio.MediaPlayer.OnBufferingUpdateListener;
import io.vov.vitamio.MediaPlayer.OnCompletionListener;
import io.vov.vitamio.MediaPlayer.OnErrorListener;
import io.vov.vitamio.MediaPlayer.OnInfoListener;
import io.vov.vitamio.MediaPlayer.OnPreparedListener;
import io.vov.vitamio.MediaPlayer.OnSeekCompleteListener;
import io.vov.vitamio.MediaPlayer.OnVideoSizeChangedListener;
import io.vov.vitamio.widget.VideoView; import java.sql.Timestamp;
import java.util.ArrayList; import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
import android.content.pm.ActivityInfo;
import android.content.res.Configuration;
import android.graphics.Color;
import android.media.AudioManager;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.util.Log;
import android.view.Display;
import android.view.GestureDetector;
import android.view.GestureDetector.SimpleOnGestureListener;
import android.view.MotionEvent;
import android.view.SurfaceHolder;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.PopupWindow;
import android.widget.SeekBar;
import android.widget.SeekBar.OnSeekBarChangeListener;
import android.widget.TextView; import com.hck.myplayer.R;
import com.zdp.aseo.content.AseoZdpAseo; public class PlayActivity extends BaseActivity implements OnClickListener,
OnBufferingUpdateListener, OnCompletionListener, OnPreparedListener,
OnVideoSizeChangedListener, SurfaceHolder.Callback, OnErrorListener,
OnInfoListener, OnSeekCompleteListener {
private String path;
private ImageView imageView;
private TextView nametTextView;
private TextView timeTextView;
private Button chiceButton;
private Button fontbButton, playbButton, nextButton;
private VideoView videoView;
private FrameLayout fLayout;
private LinearLayout layout;
private boolean isPlay;
private SeekBar seekBar;
private upDateSeekBar update;
private boolean isLock;
private String timeString;
private TextView play_tiem, endTime;
private String name;
private ImageView mOperationBg;
private ImageView mOperationPercent;
private View mVolumeBrightnessLayout;
private AudioManager mAudioManager;
/** 最大声音 */
private int mMaxVolume;
/** 当前声音 */
private int mVolume = -;
/** 当前亮度 */
private float mBrightness = -1f;
private GestureDetector mGestureDetector;
private View bar;
private TextView textViewBF;
private TextView sudu;
private TextView sudu2;
private PopupWindow pWindow;
private Button qingxiButton, liuchangButton, gaoqingButton; private boolean isFinish;
private long pauseSize;
private long size;
private ArrayList<String> urls;
private static int flag; @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// 检测Vitamio是否解压解码包
if (!LibsChecker.checkVitamioLibs(this))
return;
// 去除标题栏
requestWindowFeature(Window.FEATURE_NO_TITLE);
// 设置为全屏
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
// 定义布局
setContentView(R.layout.play);
// 初始化布局
initView();
// 获得数据
getInitDate();
// 设置数据
setInitDate();
nextButton.setEnabled(false);
fontbButton.setEnabled(false);
play();
AseoZdpAseo.initType(this, AseoZdpAseo.INSERT_TYPE); } private void getInitDate() {
// path = getIntent().getStringExtra("path");
// 获取视频的名称
name = getIntent().getStringExtra("name");
// 获取视频的url
urls = getIntent().getStringArrayListExtra("url"); } private void setInitDate() {
// 设置视频的名称,并显示在屏幕上
nametTextView.setText("视频名字:" + name);
} private void initView() {
// 地址集合
urls = new ArrayList<String>();
// 视频播放进度条
seekBar = (SeekBar) findViewById(R.id.seekBar);
// 视频信息 ,设置为不可见
fLayout = (FrameLayout) findViewById(R.id.title_fl);
fLayout.setVisibility(View.GONE);
// 视频屏幕下方的控制菜单,设置为不可见
layout = (LinearLayout) findViewById(R.id.buttom_lin);
layout.setVisibility(View.GONE);
// 视频播放框
videoView = (VideoView) findViewById(R.id.surface_view);
// 屏幕是否解锁,并设置不可见,实现监听
imageView = (ImageView) findViewById(R.id.image_lock);
imageView.setOnClickListener(this);
imageView.setVisibility(View.GONE);
// 视频下载的速度kb/s
sudu = (TextView) findViewById(R.id.sudu); sudu2 = (TextView) findViewById(R.id.sudu2);
// 视频缓冲进度条
bar = findViewById(R.id.pb);
// 视频缓冲的进度,百分比
textViewBF = (TextView) bar.findViewById(R.id.buff);
// 视频已经播放的时间
play_tiem = (TextView) findViewById(R.id.play_time);
// 视频播放总时间
endTime = (TextView) findViewById(R.id.play_end_time);
// 视频名称,并设置监听
nametTextView = (TextView) findViewById(R.id.movie_name);
nametTextView.setOnClickListener(this);
// 视频的时间
timeTextView = (TextView) findViewById(R.id.movie_time);
// 得到当前时间(通过时间戳的装换函数Timestamp)
timeString = (new Timestamp(System.currentTimeMillis())).toString()
.substring(, );
timeTextView.setText(timeString);
// 视频质量设定按钮,并设置监听按钮
chiceButton = (Button) findViewById(R.id.zhiliang);
chiceButton.setOnClickListener(this);
// 快退按钮 ,并设置监听
fontbButton = (Button) findViewById(R.id.font);
fontbButton.setOnClickListener(this);
// 播放按钮,并设置监听
playbButton = (Button) findViewById(R.id.play);
playbButton.setOnClickListener(this);
// 快进按钮并设置监听
nextButton = (Button) findViewById(R.id.next);
nextButton.setOnClickListener(this);
// 控制喇叭音量
mVolumeBrightnessLayout = findViewById(R.id.operation_volume_brightness);
// 喇叭图片
mOperationBg = (ImageView) findViewById(R.id.operation_bg);
// 音量控制的进度条
mOperationPercent = (ImageView) findViewById(R.id.operation_percent);
// 手势操作类,并设置手势监听
mGestureDetector = new GestureDetector(this, new MyGestureListener());
// 获取系统服务
mAudioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
// 获取系统的最大音量
mMaxVolume = mAudioManager
.getStreamMaxVolume(AudioManager.STREAM_MUSIC);
// 控制屏幕翻转
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
// 更新seekbar,即视频播放进度监听
setListener();
// 更新seekbar时,根据视频播放进度跟新时间等数据
update = new upDateSeekBar();
new Thread(update).start();
} private class MyGestureListener extends SimpleOnGestureListener {
@Override
// 当用户在屏幕上"滚动"时触发该方法
public boolean onScroll(MotionEvent e1, MotionEvent e2,
float distanceX, float distanceY) {
// 得到x,y坐标当前值,相对于当前view
float mOldX = e1.getX(), mOldY = e1.getY();
// getRawY()是表示相对于屏幕左上角的y坐标值
int y = (int) e2.getRawY();
// 获得屏幕的宽高
Display disp = getWindowManager().getDefaultDisplay();
int windowWidth = disp.getWidth();
int windowHeight = disp.getHeight();
// 右边滑动
if (mOldX > windowWidth * 4.0 / )
onVolumeSlide((mOldY - y) / windowHeight);
// 左边滑动
else if (mOldX < windowWidth / 5.0)
onBrightnessSlide((mOldY - y) / windowHeight);
return super.onScroll(e1, e2, distanceX, distanceY);
}
} /**
* 滑动改变声音大小
*
* @param percent
*/
private void onVolumeSlide(float percent) {
if (mVolume == -) {
mVolume = mAudioManager.getStreamVolume(AudioManager.STREAM_MUSIC);
if (mVolume < )
mVolume = ; // 显示声音的大小
mOperationBg.setImageResource(R.drawable.video_volumn_bg);
mVolumeBrightnessLayout.setVisibility(View.VISIBLE);
} int index = (int) (percent * mMaxVolume) + mVolume;
if (index > mMaxVolume)
index = mMaxVolume;
else if (index < )
index = ;
// 变更声音
mAudioManager.setStreamVolume(AudioManager.STREAM_MUSIC, index, );
// 变更进度条
ViewGroup.LayoutParams lp = mOperationPercent.getLayoutParams();
lp.width = findViewById(R.id.operation_full).getLayoutParams().width
* index / mMaxVolume;
mOperationPercent.setLayoutParams(lp);
} /**
* 滑动改变亮度
*
* @param percent
*/
private void onBrightnessSlide(float percent) {
if (mBrightness < ) {
mBrightness = getWindow().getAttributes().screenBrightness;
if (mBrightness <= 0.00f)
mBrightness = 0.50f;
if (mBrightness < 0.01f)
mBrightness = 0.01f; // 显示
mOperationBg.setImageResource(R.drawable.video_brightness_bg);
mVolumeBrightnessLayout.setVisibility(View.VISIBLE);
} WindowManager.LayoutParams lpa = getWindow().getAttributes();
lpa.screenBrightness = mBrightness + percent;
if (lpa.screenBrightness > 1.0f)
lpa.screenBrightness = 1.0f;
else if (lpa.screenBrightness < 0.01f)
lpa.screenBrightness = 0.01f;
getWindow().setAttributes(lpa);
// 变更进度条
ViewGroup.LayoutParams lp = mOperationPercent.getLayoutParams();
lp.width = (int) (findViewById(R.id.operation_full).getLayoutParams().width * lpa.screenBrightness);
mOperationPercent.setLayoutParams(lp);
}
//播放视频
private void play() {
Log.i("hck", "play flag1: " + urls.get(flag));
isPlay = true;
try {
videoView.setVideoURI(Uri.parse(urls.get(flag)));
videoView.setOnCompletionListener(this);
videoView.setOnBufferingUpdateListener(this);
videoView.setOnErrorListener(this);
videoView.setOnInfoListener(this);
videoView.setOnPreparedListener(this); } catch (Exception e) {
Log.i("hck", "PlayActivity " + e.toString());
}
} class upDateSeekBar implements Runnable { @Override
public void run() {
if (!isFinish) {
mHandler.sendMessage(Message.obtain());
mHandler.postDelayed(update, );
} }
}
//通过用户指定的播放进度更新时间等信息
@SuppressLint("HandlerLeak")
Handler mHandler = new Handler() {
public void handleMessage(Message msg) {
if (videoView == null) {
return;
}
timeString = (new Timestamp(System.currentTimeMillis())).toString()
.substring(, );
timeTextView.setText(timeString);
play_tiem.setText(StringUtils.generateTime(videoView
.getCurrentPosition()));
if (videoView != null) {
seekBar(videoView.getCurrentPosition());
} };
}; private void seekBar(long size) {
if (videoView.isPlaying()) {
long mMax = videoView.getDuration();
int sMax = seekBar.getMax();
seekBar.setProgress((int) (size * sMax / mMax)); }
} private void setListener() {
seekBar.setOnSeekBarChangeListener(new OnSeekBarChangeListener() { @Override
public void onStopTrackingTouch(SeekBar seekBar) { int value = (int) (seekBar.getProgress()
* videoView.getDuration() / seekBar.getMax());
videoView.seekTo(value);
videoView.start();
isPlay = true;
} @Override
public void onStartTrackingTouch(SeekBar seekBar) {
isPlay = false;
videoView.pause();
} @Override
public void onProgressChanged(SeekBar seekBar, int progress,
boolean fromUser) { }
}); } @Override
public boolean onTouchEvent(MotionEvent event) {
if (mGestureDetector.onTouchEvent(event))
return true;
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
if (!isLock) {
fLayout.setVisibility(View.VISIBLE);
layout.setVisibility(View.VISIBLE); }
imageView.setVisibility(View.VISIBLE);
break;
case MotionEvent.ACTION_UP:
       // 处理手势结束
endGesture();
break; default:
break;
}
return super.onTouchEvent(event);
}
  /** 手势结束 */
private void endGesture() {
mVolume = -;
mBrightness = -1f;

        // 隐藏
disHandler.removeMessages();
disHandler.sendEmptyMessageDelayed(, );
disHandler.removeMessages();
disHandler.sendEmptyMessageDelayed(, );
} private Handler disHandler = new Handler() {
@Override
public void handleMessage(Message msg) {
if (msg.what == ) {
mVolumeBrightnessLayout.setVisibility(View.GONE);
} else {
fLayout.setVisibility(View.GONE);
layout.setVisibility(View.GONE);
imageView.setVisibility(View.GONE);
if (pWindow != null && pWindow.isShowing()) {
pWindow.dismiss();
}
} }
}; @SuppressLint("HandlerLeak")
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.play:
if (isPlay) {
videoView.pause();
playbButton
.setBackgroundResource(R.drawable.player_play_highlight);
isPlay = false;
seekBar.setEnabled(false);
} else {
playbButton
.setBackgroundResource(R.drawable.player_pause_highlight);
videoView.start();
isPlay = true;
seekBar.setEnabled(true);
}
break;
case R.id.image_lock:
if (isLock) {
isLock = false;
imageView.setBackgroundResource(R.drawable.lock_off);
} else {
isLock = true;
imageView.setBackgroundResource(R.drawable.lock_on);
}
break;
case R.id.next:
videoView.pause();
if (videoView != null) {
size = videoView.getCurrentPosition() + videoView.getDuration()
/ ;
videoView.seekTo(size);
videoView.start();
}
break;
case R.id.font:
videoView.pause();
if (videoView != null) {
size = videoView.getCurrentPosition() - videoView.getDuration()
/ ;
videoView.seekTo(size);
videoView.start();
}
break;
case R.id.zhiliang:
Log.i("hck", "zhiliang");
showPop(v);
break; }
} @Override
public void surfaceChanged(SurfaceHolder arg0, int arg1, int arg2, int arg3) { } @Override
public void surfaceCreated(SurfaceHolder arg0) {
Log.i("hck", "surfaceCreated");
} @Override
public void surfaceDestroyed(SurfaceHolder arg0) { } @Override
public void onVideoSizeChanged(MediaPlayer arg0, int arg1, int arg2) {
} @Override
public void onPrepared(MediaPlayer arg0) {
nextButton.setEnabled(true);
fontbButton.setEnabled(true);
bar.setVisibility(View.GONE);
if (urls.get(flag).startsWith("http")) {
videoView.setBufferSize( * );
} else {
videoView.setBufferSize();
}
endTime.setText(StringUtils.generateTime(videoView.getDuration()));
bar.setVisibility(View.GONE);
if (pauseSize > ) {
videoView.seekTo(pauseSize);
}
pauseSize = ;
} @Override
public void onCompletion(MediaPlayer arg0) {
videoView.stopPlayback();
} @Override
public void onBufferingUpdate(MediaPlayer arg0, int arg1) {
textViewBF.setTextColor(Color.CYAN);
textViewBF.setText(videoView.getBufferPercentage() + "%"); } @Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
videoView.setVideoLayout(, );
} @Override
public boolean onError(MediaPlayer arg0, int arg1, int arg2) {
Log.i("hck", "error :" + arg1 + arg2);
return false;
} @Override
public boolean onInfo(MediaPlayer arg0, int arg1, int arg2) {
switch (arg1) {
case MediaPlayer.MEDIA_INFO_BUFFERING_START:
if (isPlay) {
bar.setVisibility(View.VISIBLE);
videoView.pause();
isPlay = false; }
break;
case MediaPlayer.MEDIA_INFO_BUFFERING_END:
if (!isPlay) {
bar.setVisibility(View.GONE);
videoView.start();
isPlay = true; }
break;
case MediaPlayer.MEDIA_INFO_DOWNLOAD_RATE_CHANGED:
sudu.setTextColor(Color.CYAN);
sudu.setText(arg2 + "kb/s");
sudu2.setText(arg2 + "kb/s");
break;
}
return true;
} @Override
protected void onPause() {
super.onPause();
videoView.pause(); } @Override
protected void onResume() {
super.onResume();
if (isPlay) {
videoView.start();
}
} @Override
protected void onDestroy() {
super.onDestroy();
if (videoView != null) {
videoView.stopPlayback();
videoView = null;
}
if (pWindow != null && pWindow.isShowing()) {
pWindow.dismiss();
}
isPlay = false;
isFinish = true;
System.gc(); } @Override
public void onSeekComplete(MediaPlayer arg0) { } private void showPop(View view2) { // View view = LayoutInflater.from(this).inflate(R.layout.pop, null);
// qingxiButton = (Button) view.findViewById(R.id.qingxi);
// gaoqingButton = (Button) view.findViewById(R.id.gaoqing);
// liuchangButton = (Button) view.findViewById(R.id.liuchang);
// pWindow = new PopupWindow(view, LayoutParams.WRAP_CONTENT,
// LayoutParams.WRAP_CONTENT);
// pWindow.setOutsideTouchable(true);
// pWindow.showAtLocation(view2, Gravity.LEFT, Gravity.LEFT, 1);
// setListener2(); } private void setListener2() {
qingxiButton.setOnClickListener(this);
gaoqingButton.setOnClickListener(this);
liuchangButton.setOnClickListener(this);
} }

缺少 :/** 当前缩放模式 */
        private int mLayout = VideoView.VIDEO_LAYOUT_ZOOM;、

参考:http://www.cnblogs.com/over140/archive/2012/05/22/2473019.html

xml代码

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#000000" > <io.vov.vitamio.widget.VideoView
android:id="@+id/surface_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true" /> <FrameLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent" > <!-- 视频信息 --> <FrameLayout
android:id="@+id/title_fl"
android:layout_width="fill_parent"
android:layout_height="50dp"
android:background="@drawable/test_widget_bg"
android:visibility="gone" > <TextView
android:id="@+id/movie_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:textColor="#ffffff"
android:textSize="16sp" /> <TextView
android:id="@+id/movie_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right|center_vertical"
android:layout_marginRight="10dp"
android:text="11:34"
android:textColor="#ffffff" />
</FrameLayout>
<!-- 屏幕是否解锁 --> <ImageView
android:id="@+id/image_lock"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_marginLeft="15dp"
android:layout_marginTop="15dp"
android:src="@drawable/lock_off"
android:visibility="gone" /> <LinearLayout
android:id="@+id/buttom_lin"
android:layout_width="fill_parent"
android:layout_height="70dp"
android:layout_gravity="bottom"
android:background="@drawable/test_widget_bg"
android:gravity="center_vertical"
android:orientation="vertical" > <RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content" > <!-- 视频已经播放的时间 --> <TextView
android:id="@+id/play_time"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_marginLeft="3dp"
android:text="20:12:33"
android:textColor="#ffffff"
android:textSize="12sp" />
<!-- 视频播放进度条 --> <SeekBar
android:id="@+id/seekBar"
style="@style/player_progressBarStyleHorizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_toLeftOf="@+id/play_end_time"
android:layout_toRightOf="@+id/play_time" /> <!-- 视频播放总时间 --> <TextView
android:id="@+id/play_end_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="3dp"
android:text="20:12:33"
android:textColor="#ffffff"
android:textSize="12sp" />
</RelativeLayout> <RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" > <!-- 视频质量设定按钮 --> <Button
android:id="@+id/zhiliang"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:background="@drawable/player_quality_current_background"
android:onClick="showP"
android:text="质量"
android:textColor="#ffffff"
android:textSize="12sp" /> <FrameLayout
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_centerInParent="true" > <!-- 快退按钮 --> <Button
android:id="@+id/font"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:background="@drawable/player_prev_highlight" />
<!-- 播放,停止按钮 --> <Button
android:id="@+id/play"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@drawable/player_pause_highlight" />
<!-- 快进按钮 --> <Button
android:id="@+id/next"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:background="@drawable/test_player_next_highlight" />
</FrameLayout> <TextView
android:id="@+id/sudu2"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_alignParentRight="true"
android:layout_marginRight="2dp"
android:gravity="center_vertical"
android:text="显示"
android:textColor="#ffffff"
android:textSize="14sp" />
</RelativeLayout>
</LinearLayout>
</FrameLayout>
<!-- 控制喇叭音量 --> <FrameLayout
android:id="@+id/operation_volume_brightness"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="#00000000"
android:orientation="horizontal"
android:padding="0dip"
android:visibility="invisible" > <ImageView
android:id="@+id/operation_bg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/video_volumn_bg" /> <FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center_horizontal"
android:paddingBottom="25dip" > <ImageView
android:id="@+id/operation_full"
android:layout_width="94dip"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:src="@drawable/video_num_bg" /> <ImageView
android:id="@+id/operation_percent"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:scaleType="matrix"
android:src="@drawable/video_num_front" />
</FrameLayout>
</FrameLayout>
<!-- 视频缓冲进度条 --> <LinearLayout
android:id="@+id/pb"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:orientation="horizontal" >
<TextView
android:id="@+id/sudu"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginRight="5dp"
android:textColor="#ffffff"
android:textSize="18sp" /> <TextView
android:id="@+id/buff"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="0%"
android:textSize="18sp" /> <ProgressBar
style="@android:style/Widget.ProgressBar.Small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center" />
</LinearLayout> </RelativeLayout>

Vitamio视频播放的更多相关文章

  1. vitamio视频播放库

    vitamio视频播放库 http://www.d    evstore.cn/evaluation/testInfo/155-181.html

  2. Vitamio视频播放器

    前言 虽然Android已经内置了VideoView组件和MediaPlayer类来支持开发视频播放器,但支持格式.性能等各方面都十分有限,这里与大家一起利用免费的Vitamio来打造属于自己的And ...

  3. Vitamio 视频播放

     资料总结 Vitamio官网:https://www.vitamio.org 源码地址:https://github.com/yixia/VitamioBundle 最佳教程:大名鼎鼎的农民伯伯博客 ...

  4. 非常有用的GitHub链接

    平常开发工作中,我经常取Github上搜索项目,Clone下来学习使用,在这个过程中,发现了好多比较好的Github地址,记录下来,分享出去. image 非常有用的GitHub链接(顺序不分先后): ...

  5. github视频录制播放相关功能-参考

    lookingstars/JZVideoDemo  视频播放器 Updated on 11 Aug Objective-C 15 10 caoguoqing/VideoEditDemo  iOS vi ...

  6. 视频播放-VideoVIew,Vitamio

    播放视频文件其实并不比播放音频文件复杂,主要是使用 VideoView类来实现的.这个类将视频的显示和控制集于一身,使得我们仅仅借助它就可以完成一个简易的视频播放器.VideoView的用法和 Med ...

  7. 玩转Android之在线视频播放控件Vitamio的使用

    其实Android中自带的MediaPlayer本身就能播放在线视频,MediaPlayer结合SurfaceView播放在线视频也是不错的选择(如果你没有性能或者用户体验上的要求),关于MediaP ...

  8. Android开发学习之路--基于vitamio的视频播放器(二)

      终于把该忙的事情都忙得差不多了,接下来又可以开始good good study,day day up了.在Android开发学习之路–基于vitamio的视频播放器(一)中,主要讲了播放器的界面的 ...

  9. Android开发学习之路--基于vitamio的视频播放器(一)

      之前也试过vitamio这个库,后来不知道被什么事情给耽搁了,就没继续下去.近来觉得视频还是需要学习一下的,谁让直播那么火呢,就想着写一个简单的视频播放的app先吧.好了那就开始吧,暂时取名为JP ...

随机推荐

  1. 【转】如何测试CTS4.0 -- 不错

    原文网址:http://blog.csdn.net/subsist/article/details/7209341/ CTS4.0测试步骤 V1.2 (更新到CTS4.0 R3)     第一:平台准 ...

  2. for添加用户

    #!/bin/bash #接受一个参数: #add: 添加用户user1..user10 #del: 删除用户user1..user10 #其它:退出 #定义变量 ADD=add DEL=del #判 ...

  3. Linux权限管理(笔记)

    权限管理:r: w:x: 三类用户:u: 属主g: 属组o: 其它用户 chown: 改变文件属主(只有管理员可以使用此命令)# chown USERNAME file,...    -R: 修改目录 ...

  4. hdu 5433 Xiao Ming climbing(bfs+三维标记)

    Problem Description   Due to the curse made by the devil,Xiao Ming is stranded on a mountain and can ...

  5. unity3d 建树篇

    今天碰到有人问这个问题,然后我经过一番折腾,找到了方法.例如以下: 有学过Unity3d的同学生都知道我们在对地形拖拉树木等表层时,其树木在我们实例执行中,它们都是能够任其他物体穿过. 这是为什么.相 ...

  6. 浅谈Service Manager成为Android进程间通信(IPC)机制Binder守护进程之路

    文章转载至CSDN社区罗升阳的安卓之旅,原文地址:http://blog.csdn.net/luoshengyang/article/details/6621566 上一篇文章Android进程间通信 ...

  7. js获取某个标签中的信息

    <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http ...

  8. MySQL 触发器的定义

    -- Insert DELIMITER $$ USE `testdatabase`$$ DROP TRIGGER /*!50032 IF EXISTS */ `Trigger_XXX_INSERT`$ ...

  9. for-in用法

    var nyc = {     fullName: "New York City",     mayor: "Bill de Blasio",     popu ...

  10. LinearLayout使用简单实例

    1.代码 import android.annotation.SuppressLint; import android.app.Activity; import android.app.ActionB ...