11589 Commits

Author SHA1 Message Date
Abel Jimenez
ec69977a1c ssa bold and italic 2021-03-01 15:55:34 -08:00
Abel Jimenez
71409c440a ssa bold and italic 2021-03-01 15:52:24 -08:00
Denise LaFayette
fcda8d47ff Support tts:textEmphasis in TTML parser and WebView output 2021-03-01 14:21:22 -08:00
TadejZupancic
50a11886b6 The popup window now opens above or below the button which caused it to open. 2021-02-25 19:35:00 +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
Marc Baechinger
ce48a28aec
Merge pull request #8634 from google/dev-v2-r2.13.2
r2.13.2
2021-02-25 13:15:45 +00:00
bachinger
c96f695af7 Bump version to 2.13.2
PiperOrigin-RevId: 359486817
2021-02-25 11:51:24 +00:00
bachinger
66d15cea09 Bump version to 2.13.2
PiperOrigin-RevId: 359486817
2021-02-25 11:41:26 +00:00
kimvde
734bf4c0c5 Update extensions NDK version to latest LTS version
Latest LTS version is better than latest stable version because it will
be supported for longer.

#minor-release
Issue:#8581
PiperOrigin-RevId: 359467482
2021-02-25 09:39:00 +00:00
kimvde
718c1e773e Update extensions NDK version to latest LTS version
Latest LTS version is better than latest stable version because it will
be supported for longer.

#minor-release
Issue:#8581
PiperOrigin-RevId: 359467482
2021-02-25 09:18:58 +00:00
krocard
36e480d81c Allow low level control of gapless offload
Allow offload of gapless content even if gapless offload is not known to be supported by the device.

This is not exposed in the high level DefaultRendererFactory as most
users are expected to prefer fidelity to power savings.

PiperOrigin-RevId: 359336407
2021-02-25 09:18:49 +00:00
olly
15c3c44e64 Add group setting for the notification
PiperOrigin-RevId: 359298960
2021-02-25 09:18:40 +00:00
olly
a5424acede TestContentProvider: Noop change to use correct constant
The constant values are the same, so this is a no-op, but for
correctness, we should pass the defined constant that the API
documents itself to accept.

PiperOrigin-RevId: 359293471
2021-02-25 09:18:31 +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
andrewlewis
abf65e27f4 Fix publishing to bintray
The configuration to publish to Maven seems to be incompatible with the
configuration for bintray, so only enable one at once. Once the GMaven
publishing flow is completely set up we can remove the exoplayerPublishEnabled
constant and the first branch entirely.

Issue: #5246
PiperOrigin-RevId: 359056610
2021-02-24 18:16:32 +00:00
andrewlewis
e3adac59b4 Add Maven publishing support
The release AAR and Android sources are included for each published artifact.

Issue: #5246
Issue: #8353

#minor-release

PiperOrigin-RevId: 358146555
2021-02-24 18:15:46 +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
bachinger
2635922bbb Add jacoco.exec files to .gitignore
#minor-release

PiperOrigin-RevId: 359041513
2021-02-24 18:08:47 +00:00
marcbaechinger
e890204757 Merge pull request #8539 from larryng:patch-1
PiperOrigin-RevId: 359000734
2021-02-24 18:07:55 +00:00
ibaker
019819a94a Rename MediaPeriodHolder.allRenderersEnabled
The new name reflects that it also waits for previously-used renderers
to be disabled.

Also fix some broken javadoc. These methods changed signature in
ea347a464a

PiperOrigin-RevId: 359253177
2021-02-24 15:46:55 +00:00
marcbaechinger
4ed36e19cf Merge pull request #8615 from szaboa:dev-v2-8435-ssa-font-size
PiperOrigin-RevId: 359244236
2021-02-24 15:46:44 +00:00
krocard
589f50fb22 Move renderer from Player to ExoPlayer
The concept of Renderers is not needed in the
Player interface. Move it to ExoPlayer.

This should not break most users as they use SimpleExoPlayer.

PiperOrigin-RevId: 359220977
2021-02-24 15:46:35 +00:00
olly
716d003c84 Add FakeDataSourceContractTest
PiperOrigin-RevId: 359095093
2021-02-24 15:46:27 +00:00
olly
19adc43bf1 Contract test for start-position-out-of-range case
Currently, this only asserts that *if* an exception is thrown, it
must be a position-out-of-range exception as determined by
DataSourceException.isCausedByPositionOutOfRange.

Issue: #7326
PiperOrigin-RevId: 359092124
2021-02-24 15:46:19 +00:00
kimvde
32e3f15e8f 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)

#minor-release

PiperOrigin-RevId: 359063793
2021-02-24 15:46:11 +00:00
olly
d8b5a1d7f4 Contract test for end-position-out-of-range case
Assert that an exception is not thrown from DataSource.open
if the DataSpec's start position is valid but its end position
extends beyond the end of the data.

HTTP based DataSource implementations have no good way of
knowing when this is the case, so it makes sense to make this
the required behaviour, rather than requiring an exception to
be thrown or allowing both.

There are also use cases where the caller may want to use the
end position as an upper bound, without knowing for sure how
long the content is. An example of this use case is wanting to
pre-cache the first N bytes of a stream. This implies that any
exception should be thrown after reading to the end of the
data, rather than preemptively in open.

Issue: #7326
PiperOrigin-RevId: 359063721
2021-02-24 15:46:02 +00:00
andrewlewis
e8b4986640 Fix publishing to bintray
The configuration to publish to Maven seems to be incompatible with the
configuration for bintray, so only enable one at once. Once the GMaven
publishing flow is completely set up we can remove the exoplayerPublishEnabled
constant and the first branch entirely.

