7185 Commits

Author SHA1 Message Date
bachinger
278a398d3d Bump version to 2.13.3
PiperOrigin-RevId: 368235728
2021-04-13 18:30:40 +01:00
ibaker
b8f83ac195 Parse DASH forced_subtitle role
#minor-release

Issue: #8781
PiperOrigin-RevId: 368212289
2021-04-13 18:14:54 +01:00
ibaker
f93fb5dc55 Switch DashManifestParser to use Ascii.equalsIgnoreCase
String.equalsIgnoreCase depends on the device locale and is discouraged.

#minor-release

PiperOrigin-RevId: 368211677
2021-04-13 18:14:31 +01:00
marcbaechinger
19121f7b20 Merge pull request #8764 from uvjustin:dev-v2
PiperOrigin-RevId: 367994410
2021-04-13 11:16:04 +01:00
olly
f3c63e224d StyledPlayerView: Fix layout issues
- Take centerControls padding into account to prevent switching to
  minimal mode too soon
- Disable clipping to padding to avoid the edges of controls from
  being clipped as the view gets smaller

Issue: #8763
PiperOrigin-RevId: 366966298
2021-04-12 14:12:13 +01:00
olly
4fd8e791f6 HLS: Fix incorrect handling of byte ranges for EXT-X-MAP tags
Issue: #8783
#minor-release
PiperOrigin-RevId: 366265419
2021-04-12 14:12:13 +01:00
olly
106294158a Fix SimpleExoPlayer documentation
I've removed the "by default" statements, since this now depends on how
the builder was configured.

PiperOrigin-RevId: 366249995
2021-04-12 14:12:12 +01:00
olly
b93395e7a5 HLS: Set initial SampleQueue start times
This ensures BUFFER_FLAG_DECODE_ONLY is set on samples that are
before the playback start position, in the case that the queue
is created after the start position is set.

#minor-release

PiperOrigin-RevId: 366249188
2021-04-12 14:12:12 +01:00
ibaker
e8742b33dd Use outputStreamEnded for MetadataRenderer#isEnded
Issue: #8710
PiperOrigin-RevId: 366051836
2021-04-12 14:12:07 +01:00
marcbaechinger
6d0a04dd87 Release all PlaybackStatsListener session when timeline becomes empty.
Currently they are only released when the timeline becomes non-empty
again or the player is released.

Issue: #8778
PiperOrigin-RevId: 366041625
2021-04-12 14:09:26 +01:00
Oliver Woodman
1fd62c685a Merge pull request #8720 from dlafayet:tts-shear-block
PiperOrigin-RevId: 365998615
2021-04-09 17:27:31 +01:00
olly
ffb1f61ef7 StyledPlayerControlView: Fix view measurement issue
The exo_controls_background view is supposed to fill its parent,
and so previously used match_parent to do this. However, if the
parent uses wrap_content for its own dimensions, the constraints
being specified become somewhat ambiguous. The parent is supposed
to be sizing itself to wrap its children, and one of the children
is supposed to be sizing itself to match the parent.

Intuitively for this case, you'd hope that the layout logic would
size the parent to wrap its other children, and that the
match_parent child would then fill the parent with its determined
size. That's not what happens, and instead the parent ends up
expanding to occupy all of the space available to it.

This commit sets the exo_controls_background view's dimensions
to be 0dp in the layout, to stop it from influencing the size of
the parent. It's then expanded to fill the parent in code.

Issue: #8726
#minor-release
PiperOrigin-RevId: 364868301
2021-04-09 17:26:35 +01:00
olly
74a9bf098c Simplify handling of playback speed in StyledPlayerControlView
PiperOrigin-RevId: 360404403
2021-04-09 17:25:04 +01:00
ibaker
14711d1fb2 Treat Dolby Vision as H264 in MCVR#getCodecMaxInputSize()
Issue: #8705
PiperOrigin-RevId: 364821429
2021-04-09 17:11:03 +01:00
aquilescanta
3d487dae40 Add missing switch case
Before this change, calling read after reaching the end of input in an Ogg file
would cause an IllegalStateException.

PiperOrigin-RevId: 364758873
2021-04-09 17:08:39 +01:00
kimvde
aa25037600 JpegExtractor: support JFIF segment preceding Exif segment
#minor-release

PiperOrigin-RevId: 364561115
2021-04-09 17:07:44 +01:00
Ian Baker
65ab00859f Merge pull request #8653 from dlafayet:textemphasis
PiperOrigin-RevId: 364363882
2021-04-09 17:07:08 +01:00
andrewlewis
871c24b966 Fix typo in styled player control view javadoc
#minor-release

