Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2d50a30d46 |
No files matched your search
@@ -1,107 +0,0 @@
|
||||
name: Publish APK
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [test-deploy]
|
||||
push:
|
||||
branches: [test-deploy]
|
||||
|
||||
jobs:
|
||||
# build:
|
||||
# runs-on: ubuntu-latest
|
||||
# container: lbry/android-base:platform-28
|
||||
# steps:
|
||||
# - name: update git # container git is too old
|
||||
# run: |
|
||||
# apt-get install -y software-properties-common
|
||||
# apt-get update
|
||||
# add-apt-repository -y ppa:git-core/ppa
|
||||
# apt-get update
|
||||
# apt-get install -y git
|
||||
# - name: work around for permission issue # git doesn't trust user that owns the checkout
|
||||
# run: |
|
||||
# git config --global --add safe.directory /__w/lbry-android/lbry-android
|
||||
# - name: checkout
|
||||
# uses: actions/checkout@v3
|
||||
# - name: hacky copy # docker image runs ~ as /root, but github actions uses ~=/github/home
|
||||
# run: |
|
||||
# cp -r /root/.buildozer ~/.buildozer/
|
||||
# - name: setup
|
||||
# run: |
|
||||
# echo "$PGP_PRIVATE_KEY" | gpg --batch --import
|
||||
# echo 'deb https://gitsecret.jfrog.io/artifactory/git-secret-deb git-secret main' >> /etc/apt/sources.list
|
||||
# wget -qO - 'https://gitsecret.jfrog.io/artifactory/api/gpg/key/public' | apt-key add -
|
||||
# apt-get -y update && apt-get -y install build-essential ca-certificates curl gpg-agent openjdk-8-jdk software-properties-common wget zipalign git-secret
|
||||
# ls -al ..
|
||||
# ls -al
|
||||
# git rev-parse --is-inside-work-tree
|
||||
# git secret reveal
|
||||
# chmod u+x $GITHUB_WORKSPACE/gradlew
|
||||
# export BUILD_VERSION=$($GITHUB_WORKSPACE/gradlew -p $GITHUB_WORKSPACE -q printVersionName --console=plain | tail -1)
|
||||
# export PATH=/usr/bin:$PATH
|
||||
# export ANDROID_SDK_ROOT=~/.buildozer/android/platform/android-sdk-23
|
||||
# echo $ANDROID_SDK_ROOT
|
||||
# echo "ANDROID_SDK_ROOT=$ANDROID_SDK_ROOT" >> $GITHUB_ENV
|
||||
# echo "end of setup home:"
|
||||
# echo $HOME
|
||||
# env:
|
||||
# PGP_PRIVATE_KEY: ${{ secrets.PGP_PRIVATE_KEY }}
|
||||
# KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
|
||||
# - name: build
|
||||
# run: |
|
||||
# ls -al ~/
|
||||
# chmod u+x ./release.sh
|
||||
# ./release.sh
|
||||
# cp bin/browser-$BUILD_VERSION-release__arm.apk /dev/null
|
||||
# cp bin/browser-$BUILD_VERSION-release__arm64.apk /dev/null
|
||||
# env:
|
||||
# PGP_PRIVATE_KEY: ${{ secrets.PGP_PRIVATE_KEY }}
|
||||
# KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
|
||||
|
||||
# - name: Upload math result for job 1
|
||||
# uses: actions/upload-artifact@v3
|
||||
# with:
|
||||
# name: homework
|
||||
# path: math-homework.txt
|
||||
build-release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: gradle/wrapper-validation-action@v1
|
||||
|
||||
- name: Create and checkout branch
|
||||
# push events already checked out the branch
|
||||
if: github.event_name == 'pull_request'
|
||||
run: git checkout -B ${{ github.head_ref }}
|
||||
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: '11'
|
||||
distribution: 'temurin'
|
||||
cache: 'gradle'
|
||||
|
||||
- name: Reveal secrets
|
||||
env:
|
||||
PGP_PRIVATE_KEY: ${{ secrets.PGP_PRIVATE_KEY }}
|
||||
run: |
|
||||
sudo apt install git-secret gpg-agent
|
||||
echo "$PGP_PRIVATE_KEY" | gpg --batch --import
|
||||
git secret reveal
|
||||
- name: Install NDK version 21.0.6113669
|
||||
run: echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.0.6113669"
|
||||
|
||||
- name: Build
|
||||
env:
|
||||
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
|
||||
run: |
|
||||
sudo apt install zipalign apksigner
|
||||
chmod +x gradlew
|
||||
./release.sh
|
||||
rm bin/*-unsigned.apk
|
||||
- name: Upload APK
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: app-release
|
||||
path: bin/*.apk
|
||||
@@ -67,4 +67,3 @@ app/twitter.properties
|
||||
app/build
|
||||
bin
|
||||
app/debuglib
|
||||
.vscode
|
||||
+41
-39
@@ -3,8 +3,7 @@ import com.google.gms.googleservices.GoogleServicesPlugin
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
compileSdkVersion 29
|
||||
buildToolsVersion "29.0.2"
|
||||
compileSdkVersion 33
|
||||
flavorDimensions "default"
|
||||
|
||||
compileOptions {
|
||||
@@ -14,18 +13,19 @@ android {
|
||||
|
||||
defaultConfig {
|
||||
applicationId "io.lbry.browser"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 29
|
||||
versionCode 1701
|
||||
versionName "0.17.1"
|
||||
minSdkVersion 24
|
||||
targetSdkVersion 33
|
||||
versionCode 1702
|
||||
versionName "0.17.2"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
packagingOptions {
|
||||
exclude 'META-INF/DEPENDENCIES'
|
||||
exclude 'lib/x86_64/darwin/libscrypt.dylib'
|
||||
resources {
|
||||
excludes += ['META-INF/DEPENDENCIES', 'lib/x86_64/darwin/libscrypt.dylib']
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
productFlavors {
|
||||
__32bit {
|
||||
versionCode android.defaultConfig.versionCode * 10 + 1
|
||||
@@ -57,6 +57,7 @@ android {
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
namespace 'io.lbry.browser'
|
||||
}
|
||||
|
||||
task printVersionName {
|
||||
@@ -75,48 +76,49 @@ configurations {
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
|
||||
implementation 'androidx.appcompat:appcompat:1.3.0-alpha01'
|
||||
implementation 'androidx.appcompat:appcompat:1.7.0-alpha01'
|
||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||
implementation 'com.google.android.material:material:1.3.0-alpha01'
|
||||
implementation 'com.google.android.material:material:1.8.0-alpha02'
|
||||
implementation "androidx.cardview:cardview:1.0.0"
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
|
||||
implementation 'androidx.navigation:navigation-fragment:2.3.1'
|
||||
implementation 'androidx.navigation:navigation-ui:2.3.1'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||
implementation 'androidx.navigation:navigation-fragment:2.5.3'
|
||||
implementation 'androidx.navigation:navigation-ui:2.5.3'
|
||||
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
|
||||
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
|
||||
implementation 'androidx.preference:preference:1.1.1'
|
||||
implementation 'androidx.webkit:webkit:1.4.0-rc01'
|
||||
implementation 'androidx.camera:camera-core:1.0.0-beta03'
|
||||
implementation 'androidx.camera:camera-camera2:1.0.0-beta03'
|
||||
implementation 'androidx.camera:camera-lifecycle:1.0.0-beta03'
|
||||
implementation 'androidx.camera:camera-view:1.0.0-alpha10'
|
||||
implementation 'androidx.browser:browser:1.2.0'
|
||||
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.1.0'
|
||||
implementation 'androidx.preference:preference:1.2.0'
|
||||
implementation 'androidx.webkit:webkit:1.6.0-alpha03'
|
||||
implementation 'androidx.camera:camera-core:1.3.0-alpha01'
|
||||
implementation 'androidx.camera:camera-camera2:1.3.0-alpha01'
|
||||
implementation 'androidx.camera:camera-lifecycle:1.3.0-alpha01'
|
||||
implementation 'androidx.camera:camera-view:1.3.0-alpha01'
|
||||
implementation 'androidx.browser:browser:1.4.0'
|
||||
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
|
||||
|
||||
implementation 'com.github.bumptech.glide:glide:4.11.0'
|
||||
implementation 'com.squareup.okhttp3:okhttp:4.4.1'
|
||||
implementation 'com.google.firebase:firebase-analytics:18.0.0'
|
||||
implementation 'com.google.android.gms:play-services-base:17.5.0'
|
||||
implementation 'com.google.firebase:firebase-messaging:21.0.0'
|
||||
implementation 'com.google.firebase:firebase-iid:21.1.0'
|
||||
implementation 'com.google.firebase:firebase-analytics:21.2.0'
|
||||
implementation 'com.google.android.gms:play-services-base:18.1.0'
|
||||
implementation 'com.google.firebase:firebase-messaging:23.1.0'
|
||||
implementation 'com.google.oauth-client:google-oauth-client:1.30.4'
|
||||
|
||||
implementation 'com.android.billingclient:billing:3.0.2'
|
||||
implementation 'com.android.billingclient:billing:5.1.0'
|
||||
|
||||
implementation 'com.google.code.gson:gson:2.8.6'
|
||||
implementation 'com.google.android.exoplayer:exoplayer-core:2.15.1'
|
||||
implementation 'com.google.android.exoplayer:exoplayer-dash:2.15.1'
|
||||
implementation 'com.google.android.exoplayer:exoplayer-ui:2.15.1'
|
||||
implementation 'com.google.android.exoplayer:extension-cast:2.15.1'
|
||||
implementation 'com.google.android.exoplayer:extension-mediasession:2.15.1'
|
||||
implementation 'com.google.android.exoplayer:exoplayer-core:2.18.1'
|
||||
implementation 'com.google.android.exoplayer:exoplayer-dash:2.18.1'
|
||||
implementation 'com.google.android.exoplayer:exoplayer-ui:2.18.1'
|
||||
implementation 'com.google.android.exoplayer:extension-cast:2.18.1'
|
||||
implementation 'com.google.android.exoplayer:extension-mediasession:2.18.1'
|
||||
|
||||
implementation 'com.google.android.flexbox:flexbox:3.0.0'
|
||||
|
||||
implementation 'com.hbb20:ccp:2.4.7'
|
||||
implementation 'com.hbb20:ccp:2.5.1'
|
||||
|
||||
implementation 'com.github.chrisbanes:PhotoView:2.3.0'
|
||||
implementation 'com.atlassian.commonmark:commonmark:0.14.0'
|
||||
|
||||
implementation 'com.arthenica:mobile-ffmpeg-full-gpl:4.4.LTS'
|
||||
implementation 'com.arthenica:mobile-ffmpeg-full:4.4.LTS'
|
||||
|
||||
implementation 'commons-codec:commons-codec:1.15'
|
||||
implementation 'org.bitcoinj:bitcoinj-tools:0.14.7'
|
||||
@@ -127,13 +129,14 @@ dependencies {
|
||||
|
||||
compileOnly 'org.projectlombok:lombok:1.18.10'
|
||||
annotationProcessor 'org.projectlombok:lombok:1.18.10'
|
||||
testAnnotationProcessor("org.projectlombok:lombok:1.18.10")
|
||||
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
|
||||
|
||||
testImplementation 'junit:junit:4.12'
|
||||
androidTestImplementation 'androidx.test:runner:1.3.0'
|
||||
androidTestImplementation 'androidx.test:rules:1.3.0'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test:runner:1.5.1'
|
||||
androidTestImplementation 'androidx.test:rules:1.5.0'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.4'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0'
|
||||
|
||||
__32bitImplementation 'io.lbry:lbrysdk32:0.102.0'
|
||||
__64bitImplementation 'io.lbry:lbrysdk64:0.102.0'
|
||||
@@ -141,4 +144,3 @@ dependencies {
|
||||
}
|
||||
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
GoogleServicesPlugin.config.disableVersionCheck = true
|
||||
@@ -1,18 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="io.lbry.browser"
|
||||
android:installLocation="auto">
|
||||
|
||||
<uses-feature android:name="android.hardware.camera" android:required="false" />
|
||||
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||
<uses-permission android:name="android.permission.CAMERA" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="com.android.vending.BILLING" />
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK"/>
|
||||
|
||||
<uses-sdk tools:overrideLibrary="com.google.zxing.client.android" />
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<activity
|
||||
android:configChanges="orientation|keyboardHidden|screenSize|smallestScreenSize|screenLayout"
|
||||
android:name=".MainActivity"
|
||||
android:label="@string/app_name"
|
||||
android:exported="true"
|
||||
android:supportsPictureInPicture="true"
|
||||
android:theme="@style/AppTheme.NoActionBar"
|
||||
android:launchMode="singleTask"
|
||||
|
||||
@@ -53,7 +53,8 @@ import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
import com.github.chrisbanes.photoview.PhotoView;
|
||||
import com.google.android.exoplayer2.C;
|
||||
import com.google.android.exoplayer2.DefaultControlDispatcher;
|
||||
//import com.google.android.exoplayer2.DefaultControlDispatcher;
|
||||
import com.google.android.exoplayer2.ForwardingPlayer;
|
||||
import com.google.android.exoplayer2.ParserException;
|
||||
import com.google.android.exoplayer2.PlaybackParameters;
|
||||
import com.google.android.exoplayer2.Player;
|
||||
@@ -65,10 +66,11 @@ import com.google.android.exoplayer2.source.MediaSource;
|
||||
import com.google.android.exoplayer2.source.ProgressiveMediaSource;
|
||||
import com.google.android.exoplayer2.ui.PlayerControlView;
|
||||
import com.google.android.exoplayer2.ui.PlayerView;
|
||||
import com.google.android.exoplayer2.ui.StyledPlayerView;
|
||||
import com.google.android.exoplayer2.upstream.DefaultDataSourceFactory;
|
||||
import com.google.android.exoplayer2.upstream.DefaultLoadErrorHandlingPolicy;
|
||||
import com.google.android.exoplayer2.upstream.Loader;
|
||||
import com.google.android.exoplayer2.upstream.cache.CacheDataSourceFactory;
|
||||
//import com.google.android.exoplayer2.upstream.cache.CacheDataSourceFactory;
|
||||
import com.google.android.exoplayer2.upstream.cache.LeastRecentlyUsedCacheEvictor;
|
||||
import com.google.android.exoplayer2.upstream.cache.SimpleCache;
|
||||
import com.google.android.exoplayer2.util.Util;
|
||||
@@ -200,7 +202,8 @@ public class FileViewFragment extends BaseFragment implements
|
||||
private ClaimListAdapter relatedContentAdapter;
|
||||
private CommentListAdapter commentListAdapter;
|
||||
private BroadcastReceiver sdkReceiver;
|
||||
private Player.EventListener fileViewPlayerListener;
|
||||
//private Player.EventListener fileViewPlayerListener;
|
||||
private Player.Listener fileViewPlayerListener;
|
||||
|
||||
private long elapsedDuration = 0;
|
||||
private long totalDuration = 0;
|
||||
@@ -296,7 +299,7 @@ public class FileViewFragment extends BaseFragment implements
|
||||
|
||||
initUi(root);
|
||||
|
||||
fileViewPlayerListener = new Player.EventListener() {
|
||||
fileViewPlayerListener = new Player.Listener() {
|
||||
@Override
|
||||
public void onPlaybackStateChanged(@Player.State int playbackState) {
|
||||
if (playbackState == Player.STATE_READY) {
|
||||
@@ -1208,18 +1211,19 @@ public class FileViewFragment extends BaseFragment implements
|
||||
}
|
||||
});
|
||||
|
||||
PlayerView playerView = root.findViewById(R.id.file_view_exoplayer_view);
|
||||
StyledPlayerView playerView = root.findViewById(R.id.file_view_exoplayer_view);
|
||||
View playbackSpeedContainer = playerView.findViewById(R.id.player_playback_speed);
|
||||
TextView textPlaybackSpeed = playerView.findViewById(R.id.player_playback_speed_label);
|
||||
textPlaybackSpeed.setText(DEFAULT_PLAYBACK_SPEED);
|
||||
|
||||
/* TODO: Removed until better method is rewritten
|
||||
playerView.setControlDispatcher(new DefaultControlDispatcher() {
|
||||
@Override
|
||||
public boolean dispatchSetPlayWhenReady(Player player, boolean playWhenReady) {
|
||||
isPlaying = playWhenReady;
|
||||
return super.dispatchSetPlayWhenReady(player, playWhenReady);
|
||||
}
|
||||
});
|
||||
});*/
|
||||
|
||||
playbackSpeedContainer.setOnCreateContextMenuListener(new View.OnCreateContextMenuListener() {
|
||||
@Override
|
||||
@@ -1772,7 +1776,7 @@ public class FileViewFragment extends BaseFragment implements
|
||||
if (MainActivity.appPlayer == null && context != null) {
|
||||
AudioAttributes audioAttributes = new AudioAttributes.Builder()
|
||||
.setUsage(C.USAGE_MEDIA)
|
||||
.setContentType(C.CONTENT_TYPE_MOVIE)
|
||||
.setContentType(C.AUDIO_CONTENT_TYPE_MOVIE)
|
||||
.build();
|
||||
|
||||
MainActivity.appPlayer = new SimpleExoPlayer.Builder(context).build();
|
||||
@@ -3040,14 +3044,6 @@ public class FileViewFragment extends BaseFragment implements
|
||||
}
|
||||
|
||||
public static class StreamLoadErrorPolicy extends DefaultLoadErrorHandlingPolicy {
|
||||
@Override
|
||||
public long getRetryDelayMsFor(int dataType, long loadDurationMs, IOException exception, int errorCount) {
|
||||
return exception instanceof ParserException
|
||||
|| exception instanceof FileNotFoundException
|
||||
|| exception instanceof Loader.UnexpectedLoaderException
|
||||
? C.TIME_UNSET
|
||||
: Math.min((errorCount - 1) * 1000, 5000);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMinimumLoadableRetryCount(int dataType) {
|
||||
|
||||
@@ -21,6 +21,7 @@ import androidx.annotation.NonNull;
|
||||
import androidx.preference.PreferenceManager;
|
||||
|
||||
import com.google.android.exoplayer2.C;
|
||||
import com.google.android.exoplayer2.MediaItem;
|
||||
import com.google.android.exoplayer2.Player;
|
||||
import com.google.android.exoplayer2.SimpleExoPlayer;
|
||||
import com.google.android.exoplayer2.audio.AudioAttributes;
|
||||
@@ -29,8 +30,10 @@ import com.google.android.exoplayer2.extractor.DefaultExtractorsFactory;
|
||||
import com.google.android.exoplayer2.source.MediaSource;
|
||||
import com.google.android.exoplayer2.source.ProgressiveMediaSource;
|
||||
import com.google.android.exoplayer2.ui.PlayerView;
|
||||
import com.google.android.exoplayer2.upstream.DefaultDataSource;
|
||||
import com.google.android.exoplayer2.upstream.DefaultDataSourceFactory;
|
||||
import com.google.android.exoplayer2.upstream.cache.CacheDataSourceFactory;
|
||||
import com.google.android.exoplayer2.upstream.cache.CacheDataSource;
|
||||
import com.google.android.exoplayer2.upstream.cache.CacheDataSource.Factory;
|
||||
import com.google.android.exoplayer2.upstream.cache.LeastRecentlyUsedCacheEvictor;
|
||||
import com.google.android.exoplayer2.upstream.cache.SimpleCache;
|
||||
import com.google.android.exoplayer2.util.Util;
|
||||
@@ -88,7 +91,7 @@ public class ShuffleFragment extends BaseFragment {
|
||||
private boolean isPlaying;
|
||||
private boolean newPlayerCreated;
|
||||
private String currentUrl;
|
||||
private Player.EventListener playerListener;
|
||||
private Player.Listener playerListener;
|
||||
|
||||
public View onCreateView(@NonNull LayoutInflater inflater,
|
||||
ViewGroup container, Bundle savedInstanceState) {
|
||||
@@ -97,7 +100,7 @@ public class ShuffleFragment extends BaseFragment {
|
||||
surfModeLoading = root.findViewById(R.id.shuffle_loading);
|
||||
textTitle = root.findViewById(R.id.shuffle_content_title);
|
||||
textPublisher = root.findViewById(R.id.shuffle_content_publisher);
|
||||
playerListener = new Player.EventListener() {
|
||||
playerListener = new Player.Listener() {
|
||||
@Override
|
||||
public void onPlayerStateChanged(boolean playWhenReady, int playbackState) {
|
||||
if (playbackState == Player.STATE_READY) {
|
||||
@@ -445,7 +448,7 @@ public class ShuffleFragment extends BaseFragment {
|
||||
if (MainActivity.appPlayer == null && context != null) {
|
||||
AudioAttributes audioAttributes = new AudioAttributes.Builder()
|
||||
.setUsage(C.USAGE_MEDIA)
|
||||
.setContentType(C.CONTENT_TYPE_MOVIE)
|
||||
.setContentType(C.AUDIO_CONTENT_TYPE_MOVIE)
|
||||
.build();
|
||||
|
||||
MainActivity.appPlayer = new SimpleExoPlayer.Builder(context).build();
|
||||
@@ -498,9 +501,9 @@ public class ShuffleFragment extends BaseFragment {
|
||||
String userAgent = Util.getUserAgent(context, getString(R.string.app_name));
|
||||
String mediaSourceUrl = getStreamingUrl();
|
||||
MediaSource mediaSource = new ProgressiveMediaSource.Factory(
|
||||
new CacheDataSourceFactory(MainActivity.playerCache, new DefaultDataSourceFactory(context, userAgent)),
|
||||
new CacheDataSource.Factory().setCache(MainActivity.playerCache).setUpstreamDataSourceFactory( new DefaultDataSource.Factory(context)),
|
||||
new DefaultExtractorsFactory()
|
||||
).setLoadErrorHandlingPolicy(new FileViewFragment.StreamLoadErrorPolicy()).createMediaSource(Uri.parse(mediaSourceUrl));
|
||||
).setLoadErrorHandlingPolicy(new FileViewFragment.StreamLoadErrorPolicy()).createMediaSource(MediaItem.fromUri(Uri.parse(mediaSourceUrl)));
|
||||
|
||||
MainActivity.appPlayer.prepare(mediaSource, true, true);
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ public final class Lbry {
|
||||
|
||||
public static final int TTL_CLAIM_SEARCH_VALUE = 120000; // 2-minute TTL for cache
|
||||
public static final String SDK_CONNECTION_STRING = "http://127.0.0.1:5279";
|
||||
public static final String LBRY_TV_CONNECTION_STRING = "https://api.na-backend.odysee.com/api/v1/proxy";
|
||||
public static final String LBRY_TV_CONNECTION_STRING = "https://api.lbry.tv/api/v1/proxy";
|
||||
public static final String TAG = "Lbry";
|
||||
|
||||
// Values to obtain from LBRY SDK status
|
||||
|
||||
+2
-4
@@ -4,12 +4,11 @@ buildscript {
|
||||
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.6.4'
|
||||
classpath 'com.google.gms:google-services:4.2.0'
|
||||
classpath 'com.android.tools.build:gradle:7.3.1'
|
||||
classpath 'com.google.gms:google-services:4.3.14'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
@@ -19,7 +18,6 @@ buildscript {
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
maven { url "https://jitpack.io" }
|
||||
/*flatDir {
|
||||
|
||||
+1
-1
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
|
||||
+1
-4
@@ -1,8 +1,5 @@
|
||||
#!/bin/bash
|
||||
echo "release.sh"
|
||||
echo $HOME
|
||||
echo $ANDROID_SDK_ROOT
|
||||
./gradlew assembleRelease --console=plain --stacktrace
|
||||
./gradlew assembleRelease --console=plain
|
||||
version=$(./gradlew -q printVersionName --console=plain | tail -1)
|
||||
mkdir -p bin/
|
||||
rm -f bin/*
|
||||
|
||||
Reference in new issue
Block a user