Issue: #5246
PiperOrigin-RevId: 359056610
2021-02-23 16:53:14 +00:00
bachinger
cad2c50c34 Add jacoco.exec files to .gitignore
#minor-release

PiperOrigin-RevId: 359041513
2021-02-23 16:53:06 +00:00
olly
c067ee8853 Fix CacheWriter to handle potential DataSink write failures
- If DataSource.close fails then it's unknown whether the underlying file was
  written to the cache. We should assume that it has not been.
- Always re-query cachedBytes at the start of CacheWriter.cache, since its
  current value may be incorrect if a previous failure was the result of a
  file not being written to the cache.

PiperOrigin-RevId: 359039109
2021-02-23 15:06:38 +00:00
gyumin
520f77bef5 Mark convenience methods as final in BasePlayer
PiperOrigin-RevId: 359021944
2021-02-23 15:06:28 +00:00
olly
46995b3c24 Remove unused mocking in CacheWriterTest
#minor-release

PiperOrigin-RevId: 358998449
2021-02-23 13:55:35 +00:00
olly
5e517f8953 Read to end-of-stream for HTTP contract tests
#minor-release

PiperOrigin-RevId: 358847933
2021-02-23 13:55:13 +00:00
bachinger
45b0c98128 Make media session extension depend on common module only
PiperOrigin-RevId: 359001281
2021-02-23 12:30:41 +00:00
marcbaechinger
95fcfdd71d Merge pull request #8539 from larryng:patch-1
PiperOrigin-RevId: 359000734
2021-02-23 12:30:31 +00:00
olly
920d2e03e6 Remove unused mocking in CacheWriterTest
#minor-release

PiperOrigin-RevId: 358998449
2021-02-23 12:30:22 +00:00
olly
b4b22d9808 Simplify Resource.isEndOfInputExpected
- Make it a property of the DataSource, not of the resource.
- Apply it only when a contract test reads using an
  unbounded DataSpec.

PiperOrigin-RevId: 358997735
2021-02-23 12:30:14 +00:00
olly
691ac39fcb Read to end-of-stream for HTTP contract tests
#minor-release

PiperOrigin-RevId: 358847933
2021-02-23 12:30:06 +00:00
ibaker
7b692f9676 Pass the session state to the onDrmSessionAcquired listener method
PiperOrigin-RevId: 358823166
2021-02-23 12:29:59 +00:00
ibaker
c64a1a0c3c Add tests to CopyOnWriteMultisetTest for modification during iteration
This is a key use-case for copy-on-write collections.

PiperOrigin-RevId: 358807866
2021-02-23 12:29:51 +00:00
ibaker
623597addb De-duplicate DRM acquire & release events by EventDispatcher
When we add DRM pre-acquire support to SampleQueue, we'll dispatch
twice the number of acquire and release events. This is slightly
confusing, since there's the same number of
DrmSessionManager#acquireSession() calls.

We can mitigate this by only dispatching each acquire and release
event to at most one EventDispatcher.

This also changes the events fired when playing a stream with both audio
and video encrypted with the same keys (even without pre-acquisition).

Before: The EventDispatcher would see 2 aquires, 1 key load and 2
release events.

After: The EventDispatcher will see 1 acquire, 1 key load and 1 release.
PiperOrigin-RevId: 358804502
2021-02-23 12:29:43 +00:00
gyumin
0eed19d8a3 Add @Documented to FieldNumber @IntDef
PiperOrigin-RevId: 358799813
2021-02-23 12:29:35 +00:00
gyumin
ff269403bf Lower minSdkVersion to 16 for media2 extension
From media2 1.1.0, it supports API level 16 and above.

PiperOrigin-RevId: 358797986
2021-02-23 12:29:27 +00:00
ibaker
8d942dc213 Simplify release event logic in DefaultDrmSession
This is a no-op assuming the class is always used correctly.
When release causes referenceCount to reach zero there can be at most
one EventDispatcher still connected (which is the one that must be
passed to that final release() call), so we can always pass the event
directly to the EventDispatcher passed in to release().

PiperOrigin-RevId: 358794004
2021-02-23 12:29:19 +00:00
Arnold Szabo
dafe710ab3 Remove extra space from SsaDecoderTest.java. 2021-02-22 20:36:06 +01:00
Arnold Szabo
9c35d76184 Parse font size into float, and fallback to Cue.DIMEN_UNSET instead of null. 2021-02-22 20:33:12 +01: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
andrewlewis
625c830b3d Fix seeking to a non-zero position in a preloaded ad item
`ImaAdsLoader` will preload the first ad of a subsequent media item, but the
preloaded ad might not actually play because the user could seek to a non-zero
position in that media item (which could trigger playback of a midroll, not the
preroll). In this case, playback would get stuck because the midroll ad
expected to play after the seek would never load, because the IMA SDK expected
the preroll to play first.

Fix this behavior by discarding the preloaded ad break. If there isn't a seek,
the transition to the next media item is still seamless.

#minor-release

PiperOrigin-RevId: 357682510
2021-02-22 15:02:51 +00:00
andrewlewis
326ec967af Fix ad tag loader period index
Previously it was safe to query the first period in the timeline, but
now we support using the ads loader in concatenations we need to use
the current period index instead.

PiperOrigin-RevId: 357578003
2021-02-22 15:01:02 +00:00
kimvde
c6ed561d57 Upgrade extensions NDK version
Issue:#8581
PiperOrigin-RevId: 357563419
2021-02-22 14:58:10 +00:00