PiperOrigin-RevId: 363915106
2021-04-09 17:05:40 +01:00
aquilescanta
ca9af38420 Add 'once' to list of devices that need SetOutputSurfaceWorkaround
Issue: #8718
PiperOrigin-RevId: 363869093
2021-04-09 17:05:13 +01:00
kimvde
5c722acca0 JpegExtractor: read GContainer and GContainerItem XMP prefixes
#minor-release

PiperOrigin-RevId: 363859522
2021-04-09 17:04:39 +01:00
aquilescanta
3732eca8b7 Avoid invalid extractors in DefaultHlsExtractorFactory
This change fixes playback of playlists where segments have the
extension and Content-Type of JPEG pictures (although in reality)
they are transport streams. File inferrence before this change will
cause an exception when assuming the inferred file type is one of
the allowed HLS containers.

#minor-release
Issue: #8733
PiperOrigin-RevId: 363641277
2021-04-09 17:04:08 +01:00
olly
0d052e0399 HLS: Allow audio variants to initialize the timestamp adjuster
This makes HLS playback less liable to become stuck if discontinuity
tags are inserted at different times across media playlists.

Issue: #8700
Issue: #8372
PiperOrigin-RevId: 362903428
2021-04-09 16:59:46 +01:00
ibaker
06e6391866 Fix CEA-708 priority
According to the spec (section 8.4.2), high numeric values represent low
priorities, so we need to flip this sort.

Issue: #8704
#minor-release
PiperOrigin-RevId: 362558370
2021-04-09 16:57:26 +01:00
andrewlewis
3bdfb76c0c Don't update the ad group count when releasing ImaAdsLoader
`ImaAdsLoader` clears its `AdPlaybackState` when it's released but this could
cause `AdsMediaSource` to look up information in the ad playback state that is
no longer in bounds.

Issue: #8693

PiperOrigin-RevId: 362556286
2021-04-09 16:56:54 +01:00
aquilescanta
21326e67e3 Fallback to inferred file types when sniffing fails
If none of the extractors successfully sniff the content then we will fall back
to inferred file types in the following order:
- Webvtt if the media comes from a SUBTITLE EXT-X-MEDIA.
- The type of media declared in the HTTP "Content-Type" header.
- The type of the media according to the file extension.
- Transport stream.

Issue: #8700
PiperOrigin-RevId: 362519769
2021-04-09 16:49:31 +01:00
ibaker
3dae045487 Deflake ClippedPlaybackTest
PiperOrigin-RevId: 362298115
2021-04-09 16:49:00 +01:00
ibaker
39e6f665a7 Pass the end position of a stream to TextRenderer when marking it final
In a period transition we pass the start time of the next period, for
the final period we pass the duration of the period or timeline, if
known.

This means sideloaded subtitles now respect the end point of
ClippingMediaSource and ensures that content subtitles aren't
incorrectly displayed over mid-roll ads.

When transitioning back into the subtitled content the subtitles still
appear slightly before the video transitions, meaning the first subtitle
of the content is shown with the last few frames of the ad. Resolving
this in a way that doesn't break anything else requires a deeper
investigation.

Issue: #5317
Issue: #8456
#minor-release
PiperOrigin-RevId: 361797118
2021-04-09 16:13:10 +01:00
Ian Baker
fbdc1bbfd7 Merge pull request #8654 from abeljim:dev-v2-8435-bolditalic
PiperOrigin-RevId: 361767801
2021-04-09 16:11:47 +01:00
tonihei
37d5947b9e Use correct period-window offset for initial prepare position.
MaskingMediaSource needs to resolve the prepare position set for a MaskingPeriod
while the source was still unprepared to the first actual prepare position.

It currently assumes that the period-window offset and the default position is
zero. This assumption is correct when a PlaceholderTimeline is used, but it
may not be true if the real timeline is already known (e.g. when re-preparing
a live stream after a playback error).

Fix this by using the known timeline at the time of the preparation.
Also:
 - Update a test that should have caught this to use lazy re-preparation.
 - Change the demo app code to use the recommended way to restart playback
   after a BehindLiveWindowException.

