Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
9fc3b483
authored
Apr 20, 2021
by
Oliver Woodman
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge pull request #8812 from TiVo:p-fix-iframe-only-implicit-init
PiperOrigin-RevId: 369215083
parents
4f145a83
0b557f35
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
0 deletions
library/hls/src/test/java/com/google/android/exoplayer2/source/hls/playlist/HlsMediaPlaylistParserTest.java
library/hls/src/test/java/com/google/android/exoplayer2/source/hls/playlist/HlsMediaPlaylistParserTest.java
View file @
9fc3b483
...
@@ -1221,6 +1221,33 @@ public class HlsMediaPlaylistParserTest {
...
@@ -1221,6 +1221,33 @@ public class HlsMediaPlaylistParserTest {
}
}
@Test
@Test
public
void
iframeOnly_withExplicitInitSegment_hasCorrectByteRange
()
throws
IOException
{
Uri
playlistUri
=
Uri
.
parse
(
"https://example.com/test3.m3u8"
);
String
playlistString
=
"#EXTM3U\n"
+
"#EXT-X-VERSION:6\n"
+
"#EXT-X-MEDIA-SEQUENCE:1616630672\n"
+
"#EXT-X-TARGETDURATION:7\n"
+
"#EXT-X-DISCONTINUITY-SEQUENCE:491 \n"
+
"#EXT-X-MAP:URI=\"iframe0.tsv\",BYTERANGE=\"564@0\"\n"
+
"\n"
+
"#EXT-X-I-FRAMES-ONLY\n"
+
"#EXT-X-PROGRAM-DATE-TIME:2021-04-12T17:08:22.000Z\n"
+
"#EXTINF:1.001000,\n"
+
"#EXT-X-BYTERANGE:121260@1128\n"
+
"iframe0.tsv"
;
InputStream
inputStream
=
new
ByteArrayInputStream
(
Util
.
getUtf8Bytes
(
playlistString
));
HlsMediaPlaylist
standalonePlaylist
=
(
HlsMediaPlaylist
)
new
HlsPlaylistParser
().
parse
(
playlistUri
,
inputStream
);
@Nullable
Segment
initSegment
=
standalonePlaylist
.
segments
.
get
(
0
).
initializationSegment
;
assertThat
(
standalonePlaylist
.
segments
).
hasSize
(
1
);
assertThat
(
initSegment
.
byteRangeLength
).
isEqualTo
(
564
);
assertThat
(
initSegment
.
byteRangeOffset
).
isEqualTo
(
0
);
}
@Test
public
void
masterPlaylistAttributeInheritance
()
throws
IOException
{
public
void
masterPlaylistAttributeInheritance
()
throws
IOException
{
Uri
playlistUri
=
Uri
.
parse
(
"https://example.com/test3.m3u8"
);
Uri
playlistUri
=
Uri
.
parse
(
"https://example.com/test3.m3u8"
);
String
playlistString
=
String
playlistString
=
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment