diff --git a/ijkmediademo/AndroidManifest.xml b/ijkmediademo/AndroidManifest.xml new file mode 100644 index 0000000000000000000000000000000000000000..3fb24150b034e5499cd68691259566ec892be2e1 --- /dev/null +++ b/ijkmediademo/AndroidManifest.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ijkmediademo/proguard-project.txt b/ijkmediademo/proguard-project.txt new file mode 100644 index 0000000000000000000000000000000000000000..f2fe1559a217865a5454add526dcc446f892385b --- /dev/null +++ b/ijkmediademo/proguard-project.txt @@ -0,0 +1,20 @@ +# To enable ProGuard in your project, edit project.properties +# to define the proguard.config property as described in that file. +# +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in ${sdk.dir}/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the ProGuard +# include property in project.properties. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} diff --git a/ijkmediademo/project.properties b/ijkmediademo/project.properties new file mode 100644 index 0000000000000000000000000000000000000000..059c86f6bf35e0f9be4aa72caab68e1b19a55ff1 --- /dev/null +++ b/ijkmediademo/project.properties @@ -0,0 +1,16 @@ +# This file is automatically generated by Android Tools. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file must be checked in Version Control Systems. +# +# To customize properties used by the Ant build system edit +# "ant.properties", and override values to adapt the script to your +# project structure. +# +# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): +#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt + +# Project target. +target=android-17 +android.library.reference.1=../ijkmediawidget +android.library.reference.2=../ijkmediaplayer diff --git a/ijkmediademo/res/drawable-hdpi/ic_launcher.png b/ijkmediademo/res/drawable-hdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..96a442e5b8e9394ccf50bab9988cb2316026245d Binary files /dev/null and b/ijkmediademo/res/drawable-hdpi/ic_launcher.png differ diff --git a/ijkmediademo/res/drawable-mdpi/ic_launcher.png b/ijkmediademo/res/drawable-mdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..359047dfa4ed206e41e2354f9c6b307e713efe32 Binary files /dev/null and b/ijkmediademo/res/drawable-mdpi/ic_launcher.png differ diff --git a/ijkmediademo/res/drawable-xhdpi/ic_launcher.png b/ijkmediademo/res/drawable-xhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..71c6d760f05183ef8a47c614d8d13380c8528499 Binary files /dev/null and b/ijkmediademo/res/drawable-xhdpi/ic_launcher.png differ diff --git a/ijkmediademo/res/layout/activity_player.xml b/ijkmediademo/res/layout/activity_player.xml new file mode 100644 index 0000000000000000000000000000000000000000..6ac1bc9c704cf68bdb450fe26b73f45fccb8bc24 --- /dev/null +++ b/ijkmediademo/res/layout/activity_player.xml @@ -0,0 +1,14 @@ + + + + + \ No newline at end of file diff --git a/ijkmediademo/res/values/attrs.xml b/ijkmediademo/res/values/attrs.xml new file mode 100644 index 0000000000000000000000000000000000000000..e67df0a379a87ce016a2e26f7732ead0a8dc0cb2 --- /dev/null +++ b/ijkmediademo/res/values/attrs.xml @@ -0,0 +1,14 @@ + + + + + + + + + diff --git a/ijkmediademo/res/values/colors.xml b/ijkmediademo/res/values/colors.xml new file mode 100644 index 0000000000000000000000000000000000000000..327c0604ce2213706c63cb482ad34c50ec395f25 --- /dev/null +++ b/ijkmediademo/res/values/colors.xml @@ -0,0 +1,5 @@ + + + #66000000 + + diff --git a/ijkmediademo/res/values/strings.xml b/ijkmediademo/res/values/strings.xml new file mode 100644 index 0000000000000000000000000000000000000000..b278c3ca34ea9ab51ca90ab2d5bb598aa07c7fdb --- /dev/null +++ b/ijkmediademo/res/values/strings.xml @@ -0,0 +1,8 @@ + + + + ijkmediademo + Dummy Button + DUMMY\nCONTENT + + diff --git a/ijkmediademo/res/values/styles.xml b/ijkmediademo/res/values/styles.xml new file mode 100644 index 0000000000000000000000000000000000000000..37141fc63407f5cfddc25a6683ca70e3a71ee8ce --- /dev/null +++ b/ijkmediademo/res/values/styles.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/ijkmediademo/src/tv/danmaku/ijk/media/demo/VideoPlayerActivity.java b/ijkmediademo/src/tv/danmaku/ijk/media/demo/VideoPlayerActivity.java new file mode 100644 index 0000000000000000000000000000000000000000..417a12faf220ef0b4a9286bbf08f1282a608f4e5 --- /dev/null +++ b/ijkmediademo/src/tv/danmaku/ijk/media/demo/VideoPlayerActivity.java @@ -0,0 +1,36 @@ +package tv.danmaku.ijk.media.demo; + +import java.io.File; + +import tv.danmaku.ijk.media.widget.MediaController; +import tv.danmaku.ijk.media.widget.VideoView; +import android.app.Activity; +import android.os.Bundle; +import android.os.Environment; + +public class VideoPlayerActivity extends Activity { + private VideoView mVideoView; + private MediaController mMediaController; + + /*- + private String mVideoPath = "httplive://v.youku.com/player/getM3U8/vid/XNTY1ODE5NjMy/type//v.m3u8"; + */ + private String mVideoPath = "http://v.iask.com/v_play_ipad.php?vid=99979978"; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_player); + + mVideoPath = new File(Environment.getExternalStorageDirectory(), + "download/test.mp4").getAbsolutePath(); + + mMediaController = new MediaController(this); + + mVideoView = (VideoView) findViewById(R.id.video_view); + mVideoView.setMediaController(mMediaController); + mVideoView.setVideoPath(mVideoPath); + mVideoView.requestFocus(); + mVideoView.start(); + } +}