453 Commits

Author SHA1 Message Date
eguven
7a114cb374 Uncomment VisibleForTesting annotations
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220432564
2018-11-07 17:57:42 +00:00
eguven
d7e23f826b Fix package visibility comments
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220323772
2018-11-07 17:57:42 +00:00
andrewlewis
abb7d8a2d5 Include UI module tests in open source push
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220277660
2018-11-07 17:57:42 +00:00
eguven
37f4540156 Move BaseGvrPlayerActivity to com.google.android.exoplayer2.ext.gvr
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219829614
2018-11-06 11:07:06 +00:00
olly
e1c6229cc8 Bump version to 2.9.1
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219609471
2018-11-01 11:22:39 +00:00
andrewlewis
1094da2b61 Fix player state transitions for postroll ads
Before this change, the player state would be STATE_ENDED then
STATE_BUFFERING (when the postroll ad was marked as played) then
STATE_ENDED again.

Queueing a final content media period with start point equal to
the content duration after a postroll ensures that the player
state doesn't change to STATE_ENDED transiently.

Switch from using C.TIME_END_OF_SOURCE to C.TIME_UNSET for media
periods that should not have an end point and are not followed
by an ad.

Content media periods before postrolls have end position
C.TIME_END_OF_SOURCE. If the postroll ad loads, its content
position is set to the content duration, which should be known
at the point of loading the postroll, then a final 'empty'
content media period with start position equal to its duration
is queued. If the postroll fails to load, this empty content
media period is queued up directly after the preceding content
media period.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219443683
2018-10-31 13:54:15 +00:00
eguven
5de17b9adc Add support for playing spherical videos on Daydream
RELNOTES=true

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219119888
2018-10-31 13:42:19 +00:00
olly
194d0f3331 Add a bit of structure DefaultTrackSelector, for sanity
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219109829
2018-10-31 13:38:51 +00:00
aquilescanta
9ea678c5e6 Add ExoCastMessage
ExoCastMessage contains all player management messages that the sender app can
send to the receiver app. ExoCastMessages can be serialized as JSON strings.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=218846977
2018-10-31 13:35:22 +00:00
olly
ede62e97b2 Fix track selection when forceLowestBitrate is enabled:
- Only use bitrate when comparing two tracks if their bitrates are
  actually different.
- For audio, prefer to use bitrate over selection flags.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=218660886
2018-10-31 13:33:32 +00:00
eguven
ea49d39a4d Add VR string and icon
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=218137830
2018-10-24 18:29:10 +01:00
vsethia
048c8bd68f Snapshots are going to become the default soon and these tests are failing when
reloading frmo snapshots. b/117347850. This is a no-op change as the current
default == _fullboot. When we globally flip and make snapshots the default,
these tests would fail and we are moving them over so that when we flip your
tests still pass.

https://groups.google.com[]forum/#!topic/mobile-ninjas/Y69PTAT5GyY

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=216634430
2018-10-15 09:28:21 +01:00
tonihei
0a7745bc03 Fix some random Android Studio warnings.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=215904019
2018-10-15 09:26:36 +01:00
eguven
e91065c4b0 Remove ProjectionRenderer.EyeType
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=215562599
2018-10-03 22:13:34 +01:00
tonihei
f0e0a7cf57 Fix left position for subtitles.
When SubtitlePainter positions the cues centred in the given box, it must add
the left offset of the box to get the correct position.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=215535289
2018-10-03 22:08:57 +01:00
tonihei
43c01562d1 Fix positioning of subtitles.
SubtitleView forwards the cue box position to SubtitlePainter. This should be
the position relative to the canvas of the SubtitleView. Currently, however,
we forward the position relative to the parent of SubtitleView. That causes
problems if SubtitleView has a non-zero offset position to its parent.

Issue:#4788

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=215535281
2018-10-03 22:07:25 +01:00
tonihei
5c8dabade6 Add @Documented to @IntDef and @StringDef annotations.
This makes the annotations appear in the generated JavaDoc.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214952419
2018-10-01 19:22:34 +01:00
eguven
c9ebaacae0 Use GlUtil class to share GL methods
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214582295
2018-09-26 13:05:17 +01:00
eguven
e86d5efb21 Recenter SphericalSurfaceView view on startup
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=214261973
2018-09-24 15:36:10 +01:00
tonihei
e25b7d2148 Add wrapper for Log messages to allow settig the log level.
Currently there is no way to disable (or reduce) the logcat output generated
by ExoPlayer.

Issue:#4665

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=213421072
2018-09-20 12:12:21 +01:00
tonihei
585806de24 Clarify doc of components which only allow a main thread player.
ExoPlayer can be run on a background thread, but some components (UI and IMA)
only support players on the main thread. This adds some documentation and
assertions for that.

To simplify assertions, this also moves the getApplicationLooper method from
ExoPlayer to Player.

