• 大小: 9.95MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-11-09
  • 语言: Java
  • 标签: android  vlc  jar  源码  

资源简介

忘了是哪下载到的。这个demo比较好用,传上去让更多人看到吧,这个demo我只是搬运工,哪位大神写的我已经忘了。

资源截图

代码片段和文件信息

package com.mediedictionary.playerlibrary;

import java.util.ArrayList;
import java.util.List;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.ListActivity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.view.View.onclickListener;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ArrayAdapter;
import android.widget.EditText;

public class DemoActivity extends ListActivity implements OnItemClickListener {

List items;
ArrayAdapter adapter;

@SuppressLint(“SdCardPath“)
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main_demo);

items = new ArrayList();
items.add(“http://img1.peiyinxiu.com/2014121211339c64b7fb09742e2c.mp4“);
items.add(“rtmp://lm01.everyon.tv:1935/ptv/pld852“);
items.add(“rtmp://183.129.244.168/weipai/s1“);
items.add(“file:///sdcard/mix.mp4“);
items.add(“file:///sdcard/DCIM/Camera/VID_20150128_155555.mp4“);
items.add(“file:///sdcard/mix/1.mp4“);
items.add(“http://img1.peiyinxiu.com/2015020312092f84a6085b34dc7c.mp4“);
//read data
SharedPreferences mySharedPreferences = getSharedPreferences(“test“ Activity.MODE_PRIVATE);
((EditText) findViewById(R.id.et_url)).setText(mySharedPreferences.getString(“url“ ““));

adapter = new ArrayAdapter(this android.R.layout.simple_list_item_1 items);
setListAdapter(adapter);
getListView().setOnItemClickListener(this);

findViewById(R.id.btn_play).setonclickListener(new onclickListener() {

@Override
public void onclick(View view) {
String url = ((EditText) findViewById(R.id.et_url)).getText().toString().trim();
if (!TextUtils.isEmpty(url)) {
startActivity(new Intent(DemoActivity.this PlayerActivity.class).putExtra(“url“ url));
}

//save data
SharedPreferences mySharedPreferences = getSharedPreferences(“test“ Activity.MODE_PRIVATE);
SharedPreferences.Editor editor = mySharedPreferences.edit();
editor.putString(“url“ ((EditText) findViewById(R.id.et_url)).getText().toString().trim());
editor.commit();

}
});
}

@Override
public void onItemClick(AdapterView arg0 View arg1 int position long arg3) {
startActivity(new Intent(this PlayerActivity.class).putExtra(“url“ items.get(position)));
}
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2015-03-07 15:57  AndroidPlayerLibrary-master\
     目录           0  2015-03-07 15:57  AndroidPlayerLibrary-master\PlayerLibrary\
     文件         752  2015-03-07 15:57  AndroidPlayerLibrary-master\PlayerLibrary\.classpath
     文件         816  2015-03-07 15:57  AndroidPlayerLibrary-master\PlayerLibrary\.project
     目录           0  2015-03-07 15:57  AndroidPlayerLibrary-master\PlayerLibrary\.settings\
     文件          85  2015-03-07 15:57  AndroidPlayerLibrary-master\PlayerLibrary\.settings\org.eclipse.core.resources.prefs
     文件         173  2015-03-07 15:57  AndroidPlayerLibrary-master\PlayerLibrary\.settings\org.eclipse.jdt.core.prefs
     文件        1805  2015-03-07 15:57  AndroidPlayerLibrary-master\PlayerLibrary\AndroidManifest.xml
     文件       51394  2015-03-07 15:57  AndroidPlayerLibrary-master\PlayerLibrary\ic_launcher-web.png
     目录           0  2015-03-07 15:57  AndroidPlayerLibrary-master\PlayerLibrary\libs\
     文件      648327  2015-03-07 15:57  AndroidPlayerLibrary-master\PlayerLibrary\libs\android-support-v4.jar
     目录           0  2015-03-07 15:57  AndroidPlayerLibrary-master\PlayerLibrary\libs\armeabi-v7a\
     文件       21536  2015-03-07 15:57  AndroidPlayerLibrary-master\PlayerLibrary\libs\armeabi-v7a\libiomx-gingerbread.so
     文件       21536  2015-03-07 15:57  AndroidPlayerLibrary-master\PlayerLibrary\libs\armeabi-v7a\libiomx-hc.so
     文件       21536  2015-03-07 15:57  AndroidPlayerLibrary-master\PlayerLibrary\libs\armeabi-v7a\libiomx-ics.so
     文件    14453924  2015-03-07 15:57  AndroidPlayerLibrary-master\PlayerLibrary\libs\armeabi-v7a\libvlcjni.so
     文件         781  2015-03-07 15:57  AndroidPlayerLibrary-master\PlayerLibrary\proguard-project.txt
     文件         563  2015-03-07 15:57  AndroidPlayerLibrary-master\PlayerLibrary\project.properties
     目录           0  2015-03-07 15:57  AndroidPlayerLibrary-master\PlayerLibrary\res\
     目录           0  2015-03-07 15:57  AndroidPlayerLibrary-master\PlayerLibrary\res\drawable-hdpi\
     文件       47104  2015-03-07 15:57  AndroidPlayerLibrary-master\PlayerLibrary\res\drawable-hdpi\Thumbs.db
     文件        1070  2015-03-07 15:57  AndroidPlayerLibrary-master\PlayerLibrary\res\drawable-hdpi\ic_backward_normal_w.png
     文件        4088  2015-03-07 15:57  AndroidPlayerLibrary-master\PlayerLibrary\res\drawable-hdpi\ic_backward_pressed_w.png
     文件        1232  2015-03-07 15:57  AndroidPlayerLibrary-master\PlayerLibrary\res\drawable-hdpi\ic_crop_circle_normal.png
     文件        4204  2015-03-07 15:57  AndroidPlayerLibrary-master\PlayerLibrary\res\drawable-hdpi\ic_crop_circle_pressed.png
     文件        1052  2015-03-07 15:57  AndroidPlayerLibrary-master\PlayerLibrary\res\drawable-hdpi\ic_forward_normal_w.png
     文件        3061  2015-03-07 15:57  AndroidPlayerLibrary-master\PlayerLibrary\res\drawable-hdpi\ic_forward_pressed_w.png
     文件        3850  2015-03-07 15:57  AndroidPlayerLibrary-master\PlayerLibrary\res\drawable-hdpi\ic_launcher.png
     文件         618  2015-03-07 15:57  AndroidPlayerLibrary-master\PlayerLibrary\res\drawable-hdpi\ic_lock.png
     文件         612  2015-03-07 15:57  AndroidPlayerLibrary-master\PlayerLibrary\res\drawable-hdpi\ic_locked.png
     文件         314  2015-03-07 15:57  AndroidPlayerLibrary-master\PlayerLibrary\res\drawable-hdpi\ic_pause_normal_w.png
............此处省略56个文件信息

评论

共有 条评论