598 Commits

Author SHA1 Message Date
aquilescanta
fcb263a407 Make DrmSessionManager take a Format instead of DrmInitData
Skipping acquirePlaceholderSession which will be removed
in a following change.

PiperOrigin-RevId: 326402746
2020-08-17 16:11:17 +01:00
olly
6f7524521b Demo app: Update concatenation terminology to use "playlist"
PiperOrigin-RevId: 326401528
2020-08-17 16:11:08 +01:00
olly
5220c70c5e Demo app: Rename drm_license_url to drm_license_uri
It's quite hard to document drm_force_default_license_uri when the
actual license URI uses "url" terminology. This brings the two in
line.

PiperOrigin-RevId: 326283162
2020-08-17 16:10:22 +01:00
olly
a7b1b56064 Demo app: Remove is_live from exolist.json
It's not used in the public exolist.json file. It's only use is to
disable the download icon for live content, but it's quite easy to
forget (there are live samples in our internal exolist.json files
that omit this property!).

It's better just to show a clear error message toast when the
download actually fails for this reason.

PiperOrigin-RevId: 326281649
2020-08-17 16:10:13 +01:00
olly
a8a32d6bec Demo app: Minor simplifications
- Simplify the ability to use placeholder DRM sessions to a boolean
- Remove unused IS_LIVE entry in the intent

PiperOrigin-RevId: 326280149
2020-08-17 16:10:03 +01:00
andrewlewis
a7a364d567 Remove unused local intent
PiperOrigin-RevId: 326216921
2020-08-17 16:09:28 +01:00
olly
361e5d9326 Demo app: Fix DRM support check for ClearKey
Issue: Issue: #7735
PiperOrigin-RevId: 325900705
2020-08-17 16:08:15 +01:00
olly
805cfb0259 Revert spurious sample update
PiperOrigin-RevId: 325419476
2020-08-07 19:04:28 +01:00
christosts
a5e6e3054d Offline DRM in main demo app
PiperOrigin-RevId: 325413035
2020-08-07 19:04:09 +01:00
olly
b9612bc338 Fix codec initialization data for Opus in MP4
PiperOrigin-RevId: 325327466
2020-08-07 19:03:40 +01:00
olly
be88143fcd Remove deprecated parts of demo app IntentUtil
PiperOrigin-RevId: 324604419
2020-08-07 18:59:11 +01:00
christosts
33fe3a47e3 Remove references to Downloads from IntentUtil
PiperOrigin-RevId: 324599130
2020-08-07 18:59:01 +01:00
christosts
abfe7a2314 Support clip start/end points in demo app
Demo app supports clip start/end points and demonstrates manual
ad insertions.

PiperOrigin-RevId: 324574358
2020-08-07 18:58:41 +01:00
ibaker
132cff1e47 Add an example of tx3g subtitles in an MP4 container
Issue: #7677
PiperOrigin-RevId: 324180797
2020-08-01 12:56:48 +01:00
christosts
6054bda028 Statically import assertions
PiperOrigin-RevId: 323769467
2020-08-01 12:55:27 +01:00
olly
4b3463ab45 Simplify internal demo app
- Enable cleartext by default for the internal demo app
- Remove "external" variant of the internal demo app

PiperOrigin-RevId: 322987978
2020-07-27 23:58:49 +01:00
aquilescanta
0f346c8c2f Fix withDecoderExtensions flavor detection in internal demo app
PiperOrigin-RevId: 322781213
2020-07-24 10:47:58 +01:00
olly
d77ce9eda0 Remove deprecated calls to external APIs
PiperOrigin-RevId: 322346067
2020-07-24 10:43:44 +01:00
claincly
73df8e4a26 Removes spherical stereo play back mode
- Removed corresponding playback examples in the resouce JSON files.
- Removed the spherical style declaration.
- Removed spherical stereo mode related Intent settings, and
- Removed code to play back media in spherical stereo mode

BUG=160460714
(grafted from 595fe17a480d5bc64d0198130150d8e8a5daa679)
PiperOrigin-RevId: 322206314
2020-07-24 10:42:03 +01:00
claincly
811921e618 Removes random ABR support in demo app
- Removed random ABR option from popup menu
- Remvoed intent parameter regarding random abr, default to
   AdaptiveTrackSelection. Removed logic for getting track selection
   mode from an intent
- Remvoed string definition regarding random ABR

PiperOrigin-RevId: 322167816
2020-07-24 10:41:45 +01:00
andrewlewis
9594aa45ff Move functionality from DemoApplication to DemoUtil
https://developer.android.com/reference/android/app/Application recommends
against subclassing application.

PiperOrigin-RevId: 322163812
2020-07-24 10:41:27 +01:00
olly
0cd15d9158 Proactively check listener arguments are non-null
PiperOrigin-RevId: 322143359
2020-07-24 10:40:24 +01:00
claincly
72728ba054 Remove Media Tunneling support in demo app
- Removed Tunneling option from popup menu
- Removed intent parameter regarding tunneling
- Removed string definition regarding tunneling

PiperOrigin-RevId: 322123578
2020-07-24 10:39:48 +01:00
andrewlewis
7fce04a67f Depend on the IMA extension in noExtensions variant
Also use the cronet extension in the demo app.

PiperOrigin-RevId: 322108530
2020-07-24 10:39:03 +01:00
andrewlewis
a8b64f9530 Remove extra MediaItem in demo app
PiperOrigin-RevId: 322094331
2020-07-24 10:38:53 +01:00
tonihei
3b26c218e1 Deduplicate clear playlist code for stop(true) calls.
The logic to clear the playlist is currently duplicated in various
reset methods so that calls to player.stop(true) can clear the playlist.

This can be deduplicated by clearing the playlist as a seperate
operation that reuses the existing code.

PiperOrigin-RevId: 321578759
2020-07-24 10:37:50 +01:00
insun
79c14cb801 Renamed PlayerActivity2 to InternalPlayerActivity and refactored
- Rename PlayerActivity2 to InternalPlayerActivity.
- Reduced code duplications.

PiperOrigin-RevId: 321515231
2020-07-24 10:36:56 +01:00
insun
aa67685071 Apply StyledPlayerView into default demo app
PiperOrigin-RevId: 321280295
2020-07-24 10:35:06 +01:00
ibaker
2f19b63ca0 Add package-info files to packages that only exist in tests
This doesn't affect the nullness checker or Kotlin, but it does make
weird warnings appear in Android Studio. It seems mildly preferable to
have the same spurious warnings in these files that we have in other
tests, rather than different spurious warnings.

PiperOrigin-RevId: 321173760
2020-07-24 10:34:12 +01:00
ibaker
e9a8335381 Migrate callers to pass MediaItem to createMediaSource()
createMediaSource(Uri) is deprecated.

PiperOrigin-RevId: 321121383
2020-07-24 10:31:22 +01:00
olly
21e56f571d Misc analysis fixes
PiperOrigin-RevId: 320921457
2020-07-13 14:04:29 +01:00
aquilescanta
968a0baa8d Fix handling of intents with no license server URI
PiperOrigin-RevId: 319497156
2020-07-03 15:31:20 +01:00
olly
5be6eaa88c Make GL demo easier to understand
PiperOrigin-RevId: 319007693
2020-07-03 09:00:28 +01:00
olly
314bc65d62 Enable download parallelisation in demo app
- Deprecate constructors that don't take an executor, to direct
  developers toward the new ones. Callers can trivially pass
  Runnable::run to one of the new ones if they want old behaviour.
- Add comment explaining warning suppression added in the CL that
  added parallelised download support.

Issue: #5978
PiperOrigin-RevId: 318803296
2020-06-29 14:38:51 +01:00
insun
d5f029315c Cleanup deprecated SimpleExoPlayerView and PlaybackControlView
PiperOrigin-RevId: 318152038
2020-06-26 11:14:13 +01:00
ibaker
06c17f5152 Redefine numeric Cue.line in terms of viewport lines, ignore lineAnchor
Numerical lines conceptually map to a grid of lines in the viewport,
with the Cue text lines being aligned to one of the viewport lines.

It doesn't make sense to position a single-line cue differently based
on lineAnchor when it's expected to 'snap' to a particular line on the
viewport grid. So we redefine the position to be in terms of the cue
lines rather than the bounds of the cue box.

