mirror of
https://github.com/TeamNewPipe/NewPipeExtractor.git
synced 2024-12-12 21:30:33 +05:30
[YouTube] Add support for automatic dubbed and secondary tracks
This commit is contained in:
parent
abba78cf9d
commit
8a3350f79d
@ -1720,9 +1720,12 @@ public final class YoutubeParsingHelper {
|
||||
case "original":
|
||||
return AudioTrackType.ORIGINAL;
|
||||
case "dubbed":
|
||||
case "dubbed-auto":
|
||||
return AudioTrackType.DUBBED;
|
||||
case "descriptive":
|
||||
return AudioTrackType.DESCRIPTIVE;
|
||||
case "secondary":
|
||||
return AudioTrackType.SECONDARY;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
@ -325,6 +325,8 @@ public final class YoutubeDashManifestCreatorsUtils {
|
||||
case DESCRIPTIVE:
|
||||
return "description";
|
||||
default:
|
||||
// Secondary track types do not seem to have a dedicated role in the DASH
|
||||
// specification, so use alternate for them
|
||||
return "alternate";
|
||||
}
|
||||
}
|
||||
|
@ -1,12 +1,13 @@
|
||||
package org.schabi.newpipe.extractor.stream;
|
||||
|
||||
/**
|
||||
* An enum representing the track type of an {@link AudioStream} extracted by a {@link
|
||||
* An enum representing the track type of {@link AudioStream}s extracted by a {@link
|
||||
* StreamExtractor}.
|
||||
*/
|
||||
public enum AudioTrackType {
|
||||
|
||||
/**
|
||||
* An original audio track of the video.
|
||||
* An original audio track of a video.
|
||||
*/
|
||||
ORIGINAL,
|
||||
|
||||
@ -20,6 +21,7 @@ public enum AudioTrackType {
|
||||
|
||||
/**
|
||||
* A descriptive audio track.
|
||||
*
|
||||
* <p>
|
||||
* A descriptive audio track is an audio track in which descriptions of visual elements of
|
||||
* a video are added to the original audio, with the goal to make a video more accessible to
|
||||
@ -29,5 +31,15 @@ public enum AudioTrackType {
|
||||
* @see <a href="https://en.wikipedia.org/wiki/Audio_description">
|
||||
* https://en.wikipedia.org/wiki/Audio_description</a>
|
||||
*/
|
||||
DESCRIPTIVE
|
||||
DESCRIPTIVE,
|
||||
|
||||
/**
|
||||
* A secondary audio track.
|
||||
*
|
||||
* <p>
|
||||
* A secondary audio track can be an alternate audio track from the original language of a
|
||||
* video or an alternate language.
|
||||
* </p>
|
||||
*/
|
||||
SECONDARY
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user