Issue:#4439

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=213280359
2018-09-17 17:56:36 +01:00
bachinger
0e12eb4d92 Dispatch notification actions to the originating PlayerNotificationManager only.
Issue #4643

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211613803
2018-09-06 12:00:55 +01:00
olly
8d0c4b1b87 Fix some Javadoc
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211352749
2018-09-03 15:16:47 +01:00
eguven
5335b258de Make SceneRenderer implement VideoFrameMetadataListener and CameraMotionListener
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211084127
2018-09-03 14:14:23 +01:00
eguven
a429f4819e Use camera motion metadata to stabilize 360 videos
RELNOTES=true

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=210537375
2018-08-28 16:43:53 +01:00
tonihei
d0161ad18b Fix all error-prone, style, optional suggestion, etc. issues.
This fixes or suppresses all reported issues by the code review linter tools.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=210107759
2018-08-28 16:37:14 +01:00
olly
924a76d532 Clean up use of deprecated APIs
- Add @Deprecated on overrides of deprecated method.
- Suppress deprecation warnings where appropriate.
- Use non-deprecated alternatives where appropriate.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=210092434
2018-08-24 16:12:44 +01:00
eguven
3f70454cc2 Fix controller ui toggling when using SphericalSurfaceView
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209909845
2018-08-24 15:56:28 +01:00
tonihei
4bf5e4991c Improve IntDef javadoc.
The doc can be improved by enumerating and linking all possible values from
the interface doc.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209772309
2018-08-24 15:53:30 +01:00
olly
9f0303b079 Fix a bunch of misc analysis warnings
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209758330
2018-08-24 15:48:58 +01:00
olly
9ccbb5bd6d Add some missing Nullable annotations
Also remove NonNull, since we assume NonNull by default. Except
where explicitly overriding a method with NonNull annotated args,
in which case we're still expected to use it.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209758204
2018-08-24 15:47:31 +01:00
eguven
02a8964fe2 Support VR180 videos
If available parse and use spherical metadata:
https://github.com/google/spatial-media/blob/master/docs/spherical-video-v2-rfc.md

RELNOTES=true

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209754080
2018-08-24 15:44:24 +01:00
olly
bd8a956d53 Use lamdas everywhere
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209162373
2018-08-24 15:19:30 +01:00
Oliver Woodman
32bd69d4b2 Cleanup recent merged pull requests 2018-08-16 17:02:08 +01:00
Oliver Woodman
94fa4d9989 Merge branch 'fix/vectorArtWork' of https://github.com/mitrejcevski/ExoPlayer into dev-v2 2018-08-16 16:58:31 +01:00
ojw28
4d931b9cad
Merge pull request #4585 from szaboa/feature/4304_buffering_view_option
#4304 - Add option to show buffering view when setPlayWhenReady is false
2018-08-16 16:45:25 +01:00
olly
bac597cb07 Update dependencies + misc fixes
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=208195761
2018-08-13 14:02:51 +01:00
olly
4ebc455c09 Fix ldpi fullscreen icons to be the correct size
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=208017966
2018-08-13 13:48:22 +01:00
eguven
bf6b647088 Rename spherical/Utils class to GlUtil
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=207525621
2018-08-06 13:22:51 +01:00
andrewlewis
b3b8356766 Fix DefaultTimeBar accessibility class name
See https://support.google.com/accessibility/android/answer/7661305.

Also fix/suppress nullability warnings.

Issue: #4611

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=207245115
2018-08-06 11:28:03 +01:00
eguven
45c1e9eef3 Add missing Nullable annotation Player.EventListener.onTimelineChanged
Issue: #4593

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=206911927
2018-08-01 13:49:21 +01:00
eguven
02e9972630 Add 360 video samples to the demo app
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=206747144
2018-08-01 13:49:20 +01:00
eguven
30fecb71d2 Fix TouchTrackerTest
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=206304655
2018-08-01 13:49:20 +01:00
Arnold Szabo
dbd25d5854 #4304 - Adjustments after code review 2018-07-27 13:41:02 +03:00
Jovche Mitrejchevski
5635ca2792 Reset aspect ratio 2018-07-27 12:03:39 +02:00
Arnold Szabo
1f12f22bb5 #4304 - Add option to show buffering view when setPlayWhenReady is false 2018-07-27 00:49:11 +03:00
Jovche Mitrejchevski
72a2b82370 Suggestions from Code Review 2018-07-26 12:26:29 +02:00
Jovche Mitrejchevski
46232977f6 Convert defaultArtwork from Bitmap to Drawable
Using bitmaps is still supported, but also this will allow using other types of drawables to be set as artwork.
2018-07-26 09:50:55 +02:00
bachinger
9d0ec37ead Show notification whilst ads are playing but hide playback actions.
Issue:#4535

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=205722036
2018-07-24 14:55:24 +01:00
eguven
9c337c8806 Add monoscopic 360 surface type to PlayerView
Using this surface it's possible to play 360 videos in a non-VR Activity that is
affected by phone and touch input.

RELNOTES=true

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=205720776
2018-07-24 14:54:05 +01:00