Skip to content
This repository was archived by the owner on Jun 12, 2024. It is now read-only.

Commit c7a4e55

Browse files
committed
Cleanup build.gradle
1 parent 1a17281 commit c7a4e55

3 files changed

Lines changed: 26 additions & 38 deletions

File tree

app/build.gradle

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,10 @@ plugins {
33
id 'org.jetbrains.kotlin.android'
44
}
55

6-
7-
8-
96
// Load values from SA properties file.
107
def propsFile = rootProject.file('sa.properties')
118
def props = new Properties()
129
props.load(new FileInputStream(propsFile))
13-
1410
repositories {
1511
mavenLocal()
1612
// Millicast SDK via Maven from GitHub Packages
@@ -33,13 +29,13 @@ android {
3329
keyPassword props['keyPassword']
3430
}
3531
}
36-
compileSdkVersion 33
32+
compileSdkVersion 34
3733

3834
defaultConfig {
3935
applicationId "com.millicast.android_java_sdk_sa"
4036
minSdkVersion 33
4137
//noinspection ExpiredTargetSdkVersion
42-
targetSdkVersion 33
38+
targetSdkVersion 34
4339
versionCode 11
4440
versionName "1.7.0"
4541
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -72,14 +68,14 @@ dependencies {
7268
implementation 'androidx.drawerlayout:drawerlayout:1.1.1'
7369
implementation 'com.google.android.material:material:1.5.0'
7470
implementation 'androidx.core:core-ktx:1.10.0'
71+
implementation 'io.dolby:promise:2.9.0'
7572
testImplementation 'junit:junit:4.+'
7673
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
7774
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
7875

7976
// Add Millicast SDK via one of the methods below.
8077
// For download via Maven from GitHub Packages:
8178
implementation 'com.millicast:millicast-sdk-android:1.7.0'
82-
implementation 'io.dolby:promise:2.9.0'
8379
// For manual addition of AAR file:
8480
// implementation project(":MillicastSDK")
8581
}

app/src/main/java/com/millicast/android_app/MillicastManager.java

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1178,9 +1178,8 @@ public boolean setAudioPlaybackIndex(int newValue) {
11781178
// If currently subscribing, do not set new audioSourceIndex.
11791179
if (isSubscribing()) {
11801180
logD(TAG, logTag + "NOT setting to " + newValue + " as currently subscribing.");
1181-
//TODO implement this
1182-
logD(TAG, logTag + "AudioPlayback:" + "IMPLEMENT THIS");
1183-
//getAudioSourceStr(audioPlayback.toString(), true));
1181+
logD(TAG, logTag + "AudioPlayback:" + "");
1182+
getAudioPlaybackStr(audioPlayback, true);
11841183
return false;
11851184
}
11861185

@@ -1412,7 +1411,6 @@ public boolean isNdiOutputEnabled(boolean forAudio) {
14121411
logD(TAG, logTag + "Flag: " + ndiEnabled + ", Track: Does not exist.");
14131412
return ndiEnabled;
14141413
}
1415-
//TODO reimplement this
14161414
return ndiEnabled;
14171415
}
14181416

@@ -1738,26 +1736,27 @@ public void startPub() {
17381736

17391737
publisher.isConnected()
17401738
.then(connected -> {
1741-
if (connected) {
1742-
publisher.isPublishing()
1743-
.then(publishing -> {
1744-
if (publishing) {
1745-
logD(TAG, logTag + "Not publishing as we are already publishing!");
1746-
} else {
1747-
if (!isAudioVideoCaptured()) {
1748-
logD(TAG, logTag + "Failed! Both audio & video are not captured.");
1749-
} else {
1750-
logD(TAG, logTag + "Trying...");
1751-
startPubMc();
1752-
}
1753-
}
1754-
})
1755-
.error(e -> {
1756-
logD(TAG, logTag + e.getLocalizedMessage());
1757-
});
1758-
} else {
1759-
//TODO CLEAN THIS UP
1739+
if (!connected) {
1740+
logD(TAG, logTag + "Not publishing as we are not connected!");
1741+
return;
17601742
}
1743+
publisher.isPublishing()
1744+
.then(publishing -> {
1745+
if (publishing) {
1746+
logD(TAG, logTag + "Not publishing as we are already publishing!");
1747+
return;
1748+
}
1749+
if (!isAudioVideoCaptured()) {
1750+
logD(TAG, logTag + "Failed! Both audio & video are not captured.");
1751+
return;
1752+
}
1753+
logD(TAG, logTag + "Trying...");
1754+
startPubMc();
1755+
})
1756+
.error(e -> {
1757+
logD(TAG, logTag + e.getLocalizedMessage());
1758+
});
1759+
17611760
}).error(e -> {
17621761
logD(TAG, logTag + e.getLocalizedMessage());
17631762
});
@@ -2395,7 +2394,7 @@ public int getSelectedIndex(ArrayList list) {
23952394
* @return
23962395
*/
23972396

2398-
//TODO clean this up
2397+
//TODO clean up
23992398
// public boolean addMediaTrack(boolean isAudio) {
24002399
// TrackType kind = TrackType.Audio;
24012400
// if (!isAudio) {

app/src/main/java/com/millicast/android_app/compat/SubscriberCompat.kt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ class SubscriberCompat(subscriberListener: SubscriberListener) : CompatBase() {
2929
fun connect() = promise {
3030
stateChange();
3131
activityChange()
32-
layersChange()
3332
onTrack();
3433
onLayers();
3534
onVad();
@@ -87,12 +86,6 @@ class SubscriberCompat(subscriberListener: SubscriberListener) : CompatBase() {
8786
}
8887
}
8988

90-
fun layersChange() = scope.launch {
91-
subscriber.layers.distinctUntilChanged().collect{
92-
newLayers ->
93-
listener.onLayers(newLayers.mid,newLayers.activeLayers,newLayers.inactiveLayersEncodingIds)
94-
}
95-
}
9689

9790
private fun onTrack() = scope.launch {
9891
subscriber.track.collect() { holder ->

0 commit comments

Comments
 (0)