diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000..b3a3ecec8
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,9 @@
+*.iml
+.gradle
+/local.properties
+.DS_Store
+/build
+/.idea
+/captures
+.externalNativeBuild
+*.apk
diff --git a/app/.gitignore b/app/.gitignore
new file mode 100644
index 000000000..796b96d1c
--- /dev/null
+++ b/app/.gitignore
@@ -0,0 +1 @@
+/build
diff --git a/app/build.gradle b/app/build.gradle
new file mode 100644
index 000000000..810669f6a
--- /dev/null
+++ b/app/build.gradle
@@ -0,0 +1,36 @@
+apply plugin: 'com.android.application'
+apply plugin: 'com.neenbedankt.android-apt'
+
+android {
+
+ def globalConfiguration = rootProject.extensions.getByName("ext")
+ compileSdkVersion globalConfiguration.androidCompileSdkVersion
+ buildToolsVersion globalConfiguration.androidBuildToolsVersion
+
+ defaultConfig {
+ applicationId "com.example.gsyvideoplayer"
+
+ minSdkVersion globalConfiguration.androidMinSdkVersion
+ targetSdkVersion globalConfiguration.androidTargetSdkVersion
+
+ versionCode 1
+ versionName "1.0"
+
+ }
+
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+ }
+ }
+}
+
+dependencies {
+ compile fileTree(dir: 'libs', include: ['*.jar'])
+ def viewDependencies = rootProject.ext.viewDependencies
+ apt viewDependencies.apt_butterKnife
+ compile viewDependencies.butterKnife
+ compile project(':gsyVideoPlayer')
+ compile 'com.android.support:appcompat-v7:22.2.1'
+}
diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro
new file mode 100644
index 000000000..960a34898
--- /dev/null
+++ b/app/proguard-rules.pro
@@ -0,0 +1,17 @@
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in C:\workSpace\softWare\Android\adt-bundle-windows-x86_64-20140702\sdk/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the proguardFiles
+# directive in build.gradle.
+#
+# 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/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
new file mode 100644
index 000000000..3dd7b1654
--- /dev/null
+++ b/app/src/main/AndroidManifest.xml
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/java/com/example/gsyvideoplayer/MainActivity.java b/app/src/main/java/com/example/gsyvideoplayer/MainActivity.java
new file mode 100644
index 000000000..2789c05a2
--- /dev/null
+++ b/app/src/main/java/com/example/gsyvideoplayer/MainActivity.java
@@ -0,0 +1,29 @@
+package com.example.gsyvideoplayer;
+
+import android.os.Bundle;
+import android.support.v7.app.AppCompatActivity;
+import android.widget.Button;
+
+import com.example.gsyvideoplayer.utils.JumpUtils;
+
+import butterknife.BindView;
+import butterknife.ButterKnife;
+import butterknife.OnClick;
+
+public class MainActivity extends AppCompatActivity {
+
+ @BindView(R.id.open_btn)
+ Button openBtn;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_main);
+ ButterKnife.bind(this);
+ }
+
+ @OnClick(R.id.open_btn)
+ public void onClick() {
+ JumpUtils.goToVideoPlayer(this, openBtn);
+ }
+}
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
new file mode 100644
index 000000000..2ea84d3ab
--- /dev/null
+++ b/app/src/main/res/layout/activity_main.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.png b/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 000000000..cde69bccc
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.png b/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 000000000..c133a0cbd
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 000000000..bfa42f0e7
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 000000000..324e72cdd
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 000000000..aee44e138
Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/values-w820dp/dimens.xml b/app/src/main/res/values-w820dp/dimens.xml
new file mode 100644
index 000000000..63fc81644
--- /dev/null
+++ b/app/src/main/res/values-w820dp/dimens.xml
@@ -0,0 +1,6 @@
+
+
+ 64dp
+
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
new file mode 100644
index 000000000..3ab3e9cbc
--- /dev/null
+++ b/app/src/main/res/values/colors.xml
@@ -0,0 +1,6 @@
+
+
+ #3F51B5
+ #303F9F
+ #FF4081
+
diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml
new file mode 100644
index 000000000..47c822467
--- /dev/null
+++ b/app/src/main/res/values/dimens.xml
@@ -0,0 +1,5 @@
+
+
+ 16dp
+ 16dp
+
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
new file mode 100644
index 000000000..31e7e1970
--- /dev/null
+++ b/app/src/main/res/values/strings.xml
@@ -0,0 +1,3 @@
+
+ GSYVideoPlayer
+
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
new file mode 100644
index 000000000..30d232444
--- /dev/null
+++ b/app/src/main/res/values/styles.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
diff --git a/build.gradle b/build.gradle
new file mode 100644
index 000000000..1374dc9cd
--- /dev/null
+++ b/build.gradle
@@ -0,0 +1,24 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+apply from: 'dependencies.gradle'
+
+buildscript {
+ repositories {
+ jcenter()
+ }
+ dependencies {
+ classpath 'com.android.tools.build:gradle:2.2.2'
+ classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
+ // NOTE: Do not place your application dependencies here; they belong
+ // in the individual module build.gradle files
+ }
+}
+
+allprojects {
+ repositories {
+ jcenter()
+ }
+}
+
+task clean(type: Delete) {
+ delete rootProject.buildDir
+}
diff --git a/gradle.properties b/gradle.properties
new file mode 100644
index 000000000..aac7c9b46
--- /dev/null
+++ b/gradle.properties
@@ -0,0 +1,17 @@
+# Project-wide Gradle settings.
+
+# IDE (e.g. Android Studio) users:
+# Gradle settings configured through the IDE *will override*
+# any settings specified in this file.
+
+# For more details on how to configure your build environment visit
+# http://www.gradle.org/docs/current/userguide/build_environment.html
+
+# Specifies the JVM arguments used for the daemon process.
+# The setting is particularly useful for tweaking memory settings.
+org.gradle.jvmargs=-Xmx1536m
+
+# When configured, Gradle will run in incubating parallel mode.
+# This option should only be used with decoupled projects. More details, visit
+# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
+# org.gradle.parallel=true
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 000000000..13372aef5
Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 000000000..04e285f34
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Mon Dec 28 10:00:20 PST 2015
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
diff --git a/gradlew b/gradlew
new file mode 100644
index 000000000..9d82f7891
--- /dev/null
+++ b/gradlew
@@ -0,0 +1,160 @@
+#!/usr/bin/env bash
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+ echo "$*"
+}
+
+die ( ) {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+esac
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
+function splitJvmOpts() {
+ JVM_OPTS=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/gradlew.bat b/gradlew.bat
new file mode 100644
index 000000000..8a0b282aa
--- /dev/null
+++ b/gradlew.bat
@@ -0,0 +1,90 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windowz variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+if "%@eval[2+2]" == "4" goto 4NT_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+goto execute
+
+:4NT_args
+@rem Get arguments from the 4NT Shell from JP Software
+set CMD_LINE_ARGS=%$
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/gsyVideoPlayer/.gitignore b/gsyVideoPlayer/.gitignore
new file mode 100644
index 000000000..796b96d1c
--- /dev/null
+++ b/gsyVideoPlayer/.gitignore
@@ -0,0 +1 @@
+/build
diff --git a/gsyVideoPlayer/build.gradle b/gsyVideoPlayer/build.gradle
new file mode 100644
index 000000000..4a2d79121
--- /dev/null
+++ b/gsyVideoPlayer/build.gradle
@@ -0,0 +1,42 @@
+apply plugin: 'com.android.library'
+apply plugin: 'com.neenbedankt.android-apt'
+android {
+
+ def globalConfiguration = rootProject.extensions.getByName("ext")
+ compileSdkVersion globalConfiguration.androidCompileSdkVersion
+ buildToolsVersion globalConfiguration.androidBuildToolsVersion
+
+ defaultConfig {
+
+ minSdkVersion globalConfiguration.androidMinSdkVersion
+ targetSdkVersion globalConfiguration.androidTargetSdkVersion
+
+ versionCode 1
+ versionName "1.0"
+
+ }
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+ }
+ }
+}
+
+dependencies {
+ compile fileTree(dir: 'libs', include: ['*.jar'])
+ def viewDependencies = rootProject.ext.viewDependencies
+ def dataDependencies = rootProject.ext.dataDependencies
+ apt viewDependencies.apt_butterKnife
+ compile viewDependencies.butterKnife
+ compile viewDependencies.ijkplayer_java
+ compile viewDependencies.ijkplayer_armv7a
+ compile viewDependencies.ijkplayer_armv5
+ compile viewDependencies.ijkplayer_exo
+ compile dataDependencies.videocache
+ compile androidDependencies.support_v4
+ compile androidDependencies.appcompat_v7
+ compile androidDependencies.recyclerView
+ compile androidDependencies.cardview_v7
+ compile androidDependencies.design
+}
diff --git a/gsyVideoPlayer/proguard-rules.pro b/gsyVideoPlayer/proguard-rules.pro
new file mode 100644
index 000000000..960a34898
--- /dev/null
+++ b/gsyVideoPlayer/proguard-rules.pro
@@ -0,0 +1,17 @@
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in C:\workSpace\softWare\Android\adt-bundle-windows-x86_64-20140702\sdk/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the proguardFiles
+# directive in build.gradle.
+#
+# 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/gsyVideoPlayer/src/main/AndroidManifest.xml b/gsyVideoPlayer/src/main/AndroidManifest.xml
new file mode 100644
index 000000000..45b456a19
--- /dev/null
+++ b/gsyVideoPlayer/src/main/AndroidManifest.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
diff --git a/gsyVideoPlayer/src/main/java/com/shuyu/gsyvideoplayer/video/StandardGSYVideoPlayer.java b/gsyVideoPlayer/src/main/java/com/shuyu/gsyvideoplayer/video/StandardGSYVideoPlayer.java
new file mode 100644
index 000000000..fd47ce014
--- /dev/null
+++ b/gsyVideoPlayer/src/main/java/com/shuyu/gsyvideoplayer/video/StandardGSYVideoPlayer.java
@@ -0,0 +1,570 @@
+package com.shuyu.gsyvideoplayer.video;
+
+import android.app.Activity;
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.text.TextUtils;
+import android.util.AttributeSet;
+import android.view.Gravity;
+import android.view.LayoutInflater;
+import android.view.MotionEvent;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.Window;
+import android.view.WindowManager;
+import android.widget.ImageView;
+import android.widget.ProgressBar;
+import android.widget.TextView;
+import android.widget.Toast;
+
+
+import com.shuyu.gsyvideoplayer.GSYVideoPlayer;
+import com.shuyu.gsyvideoplayer.R;
+import com.shuyu.gsyvideoplayer.listener.StandardVideoAllCallBack;
+import com.shuyu.gsyvideoplayer.utils.CommonUtil;
+
+import java.util.Timer;
+import java.util.TimerTask;
+
+/**
+ * Created by shuyu on 2016/11/11.
+ */
+
+public class StandardGSYVideoPlayer extends GSYVideoPlayer {
+
+
+ protected static StandardVideoAllCallBack JC_BURIED_POINT_STANDARD;
+ protected static Timer DISSMISS_CONTROL_VIEW_TIMER;
+
+ public ImageView backButton;
+ public ProgressBar bottomProgressBar, loadingProgressBar;
+ public TextView titleTextView;
+ public ImageView thumbImageView;
+ public ImageView coverImageView;
+
+ protected DismissControlViewTimerTask mDismissControlViewTimerTask;
+
+
+ public static void setJcBuriedPointStandard(StandardVideoAllCallBack jcBuriedPointStandard) {
+ JC_BURIED_POINT_STANDARD = jcBuriedPointStandard;
+ GSYVideoPlayer.setJcBuriedPoint(jcBuriedPointStandard);
+ }
+
+ public StandardGSYVideoPlayer(Context context) {
+ super(context);
+ }
+
+ public StandardGSYVideoPlayer(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ }
+
+ @Override
+ protected void init(Context context) {
+ super.init(context);
+ bottomProgressBar = (ProgressBar) findViewById(R.id.bottom_progressbar);
+ titleTextView = (TextView) findViewById(R.id.title);
+ backButton = (ImageView) findViewById(R.id.back);
+ thumbImageView = (ImageView) findViewById(R.id.thumb);
+ coverImageView = (ImageView) findViewById(R.id.cover);
+ loadingProgressBar = (ProgressBar) findViewById(R.id.loading);
+
+ thumbImageView.setOnClickListener(this);
+ backButton.setOnClickListener(this);
+
+ }
+
+ @Override
+ public boolean setUp(String url, boolean cacheWithPlay, Object... objects) {
+ if (objects.length == 0) return false;
+ if (super.setUp(url, cacheWithPlay, objects)) {
+ titleTextView.setText(objects[0].toString());
+ if (mIfCurrentIsFullscreen) {
+ fullscreenButton.setImageResource(R.drawable.video_shrink);
+ } else {
+ fullscreenButton.setImageResource(R.drawable.video_enlarge);
+ backButton.setVisibility(View.GONE);
+ }
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public int getLayoutId() {
+ return R.layout.video_layout_standard;
+ }
+
+ @Override
+ protected void setStateAndUi(int state) {
+ super.setStateAndUi(state);
+ switch (mCurrentState) {
+ case CURRENT_STATE_NORMAL:
+ changeUiToNormal();
+ break;
+ case CURRENT_STATE_PREPAREING:
+ changeUiToPrepareingShow();
+ startDismissControlViewTimer();
+ break;
+ case CURRENT_STATE_PLAYING:
+ changeUiToPlayingShow();
+ startDismissControlViewTimer();
+ break;
+ case CURRENT_STATE_PAUSE:
+ changeUiToPauseShow();
+ cancelDismissControlViewTimer();
+ break;
+ case CURRENT_STATE_ERROR:
+ changeUiToError();
+ break;
+ case CURRENT_STATE_AUTO_COMPLETE:
+ changeUiToCompleteShow();
+ cancelDismissControlViewTimer();
+ bottomProgressBar.setProgress(100);
+ break;
+ case CURRENT_STATE_PLAYING_BUFFERING_START:
+ changeUiToPlayingBufferingShow();
+ break;
+ }
+ }
+
+ @Override
+ public boolean onTouch(View v, MotionEvent event) {
+ int id = v.getId();
+ if (id == R.id.surface_container) {
+ switch (event.getAction()) {
+ case MotionEvent.ACTION_DOWN:
+ break;
+ case MotionEvent.ACTION_MOVE:
+ break;
+ case MotionEvent.ACTION_UP:
+ startDismissControlViewTimer();
+ if (mChangePosition) {
+ int duration = getDuration();
+ int progress = mSeekTimePosition * 100 / (duration == 0 ? 1 : duration);
+ bottomProgressBar.setProgress(progress);
+ }
+ if (!mChangePosition && !mChangeVolume && !mBrightness) {
+ onClickUiToggle();
+ }
+ break;
+ }
+ } else if (id == R.id.progress) {
+ switch (event.getAction()) {
+ case MotionEvent.ACTION_DOWN:
+ cancelDismissControlViewTimer();
+ break;
+ case MotionEvent.ACTION_UP:
+ startDismissControlViewTimer();
+ break;
+ }
+ }
+ return super.onTouch(v, event);
+ }
+
+ @Override
+ public void onClick(View v) {
+ super.onClick(v);
+ int i = v.getId();
+ if (i == R.id.thumb) {
+ if (TextUtils.isEmpty(mUrl)) {
+ Toast.makeText(getContext(), getResources().getString(R.string.no_url), Toast.LENGTH_SHORT).show();
+ return;
+ }
+ if (mCurrentState == CURRENT_STATE_NORMAL) {
+ if (!mUrl.startsWith("file") && !CommonUtil.isWifiConnected(getContext()) && !WIFI_TIP_DIALOG_SHOWED) {
+ showWifiDialog();
+ return;
+ }
+ startPlayLocic();
+ } else if (mCurrentState == CURRENT_STATE_AUTO_COMPLETE) {
+ onClickUiToggle();
+ }
+ } else if (i == R.id.surface_container) {
+ if (JC_BURIED_POINT_STANDARD != null && isCurrentMediaListener()) {
+ if (mIfCurrentIsFullscreen) {
+ JC_BURIED_POINT_STANDARD.onClickBlankFullscreen(mUrl, mObjects);
+ } else {
+ JC_BURIED_POINT_STANDARD.onClickBlank(mUrl, mObjects);
+ }
+ }
+ startDismissControlViewTimer();
+ } else if (i == R.id.back) {
+ backFullscreen();
+ }
+ }
+
+ @Override
+ public void showWifiDialog() {
+ super.showWifiDialog();
+ AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
+ builder.setMessage(getResources().getString(R.string.tips_not_wifi));
+ builder.setPositiveButton(getResources().getString(R.string.tips_not_wifi_confirm), new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ dialog.dismiss();
+ startPlayLocic();
+ WIFI_TIP_DIALOG_SHOWED = true;
+ }
+ });
+ builder.setNegativeButton(getResources().getString(R.string.tips_not_wifi_cancel), new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ dialog.dismiss();
+ }
+ });
+ builder.create().show();
+ }
+
+ public void startPlayLocic() {
+ if (JC_BURIED_POINT_STANDARD != null) {
+ JC_BURIED_POINT_STANDARD.onClickStartThumb(mUrl, mObjects);
+ }
+ prepareVideo();
+ startDismissControlViewTimer();
+ }
+
+ private void onClickUiToggle() {
+ if (mCurrentState == CURRENT_STATE_PREPAREING) {
+ if (bottomContainer.getVisibility() == View.VISIBLE) {
+ changeUiToPrepareingClear();
+ } else {
+ changeUiToPrepareingShow();
+ }
+ } else if (mCurrentState == CURRENT_STATE_PLAYING) {
+ if (bottomContainer.getVisibility() == View.VISIBLE) {
+ changeUiToPlayingClear();
+ } else {
+ changeUiToPlayingShow();
+ }
+ } else if (mCurrentState == CURRENT_STATE_PAUSE) {
+ if (bottomContainer.getVisibility() == View.VISIBLE) {
+ changeUiToPauseClear();
+ } else {
+ changeUiToPauseShow();
+ }
+ } else if (mCurrentState == CURRENT_STATE_AUTO_COMPLETE) {
+ if (bottomContainer.getVisibility() == View.VISIBLE) {
+ changeUiToCompleteClear();
+ } else {
+ changeUiToCompleteShow();
+ }
+ } else if (mCurrentState == CURRENT_STATE_PLAYING_BUFFERING_START) {
+ if (bottomContainer.getVisibility() == View.VISIBLE) {
+ changeUiToPlayingBufferingClear();
+ } else {
+ changeUiToPlayingBufferingShow();
+ }
+ }
+ }
+
+ @Override
+ protected void setProgressAndTime(int progress, int secProgress, int currentTime, int totalTime) {
+ super.setProgressAndTime(progress, secProgress, currentTime, totalTime);
+ if (progress != 0) bottomProgressBar.setProgress(progress);
+ if (secProgress != 0) bottomProgressBar.setSecondaryProgress(secProgress);
+ }
+
+ @Override
+ protected void resetProgressAndTime() {
+ super.resetProgressAndTime();
+ bottomProgressBar.setProgress(0);
+ bottomProgressBar.setSecondaryProgress(0);
+ }
+
+ //Unified management Ui
+ private void changeUiToNormal() {
+ topContainer.setVisibility(View.VISIBLE);
+ bottomContainer.setVisibility(View.INVISIBLE);
+ startButton.setVisibility(View.VISIBLE);
+ loadingProgressBar.setVisibility(View.INVISIBLE);
+ thumbImageView.setVisibility(View.VISIBLE);
+ coverImageView.setVisibility(View.VISIBLE);
+ bottomProgressBar.setVisibility(View.INVISIBLE);
+ updateStartImage();
+ }
+
+ private void changeUiToPrepareingShow() {
+ topContainer.setVisibility(View.VISIBLE);
+ bottomContainer.setVisibility(View.VISIBLE);
+ startButton.setVisibility(View.INVISIBLE);
+ loadingProgressBar.setVisibility(View.VISIBLE);
+ thumbImageView.setVisibility(View.INVISIBLE);
+ coverImageView.setVisibility(View.VISIBLE);
+ bottomProgressBar.setVisibility(View.INVISIBLE);
+ }
+
+ private void changeUiToPrepareingClear() {
+ topContainer.setVisibility(View.INVISIBLE);
+ bottomContainer.setVisibility(View.INVISIBLE);
+ startButton.setVisibility(View.INVISIBLE);
+ thumbImageView.setVisibility(View.INVISIBLE);
+ bottomProgressBar.setVisibility(View.INVISIBLE);
+ coverImageView.setVisibility(View.VISIBLE);
+ }
+
+ private void changeUiToPlayingShow() {
+ topContainer.setVisibility(View.VISIBLE);
+ bottomContainer.setVisibility(View.VISIBLE);
+ startButton.setVisibility(View.VISIBLE);
+ loadingProgressBar.setVisibility(View.INVISIBLE);
+ thumbImageView.setVisibility(View.INVISIBLE);
+ coverImageView.setVisibility(View.INVISIBLE);
+ bottomProgressBar.setVisibility(View.INVISIBLE);
+ updateStartImage();
+ }
+
+ private void changeUiToPlayingClear() {
+ changeUiToClear();
+ bottomProgressBar.setVisibility(View.VISIBLE);
+ }
+
+ private void changeUiToPauseShow() {
+ topContainer.setVisibility(View.VISIBLE);
+ bottomContainer.setVisibility(View.VISIBLE);
+ startButton.setVisibility(View.VISIBLE);
+ loadingProgressBar.setVisibility(View.INVISIBLE);
+ thumbImageView.setVisibility(View.INVISIBLE);
+ coverImageView.setVisibility(View.INVISIBLE);
+ bottomProgressBar.setVisibility(View.INVISIBLE);
+ updateStartImage();
+ }
+
+ private void changeUiToPauseClear() {
+ changeUiToClear();
+ bottomProgressBar.setVisibility(View.VISIBLE);
+ }
+
+ private void changeUiToPlayingBufferingShow() {
+ topContainer.setVisibility(View.VISIBLE);
+ bottomContainer.setVisibility(View.VISIBLE);
+ startButton.setVisibility(View.INVISIBLE);
+ loadingProgressBar.setVisibility(View.VISIBLE);
+ thumbImageView.setVisibility(View.INVISIBLE);
+ coverImageView.setVisibility(View.INVISIBLE);
+ bottomProgressBar.setVisibility(View.INVISIBLE);
+ }
+
+ private void changeUiToPlayingBufferingClear() {
+ topContainer.setVisibility(View.INVISIBLE);
+ bottomContainer.setVisibility(View.INVISIBLE);
+ startButton.setVisibility(View.INVISIBLE);
+ loadingProgressBar.setVisibility(View.VISIBLE);
+ thumbImageView.setVisibility(View.INVISIBLE);
+ coverImageView.setVisibility(View.INVISIBLE);
+ bottomProgressBar.setVisibility(View.VISIBLE);
+ updateStartImage();
+ }
+
+ private void changeUiToClear() {
+ topContainer.setVisibility(View.INVISIBLE);
+ bottomContainer.setVisibility(View.INVISIBLE);
+ startButton.setVisibility(View.INVISIBLE);
+ loadingProgressBar.setVisibility(View.INVISIBLE);
+ thumbImageView.setVisibility(View.INVISIBLE);
+ coverImageView.setVisibility(View.INVISIBLE);
+ bottomProgressBar.setVisibility(View.INVISIBLE);
+ }
+
+ private void changeUiToCompleteShow() {
+ topContainer.setVisibility(View.VISIBLE);
+ bottomContainer.setVisibility(View.VISIBLE);
+ startButton.setVisibility(View.VISIBLE);
+ loadingProgressBar.setVisibility(View.INVISIBLE);
+ thumbImageView.setVisibility(View.VISIBLE);
+ coverImageView.setVisibility(View.INVISIBLE);
+ bottomProgressBar.setVisibility(View.INVISIBLE);
+ updateStartImage();
+ }
+
+ private void changeUiToCompleteClear() {
+ topContainer.setVisibility(View.INVISIBLE);
+ bottomContainer.setVisibility(View.INVISIBLE);
+ startButton.setVisibility(View.VISIBLE);
+ loadingProgressBar.setVisibility(View.INVISIBLE);
+ thumbImageView.setVisibility(View.VISIBLE);
+ coverImageView.setVisibility(View.INVISIBLE);
+ bottomProgressBar.setVisibility(View.VISIBLE);
+ updateStartImage();
+ }
+
+ private void changeUiToError() {
+ topContainer.setVisibility(View.INVISIBLE);
+ bottomContainer.setVisibility(View.INVISIBLE);
+ startButton.setVisibility(View.VISIBLE);
+ loadingProgressBar.setVisibility(View.INVISIBLE);
+ thumbImageView.setVisibility(View.INVISIBLE);
+ coverImageView.setVisibility(View.VISIBLE);
+ bottomProgressBar.setVisibility(View.INVISIBLE);
+ updateStartImage();
+ }
+
+ private void updateStartImage() {
+ if (mCurrentState == CURRENT_STATE_PLAYING) {
+ startButton.setImageResource(R.drawable.video_click_pause_selector);
+ } else if (mCurrentState == CURRENT_STATE_ERROR) {
+ startButton.setImageResource(R.drawable.video_click_error_selector);
+ } else {
+ startButton.setImageResource(R.drawable.video_click_play_selector);
+ }
+ }
+
+ protected Dialog mProgressDialog;
+ protected ProgressBar mDialogProgressBar;
+ protected TextView mDialogSeekTime;
+ protected TextView mDialogTotalTime;
+ protected ImageView mDialogIcon;
+
+ @Override
+ protected void showProgressDialog(float deltaX, String seekTime, int seekTimePosition, String totalTime, int totalTimeDuration) {
+ super.showProgressDialog(deltaX, seekTime, seekTimePosition, totalTime, totalTimeDuration);
+ if (mProgressDialog == null) {
+ View localView = LayoutInflater.from(getContext()).inflate(R.layout.video_progress_dialog, null);
+ mDialogProgressBar = ((ProgressBar) localView.findViewById(R.id.duration_progressbar));
+ mDialogSeekTime = ((TextView) localView.findViewById(R.id.tv_current));
+ mDialogTotalTime = ((TextView) localView.findViewById(R.id.tv_duration));
+ mDialogIcon = ((ImageView) localView.findViewById(R.id.duration_image_tip));
+ mProgressDialog = new Dialog(getContext(), R.style.video_style_dialog_progress);
+ mProgressDialog.setContentView(localView);
+ mProgressDialog.getWindow().addFlags(Window.FEATURE_ACTION_BAR);
+ mProgressDialog.getWindow().addFlags(32);
+ mProgressDialog.getWindow().addFlags(16);
+ mProgressDialog.getWindow().setLayout(-2, -2);
+ WindowManager.LayoutParams localLayoutParams = mProgressDialog.getWindow().getAttributes();
+ localLayoutParams.gravity = 49;
+ localLayoutParams.y = getResources().getDimensionPixelOffset(R.dimen.video_progress_dialog_margin_top);
+ mProgressDialog.getWindow().setAttributes(localLayoutParams);
+ }
+ if (!mProgressDialog.isShowing()) {
+ mProgressDialog.show();
+ }
+
+ mDialogSeekTime.setText(seekTime);
+ mDialogTotalTime.setText(" / " + totalTime);
+ mDialogProgressBar.setProgress(seekTimePosition * 100 / totalTimeDuration);
+ if (deltaX > 0) {
+ mDialogIcon.setBackgroundResource(R.drawable.video_forward_icon);
+ } else {
+ mDialogIcon.setBackgroundResource(R.drawable.video_backward_icon);
+ }
+
+ }
+
+ @Override
+ protected void dismissProgressDialog() {
+ super.dismissProgressDialog();
+ if (mProgressDialog != null) {
+ mProgressDialog.dismiss();
+ }
+ }
+
+
+ protected Dialog mBrightnessDialog;
+ protected TextView mBrightnessDialogTv;
+ protected Dialog mVolumeDialog;
+ protected ProgressBar mDialogVolumeProgressBar;
+
+ @Override
+ protected void showVolumeDialog(float deltaY, int volumePercent) {
+ super.showVolumeDialog(deltaY, volumePercent);
+ if (mVolumeDialog == null) {
+ View localView = LayoutInflater.from(getContext()).inflate(R.layout.video_volume_dialog, null);
+ mDialogVolumeProgressBar = ((ProgressBar) localView.findViewById(R.id.volume_progressbar));
+ mVolumeDialog = new Dialog(getContext(), R.style.video_style_dialog_progress);
+ mVolumeDialog.setContentView(localView);
+ mVolumeDialog.getWindow().addFlags(8);
+ mVolumeDialog.getWindow().addFlags(32);
+ mVolumeDialog.getWindow().addFlags(16);
+ mVolumeDialog.getWindow().setLayout(-2, -2);
+ WindowManager.LayoutParams localLayoutParams = mVolumeDialog.getWindow().getAttributes();
+ localLayoutParams.gravity = 19;
+ localLayoutParams.x = getContext().getResources().getDimensionPixelOffset(R.dimen.video_volume_dialog_margin_left);
+ mVolumeDialog.getWindow().setAttributes(localLayoutParams);
+ }
+ if (!mVolumeDialog.isShowing()) {
+ mVolumeDialog.show();
+ }
+
+ mDialogVolumeProgressBar.setProgress(volumePercent);
+ }
+
+ @Override
+ protected void dismissVolumeDialog() {
+ super.dismissVolumeDialog();
+ if (mVolumeDialog != null) {
+ mVolumeDialog.dismiss();
+ }
+ }
+
+ @Override
+ protected void showBrightnessDialog(float percent) {
+ if (mBrightnessDialog == null) {
+ View localView = LayoutInflater.from(getContext()).inflate(R.layout.video_brightness, null);
+ mBrightnessDialogTv = (TextView) localView.findViewById(R.id.app_video_brightness);
+ mBrightnessDialog = new Dialog(getContext(), R.style.video_style_dialog_progress);
+ mBrightnessDialog.setContentView(localView);
+ mBrightnessDialog.getWindow().addFlags(8);
+ mBrightnessDialog.getWindow().addFlags(32);
+ mBrightnessDialog.getWindow().addFlags(16);
+ mBrightnessDialog.getWindow().setLayout(-2, -2);
+ WindowManager.LayoutParams localLayoutParams = mBrightnessDialog.getWindow().getAttributes();
+ localLayoutParams.gravity = Gravity.CENTER;
+ localLayoutParams.x = ViewGroup.LayoutParams.WRAP_CONTENT;
+ mBrightnessDialog.getWindow().setAttributes(localLayoutParams);
+ }
+ if (!mBrightnessDialog.isShowing()) {
+ mBrightnessDialog.show();
+ }
+ if (mBrightnessDialogTv != null)
+ mBrightnessDialogTv.setText((int) (percent * 100) + "%");
+ }
+
+ @Override
+ protected void dismissBrightnessDialog() {
+ super.dismissVolumeDialog();
+ if (mBrightnessDialog != null) {
+ mBrightnessDialog.dismiss();
+ }
+ }
+
+
+ private void startDismissControlViewTimer() {
+ cancelDismissControlViewTimer();
+ DISSMISS_CONTROL_VIEW_TIMER = new Timer();
+ mDismissControlViewTimerTask = new DismissControlViewTimerTask();
+ DISSMISS_CONTROL_VIEW_TIMER.schedule(mDismissControlViewTimerTask, 2500);
+ }
+
+ private void cancelDismissControlViewTimer() {
+ if (DISSMISS_CONTROL_VIEW_TIMER != null) {
+ DISSMISS_CONTROL_VIEW_TIMER.cancel();
+ }
+ if (mDismissControlViewTimerTask != null) {
+ mDismissControlViewTimerTask.cancel();
+ }
+
+ }
+
+ protected class DismissControlViewTimerTask extends TimerTask {
+
+ @Override
+ public void run() {
+ if (mCurrentState != CURRENT_STATE_NORMAL
+ && mCurrentState != CURRENT_STATE_ERROR
+ && mCurrentState != CURRENT_STATE_AUTO_COMPLETE) {
+ if (getContext() != null && getContext() instanceof Activity) {
+ ((Activity) getContext()).runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ bottomContainer.setVisibility(View.INVISIBLE);
+ topContainer.setVisibility(View.INVISIBLE);
+ bottomProgressBar.setVisibility(View.VISIBLE);
+ startButton.setVisibility(View.INVISIBLE);
+ }
+ });
+ }
+ }
+ }
+ }
+}
diff --git a/gsyVideoPlayer/src/main/res/drawable-xxhdpi/video_back.png b/gsyVideoPlayer/src/main/res/drawable-xxhdpi/video_back.png
new file mode 100644
index 000000000..65ecff602
Binary files /dev/null and b/gsyVideoPlayer/src/main/res/drawable-xxhdpi/video_back.png differ
diff --git a/gsyVideoPlayer/src/main/res/drawable-xxhdpi/video_backward_icon.png b/gsyVideoPlayer/src/main/res/drawable-xxhdpi/video_backward_icon.png
new file mode 100644
index 000000000..51f5ca366
Binary files /dev/null and b/gsyVideoPlayer/src/main/res/drawable-xxhdpi/video_backward_icon.png differ
diff --git a/gsyVideoPlayer/src/main/res/drawable-xxhdpi/video_enlarge.png b/gsyVideoPlayer/src/main/res/drawable-xxhdpi/video_enlarge.png
new file mode 100644
index 000000000..ff88553ef
Binary files /dev/null and b/gsyVideoPlayer/src/main/res/drawable-xxhdpi/video_enlarge.png differ
diff --git a/gsyVideoPlayer/src/main/res/drawable-xxhdpi/video_error_normal.png b/gsyVideoPlayer/src/main/res/drawable-xxhdpi/video_error_normal.png
new file mode 100644
index 000000000..b588160e4
Binary files /dev/null and b/gsyVideoPlayer/src/main/res/drawable-xxhdpi/video_error_normal.png differ
diff --git a/gsyVideoPlayer/src/main/res/drawable-xxhdpi/video_error_pressed.png b/gsyVideoPlayer/src/main/res/drawable-xxhdpi/video_error_pressed.png
new file mode 100644
index 000000000..1af4fc232
Binary files /dev/null and b/gsyVideoPlayer/src/main/res/drawable-xxhdpi/video_error_pressed.png differ
diff --git a/gsyVideoPlayer/src/main/res/drawable-xxhdpi/video_forward_icon.png b/gsyVideoPlayer/src/main/res/drawable-xxhdpi/video_forward_icon.png
new file mode 100644
index 000000000..f7e318881
Binary files /dev/null and b/gsyVideoPlayer/src/main/res/drawable-xxhdpi/video_forward_icon.png differ
diff --git a/gsyVideoPlayer/src/main/res/drawable-xxhdpi/video_loading_bg.png b/gsyVideoPlayer/src/main/res/drawable-xxhdpi/video_loading_bg.png
new file mode 100644
index 000000000..cd1f03428
Binary files /dev/null and b/gsyVideoPlayer/src/main/res/drawable-xxhdpi/video_loading_bg.png differ
diff --git a/gsyVideoPlayer/src/main/res/drawable-xxhdpi/video_pause_normal.png b/gsyVideoPlayer/src/main/res/drawable-xxhdpi/video_pause_normal.png
new file mode 100644
index 000000000..874c2e0c9
Binary files /dev/null and b/gsyVideoPlayer/src/main/res/drawable-xxhdpi/video_pause_normal.png differ
diff --git a/gsyVideoPlayer/src/main/res/drawable-xxhdpi/video_pause_pressed.png b/gsyVideoPlayer/src/main/res/drawable-xxhdpi/video_pause_pressed.png
new file mode 100644
index 000000000..a0c1dba24
Binary files /dev/null and b/gsyVideoPlayer/src/main/res/drawable-xxhdpi/video_pause_pressed.png differ
diff --git a/gsyVideoPlayer/src/main/res/drawable-xxhdpi/video_play_normal.png b/gsyVideoPlayer/src/main/res/drawable-xxhdpi/video_play_normal.png
new file mode 100644
index 000000000..6fc16102c
Binary files /dev/null and b/gsyVideoPlayer/src/main/res/drawable-xxhdpi/video_play_normal.png differ
diff --git a/gsyVideoPlayer/src/main/res/drawable-xxhdpi/video_play_pressed.png b/gsyVideoPlayer/src/main/res/drawable-xxhdpi/video_play_pressed.png
new file mode 100644
index 000000000..e5802a569
Binary files /dev/null and b/gsyVideoPlayer/src/main/res/drawable-xxhdpi/video_play_pressed.png differ
diff --git a/gsyVideoPlayer/src/main/res/drawable-xxhdpi/video_shrink.png b/gsyVideoPlayer/src/main/res/drawable-xxhdpi/video_shrink.png
new file mode 100644
index 000000000..461f77762
Binary files /dev/null and b/gsyVideoPlayer/src/main/res/drawable-xxhdpi/video_shrink.png differ
diff --git a/gsyVideoPlayer/src/main/res/drawable-xxhdpi/video_volume_icon.png b/gsyVideoPlayer/src/main/res/drawable-xxhdpi/video_volume_icon.png
new file mode 100644
index 000000000..68876bf11
Binary files /dev/null and b/gsyVideoPlayer/src/main/res/drawable-xxhdpi/video_volume_icon.png differ
diff --git a/gsyVideoPlayer/src/main/res/values/colors.xml b/gsyVideoPlayer/src/main/res/values/colors.xml
new file mode 100644
index 000000000..32668c793
--- /dev/null
+++ b/gsyVideoPlayer/src/main/res/values/colors.xml
@@ -0,0 +1,6 @@
+
+
+
+ #f77500
+
+
diff --git a/gsyVideoPlayer/src/main/res/values/strings.xml b/gsyVideoPlayer/src/main/res/values/strings.xml
new file mode 100644
index 000000000..61fef09d3
--- /dev/null
+++ b/gsyVideoPlayer/src/main/res/values/strings.xml
@@ -0,0 +1,9 @@
+
+
+
+ 您当前正在使用移动网络,继续播放将消耗流量
+ 继续播放
+ 停止播放
+ 播放地址无效
+
+
diff --git a/settings.gradle b/settings.gradle
new file mode 100644
index 000000000..4433a3e7c
--- /dev/null
+++ b/settings.gradle
@@ -0,0 +1 @@
+include ':app', ':gsyVideoPlayer'