702 Commits

Author SHA1 Message Date
ibaker
99ebeaed17 Change the SubtitleView.Output interface
This allows properties to propagate when switching view types
(e.g. bottomPaddingFraction).

It also allows the style-stripping code to be pushed up to SubtitleView
and therefore shared.

PiperOrigin-RevId: 310353534
2020-05-14 22:18:37 +01:00
ibaker
c4c826fbfe Add StrikethroughSpan support to SpannedToHtmlConverter
PiperOrigin-RevId: 310332708
2020-05-14 22:18:18 +01:00
tonihei
95ffc365ca Remove auto-notification of current cues when adding listener.
Users of addTextOutput should instead query the current cues if they
need them. This is more consistent with how other listeners are handled.

PiperOrigin-RevId: 310112241
2020-05-06 20:56:37 +01:00
ibaker
5117138481 Fix RelativeSizeSpan handling in SpannedToHtmlConverter
A silly mistake of confusing a fractional float with a percentage.

PiperOrigin-RevId: 309946004
2020-05-05 18:39:07 +01:00
Oliver Woodman
af6baaed90 Merge pull request #7304 from AChep:patch-1
PiperOrigin-RevId: 309395364
2020-05-01 19:50:46 +01:00
ibaker
e11ae734ed Add RelativeSizeSpan support to SpannedHtmlConverter
PiperOrigin-RevId: 309391401
2020-05-01 19:50:26 +01:00
ibaker
eb7c14704f Add AbsoluteSizeSpan to SpannedHtmlConverter
PiperOrigin-RevId: 309390205
2020-05-01 19:50:08 +01:00
ibaker
fa0178d043 Add TypefaceSpan support to SpannedToHtmlConverter
PiperOrigin-RevId: 309390050
2020-05-01 19:50:00 +01:00
ibaker
10db7a9c45 Ensure we destroy WebViews when we detach them from SubtitleView
PiperOrigin-RevId: 309389731
2020-05-01 19:49:51 +01:00
ibaker
79c003f5a8 Add bitmap support to SubtitleWebView using SubtitleTextView
PiperOrigin-RevId: 309389571
2020-05-01 19:49:42 +01:00
ibaker
222231dd8e Update SubtitleWebView to use center alignment by default
This mimics the behaviour of SubtitleTextView for cues that don't have
alignment set.

PiperOrigin-RevId: 309389392
2020-05-01 19:49:33 +01:00
ibaker
ab57c8010f Add bottomPaddingFraction support to SubtitleWebView
PiperOrigin-RevId: 309245320
2020-05-01 19:49:07 +01:00
ibaker
caeeae2c9e Use system foreground & background color in SubtitleWebView
PiperOrigin-RevId: 309244671
2020-05-01 19:48:58 +01:00
ibaker
4371617ec9 Add HTML support for BackgroundColorSpan
PiperOrigin-RevId: 309244135
2020-05-01 19:48:50 +01:00
ibaker
8c64d188cc Add support for Cue and default text sizes in SubtitleWebView
PiperOrigin-RevId: 309243467
2020-05-01 19:48:41 +01:00
andrewlewis
3b315b8134 Add TrackSelectionView getTag null check
PiperOrigin-RevId: 308988419
2020-05-01 19:46:48 +01:00
ibaker
284b843da0 Add fall-back behaviour for vertical cues if rendering isn't supported
PiperOrigin-RevId: 308854072
2020-05-01 19:45:55 +01:00
insun
4580b52454 Clean up old xml files which are not referenced anymore.
PiperOrigin-RevId: 308841370
2020-05-01 19:45:20 +01:00
Artem Chepurnoy
dfde3df2c2
Remove unused locationOnScreen variable 2020-04-30 17:36:04 +03:00
Artem Chepurnoy
088938c9ab Fix DefaultTimeBar ignores touch transformations #7303 2020-04-29 14:55:59 +03:00
ibaker
6a36574af3 Use anti-aliasing and bitmap filtering for bitmap subtitles
issue:#6950
PiperOrigin-RevId: 307411067
2020-04-27 10:18:31 +01:00
ibaker
7214ad2d6f Use FrameLayout instead of ViewGroup for Subtitle(Web)View
This is a more specific ViewGroup subclass that handles some of the
layout logic automatically. It's designed to work best with a single
child view, as used here.

PiperOrigin-RevId: 306654947
2020-04-15 17:42:19 +01:00
ibaker
a6358dc7be Escape the rubyText when generating HTML
This should have been done before, I just missed it.

PiperOrigin-RevId: 304612519
2020-04-06 13:27:58 +01:00
ibaker
6438e1cdbc Add support for tate-chu-yoko to SpannedToHtmlConverter
PiperOrigin-RevId: 304386857
2020-04-06 13:27:27 +01:00
ibaker
205adb7f8d Rewrite the vertical text support in SubtitleWebView
The attempt in <unknown commit> was hacky and incomplete.

PiperOrigin-RevId: 304356038
2020-04-06 13:27:06 +01:00
ibaker
7323b5351a Add support for multi-line strings to SpannedToHtmlConverter
PiperOrigin-RevId: 304355717
2020-04-06 13:26:50 +01:00
ibaker
262f19aa63 Add vertical text support to SubtitleWebView
PiperOrigin-RevId: 304186326
2020-04-01 22:38:54 +01:00
ibaker
76358d983f Base64 encode the subtitle HTML before passing to WebView.loadData
Without this, URL-encoding is assumed, which means ampersand-codes are
not carried through to the underlying web page correctly.

