Skip to content

Commit 3e44856

Browse files
author
Martin
authored
Merge branch 'TeamNewPipe:dev' into dev
2 parents bd1c003 + 19dd9d2 commit 3e44856

3 files changed

Lines changed: 12 additions & 45 deletions

File tree

README.ja.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<p align="center"><a href="https://newpipe.net">ウェブサイト</a> &bull; <a href="https://newpipe.net/blog/">ブログ</a> &bull; <a href="https://newpipe.net/FAQ/">FAQ</a> &bull; <a href="https://newpipe.net/press/">ニュース</a></p>
1818
<hr>
1919

20-
*他の言語で読む: [English](README.md), [Español](README.es.md), [한국어](README.ko.md), [Soomaali](README.so.md), [Português Brasil](README.pt.br.md), [日本語](README.ja.md), [Română](README.ro.md), [Türkçe](README.tr.md)*
20+
*他の言語で読む: [English](README.md), [Español](README.es.md), [한국어](README.ko.md), [Soomaali](README.so.md), [Português Brasil](README.pt_BR.md), [日本語](README.ja.md), [Română](README.ro.md), [Türkçe](README.tr.md)*
2121

2222
<b>注意: これはベータ版のため、バグが発生する可能性があります。もしバグが発生した場合、GitHub のリポジトリで Issue を開いてください。</b>
2323

app/src/main/java/org/schabi/newpipe/player/helper/PlayerDataSource.java

Lines changed: 8 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
package org.schabi.newpipe.player.helper;
22

33
import android.content.Context;
4-
import android.os.Build;
54

65
import androidx.annotation.NonNull;
76

8-
import com.google.android.exoplayer2.source.MediaParserExtractorAdapter;
97
import com.google.android.exoplayer2.source.ProgressiveMediaSource;
108
import com.google.android.exoplayer2.source.SingleSampleMediaSource;
11-
import com.google.android.exoplayer2.source.chunk.MediaParserChunkExtractor;
129
import com.google.android.exoplayer2.source.dash.DashMediaSource;
1310
import com.google.android.exoplayer2.source.dash.DefaultDashChunkSource;
1411
import com.google.android.exoplayer2.source.hls.HlsMediaSource;
15-
import com.google.android.exoplayer2.source.hls.MediaParserHlsMediaChunkExtractor;
1612
import com.google.android.exoplayer2.source.smoothstreaming.DefaultSsChunkSource;
1713
import com.google.android.exoplayer2.source.smoothstreaming.SsMediaSource;
1814
import com.google.android.exoplayer2.upstream.DataSource;
@@ -46,17 +42,10 @@ public SsMediaSource.Factory getLiveSsMediaSourceFactory() {
4642
}
4743

4844
public HlsMediaSource.Factory getLiveHlsMediaSourceFactory() {
49-
final HlsMediaSource.Factory factory =
50-
new HlsMediaSource.Factory(cachelessDataSourceFactory)
51-
.setAllowChunklessPreparation(true)
52-
.setLoadErrorHandlingPolicy(
53-
new DefaultLoadErrorHandlingPolicy(MANIFEST_MINIMUM_RETRY));
54-
55-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
56-
factory.setExtractorFactory(MediaParserHlsMediaChunkExtractor.FACTORY);
57-
}
58-
59-
return factory;
45+
return new HlsMediaSource.Factory(cachelessDataSourceFactory)
46+
.setAllowChunklessPreparation(true)
47+
.setLoadErrorHandlingPolicy(
48+
new DefaultLoadErrorHandlingPolicy(MANIFEST_MINIMUM_RETRY));
6049
}
6150

6251
public DashMediaSource.Factory getLiveDashMediaSourceFactory() {
@@ -71,26 +60,11 @@ public DashMediaSource.Factory getLiveDashMediaSourceFactory() {
7160
private DefaultDashChunkSource.Factory getDefaultDashChunkSourceFactory(
7261
final DataSource.Factory dataSourceFactory
7362
) {
74-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
75-
return new DefaultDashChunkSource.Factory(
76-
MediaParserChunkExtractor.FACTORY,
77-
dataSourceFactory,
78-
1
79-
);
80-
}
81-
8263
return new DefaultDashChunkSource.Factory(dataSourceFactory);
8364
}
8465

8566
public HlsMediaSource.Factory getHlsMediaSourceFactory() {
86-
final HlsMediaSource.Factory factory = new HlsMediaSource.Factory(cacheDataSourceFactory);
87-
88-
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.R) {
89-
return factory;
90-
}
91-
92-
// *** >= Android 11 / R / API 30 ***
93-
return factory.setExtractorFactory(MediaParserHlsMediaChunkExtractor.FACTORY);
67+
return new HlsMediaSource.Factory(cacheDataSourceFactory);
9468
}
9569

9670
public DashMediaSource.Factory getDashMediaSourceFactory() {
@@ -101,18 +75,9 @@ public DashMediaSource.Factory getDashMediaSourceFactory() {
10175
}
10276

10377
public ProgressiveMediaSource.Factory getExtractorMediaSourceFactory() {
104-
final ProgressiveMediaSource.Factory factory;
105-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
106-
factory = new ProgressiveMediaSource.Factory(
107-
cacheDataSourceFactory,
108-
MediaParserExtractorAdapter.FACTORY
109-
);
110-
} else {
111-
factory = new ProgressiveMediaSource.Factory(cacheDataSourceFactory);
112-
}
113-
114-
return factory.setLoadErrorHandlingPolicy(
115-
new DefaultLoadErrorHandlingPolicy(EXTRACTOR_MINIMUM_RETRY));
78+
return new ProgressiveMediaSource.Factory(cacheDataSourceFactory)
79+
.setLoadErrorHandlingPolicy(
80+
new DefaultLoadErrorHandlingPolicy(EXTRACTOR_MINIMUM_RETRY));
11681
}
11782

11883
public SingleSampleMediaSource.Factory getSampleMediaSourceFactory() {

app/src/main/java/org/schabi/newpipe/util/external_communication/TextLinkifier.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@
3333
public final class TextLinkifier {
3434
public static final String TAG = TextLinkifier.class.getSimpleName();
3535

36-
private static final Pattern HASHTAGS_PATTERN = Pattern.compile("(#[A-Za-z0-9_]+)");
36+
// Looks for hashtags with characters from any language (\p{L}), numbers, or underscores
37+
private static final Pattern HASHTAGS_PATTERN =
38+
Pattern.compile("(#[\\p{L}0-9_]+)");
3739

3840
private TextLinkifier() {
3941
}

0 commit comments

Comments
 (0)