[*] H5监控
This commit is contained in:
@@ -4,12 +4,12 @@ plugins {
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
namespace 'com.acgist.client.boot'
|
namespace 'com.acgist.client.boot'
|
||||||
compileSdk 32
|
compileSdk rootProject.ext.taoyao.compileSdk
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdk 28
|
minSdk rootProject.ext.taoyao.minSdk
|
||||||
targetSdk 32
|
targetSdk rootProject.ext.taoyao.targetSdk
|
||||||
versionCode 100
|
versionCode rootProject.ext.taoyao.versionCode
|
||||||
versionName "1.0.0"
|
versionName rootProject.ext.taoyao.versionName
|
||||||
consumerProguardFiles "consumer-rules.pro"
|
consumerProguardFiles "consumer-rules.pro"
|
||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
@@ -19,8 +19,8 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_17
|
sourceCompatibility rootProject.ext.taoyao.javaVersion
|
||||||
targetCompatibility JavaVersion.VERSION_17
|
targetCompatibility rootProject.ext.taoyao.javaVersion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,3 +2,15 @@ plugins {
|
|||||||
id 'com.android.library' version '7.4.2' apply false
|
id 'com.android.library' version '7.4.2' apply false
|
||||||
id 'com.android.application' version '7.4.2' apply false
|
id 'com.android.application' version '7.4.2' apply false
|
||||||
}
|
}
|
||||||
|
ext {
|
||||||
|
taoyao = [
|
||||||
|
minSdk : 28,
|
||||||
|
targetSdk : 32,
|
||||||
|
compileSdk : 32,
|
||||||
|
versionCode : 100,
|
||||||
|
versionName : "1.0.0",
|
||||||
|
ndkVersion : "23.1.7779620",
|
||||||
|
javaVersion : JavaVersion.VERSION_17,
|
||||||
|
cmakeVersion : "3.22.1",
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -4,12 +4,12 @@ plugins {
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
namespace 'com.acgist.taoyao.client'
|
namespace 'com.acgist.taoyao.client'
|
||||||
compileSdk 32
|
compileSdk rootProject.ext.taoyao.compileSdk
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdk 28
|
minSdk rootProject.ext.taoyao.minSdk
|
||||||
targetSdk 32
|
targetSdk rootProject.ext.taoyao.targetSdk
|
||||||
versionCode 100
|
versionCode rootProject.ext.taoyao.versionCode
|
||||||
versionName "1.0.0"
|
versionName rootProject.ext.taoyao.versionName
|
||||||
consumerProguardFiles "consumer-rules.pro"
|
consumerProguardFiles "consumer-rules.pro"
|
||||||
applicationId "com.acgist.taoyao.client"
|
applicationId "com.acgist.taoyao.client"
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
@@ -20,13 +20,13 @@ android {
|
|||||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility rootProject.ext.taoyao.javaVersion
|
||||||
|
targetCompatibility rootProject.ext.taoyao.javaVersion
|
||||||
|
}
|
||||||
buildFeatures {
|
buildFeatures {
|
||||||
viewBinding true
|
viewBinding true
|
||||||
}
|
}
|
||||||
compileOptions {
|
|
||||||
sourceCompatibility JavaVersion.VERSION_17
|
|
||||||
targetCompatibility JavaVersion.VERSION_17
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|||||||
@@ -6,14 +6,14 @@ def WEBRTC_INC_PATH = "${projectDir}/deps/webrtc/src"
|
|||||||
def WEBRTC_LIB_PATH = "${projectDir}/deps/webrtc/lib"
|
def WEBRTC_LIB_PATH = "${projectDir}/deps/webrtc/lib"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace 'com.acgist.mediasoup'
|
namespace 'com.acgist.taoyao.media'
|
||||||
compileSdk 32
|
compileSdk rootProject.ext.taoyao.compileSdk
|
||||||
ndkVersion "23.1.7779620"
|
ndkVersion rootProject.ext.taoyao.ndkVersion
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdk 28
|
minSdk rootProject.ext.taoyao.minSdk
|
||||||
targetSdk 32
|
targetSdk rootProject.ext.taoyao.targetSdk
|
||||||
versionCode 100
|
versionCode rootProject.ext.taoyao.versionCode
|
||||||
versionName "1.0.0"
|
versionName rootProject.ext.taoyao.versionName
|
||||||
consumerProguardFiles "consumer-rules.pro"
|
consumerProguardFiles "consumer-rules.pro"
|
||||||
externalNativeBuild {
|
externalNativeBuild {
|
||||||
cmake {
|
cmake {
|
||||||
@@ -37,24 +37,24 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_17
|
sourceCompatibility rootProject.ext.taoyao.javaVersion
|
||||||
targetCompatibility JavaVersion.VERSION_17
|
targetCompatibility rootProject.ext.taoyao.javaVersion
|
||||||
}
|
|
||||||
externalNativeBuild {
|
|
||||||
cmake {
|
|
||||||
path file('CMakeLists.txt')
|
|
||||||
version '3.22.1'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
sourceSets {
|
sourceSets {
|
||||||
main {
|
main {
|
||||||
jniLibs.srcDirs = ["libs"]
|
jniLibs.srcDirs = ["libs"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
externalNativeBuild {
|
||||||
|
cmake {
|
||||||
|
path file('CMakeLists.txt')
|
||||||
|
version rootProject.ext.taoyao.cmakeVersion
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api project(path: ':boot')
|
api project(path: ':boot')
|
||||||
implementation 'androidx.annotation:annotation:1.3.0'
|
api 'androidx.annotation:annotation:1.3.0'
|
||||||
testImplementation 'junit:junit:4.13.2'
|
testImplementation 'junit:junit:4.13.2'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2285,7 +2285,7 @@ class Taoyao extends RemoteClient {
|
|||||||
this.callbackError("无效终端");
|
this.callbackError("无效终端");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
me.checkDevice();
|
await me.checkDevice();
|
||||||
const response = await me.request(
|
const response = await me.request(
|
||||||
protocol.buildMessage("session::call", {
|
protocol.buildMessage("session::call", {
|
||||||
clientId
|
clientId
|
||||||
@@ -2298,8 +2298,9 @@ class Taoyao extends RemoteClient {
|
|||||||
|
|
||||||
async defaultSessionCall(message) {
|
async defaultSessionCall(message) {
|
||||||
const me = this;
|
const me = this;
|
||||||
|
await me.checkDevice();
|
||||||
const { name, clientId, sessionId } = message.body;
|
const { name, clientId, sessionId } = message.body;
|
||||||
const session = new Session({name, clientId, sessionId});
|
const session = new Session({name, clientId, sessionId, audioEnabled: me.audioProduce, videoEnabled: me.videoProduce});
|
||||||
this.sessionClients.set(sessionId, session);
|
this.sessionClients.set(sessionId, session);
|
||||||
await me.buildPeerConnection(session, sessionId);
|
await me.buildPeerConnection(session, sessionId);
|
||||||
session.peerConnection.createOffer().then(async description => {
|
session.peerConnection.createOffer().then(async description => {
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ taoyao:
|
|||||||
s=TaoyaoRecord
|
s=TaoyaoRecord
|
||||||
t=0 0
|
t=0 0
|
||||||
a=group:BUNDLE video audio
|
a=group:BUNDLE video audio
|
||||||
m=video %d RTP/AVP 101 102
|
m=video %d RTP/AVP 101
|
||||||
c=IN IP4 0.0.0.0
|
c=IN IP4 0.0.0.0
|
||||||
a=rtpmap:101 VP8/90000
|
a=rtpmap:101 VP8/90000
|
||||||
a=recvonly
|
a=recvonly
|
||||||
@@ -163,7 +163,7 @@ taoyao:
|
|||||||
a=rtpmap:100 OPUS/48000/2
|
a=rtpmap:100 OPUS/48000/2
|
||||||
a=recvonly
|
a=recvonly
|
||||||
# 录像命令
|
# 录像命令
|
||||||
record: ffmpeg -protocol_whitelist "file,rtp,udp" -y -thread_queue_size 1024 -i %s -c:a aac -c:v h264 %s
|
record: ffmpeg -y -protocol_whitelist "file,rtp,udp" -thread_queue_size 1024 -i %s -c:a aac -c:v h264 %s
|
||||||
# 预览命令
|
# 预览命令
|
||||||
preview: ffmpeg -y -i %s -ss %d -vframes 1 -f image2 %s
|
preview: ffmpeg -y -i %s -ss %d -vframes 1 -f image2 %s
|
||||||
# 时长命令
|
# 时长命令
|
||||||
|
|||||||
Reference in New Issue
Block a user