PiperOrigin-RevId: 304163733
2020-04-01 22:38:27 +01:00
ibaker
5392a2f4bc Add non-ascii characters to SpannedToHtmlConverterTest
These are handled by converting to ampersand codes - add a test to show
that's explicit & deliberate.

PiperOrigin-RevId: 304163712
2020-04-01 22:38:19 +01:00
ibaker
802d71a5cb Add cue positioning to SubtitleWebView
PiperOrigin-RevId: 303998690
2020-04-01 22:37:33 +01:00
jaewan
a2896c6cba Allow developers to specify CharSequence for Notification strings
CharSequence is used by Notification builders and allows to set Spannable text.
It's the base interface of the String class, so apps wouldn't be break after
the update.

PiperOrigin-RevId: 303731890
2020-03-30 17:17:27 +01:00
ibaker
92494ce44b Document that overlapping spans aren't rendered to HTML correctly
Add some mitigation about why this is probably on OK limitation.

PiperOrigin-RevId: 302907940
2020-03-27 23:30:28 +00:00
andrewlewis
26a27944c5 Add option for sensor rotation in 360 playbacks
Issue: #6761
PiperOrigin-RevId: 300715682
2020-03-19 00:47:12 +00:00
bachinger
527563da31 remove deprecated usage of PlaybackParameter
Removes usage of PlaybackParameters where it seems to be trivial.

PiperOrigin-RevId: 300435199
2020-03-19 00:45:18 +00:00
olly
f82bc244ea Add show/hideScrubber to DefaultTimeBar
PiperOrigin-RevId: 300249371
2020-03-11 16:27:07 +00:00
olly
b83041a6f5 Fix SubtitleView.ViewType IntDef
PiperOrigin-RevId: 300067502
2020-03-11 16:26:33 +00:00
tonihei
b5976a55ff Upgrade Kotlin annotations and fix gradle warnings
The new version fixes some warnings in Gradle builds. Also
add missing indirect compileOnly dependencies to fix some more warnings

Issue:issue:#7007
PiperOrigin-RevId: 298855510
2020-03-10 10:19:19 +00:00
ibaker
63256a48d4 Disable text selection in SubtitleWebView
PiperOrigin-RevId: 298605366
2020-03-10 10:17:56 +00:00
ibaker
7bfd2b27eb Start generating HTML from Span-styling in SubtitleWebView
PiperOrigin-RevId: 298565231
2020-03-10 10:17:39 +00:00
olly
a6d0caaa3c Drop prefix test- from test methods under v2/library
This is one step toward following the google3's test naming convention.
See go/java-testing/getting_started#basic-test-template for details
why prefix test isn't necessary.

This CL is generated by following command
$ find -name '*Test.java' | xargs -I{} sed -i 's/^\ \ public\ void\ test\([A-Z]\)\(.*\)$/  public void \L\1\E\2/' {}

and then manually modified following tests where test method names conflict with test target.
- VorbisUtilTest
- VorbisReaderTest
- UtilTest
- DownloadManagerDashTest
- DefaultOggSeekerTest
- OggPageHeaderTest
- HlsMasterPlaylistParserTest

PiperOrigin-RevId: 298074653
2020-03-10 10:15:43 +00:00
olly
54283746be Fix lint errors
PiperOrigin-RevId: 295953956
2020-02-25 21:21:29 +00:00
christosts
0a612ce34a Video processing offset in AnalyticsListener
PiperOrigin-RevId: 295146481
2020-02-17 17:13:09 +00:00
christosts
9c58e57127 Video frame processing offset in DecoderCounters
Add fields in DecoderCounters for computing the average video frame
processing offset.

The MediaCodecVideoRenderer reports the video frame processing offset
and the demo app presents it on the debug information.

PiperOrigin-RevId: 294677878
2020-02-13 15:45:22 +00:00
olly
1440cad5ed Fix build warnings under exoplayer/v2/library
- Removes empty <p> tag in javadoc
- Removes incorrect parameter name warnings for var args.

PiperOrigin-RevId: 294555651
2020-02-13 15:44:11 +00:00
olly
12187c9048 Apply minimal layout change according to view size
- Add method to scale scrubber handle of DefaultTimeBar

PiperOrigin-RevId: 294366734
2020-02-11 17:12:29 +00:00
bachinger
3dc9225bab remove deprecated usage of onPlayerStateChanged in ui components
PiperOrigin-RevId: 294182858
2020-02-11 17:11:11 +00:00
bachinger
c02933ac0a rename getPlaybackError
PiperOrigin-RevId: 294074348
2020-02-11 17:10:41 +00:00
bachinger
e1c48515eb add next, previous, fastForward and rewind to ControlDispatcher
Issue: #6926, #6934
PiperOrigin-RevId: 293315532
2020-02-11 17:07:52 +00:00
bachinger
4bb6036cf6 add playback state changed listener
This change deprecates Player.onPlayerStateChanged(boolean pwr, int state). It removes deprecation for trivial cases. I'll remove other deprecated usages (mostly in ui module) in follow-up CLs to not bloat this CL.

PiperOrigin-RevId: 292917872
2020-02-11 17:07:03 +00:00
ibaker
b6bd57ab12 Replace most usages of @TargetApi with @RequiresApi
We keep @TargetApi where the method is a safe no-op on
older versions due to an in-line version check.

PiperOrigin-RevId: 292878727
2020-02-03 11:21:21 +00:00