Skip to content

Commit f296e1f

Browse files
committed
package ijkplayer-example as ijkplayer-view
1 parent 72f1b61 commit f296e1f

File tree

24 files changed

+584
-21
lines changed

24 files changed

+584
-21
lines changed

android/ijkplayer/gradle.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,7 @@ POM_LICENSE_DIST=repo
3434
POM_DEVELOPER_ID=bbcallen
3535
POM_DEVELOPER_NAME=Zhang Rui
3636
POM_DEVELOPER_EMAIL=[email protected]
37+
38+
# set to false, is 'module' mode, ijkplayer-example will be package to be `ijkplayer-view`
39+
# set to true, is 'app' mode, ijkplayer-example will be a app
40+
isModuleAsApp=false
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
apply plugin: 'com.android.application'
2+
3+
android {
4+
compileSdkVersion project.compileSdkVersion
5+
buildToolsVersion project.buildToolsVersion
6+
7+
8+
defaultConfig {
9+
applicationId "cn.transcodegroup.ijkplayerapp"
10+
minSdkVersion 14
11+
targetSdkVersion 28
12+
versionCode 1
13+
versionName "1.0"
14+
15+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
16+
17+
}
18+
19+
buildTypes {
20+
release {
21+
minifyEnabled false
22+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
23+
}
24+
}
25+
}
26+
27+
dependencies {
28+
compile fileTree(dir: 'libs', include: ['*.jar'])
29+
if (!isModuleAsApp.toBoolean()) {
30+
compile project(':ijkplayer-view')
31+
}
32+
33+
testCompile "junit:junit:4.12"
34+
androidTestCompile("com.android.support.test:runner:1.0.2") {
35+
exclude group: 'com.android.support', module: 'support-annotations'
36+
}
37+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<manifest package="cn.transcodegroup.ijkplayerapp"
2+
xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools">
4+
5+
<application
6+
android:allowBackup="true"
7+
android:icon="@mipmap/ic_launcher"
8+
android:label="@string/app_name"
9+
android:roundIcon="@mipmap/ic_launcher_round"
10+
android:supportsRtl="true"
11+
android:theme="@style/AppTheme"
12+
tools:ignore="GoogleAppIndexingWarning">
13+
<activity android:name=".MainActivity">
14+
<intent-filter>
15+
<action android:name="android.intent.action.MAIN"/>
16+
17+
<category android:name="android.intent.category.LAUNCHER"/>
18+
</intent-filter>
19+
</activity>
20+
</application>
21+
</manifest>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package cn.transcodegroup.ijkplayerapp;
2+
3+
import android.os.Bundle;
4+
import android.support.annotation.Nullable;
5+
import android.support.v7.app.AppCompatActivity;
6+
import android.widget.FrameLayout;
7+
8+
import tv.danmaku.ijk.media.example.widget.media.IjkVideoView;
9+
10+
public class MainActivity extends AppCompatActivity {
11+
@Override
12+
protected void onCreate(@Nullable Bundle savedInstanceState) {
13+
super.onCreate(savedInstanceState);
14+
FrameLayout layout = new FrameLayout(this);
15+
IjkVideoView videoView = new IjkVideoView(this);
16+
layout.addView(videoView);
17+
setContentView(layout);
18+
videoView.setVideoPath("rtmp://118.89.52.73:1935/live/3601_2");
19+
videoView.start();
20+
}
21+
}
6.24 KB
Loading
10.2 KB
Loading
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<color name="colorPrimary">#008577</color>
4+
<color name="colorPrimaryDark">#00574B</color>
5+
<color name="colorAccent">#D81B60</color>
6+
</resources>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<resources>
2+
<string name="app_name">ijkplayer-app</string>
3+
</resources>

0 commit comments

Comments
 (0)