Back to Exoplayer

HlsPlaylistParser (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/source/hls/playlist/HlsPlaylistParser.html

latest4.6 KB
Original Source

Package com.google.android.exoplayer2.source.hls.playlist

Class HlsPlaylistParser

  • java.lang.Object

    • com.google.android.exoplayer2.source.hls.playlist.HlsPlaylistParser
  • All Implemented Interfaces:ParsingLoadable.Parser<HlsPlaylist>


[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classHlsPlaylistParserextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[ParsingLoadable.Parser](../../../upstream/ParsingLoadable.Parser.html "interface in com.google.android.exoplayer2.upstream")<[HlsPlaylist](HlsPlaylist.html "class in com.google.android.exoplayer2.source.hls.playlist")>

Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.

HLS playlists parsing logic.

Nested Class Summary

Nested Classes | Modifier and Type | Class | Description | | --- | --- | --- | | static class | HlsPlaylistParser.DeltaUpdateException | Deprecated.

Exception thrown when merging a delta update fails. |

Constructor Summary

Constructors | Constructor | Description | | --- | --- | | HlsPlaylistParser() | Deprecated.

Creates an instance where media playlists are parsed without inheriting attributes from a multivariant playlist. | | HlsPlaylistParser​(HlsMultivariantPlaylist multivariantPlaylist, HlsMediaPlaylist previousMediaPlaylist) | Deprecated.

Creates an instance where parsed media playlists inherit attributes from the given multivariant playlist. |

Method Summary

All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description | | --- | --- | --- | | HlsPlaylist | parse​(Uri uri, InputStream inputStream) | Deprecated.

Parses an object from a response. |

- 

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

- 

HlsPlaylistParser

public HlsPlaylistParser()

Deprecated.

Creates an instance where media playlists are parsed without inheriting attributes from a multivariant playlist.

- 

HlsPlaylistParser

public HlsPlaylistParser​([HlsMultivariantPlaylist](HlsMultivariantPlaylist.html "class in com.google.android.exoplayer2.source.hls.playlist")multivariantPlaylist,
                         @Nullable[HlsMediaPlaylist](HlsMediaPlaylist.html "class in com.google.android.exoplayer2.source.hls.playlist")previousMediaPlaylist)

Deprecated.

Creates an instance where parsed media playlists inherit attributes from the given multivariant playlist. Parameters:multivariantPlaylist - The multivariant playlist from which media playlists will inherit attributes.previousMediaPlaylist - The previous media playlist from which the new media playlist may inherit skipped segments.

Method Detail

- 

parse

public[HlsPlaylist](HlsPlaylist.html "class in com.google.android.exoplayer2.source.hls.playlist")parse​([Uri](https://developer.android.com/reference/android/net/Uri.html "class or interface in android.net")uri,[InputStream](https://developer.android.com/reference/java/io/InputStream.html "class or interface in java.io")inputStream)
                  throws[IOException](https://developer.android.com/reference/java/io/IOException.html "class or interface in java.io")

Deprecated.

Description copied from interface: ParsingLoadable.Parser

Parses an object from a response. Specified by:parse in interface ParsingLoadable.Parser<HlsPlaylist>Parameters:uri - The source Uri of the response, after any redirection.inputStream - An InputStream from which the response data can be read.Returns:The parsed object.Throws:ParserException - If an error occurs parsing the data.IOException - If an error occurs reading data from the stream.