Skip to content

Commit 943a942

Browse files
Add PushExternalVideo example.
1 parent 7381c56 commit 943a942

18 files changed

Lines changed: 1048 additions & 3 deletions

File tree

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources>
3-
<string name="agora_app_id" translatable="false"><#YOUR APP ID#></string>
4-
<string name="agora_access_token" translatable="false"><#YOUR ACCESS TOKEN#></string>
3+
<!-- <string name="agora_app_id" translatable="false"><#YOUR APP ID#></string>-->
4+
<!-- <string name="agora_access_token" translatable="false"><#YOUR ACCESS TOKEN#></string>-->
5+
<!-- <string name="agora_app_id" translatable="false">266819b117a042a9aa188a67b5daabfb</string>-->
6+
<!-- <string name="agora_access_token" translatable="false">006266819b117a042a9aa188a67b5daabfbIACsl0GIdXKqEvmBYWQvl9Anbl3fLGpb298X8JoqA1BJWJzywRwAAAAAEAB65KjRe0LfXgEAAQB7Qt9e</string>-->
7+
<string name="agora_app_id" translatable="false">aab8b8f5a8cd4469a63042fcfafe7063</string>
8+
<string name="agora_access_token" translatable="false"></string>
59
</resources>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
apply plugin: 'com.android.library'
2+
3+
android {
4+
compileSdkVersion 29
5+
buildToolsVersion "29.0.2"
6+
7+
8+
defaultConfig {
9+
minSdkVersion 21
10+
targetSdkVersion 29
11+
versionCode 1
12+
versionName "1.0"
13+
14+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
15+
consumerProguardFiles 'consumer-rules.pro'
16+
}
17+
18+
buildTypes {
19+
release {
20+
minifyEnabled false
21+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
22+
}
23+
}
24+
25+
}
26+
27+
dependencies {
28+
implementation fileTree(dir: 'libs', include: ['*.jar'])
29+
implementation 'androidx.appcompat:appcompat:1.1.0'
30+
api 'com.google.ar:core:1.13.0'
31+
testImplementation 'junit:junit:4.12'
32+
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
33+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
34+
implementation project(path: ':lib-component')
35+
}

Android/APIExample/lib-external-video/consumer-rules.pro

Whitespace-only changes.
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: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
package="io.agora.advancedvideo.externvideosource">
3+
4+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
5+
6+
<application>
7+
<service android:name=".ExternalVideoInputService"
8+
android:exported="false"
9+
android:foregroundServiceType="mediaProjection"/>
10+
</application>
11+
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package io.agora.advancedvideo.externvideosource;
2+
3+
interface IExternalVideoInputService {
4+
// the type of external video input is one of
5+
// ExternalVideoInputManager TYPE_LOCAL_VIDEO,
6+
// TYPE_SCREEN_SHARE
7+
// Bundle contains any information that is
8+
// necessary for this external video input
9+
// returns true if the input has been set or
10+
// has replaced the current input, false otherwise.
11+
boolean setExternalVideoInput(int type, in Intent intent);
12+
}

0 commit comments

Comments
 (0)