It's also not possible to always handle ANCHOR_TYPE_MIDDLE when
lineType=NUMBER (as it relies on the number of lines in the cue being
odd), so it's easier to ignore lineAnchor completely.
PiperOrigin-RevId: 318034664
2020-06-26 11:13:33 +01:00
tonihei
1836f1df36 Update Checkerframework.
The compat dependency is no longer maintained and we need to keep
it at its old version.

PiperOrigin-RevId: 317658349
2020-06-23 11:07:34 +01:00
andrewlewis
aec5ff8be1 Fix incorrect rounding of ad cue points
We currently get float ad cue points from IMA, but store these as
longs in microseconds. The cast from double to long would take the
floor of the value, which could lead to stored ad cue points being
off-by-one. Use Math.round to avoid this.

ImaAdsLoader also has code to map a double AdPodInfo position (which
should match a cue point) onto the corresponding ad group index by
searching the long ad cue points. Match the calculation used where we
map float cue points, including narrowing the position to a float
first to avoid regressions if IMA SDK behavior changes to represent
positions in more than float precision later, and also remove the
requirement that the ad positions match exactly as a defensive
measure.

PiperOrigin-RevId: 317607017
2020-06-23 11:06:49 +01:00
Oliver Woodman
2fcd759edb Merge pull request #7479 from sravan1213:dev-v2
PiperOrigin-RevId: 315794031
2020-06-11 10:11:30 +01:00
sravan1213
c3282c9a37 Propagate download exception through onDownloadChanged callback 2020-06-08 18:51:54 +05:30
andrewlewis
c13be44f68 Add one hour on-demand test video
PiperOrigin-RevId: 314100932
2020-06-01 14:59:56 +01:00
andrewlewis
eddc2b0b33 Enable multidex for demos
This is necessary now we have Guava in debug (no-minified) apps.

Also switch to AndroidX multidex to remove the support library dependency.
Temporarily we need to add an Application class, as internal jetification
doesn't seem to handle declaring MultiDexApplication in AndroidManifest.xml.

issue:#7421
PiperOrigin-RevId: 313145023
2020-05-27 18:59:43 +01:00
olly
03d9375872 Fix demo app persistent sample selection
It currently crashes if the samples change such that the persisted
position is no longer within bounds.

PiperOrigin-RevId: 312554337
2020-05-21 17:09:32 +01:00
olly
f38a1015ae Adding instructions on how to build and run ExoPlayer demo apps
Issue:#7338
PiperOrigin-RevId: 312470913
2020-05-21 17:08:53 +01:00
bachinger
d233c04582 Simplify DownloadHelper
PiperOrigin-RevId: 312467496
2020-05-21 17:08:43 +01:00
olly
b9abe2d0d6 Clean up samples list
- Add Widevine AV1 streams
- Remove SD and HD only Widevine streams (we don't need so many!)
- Simplify naming

PiperOrigin-RevId: 311697741
2020-05-15 10:59:07 +01:00
bachinger
fefb2a03c2 Provide a constructor that does not require a context
The only reason to require a context for creating an instance of
DefaultMediaSourceFactory is creating a user agent. DownloadHelper
has a bunch of static methods that need to instantiate a
DefaultMediaSourceFactory without a Context. By adding a setter for
the user agent we can remove that restriction and use a default user
agent.

PiperOrigin-RevId: 311291603
2020-05-14 22:22:42 +01:00
bachinger
66fd81401b Add forceDefaultLicenseUri to MediaItem.DrmConfiguration
ISSUE: #7114
PiperOrigin-RevId: 311115835
2020-05-14 22:21:58 +01:00
bachinger
b22783f895 Rename sourceUri to uri
PiperOrigin-RevId: 308918151
2020-05-01 19:46:04 +01:00
andrewlewis
008d38d832 Reattach player to ads loader on resume
When pausing and resuming a playback using an AdsLoader
it is necessary to call setPlayer again. This fixes an
issue where playback was stuck in the buffering state
when pausing and resuming an ad playback in the demo app.

PiperOrigin-RevId: 308582143
2020-04-27 11:34:29 +01:00