Issue: #8675
PiperOrigin-RevId: 361604191
2021-04-09 16:10:26 +01:00
Ian Baker
db60db70fc Merge pull request #8662 from joakimzhang:dev-v2
PiperOrigin-RevId: 361029604
2021-04-09 16:07:55 +01:00
bachinger
01d4adad6d Reset playback speed when live speed control becomes unused
Issue: #8664
#minor-release
PiperOrigin-RevId: 360877086
2021-04-09 16:06:56 +01:00
Oliver Woodman
d6eb61d6f8 Merge pull request #8546 from TadejZupancic:dev-v2
PiperOrigin-RevId: 360433358
2021-04-09 16:06:22 +01:00
kimvde
1a190ff90e Link to callback in Player getters' Javadoc
PiperOrigin-RevId: 360398175
2021-04-09 16:04:54 +01:00
andrewlewis
bcd0a91ed6 Fall back from DTS HD to DTS
#minor-release

PiperOrigin-RevId: 360384540
2021-04-09 14:10:21 +01:00
olly
8570248079 Fix scrubber not reappearing correctly in some cases
Issue: #8646
PiperOrigin-RevId: 360184586
2021-04-09 14:08:49 +01:00
ibaker
e4d5e07fd3 Make SsaDecoder robust against absent Format items
Suggested in a comment on PR Issue: #8615

PiperOrigin-RevId: 359522217
2021-04-09 14:01:23 +01:00
Ian Baker
4364b9150f Disable flaky test in ExoPlayerTest
targetLiveOffsetInMedia_unknownWindowStartTime_doesNotAdjustLiveOffset
is flaky on the release branch. It's not flaky on the dev-v2 branch
due to recent changes to FakeClock's behaviour which aren't yet present
on release-v2.
2021-02-25 16:29:37 +00:00
bachinger
c96f695af7 Bump version to 2.13.2
PiperOrigin-RevId: 359486817
2021-02-25 11:51:24 +00:00
marcbaechinger
e21b99a671 Merge pull request #8615 from szaboa:dev-v2-8435-ssa-font-size
PiperOrigin-RevId: 359244236
2021-02-24 18:35:59 +00:00
kimvde
3f8f7ba97f Fix conditions to enable UI actions
- Ensure consistency between (Styled)PlayerControlView,
  PlayerNotificationManager, TimelineQueueNavigator and
  DefaultControlDispatcher.
- Handle the case where a live stream has ended when enabling previous
  and next actions (window.isLive() is true and window.isDynamic is
  false in that case)

PiperOrigin-RevId: 359063793
2021-02-24 18:32:11 +00:00
kimvde
90c18e4410 Enable next button if window is live
This behavior is consistent with DefaultControlDispatcher#dispatchNext().

#minor-release

PiperOrigin-RevId: 357145076
2021-02-24 18:14:03 +00:00
marcbaechinger
e890204757 Merge pull request #8539 from larryng:patch-1
PiperOrigin-RevId: 359000734
2021-02-24 18:07:55 +00:00
olly
46995b3c24 Remove unused mocking in CacheWriterTest
#minor-release

PiperOrigin-RevId: 358998449
2021-02-23 13:55:35 +00:00
olly
18a94aa717 SilenceSampleStream.readData: Handle flags-only buffers
The SampleStream.readData contract is that when reading a sample
with a flags-only buffer, the buffer timestamp and flags should
be set and the read position should not be advanced.

#minor-release

PiperOrigin-RevId: 357842130
2021-02-22 15:04:08 +00:00
olly
5be7d4da9e Don't clear audioSessionId when audio disabled
Issue: #8585
PiperOrigin-RevId: 357553237
2021-02-22 14:52:37 +00:00
tonihei
0ab9a219f7 Clarify/correct restrictions of AdsMediaSource.
The source can be used in compositions (in fact, every source is
automatically used in an internal composition when constructing the
playlist), and there is not really a concept of top-level media source
any more since the Player supports playlists.

The actual restriction is that the content media source needs to have
exactly one period to be able to create a SinglePeriodAdTimeline.

#minor-release

PiperOrigin-RevId: 357544191
2021-02-22 14:46:35 +00:00
kimvde
84d7433936 Revert logic to decide whether meta atom is full
The previous logic was changed under the assumption that the first box
inside a meta box was not always an hdlr box, but this is not true.

#minor-release

PiperOrigin-RevId: 357200713
2021-02-22 14:35:54 +00:00
kimvde
75cc5990b0 Add support for MP4/QuickTime non-full meta atoms
PiperOrigin-RevId: 357160215
2021-02-22 14:32:08 +00:00
olly
5807d2e0be Fix RequiresApi annotation
#minor-release

PiperOrigin-RevId: 357273184
2021-02-12 22:55:02 +00:00
olly
26371ae40f Bump version to 2.13.1
PiperOrigin-RevId: 357219132
2021-02-12 20:01:59 +00:00