From b4d7d9964b46ab27b67ddd05754afe6fdfecad04 Mon Sep 17 00:00:00 2001 From: Equip de Desenvolupadors de PBE Date: Sun, 9 Dec 2012 20:34:35 +0000 Subject: [PATCH] Added VitamioDemo --- VitamioDemo/.gitignore | 21 +++++++++++++++++++++ VitamioDemo/.settings/org.eclipse.jdt.core.prefs | 11 +++++++++++ VitamioDemo/AndroidManifest.xml | 35 +++++++++++++++++++++++++++++++++++ VitamioDemo/README.md | 4 ++++ VitamioDemo/build.xml | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ VitamioDemo/ic_launcher-web.png | Bin 0 -> 14381 bytes VitamioDemo/proguard-project.txt | 20 ++++++++++++++++++++ VitamioDemo/project.properties | 15 +++++++++++++++ VitamioDemo/res/drawable-hdpi/ic_launcher.png | Bin 0 -> 2805 bytes VitamioDemo/res/drawable-xhdpi/ic_launcher.png | Bin 0 -> 3365 bytes VitamioDemo/res/layout/videoview.xml | 20 ++++++++++++++++++++ VitamioDemo/res/values/strings.xml | 6 ++++++ VitamioDemo/src/io/vov/vitamio/demo/VideoViewDemo.java | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 13 files changed, 274 insertions(+), 0 deletions(-) create mode 100644 VitamioDemo/.gitignore create mode 100644 VitamioDemo/.settings/org.eclipse.jdt.core.prefs create mode 100644 VitamioDemo/AndroidManifest.xml create mode 100644 VitamioDemo/README.md create mode 100644 VitamioDemo/build.xml create mode 100644 VitamioDemo/ic_launcher-web.png create mode 100644 VitamioDemo/proguard-project.txt create mode 100644 VitamioDemo/project.properties create mode 100644 VitamioDemo/res/drawable-hdpi/ic_launcher.png create mode 100644 VitamioDemo/res/drawable-xhdpi/ic_launcher.png create mode 100644 VitamioDemo/res/layout/videoview.xml create mode 100644 VitamioDemo/res/values/strings.xml create mode 100644 VitamioDemo/src/io/vov/vitamio/demo/VideoViewDemo.java diff --git a/VitamioDemo/.gitignore b/VitamioDemo/.gitignore new file mode 100644 index 0000000..1e3e304 --- /dev/null +++ b/VitamioDemo/.gitignore @@ -0,0 +1,21 @@ +# built application files +*.apk +*.ap_ + +# files for the dex VM +*.dex + +# Java class files +*.class + +# generated files +bin/ +gen/ +obj/ + +# Local configuration file (sdk path, etc) +local.properties + +# Eclipse project files +.classpath +.project diff --git a/VitamioDemo/.settings/org.eclipse.jdt.core.prefs b/VitamioDemo/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..8000cd6 --- /dev/null +++ b/VitamioDemo/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/VitamioDemo/AndroidManifest.xml b/VitamioDemo/AndroidManifest.xml new file mode 100644 index 0000000..060fd8c --- /dev/null +++ b/VitamioDemo/AndroidManifest.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/VitamioDemo/README.md b/VitamioDemo/README.md new file mode 100644 index 0000000..7046028 --- /dev/null +++ b/VitamioDemo/README.md @@ -0,0 +1,4 @@ +VitamioDemo +=========== + +Demo of Vitamio for Android \ No newline at end of file diff --git a/VitamioDemo/build.xml b/VitamioDemo/build.xml new file mode 100644 index 0000000..fe75f3c --- /dev/null +++ b/VitamioDemo/build.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/VitamioDemo/ic_launcher-web.png b/VitamioDemo/ic_launcher-web.png new file mode 100644 index 0000000..6b45524 Binary files /dev/null and b/VitamioDemo/ic_launcher-web.png differ diff --git a/VitamioDemo/proguard-project.txt b/VitamioDemo/proguard-project.txt new file mode 100644 index 0000000..f2fe155 --- /dev/null +++ b/VitamioDemo/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/VitamioDemo/project.properties b/VitamioDemo/project.properties new file mode 100644 index 0000000..d05ba13 --- /dev/null +++ b/VitamioDemo/project.properties @@ -0,0 +1,15 @@ +# 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=Google Inc.:Google APIs:16 +android.library.reference.1=../VitamioBundle diff --git a/VitamioDemo/res/drawable-hdpi/ic_launcher.png b/VitamioDemo/res/drawable-hdpi/ic_launcher.png new file mode 100644 index 0000000..c6ba88c Binary files /dev/null and b/VitamioDemo/res/drawable-hdpi/ic_launcher.png differ diff --git a/VitamioDemo/res/drawable-xhdpi/ic_launcher.png b/VitamioDemo/res/drawable-xhdpi/ic_launcher.png new file mode 100644 index 0000000..5add9b7 Binary files /dev/null and b/VitamioDemo/res/drawable-xhdpi/ic_launcher.png differ diff --git a/VitamioDemo/res/layout/videoview.xml b/VitamioDemo/res/layout/videoview.xml new file mode 100644 index 0000000..f23fc27 --- /dev/null +++ b/VitamioDemo/res/layout/videoview.xml @@ -0,0 +1,20 @@ + + + + + + + + + \ No newline at end of file diff --git a/VitamioDemo/res/values/strings.xml b/VitamioDemo/res/values/strings.xml new file mode 100644 index 0000000..1d17505 --- /dev/null +++ b/VitamioDemo/res/values/strings.xml @@ -0,0 +1,6 @@ + + + + VitamioDemo + + \ No newline at end of file diff --git a/VitamioDemo/src/io/vov/vitamio/demo/VideoViewDemo.java b/VitamioDemo/src/io/vov/vitamio/demo/VideoViewDemo.java new file mode 100644 index 0000000..1671be4 --- /dev/null +++ b/VitamioDemo/src/io/vov/vitamio/demo/VideoViewDemo.java @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2012 YIXIA.COM + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.vov.vitamio.demo; + +import io.vov.vitamio.MediaPlayer; +import io.vov.vitamio.widget.MediaController; +import io.vov.vitamio.widget.VideoView; +import android.app.Activity; +import android.content.res.Configuration; +import android.os.Bundle; + +public class VideoViewDemo extends Activity { + + private String path = "http://devimages.apple.com/iphone/samples/bipbop/gear1/prog_index.m3u8"; + private VideoView mVideoView; + + @Override + public void onCreate(Bundle icicle) { + super.onCreate(icicle); + if (!io.vov.vitamio.LibsChecker.checkVitamioLibs(this)) + return; + + setContentView(R.layout.videoview); + mVideoView = (VideoView) findViewById(R.id.surface_view); + mVideoView.setVideoPath(path); + mVideoView.setVideoQuality(MediaPlayer.VIDEOQUALITY_HIGH); + mVideoView.setMediaController(new MediaController(this)); + } + + @Override + public void onConfigurationChanged(Configuration newConfig) { + if (mVideoView != null) + mVideoView.setVideoLayout(VideoView.VIDEO_LAYOUT_SCALE, 0); + super.onConfigurationChanged(newConfig); + } +} -- libgit2 0.22.2