From 17033876b1393d147a84d5c517ddb34055e7bc43 Mon Sep 17 00:00:00 2001 From: Guoen Yong Date: Tue, 21 Mar 2023 17:10:25 +0800 Subject: [PATCH] Impr/doris 1730 migrate exo 2.18.4 (#77) * Provide access to original media timestamps in AudioSink. * Add `setOutputStreamOffsetUs(long)` method in `AudioSink`. * Add private methods `setOutputStreamOffsetUs(long)` method in `MediaCodecRenderer` and `DecoderAudioRenderer`. * Add protected method `onOutputStreamOffsetUs(long)` method in `MediaCodecRenderer`, in which: * `MediaCodecRenderer` itself will be no-op for this method. * `MediaCodecAudioRenderer` will propagate this value to its `audioSink`. * Add logics in `DecoderAudioRenderer` to calculate `outputStreamOffsetUs`. PiperOrigin-RevId: 479265429 (cherry picked from commit 4c73241058041fd978e9748b2158168d4e6e702d) * Add a FrameProcessor flag to drop the processed frame This mode is supported by using `C.TIME_UNSET` (which is a negative value). The new logic decouples the value of `C.TIME_UNSET` and the frame dropping behaviour. PiperOrigin-RevId: 479368880 (cherry picked from commit ccab9fba0369ea9709a6987024177e8b73a5c7ac) * Document the allowed values of TsPayloadReader.Flags IntDef PiperOrigin-RevId: 479569806 (cherry picked from commit 7c68b8d4500cb25779a473b52029944ec4d29543) * HDR: Disable tone mapping on unsupported pixel build ID. Also, update tests to allow AnyOf error codes, and no longer check exception messages, which caused quite a bit of churn. PiperOrigin-RevId: 479570861 (cherry picked from commit faa796d7365330d1f1d4f5b17901d6b1a78ce868) * Bump dexmaker version PiperOrigin-RevId: 479579252 (cherry picked from commit a6b9772f0e6f5a31baafb6965c3386d819d3c1e9) * Remove late frame dropping in FrameProcessor Currently, a frame is dropped if it's requested release time is in the past. This mode was added to support previewing. However, in normal ExoPlayer playback, slightly late frames (<30ms late) are also rendered. On MediaCodec side, this means calling `releaseOutputBuffer` with a release time in the past. PiperOrigin-RevId: 479615291 (cherry picked from commit 2188685c465aa6d641e78ab33eaa93fbb92185b8) * Adjust track selection with Dolby Vision if display does not support If the sample type is Dolby Vision and the display does not support Dolby Vision, then the capabilities DecoderSupport flag is set to DECODER_SUPPORT_FALLBACK_MIMETYPE. This denotes that the renderer will use a decoder for a fallback mimetype if possible. This alters track selection as tracks with DecoderSupport DECODER_SUPPORT_PRIMARY are preferred. UnitTests included -DefaultTrackSelector test that checks track selection reordering with DECODER_SUPPORT_FALLBACK_MIMETYPE -MediaCodecVideoRenderer test that checks setting of DecoderSupport flag based on Display's Dolby Vision support Issue: google/ExoPlayer#8944 PiperOrigin-RevId: 480040876 (cherry picked from commit a366590a0425ff138520752e2fc94c70429c20ab) * Treat NO_VALUE as zero when adding up total required bitrate We currently use the literal -1 (=NO_VALUE) when adding up the total. Tracks without known bitrate can be ignored in the calculation, but we should use an explicit value of 0. #minor-release Issue: google/ExoPlayer#10664 PiperOrigin-RevId: 480048126 (cherry picked from commit af19e0ea890e7b274b6f75f409f00f11e11c1c81) * Add local file picker to ConfigurationActivity PiperOrigin-RevId: 480349627 (cherry picked from commit 225d0dcdd1e7e7f1f41d8ac1d2dee7340c40cf3a) * Demo: Read long values from trim slider. Before, slider values were read as `floor()`'ed `longValue()`s, so that trimming to intervals less than one second would be interpreted as a request for a zero- duration trim. Also, rename `radiusRange` references here to `trimRange`, since this is not a radius range. PiperOrigin-RevId: 480401556 (cherry picked from commit 6c59f9ece40f6450405d29acd559492145158409) * Demo: Hide player controls by default. Player controls are somewhat distracting when showing the difference between the input and output video, as they obscure and darken the video players. PiperOrigin-RevId: 480597804 (cherry picked from commit 91a61cecbe37f4c5595f534ee237011289c0ac18) * Demo: Shorten trim range from 60 seconds to 10 seconds. Most demo videos aren't very long, and the default demo video is only 10 seconds. Shorten the maximum trim duration to 10 seconds, to demonstrate transformer functionality more easily, and allow this to be used more easily when trimming short sections of a longer video (ex. to make test clips) PiperOrigin-RevId: 480602037 (cherry picked from commit 3142a2127dc224e4c2124989b952a8bd1e06d510) * Add Cea608DecoderTest When debugging and fixing Issue: google/ExoPlayer#10666 I wanted to write a regression test, but needed to add a test first... This is just a small bit of coverage to start with. It checks the field/channel filtering works correctly, but doesn't check any styling info. It also doesn't test 'pop on' subtitles (i.e. when the subtitle isn't shown until a 'end of subtitle' signal is received). PiperOrigin-RevId: 480644568 (cherry picked from commit 6052212c15b89d71846f1f3855728ce863304bca) * Remove supportsSampleMimeType from Muxer.Factory - This method is redundant with getSupportedSampleMimeTypes(). - This is to prepare the Muxer class to become public. PiperOrigin-RevId: 480840902 (cherry picked from commit 8962f5a3f4b505224ceb22ac5771b85f24e30358) * Fix blank toast in Transformer Demo PiperOrigin-RevId: 480847967 (cherry picked from commit 446c9943f935541d7b76fc1dfa62ee969d775f60) * Migrate media constants from androidx.media.util.MediaConstants Adds root extras and metadata extras to MockMediaLibraryService and MockMediaBrowserCompatService and completed test cases for asserting interoperability with a media1 or Media3 browser. PiperOrigin-RevId: 480854842 (cherry picked from commit f95406e75d1eca9b96477132d33d752e2485bee6) * Ensure sessions without MediaPeriodId are ended after seek to new item We already have logic to end all session except the current one if the current one doesn't have a MediaPeriodId yet. This is assuming that this only happens after a seek on the app side where the player doesn't have detailled knowledge about the MediaPeriodIds yet. Currently this logic isn't triggered if the window we are coming from doesn't have its MediaPeriodId either as we run into another check that keeps sessions around until we have a valid windowSequenceNumber. Swapping both conditions fixes this case without breaking any of the other known transition scenarios. Issue: androidx/media#180 PiperOrigin-RevId: 480866465 (cherry picked from commit 6070d9110a9cec61f6073c7669f2f8185a635767) * Mark effectively-final PlayerControlView fields as actually final This means the null checker can be more sure that these fields don't get reassigned between a null-check and a usage. PiperOrigin-RevId: 481142004 (cherry picked from commit 248ee469ad243a86b66445f96782b915296eec4c) * Effect: Remove unused private int ouptutTexId in pixel tests. PiperOrigin-RevId: 481143798 (cherry picked from commit 026699bafc6d73bc63b6cf416ea183fc3d506039) * Fix the position of IntDef annotations on fields in the UI module PiperOrigin-RevId: 481150758 (cherry picked from commit 871a5e685e9bc78544107c803306320e7d53ee53) * Fix display settings window UI bug for foldable devices. PiperOrigin-RevId: 481215581 (cherry picked from commit 6cdaf2c031258221939eead3b11075a90e2c742c) * Add copybara annotated import statement for special cases PiperOrigin-RevId: 481605567 (cherry picked from commit fd315dadebe479f2cc75fb4fa482cb414270bdcf) * Add manifest to make gradle build work PiperOrigin-RevId: 481606248 (cherry picked from commit 325e973ace929efa193b114271d844f20814705a) * Add DefaultMuxer forwarding to FrameworkMuxer - The naming DefaultMuxer is more consistent with the rest of Transformer codebase (e.g. DefaultEncoderFactory). - By hiding the implementation details of DefaultMuxer, the transition to in-app Muxer will be seamless for apps using DefaultMuxer. - The current plan is that DefaultMuxer will become the in-app muxer. PiperOrigin-RevId: 481838790 (cherry picked from commit b4d7f066dd31cce1e3d7ab14cc47d3b7be364a88) * Remove more references to overriding layouts from Player(Control)View In exoplayer2 this affects StyledPlayer(Control)View #minor-release PiperOrigin-RevId: 481878940 (cherry picked from commit a5583c04bb6c199633e2b1edf036060c0d33b616) * Fix parameter comment block. #cleanup PiperOrigin-RevId: 481882181 (cherry picked from commit b6bd35860cda60f27439df737fdee815060ed6fe) * Remove deprecated setOutputMimeType This is to prepare Muxer to become public PiperOrigin-RevId: 481893842 (cherry picked from commit bd9181e6ba5daf865f9c2f4338f1238b108dafd8) * GL: Move loadAsset to GlProgram, where it's used. (Also, make some public methods private) PiperOrigin-RevId: 481912071 (cherry picked from commit a404fde4fa9d9d16b0be3c6e08dabd059c07f471) * Ensure onMediaItemTransition is sent for repeats of the same item Currently, repeating the same item (via seekNext/Previous) implicitly results in a seek to the default position of the current item, which looks exactly the same as a direct seek. As a result, we don't send onMediaItemTransition as we would for every other seekNext/Previous call. This can be fixed by explicitly marking the repeat case in the internal BasePlayer/ExoPlayerImpl methods, so that the callback can be triggered. Issue: google/ExoPlayer#10667 PiperOrigin-RevId: 481951788 (cherry picked from commit 76ce0cc69fa12a9b2592103da97dd45c15bfe4d3) * Test: Update MatrixProcessorPixelTest to use input width and height. Before, they used `width` and `height`, which was inconsistent with other pixel tests, and less descriptive. Refactoring change only. No functional change intended. PiperOrigin-RevId: 481970243 (cherry picked from commit 620d8c9479469f11bdd372e80d231a64e0132808) * Remove ForwardingPlayer special case from PlayerControlView.setPlayer This was originally added in https://github.com/google/ExoPlayer/commit/4fd7d777b669f6adacc3737a7e15b04a57f030fb, but it hasn't done anything since https://github.com/google/ExoPlayer/commit/98ee159df161c7c8806c0b0490b642738822f6a7 (when the instanceof ExoPlayer check was removed). PiperOrigin-RevId: 482161662 (cherry picked from commit 7d5f1a24be204321961aba81f2de5b1ce1328c71) * Effect: Remove unnecessary "this" qualifier `transformationMatrix` is not ambiguous, as there's no other local transformationMatrix variable nearby. PiperOrigin-RevId: 482184602 (cherry picked from commit c698ec51a24bdf42e2affad181d2a6d812cbe47b) * Make Muxer public The reason for making the Muxer public is that we want to add an option to disable or configure the timer that will throw when the muxer doesn't receive any data for a given period of time. PiperOrigin-RevId: 482199360 (cherry picked from commit d213b93958fce7e2a25851ec44b7c1938fcf0d7d) * HDR: Support RGBA_1010102 in GlUtil as a parameter. Make it easier to support use of RGBA_101012 rather than RGBA_8888 for EGL contexts, displays, and surfaces. This tangentially supports adding HDR tests, by slightly simplifying the color selection logic we'd have to add in HDR tests. PiperOrigin-RevId: 482219428 (cherry picked from commit 9e1adee4cbc3386672f42d580734175c442bdbea) * Corrected ordering of javadoc params PiperOrigin-RevId: 482231370 (cherry picked from commit 897722071e90f7b79527a75ac667a4e2143fbdfd) * Merge pull request #10578 from thucngv:release-v2 PiperOrigin-RevId: 481115402 (cherry picked from commit 9861f88f3db419553b893efd98a5e1a0c8c6287c) * Use static import for Assertions in MCVR PiperOrigin-RevId: 481122795 (cherry picked from commit 12f7174e1f8a2c2b1f36df749b43262efb88f60a) * Merge pull request #183 from jasper-apps:bugfix/make-download-notification-appear-immediately PiperOrigin-RevId: 482165983 (cherry picked from commit 405455b06c6d596552c695670664309319f5570c) * Map lib-effect from androidx to exoplayer2 PiperOrigin-RevId: 482179761 (cherry picked from commit 28c4be2f6bd56205e3b8128bf710c34b3b3d65e9) * Remove muxerFactory dependency on playerListener This listener will need to be passed to the MuxerWrapper to throw when the Transformer is stuck. PiperOrigin-RevId: 482433552 (cherry picked from commit e3f28421fd85f1c44135f24c3df1fac000834f67) * Change areSizeAndRateSupported to use PerfomancePoint.covers PiperOrigin-RevId: 482461219 (cherry picked from commit 0eb30eacc7f65f84e34e038567d0dd86dc4b6e2c) * Fix some incorrect comments in Cea608DecoderTest Also used all-caps consistently PiperOrigin-RevId: 483317405 (cherry picked from commit 6dcb9aaaa87d1a11a0eb41d1f80312796bceb55a) * Merge pull request #10618 from vishnuchilakala:fix/do_not_send_content_complete_if_midroll_skipped PiperOrigin-RevId: 482481703 (cherry picked from commit a413b478f7c45615d3fc7ebd31cacfc363e8ca31) * Merge pull request #162 from ittiam-systems:rtp-mp4a-latm PiperOrigin-RevId: 482490230 (cherry picked from commit fd2ba37b1d67576313aec0512d630331b7c99f4b) * Add DAI specific methods to AdPlaybackState PiperOrigin-RevId: 482755468 (cherry picked from commit a8e6894ad63271293a831d13419b1372fe0f387a) * Add CanIgnoreReturnValue to AudioProcessor#configure + implementations Although it can be useful to check the output format, it's not required or needed. For some AudioProcessor implementations, it is stated/obvious that the output format will match the input, in which case there is no a need to check the return value. #cleanup PiperOrigin-RevId: 483403679 (cherry picked from commit a7bfa12eecb42cbdd13bd7e612603a4d400ebda4) * Use int for an unsigned byte value in Cea608Decoder This is a no-op, but it's more 'correct' because it avoids any potential sign mix-ups that come from storing an unsigned byte (with a potentially set MSB) in a signed java byte variable. PiperOrigin-RevId: 483409798 (cherry picked from commit 3d0f43a149c846670480c993e09def1a2d2eeeea) * Clarify sideloaded subtitle example #minor-release PiperOrigin-RevId: 483633564 (cherry picked from commit eaf1f2153abca685fce6092a52eb4059bc61815a) * Add GL utility methods to get 4x4 identity and set identity PiperOrigin-RevId: 483671580 (cherry picked from commit f5ad4e098dd71bd4f99b87350e042acab4f95746) * Move AudioProcessor to common. PiperOrigin-RevId: 483699606 (cherry picked from commit dda17db261758f7211ffa793ee9cc6fea842addb) * Move `DefaultAudioSink.AudioProcessorChain` to `AudioProcessorChain` Split inner interface into separate file, which will go in common module. The old interface will be deprecated and extends the new. #cleanup PiperOrigin-RevId: 483732226 (cherry picked from commit ad52b68c738e8321b966b904d3cd2139f7a560ef) * Fix `Cea608Decoder` handling of service switch commands in field 2 From ANSI-CTA-608-E R-2014 section 8.4: > When closed captioning is used on line 21, field 2, it shall conform > to all of the applicable specifications and recommended practices as > defined for field 1 services with the following differences: > 1. The non-printing character of the miscellaneous control-character > pairs that fall in the range of 0x14, 0x20 to 0x14, 0x2F in field 1, > shall be replaced with 0x15, 0x20 to 0x15, 0x2F when used in field > 2. > 2. The non-printing character of the miscellaneous control-character > pairs that fall in the range of 0x1C, 0x20 to 0x1C, 0x2F in field > 1, shall be replaced with 0x1D, 0x20 to 0x1D, 0x2F when used in > field 2. This basically means that `cc1=0x15` in field 2 should be interpreted as `cc1=0x14` in field 1, and same for `0x1D -> 0x1C`. The `isMiscCode` method above already handles this by ignoring the LSB (the only difference between `0x14` and `0x15`, and `0x1C` and `0x1D`) by AND-ing with `0xF6` instead of `0xF7`. This change uses the same trick in `isServiceSwitchCommand`. Issue: google/ExoPlayer#10666 #minor-release PiperOrigin-RevId: 483927506 (cherry picked from commit 7c6d492ff19b6aead4cc6f1f9a426145fc1faa0d) * Mute input video player in transformer demo PiperOrigin-RevId: 483969411 (cherry picked from commit 8181b3c6a1aba32459d4a5975cc708cbf224b397) * Add AudioProcessor.AudioFormat equals method. PiperOrigin-RevId: 483983486 (cherry picked from commit c9585d0154980c576710d035be51eb472fbd6665) * Add muxer timer to detect when generating an output sample is too slow This allows to throw when the Transformer is stuck or is too slow. PiperOrigin-RevId: 484179037 (cherry picked from commit 376ee77f52bed47de54c6478b4006f1b25a543d0) * Make adding ad live breaks more robust This change makes adding ad events in live streams more robust by allowing ad groups to grow in number of ads if more ad events are received than initially announced by the SDK. With the IMA prefetch feature, an AdPod can grow in size in certain conditions like from initially 2 ads to 4 ads being part of the ad group. With this change, if an additional ad event arrives while the ad group is still being played, the ad group is expanded. If the event arrives late and the ad group is already completed, a new group is created for the remaining ads. This also covers the case where we join the live stream while an ad is being played and we missed at least one LOADED event from the SDK. Ads of the group before the first LOADED event are ignored in such a case. PiperOrigin-RevId: 484214760 (cherry picked from commit 136addf640e451602163be9e4272d1e27b8ed5b8) * Add test for muxer watchdog timer PiperOrigin-RevId: 484298261 (cherry picked from commit 42057cc9f8f81e24c64c629d2e11e7102afd0f30) * Upgrade dackka and fix some generation errors #minor-release PiperOrigin-RevId: 484483080 (cherry picked from commit fc1eca10f4934fd92c84db222815fc1e77ddd5f6) * Disable the muxer watchdog if all tracks have ended. PiperOrigin-RevId: 484512661 (cherry picked from commit 2390322a00a9e71f16dfe28088ae7cd3e462129f) * Bump appTargetSDKVersion to 33 #minor-release PiperOrigin-RevId: 484514123 (cherry picked from commit 1bbe7c11f8ad7dfbbf3fe30796414bd196f0df5a) * Tighten the wording for sending a pull request. PiperOrigin-RevId: 485036120 (cherry picked from commit 8030a492ff676fa32dc25fe48829c9a066529cd5) * Disable failing tests of FlacExtractorSeekTest PiperOrigin-RevId: 485061783 (cherry picked from commit 55b82ff8ae491f6bcc7f3901476d2b1571a10005) * Enfore minCompileSdk version when depending on ExoPlayer/Media3 libs If an app sets a compileSdkVersion that is lower than the one used to create AARs of its dependencies, the build process may produce invalid outputs, for example by stripping methods from the APK that are only called when the app is running on a new API version. To avoid this issue, we can enforce that the compileSdk of apps or libraries depending on ExoPlayer/Media3 is at least the same as the one we used for compilation when creating the AAR. Issue: google/ExoPlayer#10684 PiperOrigin-RevId: 485100067 (cherry picked from commit 23d39caea0bee0143705191fd97ac7f0cf9a76f9) * Removed move transformation for exoplayer2 audio package-info.java https://github.com/google/ExoPlayer/commit/dda17db261758f7211ffa793ee9cc6fea842addb creation of audio/package-info.java introduced a copybara conflict with the exoplayer2/audio/package-info.java move transformation in copy.bara.sky. Solution was to remove original package-info-common-audio.java and the move transformation as https://github.com/google/ExoPlayer/commit/dda17db261758f7211ffa793ee9cc6fea842addb now covers it. Tested with a copybara push to exoplayer github PiperOrigin-RevId: 485329674 (cherry picked from commit 972e169bd85b14848dcae75e34f9e95fe87e1f4b) * HDR: Generalize Pixel 6 workaround to TP PiperOrigin-RevId: 485366659 (cherry picked from commit 6de5d9336db68cab7ffa886869fe882af6299223) * Load bitmaps for `MediaMetadataCompat` and handle the metadata updates. * Add `Listener` in `MediaSession` with method `onNotificationRefreshRequired(MediaSession)`. * Add `MediaSessionService` as the listener of the `MediaSession` when `MediaSession` is added to `MediaSessionService` * Load bitmap when update metadata in `MediaSessionLegacyStub` and call `onNotificationRefreshRequired` when bitmap asynchronously arrives. PiperOrigin-RevId: 485376145 (cherry picked from commit 624238c6b6e621deed585cb19b63f117ae3f7e76) * Apply tone mapping workaround to Pixel Watch as well. Not sure what BUILD.ID the fix will first be applied on though. PiperOrigin-RevId: 485389618 (cherry picked from commit 2ddd645a3484aed4b9e519f99f4ab1bc989b6a0e) * Fix Dackka/Metalava errors in the effects module Public methods may only refer to public types in their signature. This change ensures that by switching to a public supertype everywhere. PiperOrigin-RevId: 485568625 (cherry picked from commit 3fdfe585ffe927c90f412b892101dbe01119b8df) * Fix Dackka javadoc errors in protected methods If there's an @param javadoc tag in a supertype then all overrides of this method that don't also override the javadoc must use the same parameter name. PiperOrigin-RevId: 485857711 (cherry picked from commit b8e5d708fc77a06e831abd7f2c2e57f68bb3720f) * Add 'Player.getVideoSurfaceSize' that returns the size of the surface on which the video is rendered. Design Doc: go/aaos-mu-media-dd PiperOrigin-RevId: 485884772 * HDR Test: Add link to tested method. PiperOrigin-RevId: 485890141 (cherry picked from commit bd4e58d68bd219154e3d90b0a1031236f8608e96) * Disable publishing block when media3 included in another build. From https://github.com/androidx/media/pull/127/files PiperOrigin-RevId: 485921271 (cherry picked from commit 36a51ac9163fdea5e85e1308a7acd0b945918992) * Add @SuppressWarnings to unblock T SDK for LSC: https://docs.google.com/document/d/16tpK6aXqN68PvTyvt4siM-m7f0NXi_8xEeitLDzr8xY/edit?usp=sharing TESTED=NA BEGIN_PUBLIC/END_PUBLIC PiperOrigin-RevId: 486180995 (cherry picked from commit 88445d213a3ebfd30b32994dbdacc9488923041e) * HDR: Update test FileUtil to handle null ColorInfo. PiperOrigin-RevId: 486706595 (cherry picked from commit 0b53c934d8f391000c72a0a9d6ced9c2bdb77a95) * HDR: Set decoder codec profile and level if available. This should be necessary to ensure decoders see fewer errors. Setting this resulted in removing native_dequeueOutputBuffer errors on OMX.MTK decoders for in-app tone mapping prototyping. PiperOrigin-RevId: 486715941 (cherry picked from commit 0b7e5bbad287053d56720ad682c1a5015eedb9cf) * Move muxer initialization off application thread Problem: We are initialising muxer as soon as we start the transformation. Now the startTransformation() method can be called from main thread, but muxer creation is an I/O operation and should be not be done on main thread. Solution: Added lazy initialisation of muxer object. The actual transformation happens on background thread so the muxer will be initialised lazily from background thread only. Another way was to provide an initialize() method on MuxerWrapper which will explicitly initialise muxer object but with this approach the caller need to call the initialise method before calling anything else. With current implementation the renderers are calling MuxerWrapper methods on various callbacks (Not sequentially) and also we are sharing same muxer with multiple renderers so It might become confusing for the caller on when to call the initialise() method. Also there are few methods on MuxerWrapper which dont really need muxer object. So in short it might make MuxerWrapper APIs more confusing. Validation: Verified the transformation from demo app. PiperOrigin-RevId: 486735787 (cherry picked from commit b10b4e6d4694c7240073b81c3a09227042b58c21) * Move muxing inside sample pipelines This logic is currently in the player renderers. With multi-asset, the renderers will go into the AssetLoader, which shouldn't be responsible for muxing. PiperOrigin-RevId: 486860502 (cherry picked from commit d8754b6642d0a99e2705f3e21ff8b83d50472bbd) * Set targetSdkVersion of main demo app back to 29 #minor-release PiperOrigin-RevId: 486969194 (cherry picked from commit 21724665283a29133f5d77f5321bcdf182e6aafd) * Move slow mo logic to sample pipelines This is to avoid having this logic in TransformerInternal once it is added. PiperOrigin-RevId: 487159941 (cherry picked from commit b59fdf5e98bf5ec3cd0800edb5fb2e6ebd9da5c3) * Merge Issue: google/ExoPlayer#10762: Fix ffmpeg jni wrapper returning invalid result codes Imported from GitHub PR Issue: google/ExoPlayer#10762 This ensure that ffmpeg error code are properly translated to values that the ExoPlayer decoder understand. The main gain is that it allows the decoder to properly ignore more cases of invalid data and recover. The second gain is that the other errors are now proper ExoPlayer errors and no more obscure buffer ones. Fixes: Issue: google/ExoPlayer#10760 Merge 82ceeb77d6df71f5ffb0474db66a36fd6eb8e51a into 972e169bd85b14848dcae75e34f9e95fe87e1f4b COPYBARA_INTEGRATE_REVIEW=go/exoghi/10762 from Tolriq:ffmpeg_error_code 82ceeb77d6df71f5ffb0474db66a36fd6eb8e51a PiperOrigin-RevId: 487189910 (cherry picked from commit 6d2e7a1b5760a05eade18b1a028b3d27f714715c) * Add ExoPlayerAssetLoader Just move some code around for now, to start setting up the overall structure. PiperOrigin-RevId: 487229329 (cherry picked from commit 5d1cab0cf50e31e5886310dd55e6de7c4b3523ba) * Change UnsupportedEncodingException to IllegalArgumentException In startTransformation method we were throwing UnsupportedEncodingException (IOException) when mediaItem with unsupported arguments is passed. Changed this to IllegalArgumentException which seems more logical here. PiperOrigin-RevId: 487259296 (cherry picked from commit 4598cc92485c149f5c613d3c926ae4493a457668) * Set HDR color info on FrameworkMuxer Not setting the color info results in a missing "colr" box in the produced container, under file/moov/trak/mdia/minf/stbl/stsd/hvc1. This means extractors will not be able to find out the transcoded file is HDR. In `Transformer`, this means it can't transcode this transcoded file, because it currently relies on the container bearing HDR info to construct the transcoding sample pipeline. PiperOrigin-RevId: 487276712 (cherry picked from commit d6c8e3a8aff07be5c184473826753047bf4b2387) * HDR: Implement ForceInterpretHdrVideoAsSdr Also, document that we tone map when no HDR features are explicitly set PiperOrigin-RevId: 487310971 (cherry picked from commit 8bdd2784d330c0c9f493f092825d08f8a5cc4305) * Fix Dackka/Metalava errors in the ExoPlayer module This makes two types of fix: 1. Align parameter names on overridden methods where the superclass has `@param` javadoc. 2. Use `@hide` on `protected final` methods that refer to package-private types. This will hide these symbols from Dackka javadoc generation but not (currently) from the artefacts distributed on Maven. These methods are currently unusable outside their package anyway (e.g. by external developers) because of the dependency on a package-private type. This also changes some HLS, SmoothStreaming, and IMA code where I've renamed parameters of overridden methods to be consistent across the type hierarchy. #minor-release PiperOrigin-RevId: 487472665 (cherry picked from commit 10c4a4dfc172cfac77528c7cb746fe827ca6f78c) * Fix Dackka/Metalava errors in the HLS and RTSP modules This makes two fixes: 1. Remove `HlsSampleStreamWrapper.Callback` (package-private) from the list of interfaces implemented by `HlsMediaPeriod` (`public`) and move the implementation to a private inner class instead. This avoids Metalava complaining about a public class that inherits from a package-private type. 2. Reduce the visibility of `RtpPayloadFormat.isFormatSupported(MediaDescription)` from `public` to package-private. The `MediaDescription` type is already package-private, so this method was already unusable outside the package. #minor-release PiperOrigin-RevId: 487472781 (cherry picked from commit 9041d7b979f3b998758d74279f5d281088d879a8) * Fix Dackka/Metalava errors in av1, flac, ffmpeg, midi, and opus modules This uses `@hide` on `protected final` methods to hide them from Dackka javadoc generation, since these methods are inaccessible to developers anyway. These symbols will still (currently) be included in artefacts distributed on Maven (because we don't run Metalava as part of generating these artefacts). In some cases I had to change the visibility/finality of methods to make them `protected final` before adding the `@hide` annotation (but the impact should be very low, since most of these methods were either already unusable by app developers, or they shouldn't have been used). #minor-release PiperOrigin-RevId: 487472907 (cherry picked from commit 1cd488ac9a1e838139495f55aa32eb951f1e8d8f) * Fix Dackka/Metalava errors in test_utils module This involves reducing the visibility of methods/constructors that are already unusable outside the `androidx.media3.test.utils` package. #minor-release PiperOrigin-RevId: 487473005 (cherry picked from commit ca8de0e49b03339b03a6e048e7e7a27df86e5ff5) * Fix Dackka parameter name error in `Gav1Decoder` and `VpxDecoder` These aren't caught by presubmit because the classes are annotated `@VisibleForTesting` and are therefore stripped out by Metalava. However Metalava doesn't run when we're generating javadoc for real. #minor-release PiperOrigin-RevId: 487476260 (cherry picked from commit 14e23d34e17afa076cd912264bb60685961c58e3) * Set targetSdkVersion of main demo app to 29 #minor-release PiperOrigin-RevId: 487479366 (cherry picked from commit 09bee98b8f94a608fc994f96f2f538458a96b8d9) * Fix parameter name mismatch in MappingTrackSelector.selectTracks It's not clear to me why presubmit didn't catch this, I briefly investigated but couldn't work it out - so I'm just going to fix it and move on. #minor-release PiperOrigin-RevId: 487497827 (cherry picked from commit 13ee34faccaf98ff90850601f40c95622b1e878b) * Configure Dackka to generate javadoc for protected methods #minor-release PiperOrigin-RevId: 487497923 (cherry picked from commit 7cb2e1130326a3a802b439185210004268d96b31) * Add missing IntDef on MediaSource.Factory.getSupportedTypes overrides Without this the annotation isn't shown in javadoc (same in Dackka) No annotation: https://exoplayer.dev/doc/reference/com/google/android/exoplayer2/source/DefaultMediaSourceFactory.html#getSupportedTypes() Annotation present: https://exoplayer.dev/doc/reference/com/google/android/exoplayer2/source/MediaSource.Factory.html#getSupportedTypes() #minor-release PiperOrigin-RevId: 487498450 (cherry picked from commit 4949fbe5edc9dbbf1a713b152907cc3a175956d5) * Reformat demo build.gradle file PiperOrigin-RevId: 487539107 (cherry picked from commit 0383b723b7c26da107a719a16a05da459ae971ee) * Add `@ForOverride` to `DecoderAudioRenderer` `protected` methods PiperOrigin-RevId: 487779266 (cherry picked from commit a34fdcf168a3704babdb6b7d96c60344ab89c17c) * Reformat demo build.gradle file PiperOrigin-RevId: 488376715 (cherry picked from commit 30b73c85c53cce0d21e8df21ee680406aa0ad1d7) * Calculate SSAI window duration for live periods with unset duration. We currently skip this calculation entirely, but it can be added by calculating the window duration using the wrapped window's duration and the provided AdPlaybackState. Issue: google/ExoPlayer#10764 PiperOrigin-RevId: 488614767 (cherry picked from commit 20151b9930f1b54d7894ec41465a2e85df92462d) * Mark iterationFinished when triggering release event. When we currently trigger the iteration finished event during the release, we don't mark the event as triggered. This means that someone can trigger another release from within the callback, which then tries to resend the event. Issue: google/ExoPlayer#10758 #minor-release PiperOrigin-RevId: 488645089 (cherry picked from commit 3e5103a3e55e2dc545b4a2442beaa49f307ecfdc) * Set valid channel masks for 8 and 12 channels on all Android versions Util.getAudioTrackChannelConfig() maps a channel count to a channel mask that is passed to AudioTrack. The method expected that playback of 8-channel audio is possible from Android 5.1 and playback of 12-channel audio is only possible from Android 12L. However, there is no restriction on the upper number of channels that can be passed to the AudioTrack. google/ExoPlayer#10701 is an example where the audio decoder outputs 12 channels on an Android 10. This change removes the restrictions for 8 and 12 channels. Note, we still do not support playback of arbitrary number of channels as it would require further changes to DefaultAudioSink. #minor-release Issue: google/ExoPlayer#10701 PiperOrigin-RevId: 488659831 (cherry picked from commit 1b24e6fd14774d5c8b3e7b8084b30204581d13ce) * Rename getVideoSurfaceSize to getSurfaceSize This better matches the callback name (onSurfaceSizeChanged) and probably cause less confusion with getVideoSize. PiperOrigin-RevId: 488669786 (cherry picked from commit 8438daca1f8cbea24aa414ee500044baf1a28367) * Filter bogus AndroidX core jar file when creating javadoc #minor-release PiperOrigin-RevId: 489202167 (cherry picked from commit 7e82d4ec44b88a54ac022acf1cccdcd383457e1a) * Remove @hide javadoc annotation from ExoPlayer GitHub This tag is only understood by Dackka, which is used to generate the media3 javadoc. PiperOrigin-RevId: 489233200 (cherry picked from commit 058cba95d40db83c77f4dd0aa8cb561221463b3a) * Version bump to exoplayer:2.18.2 and media3:1.0.0-beta03 #minor-release PiperOrigin-RevId: 489959918 (cherry picked from commit ca190c084bd9ef8c281fac7655344d48f265042c) * Update JavaDoc for exoplayer:2.18.2 #minor-release PiperOrigin-RevId: 490202192 (cherry picked from commit 6f1cf6dab4dd7e37e5d2ea15ad0cc34eafba601c) * Reorder some release notes in other sections. #minor-release PiperOrigin-RevId: 490224795 (cherry picked from commit e567594cf7640bd96ec13d071c4523f7898b55be) * Fix compilation error in ffmpeg JNI layer PiperOrigin-RevId: 490263003 (cherry picked from commit 202e03fc64dac568955ce00684368cbea9b244f7) * Remove two media3-only release notes from the ExoPlayer release notes Issue: google/ExoPlayer#10811 PiperOrigin-RevId: 490726544 (cherry picked from commit bb270c62cf2f7a1570fe22f87bb348a2d5e94dcf) * Update migration script Issue: google/ExoPlayer#10854 PiperOrigin-RevId: 496922055 (cherry picked from commit 8e9f83867b5c9536488cf74f06c4cf2535ef848f) * Changed decoder list sort to order by functional support of format Added new method to check if codec just functionally supports a format. Changed getDecoderInfosSortedByFormatSupport to use new function to order by functional support. This allows decoders that only support functionally and are more preferred by the MediaCodecSelector to keep their preferred position in the sorted list. UnitTests included -Two MediaCodecVideoRenderer tests that verify hw vs sw does not have an effect on sort of the decoder list, it is only based on functional support Issue: google/ExoPlayer#10604 PiperOrigin-RevId: 487779284 (cherry picked from commit 1eb8a6b36ed98bd66a5bad5273526a918511a39f) * Fix NPE when listener is not set PiperOrigin-RevId: 488970696 (cherry picked from commit f52bb274b8b54df2404ab485c7d277150005b679) * Add setPlaybackLooper ExoPlayer builder method The method allows clients to specify a pre-existing thread to use for playback. This can be used to run multiple ExoPlayer instances on the same playback thread. PiperOrigin-RevId: 488980749 (cherry picked from commit 79b809b5563260cd20541afe607e36ae351fbbed) * Mark broadcast receivers as not exported They are called from the system only and don't need to be exported to be visible to other apps. PiperOrigin-RevId: 489210264 (cherry picked from commit c1fd03df7403019143f503bbe208d73cabc11243) * Throw exception if a released player is passed to TestPlayerRunHelper I considered moving this enforcement inside the ExoPlayerImpl implementation, but it might lead to app crashes in cases that apps (incorrectly) call a released player, but it wasn't actually causing a problem. PiperOrigin-RevId: 489233917 (cherry picked from commit d4c9199a6175a6c89f7a3d3900af1b9dfcb075f0) * Add additional codecs to the eosPropagationWorkaround list. Issue: google/ExoPlayer#10756 PiperOrigin-RevId: 489236336 (cherry picked from commit cbcdbfe021d9ffb453ed0e67a9ca1ea5f8691f51) * Pass correct frame size for passthrough playback When estimating the AudioTrack min buffer size, we must use a PCM frame of 1 when doing direct playback (passthrough). The code was passing -1 (C.LENGTH_UNSET). PiperOrigin-RevId: 489238392 (cherry picked from commit d9d716869b7df2cd95704e9ac24a5f9a376afa2c) * Add remaining state and getters to SimpleBasePlayer This adds the full Builders and State representation needed to implement all Player getter methods and listener invocations. PiperOrigin-RevId: 489503319 (cherry picked from commit b81cd08271cd94f244ca5d7c995cd29523057a60) * Add `set -eu` to all shell scripts These flags ensure that any errors cause the script to exit (instead of just carrying on) (`-e`) and that any unrecognised substitution variables cause an error instead of silently resolving to an empty string (`-u`). Issues like Issue: google/ExoPlayer#10791 should be more quickly resolved with `set -e` because the script will clearly fail with an error like `make: command not found` which would give the user a clear pointer towards the cause of the problem. #minor-release PiperOrigin-RevId: 490001419 (cherry picked from commit f83441974411dca5673a34548b11bc6e6cb809ff) * Fixed missing imports for Metadata and AdPlaybackState for Exoplayer PiperOrigin-RevId: 490012573 (cherry picked from commit 1551bea3983196272d1a8e836103a77fd9090568) * Fixed Exoplayer imports for SimpleBasePlayerTest PiperOrigin-RevId: 490181547 (cherry picked from commit 788f74740b2e560af255ab948a4bc64d116633ca) * Add `DefaultExtractorsFactory.setTsSubtitleFormats` ExoPlayer is unable to detect the presence of subtitle tracks in some MPEG-TS files that don't fully declare them. It's possible for a developer to provide the list instead, but doing so is quite awkward without this helper method. This is consistent for how `DefaultExtractorsFactory` allows other aspects of the delegate `Extractor` implementations to be customised. * Issue: google/ExoPlayer#10175 * Issue: google/ExoPlayer#10505 #minor-release PiperOrigin-RevId: 490214619 (cherry picked from commit 4853444f0dc90163c257d0e20962604510557df4) * Reorder some release notes in other sections. PiperOrigin-RevId: 490224795 (cherry picked from commit e567594cf7640bd96ec13d071c4523f7898b55be) * Merge pull request #10786 from TiVo:p-aacutil-test-impl PiperOrigin-RevId: 490465182 (cherry picked from commit 8a9a66c288d5ee2749a29de133e598f326e518dd) * Exclude tracks from `PlayerInfo` if not changed This change includes a change in the `IMediaController.aidl` file and needs to provide backwards compatibility for when a client connects that is of an older or newer version of the current service implementation. This CL proposes to create a new AIDL method `onPlayerInfoChangedWithExtensions` that is easier to extend in the future because it does use an `Bundle` rather than primitives. A `Bundle` can be changed in a backward/forwards compatible way in case we need further changes. The compatibility handling is provided in `MediaSessionStub` and `MediaControllerStub`. The approach is not based on specific AIDL/Binder features but implemented fully in application code. Issue: androidx/media#102 #minor-release PiperOrigin-RevId: 490483068 (cherry picked from commit f262e9132b32ad89f65853086f30389925b61422) * Parse and set `peakBitrate` for Dolby TrueHD(AC-3) and (E-)AC-3 #minor-release PiperOrigin-RevId: 490527831 (cherry picked from commit 01eddb34f555903c576c79b02a7b34a53e0272cb) * Rollback of https://github.com/google/ExoPlayer/commit/01eddb34f555903c576c79b02a7b34a53e0272cb *** Original commit *** Parse and set `peakBitrate` for Dolby TrueHD(AC-3) and (E-)AC-3 #minor-release *** PiperOrigin-RevId: 490570517 (cherry picked from commit ea3552c1a030d8b14c0cd0093f7eaa6242f969eb) * Rollback of https://github.com/google/ExoPlayer/commit/ea3552c1a030d8b14c0cd0093f7eaa6242f969eb *** Original commit *** Rollback of https://github.com/google/ExoPlayer/commit/01eddb34f555903c576c79b02a7b34a53e0272cb *** Original commit *** Parse and set `peakBitrate` for Dolby TrueHD(AC-3) and (E-)AC-3 #minor-release *** *** PiperOrigin-RevId: 490707234 (cherry picked from commit 8c91a31ced401ce14911fbfdf58dda3c7ee8e643) * Remove two media3-only release notes from the ExoPlayer release notes Issue: google/ExoPlayer#10811 PiperOrigin-RevId: 490726544 (cherry picked from commit bb270c62cf2f7a1570fe22f87bb348a2d5e94dcf) * Use `ParsableBitArray` instead of `ParsableByteArray` To avoid complicated bit shifting and masking. Also makes the code more readable. PiperOrigin-RevId: 490749482 (cherry picked from commit 89e4b8d049507efeb610f437429f25cf18df8f8b) * Convert bitrates to bps before setting it Format expects the values of `averageBitrate` and `peakBitrate` in bps and the value fetched from AC3SpecificBox and EC3SpecificBox is in kbps. PiperOrigin-RevId: 490756581 (cherry picked from commit 67955e0ce331481bcb3fd94c9ffb9632f27eae6e) * Remove flakiness from DefaultAnalyticsCollectorTest Our FakeClock generally makes sure that playback tests are fully deterministic. However, this fails if the test uses blocking waits with clock.onThreadBlocked and where relevant Handlers are created without using the clock. To fix the flakiness, we can make the following adjustments: - Use TestExoPlayerBuilder instead of legacy ExoPlayerTestRunner to avoid onThreadBlocked calls. This also makes the tests more readable. - Use clock to create Handler for FakeVideoRenderer and FakeAudioRenderer. Ideally, this should be passed through RenderersFactory, but it's too disruptive given this is a public API. - Use clock for MediaSourceList and MediaPeriodQueue update handler. PiperOrigin-RevId: 490907495 (cherry picked from commit 7d62943bcd149eecce77cb44e4f867128ca374d3) * Clean up javadoc on `Metadata.Entry.populateMediaMetadata` Remove self-links, and remove section that is documenting internal ordering behaviour of [`SimpleBasePlayer.getCombinedMediaMetadata`](https://github.com/google/ExoPlayer/blob/bb270c62cf2f7a1570fe22f87bb348a2d5e94dcf/library/common/src/main/java/com/google/android/exoplayer2/SimpleBasePlayer.java#L1770) rather than anything specifically about this method. #minor-release PiperOrigin-RevId: 490923719 (cherry picked from commit ed8c196e2eb36eefef9952d255cb6355807b9e9f) * Ensure messages sent on a dead thread don't block FakeClock execution FakeClock keeps an internal list of messages to be executed to ensure deterministic serialization. The next message from the list is triggered by a separate helper message sent to the real Handler. However, if the target HandlerThread is no longer alive (e.g. when it quit itself during the message execution), this helper message is never executed and the entire message execution chain is stuck forever. This can be solved by checking the return values of Hander.post or Handler.sendMessage, which are false if the message won't be delivered. If the messages are not delivered, we can unblock the chain by marking the message as complete and triggering the next one. PiperOrigin-RevId: 491275031 (cherry picked from commit 2977bef872d7f3a1611fd6e8a45931388ea21c9f) * Merge pull request #10799 from OxygenCobalt:id3v2-multi-value PiperOrigin-RevId: 491289028 (cherry picked from commit c827e46c3db2691b1b5fed57fa5b67890331aa85) * Split up `Id3DecoderTest` methods It's clearer if each test method follows the Arrange/Act/Assert pattern PiperOrigin-RevId: 491299379 (cherry picked from commit bf77290fbe78aa25698c1a7082b2a18cd7f1b06c) * Remove impossible `UnsupportedEncodingException` from `Id3Decoder` The list of charsets is already hard-coded, and using `Charset` types ensures they will all be present at run-time, hence we will never encounter an 'unsupported' charset. PiperOrigin-RevId: 491324466 (cherry picked from commit 043546a03475356764cf8b754bd0fff87a0c6e1a) * Merge pull request #10776 from dongvanhung:feature/add_support_clear_download_manager_helpers PiperOrigin-RevId: 491336828 (cherry picked from commit 3a7f940f41e278cde88c29201191229ed7d39e49) * Bump cast sdk version and remove workaround for live duration The fix for b/171657375 (internal) has been shipped with 21.1.0 already (see https://developers.google.com/cast/docs/release-notes#august-8,-2022). PiperOrigin-RevId: 491583727 (cherry picked from commit 04f031d16805a6d6786d135f77d0f6e79c77c8f7) * Add configuration to support OPUS offload To support OPUS offload, we need to provide a few configuration values that are currently not set due to the lack of devices supporting OPUS offload. PiperOrigin-RevId: 491613716 (cherry picked from commit 4cf877b81428021c4eb2dfa1a743178f280aceb5) * Use audio bitrate to calculate AudioTrack min buffer in passthrough Use the bitrate of the audio format (when available) in DefaultAudioSink.AudioTrackBufferSizeProvider.getBufferSizeInBytes() to calculate accurate buffer sizes for direct (passthrough) playbacks. #minor-release PiperOrigin-RevId: 491628530 (cherry picked from commit e219ac21ae604f182769d69f6f590191a92100d0) * Rename SimpleBasePlayer.PlaylistItem to MediaItemData This better matches the terminology we use elsewhere in the Player interface, where items inside the playlist are referred to as "media item" and only the entire list is called "playlist". PiperOrigin-RevId: 491882849 (cherry picked from commit 6c467590d0fdc27dd5afeefe479c3d4414483de5) * Parse and set bitrates in `Ac3Reader` PiperOrigin-RevId: 492003800 (cherry picked from commit 5f73984823b943d750f41519d431ad3b12dada65) * Add media type to MediaMetadata This helps to denote what type of content or folder the metadata describes. PiperOrigin-RevId: 492123690 (cherry picked from commit 1ac72de551a07d37c3b80d96028463244407a5b4) * Add support for most setters in SimpleBasePlayer This adds the forwarding logic for most setters in SimpleExoPlayer in the same style as the existing logic for setPlayWhenReady. This change doesn't implement the setters for modifying media items, seeking and releasing yet as they require additional handling that goes beyond the repeated implementation pattern in this change. PiperOrigin-RevId: 492124399 (cherry picked from commit e598a17b3628e1179fa4219ca3212407fb3fdeb1) * Merge pull request #10750 from Stronger197:subrip_utf_16 PiperOrigin-RevId: 492164739 (cherry picked from commit 496cfa420d7dd23fb5913c9ecf7b0b1e04cc65ff) * Split SubripDecoder and ParsableByteArray tests In some cases we split a test method, and in other cases we just add line breaks to make the separation between arrange/act/assert more clear. PiperOrigin-RevId: 492182769 (cherry picked from commit 02fa8aa784b518f0ffad5c44da6eec1a94def4ee) * Removed ExoPlayer specific states from SimpleBasePlayer PiperOrigin-RevId: 492443147 (cherry picked from commit 08f6fe172732f8a3327746f249888368c39265bc) * Fix `TextRenderer` exception when a subtitle file contains no cues Discovered while investigating Issue: google/ExoPlayer#10823 Example stack trace with the previous code (I added the index value for debugging): ``` playerFailed [eventTime=44.07, mediaPos=44.01, window=0, period=0, errorCode=ERROR_CODE_FAILED_RUNTIME_CHECK androidx.media3.exoplayer.ExoPlaybackException: Unexpected runtime error at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:635) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loopOnce(Looper.java:202) at android.os.Looper.loop(Looper.java:291) at android.os.HandlerThread.run(HandlerThread.java:67) Caused by: java.lang.IllegalArgumentException: index=-1 at androidx.media3.common.util.Assertions.checkArgument(Assertions.java:55) at androidx.media3.extractor.text.webvtt.WebvttSubtitle.getEventTime(WebvttSubtitle.java:62) at androidx.media3.extractor.text.SubtitleOutputBuffer.getEventTime(SubtitleOutputBuffer.java:56) at androidx.media3.exoplayer.text.TextRenderer.getCurrentEventTimeUs(TextRenderer.java:435) at androidx.media3.exoplayer.text.TextRenderer.render(TextRenderer.java:268) at androidx.media3.exoplayer.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:1008) at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:509) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loopOnce(Looper.java:202) at android.os.Looper.loop(Looper.java:291) at android.os.HandlerThread.run(HandlerThread.java:67) ] ``` #minor-release PiperOrigin-RevId: 492464180 (cherry picked from commit 5f6fde4d2a90d78a8d58430c88d7dc12849fe163) * Fix `ExoPlayerTest` to use `C.TIME_UNSET` instead of `C.POSITION_UNSET` This inconsistency was exposed by an upcoming change to deprecate `POSITION_UNSET` in favour of `INDEX_UNSET` because position is an ambiguous term between 'byte offset' and 'media position', as shown here. PiperOrigin-RevId: 492470241 (cherry picked from commit 2f8cf947c71db6be9459492117fe95b1a8bc7178) * Fix threading of onFallbackApplied callback The callback is currently triggered on the ExoPlayer playback thread instead of the app thread that added the listener. PiperOrigin-RevId: 492474405 (cherry picked from commit f3fc4fb9735a4b67a3740b3796495017eb5c978c) * Add javadoc links to README files Fix some other link titles and destinations spotted along the way. #minor-release PiperOrigin-RevId: 493276172 (cherry picked from commit c006575d4306f9bfad9c6f27d964fab00a6e1718) * Support release in SimpleBasePlayer This adds support for the release handling. To align with the established behavior in ExoPlayer, the player can only call listeners from within the release methods (and not afterwards) and automatically enforces an IDLE state (without listener call) in case getters of the player are used after release. PiperOrigin-RevId: 493543958 (cherry picked from commit 3a66c28d4f0fc6bbd7af3f5846a5645aa3ccf778) * Replace MediaMetadata folderType by isBrowsable The folder type has a mix of information about the item. It shows whether the item is browsable (type != FOLDER_TYPE_NONE) and which Bluetooth folder type to set for legacy session information. It's a lot clearer to split this into a boolean isBrowsable and use the existing mediaType to map back to the bluetooth folder type where required. folderType is not marked as deprecated yet as this would be an API change, which will be done later. PiperOrigin-RevId: 493544589 (cherry picked from commit 9d059352cff0a75f0f9c4e37010bbfa2fc6079fd) * Remove debug timeout multiplier. It looks like this was added accidentally in . PiperOrigin-RevId: 493834134 (cherry picked from commit f8e4e1765f3bc956e1e6e9eb17d72cb6c152282c) * Clarify and correct allowed multi-threading for some Player methods Some Player methods like getting the Looper and adding listeners were always allowed to be called from any thread, but this is undocumented. This change makes the threading rules of these methods more explicit. Removing listeners was never meant to be called from another thread and we also don't support it safely because final callbacks may be triggered from the wrong thread. To find potential issues, we can assert the correct thread when releasing listeners. Finally, there is a potential race condition when calling addListener from a different thread at the same time as release, which may lead to a registered listener that could receive callbacks after the player is released. PiperOrigin-RevId: 493843981 (cherry picked from commit e9364b0f6e1a104de9cf4393daab521edc4eccf4) * Forward seek command details to seekTo method in BasePlayer BasePlayer simplifies implementations by handling all the various seek methods and forwarding to a single method that can then be implemented by subclasses. However, this loses the information about the concrete entry point used for seeking, which is relevant when the subclass wants to verify or filter by Player.Command. This can be improved by adding the command as a new parameter. Since we have to change the method anyway, we can also incorporate the boolean flag about whether the current item is repeated to avoid the separate method. PiperOrigin-RevId: 494948094 (cherry picked from commit 6e0f1f10b3666e6c2c74fc5a154dec3f0e03fecb) * Reset isLoading when calling SimpleBasePlayer.stop/release isLoading is not allowed to be true when IDLE, so we have to set to false when stopping in case it was set to true before. PiperOrigin-RevId: 494975405 (cherry picked from commit e4f0b73aa325d096b493bd646c63bc6a4bf5880b) * Document the reason for defining private method `defaultIfNull` PiperOrigin-RevId: 495004732 (cherry picked from commit c3ca71fda738772dccc5a5e07293c884d2194f0a) * Remove parameters with default values from bundle in `MediaItem` This improves the time taken to construct PlayerInfo from bundle from ~600ms to ~450ms. PiperOrigin-RevId: 495055355 (cherry picked from commit 7de47fe2a1493da1b0720ddeb357052d2b1dc5bb) * Clear one-off events from state as soon as they are triggered. This ensures they are not accidentally triggered again when the state is rebuilt with a buildUpon method. PiperOrigin-RevId: 495280711 (cherry picked from commit fa5aaf958d616d831d50fdaceb02d3ff3cbad0fa) * Allow unset index and position values + remove period index This simplifies some position tracking needs for an app implementing SimpleBasePlayer. - The period index can always be derived from the media item index and the position. So there is no need to set it separately. - The media item index can be left unset in the State in case the app doesn't care about the value or wants to set it the default start index (e.g. while the playlist is still empty where UNSET is different from zero). - Similarly, we should allow to set the content position (and buffered position) to C.TIME_UNSET to let the app ignore it or indicate the default position explictly. PiperOrigin-RevId: 495352633 (cherry picked from commit 91557ac9d4eaf83e68f563373541dc8e12043e00) * Remove parameters with `null` values from bundle in `MediaMetadata` Improves the time taken to construct `playerInfo` from its bundle from ~450 ms to ~400 ms. Each `MediaItem` inside `Timeline.Window` contains `MediaMetadata` and hence is a good candidate for bundling optimisations. There already exists a test to check all parameters for null values when unset. PiperOrigin-RevId: 495614719 (cherry picked from commit 8dea624c980ff65aece63c6aeecdeef894470231) * Use theme when loading drawables on API 21+ Issue: androidx/media#220 PiperOrigin-RevId: 495642588 (cherry picked from commit 33f8f406929c739e98bbea475b3609beb7db2b5f) * Rename `EMPTY_MEDIA_ITEM` to `PLACEHOLDER_MEDIA_ITEM` The `MediaItem` instances in the following cases are not actually empty but acts as a placeholder. `EMPTY_MEDIA_ITEM` can also be confused with `MediaItem.EMPTY`. PiperOrigin-RevId: 495843012 (cherry picked from commit 74559b4a188e476378f3f0df908598ce763d909a) * Clarify behavior for out-of-bounds indices and align implementations Some Player methods operate relative to existing indices in the playlist (add,remove,move,seek). As these operations may be issued from a place with a stale playlist (e.g. a controller that sends a command while the playlist is changing), we have to handle out- of-bounds indices gracefully. In most cases this is already documented and implemented correctly. However, some cases are not documented and the existing player implementations don't handle these cases consistently (or in some cases not even correctly). PiperOrigin-RevId: 495856295 (cherry picked from commit a1c0b10482baffc3721561446ee4bb788d8a1231) * Check if codec still exists before handling tunneling events The tunneling callbacks are sent via Handler messages and may be handled after the codec/surface was changed or released. We already guard against the codec/surface change condition by creating a new listener and verifying that the current callback happens for the correct listener instance, but we don't guard against a released codec yet. PiperOrigin-RevId: 495882353 (cherry picked from commit 5e23b8bfd5a9a9542c2ab8d23ae51c1689d8ff51) * Add playlist and seek operations to SimpleBasePlayer These are the remaining setter operations. They all share the same logic that handles playlist and/or position changes. The logic to create the placeholder state is mostly copied from ExoPlayerImpl's maskTimelineAndPosition and getPeriodPositonUsAfterTimelineChanged. PiperOrigin-RevId: 496364712 (cherry picked from commit 09d37641d1ef3b8cf26dc39cfcd317ebe3ef5c79) * Remove ellipsis from Player javadoc PiperOrigin-RevId: 496377192 (cherry picked from commit 844428ea329754118b8c0a2d58373415f539d725) * Fix Dackka error due to param name mismatch https://developer.android.com/reference/androidx/leanback/media/PlayerAdapter#seekTo(long) #minor-release PiperOrigin-RevId: 496378709 (cherry picked from commit d2a3d8f6fabb6d22ac28a76379725d0915344cba) * Clarify some Player command and method javadoc #minor-release PiperOrigin-RevId: 496661152 (cherry picked from commit f47ad3c2d097a557bd2222a5b104e7867aef585d) * Document the relationship between Player methods and available commands #minor-release PiperOrigin-RevId: 496668378 (cherry picked from commit 54e79689e925a2a18bc02522d4f7f73dcfb35d83) * Add error messages to correctness assertions in SimpleBasePlayer Users of this class may run into these assertions when creating the State and they need to check the source code to understand why the State is invalid. Adding error messages to all our correctness assertions helps to understand the root cause more easily. PiperOrigin-RevId: 496875109 (cherry picked from commit b7e887a58dff7615926f8002ee3210b3071c5537) * Fix recursive loop when registering controller visibility listeners There are two overloads of this method due to a type 'rename' from `PlayerControlView.VisibilityListener` to `PlayerView.ControllerVisibilityListener`. Currently when you call one overload it passes `null` to the other one (to clear the other listener). Unfortunately this results in it clearing itself, because it receives a null call back! This change tweaks the documentation to clarify that the 'other' listener is only cleared if you pass a non-null listener in. This solves the recursive problem, and allows the 'legacy' visibility listener to be successfully registered. Issue: androidx/media#229 #minor-release PiperOrigin-RevId: 496876397 (cherry picked from commit 37fd65a8e51ddba92584109217114d9f2c2f009d) * Update migration script Issue: google/ExoPlayer#10854 PiperOrigin-RevId: 496922055 (cherry picked from commit 8e9f83867b5c9536488cf74f06c4cf2535ef848f) * Bump IMA SDK version to 3.29.0 Issue: google/ExoPlayer#10845 PiperOrigin-RevId: 496947392 (cherry picked from commit 8ed515880a0b6c05b766e868e2ef931b886925cc) * Check `MediaMetadata` bundle to verify keys are skipped Added another check in test to make sure we don't add keys to bundle for fields with `null` values. PiperOrigin-RevId: 496948705 (cherry picked from commit 890fd0a9fb135e938dc465d936b24065c65dbb98) * Optimise bundling for `AdPlaybackState` using `AdPlaybackState.NONE` Did not do this optimisation for `AdPlaybackState.AdGroup` as its length is zero for `AdPlaybackState` with no ads. No need to pass default values while fetching keys, which we always set in `AdPlaybackState.AdGroup.toBundle()`. PiperOrigin-RevId: 496995048 (cherry picked from commit f2eac2df711cad579f3042568a24c1f51a119428) * Fix order of playback controls in RTL layout Issue: androidx/media#227 #minor-release PiperOrigin-RevId: 497159283 (cherry picked from commit 8313af1677507fb0cc51d53e81bf930f1a954c87) * Enable RTL support in the demo app We might as well keep this enabled by default, rather than having to manually toggle it on to investigate RTL issues like Issue: androidx/media#227. PiperOrigin-RevId: 497159744 (cherry picked from commit 010c6b96e74979370f139f8126c176ea7b279313) * Remove player listener on the application thread of the player PiperOrigin-RevId: 497183220 (cherry picked from commit 965606f7a7626b95087845191f9b6d4c33ced2e7) * Check bundles in `MediaItem` to verify keys are skipped Added another check in each of these tests to make sure we don't add keys to bundle for fields with default values. Also fixed comments of similar changes in `AdPlaybackStateTest` and `MediaMetadataTest`. PiperOrigin-RevId: 499463581 (cherry picked from commit 9d431a52ef7a39772f65b8de170a225848be5251) * Optimise bundling for `Timeline.Window` and `Timeline.Period` Improves the time taken to construct playerInfo from its bundle from ~400 ms to ~300 ms. Also made `Timeline.Window.toBundle(boolean excludeMediaItem)` public as it was required to assert a condition in tests. PiperOrigin-RevId: 499512353 (cherry picked from commit 2a77f1e2f96684c8c2e0b27e4118635af0724811) * Throw a ParserException instead of a NullPointerException if the sample table (stbl) is missing a required sample description (stsd). As per the javadoc for AtomParsers.parseTrack, ParserException should be "thrown if the trak atom can't be parsed." PiperOrigin-RevId: 499522748 (cherry picked from commit bbe78b10c125529d039fea9bf0117cc04d2a3532) * Fix typo in `DefaultTrackSelector.Parameters` field PiperOrigin-RevId: 499905136 (cherry picked from commit bdd6818c14f97ba305d008c963fd2c369fab312c) * Initialise fields used for bundling as String directly Initialising the fields as Integer and then getting a String on compute time is slow. Instead we directly initialise these fields as String. Improves the time taken in bundling PlayerInfo further to less than 200ms from ~300ms. Also modified a test to improve productive coverage. PiperOrigin-RevId: 500003935 (cherry picked from commit d49437c6e112e60e9c85edeef73a73bce7de939a) * Update bandwidth meter estimates PiperOrigin-RevId: 501010994 (cherry picked from commit 09a15fb73103c406965856de4d120a5028bb37b5) * Add focusSkipButtonWhenAvailable to focus UI on ATV For TV devices the skip button needs to have the focus to be accessible with the remote control. This property makes this configurable while being set to true by default. PiperOrigin-RevId: 501077608 (cherry picked from commit d2898b70ead3b2ad1244a730c3b456146755c138) * Request notification permission in demo app for API 33+ Starting with API 33 the POST_NOTIFICATION permission needs to be requested at runtime or the notification is not shown. Note that with an app with targetSdkVersion < 33 but on a device with API 33 the notification permission is automatically requested when the app starts for the first time. If the user does not grant the permission, requesting the permission at runtime result in an empty array of grant results. Issue: google/ExoPlayer#10884 PiperOrigin-RevId: 501320632 (cherry picked from commit 6bacbaac548d612e85647b4d13c22dae0401447e) * Document that `DownloadService` needs notification permissions Starting with Android 13 (API 33) an app needs to request the permission to post notifications or notifications are suppressed. This change documents this in the class level JavaDoc of the `DownloadService`. Issue: google/ExoPlayer#10884 PiperOrigin-RevId: 501346908 (cherry picked from commit 055ed77433944fc31d431d65e09514e8b3e250f1) * Add AdsLoader.focusSkipButton() This method allows to call through to `StreamManager.focus()` of the currently playing SSAI stream. PiperOrigin-RevId: 501399144 (cherry picked from commit 0ba0c0ed43fbcf4a57f6fc91829ba00d72e3672f) * Clarify what default settings are being used for SSAI AdsLoader PiperOrigin-RevId: 502388865 (cherry picked from commit 26e1a28176d8520890802c0a50aec8bc710eb2c3) * Disables play/pause button when there's nothing to play PiperOrigin-RevId: 502571320 (cherry picked from commit 345f2345c74ccbbf3dd49f125b1b81938b0a9995) * Make availableCommands known when bundling PlayerInfo When bundling PlayerInfo, we remove data when the controller is not allowed to access this data via getters. We also remove data for performance reasons. In the toBundle() method, it's currently hard to make the connection between allowed commands and filtering, because the values are checked at a different place. This can be made more readable by forwarding the applicable Commands directly. The only functional fix is to filter the Timeline when sending the first PlayerInfo after a connecting a controller if the command to get the Timeline is not available. This also allows us to remove a path to filter MediaItems from Timelines as it isn't used. PiperOrigin-RevId: 502607391 (cherry picked from commit 5461d5cbf1cee5bf85bb3b7ae4f4f22c2c2538b8) * Fix javadoc references to `writeSampleData` PiperOrigin-RevId: 502821506 (cherry picked from commit 8fcd6bbffc6d67cf007d09f0230256b3ed551fd8) * Correctly filter PlayerInfo by available getter commands. When bundling PlayerInfo, we need to remove information if the controller is not allowed to access it. This was only partially done at the moment. PiperOrigin-RevId: 502852798 (cherry picked from commit 50f066d63425f44f51108d654006f470d76fb042) * Extend command GET_CURRENT_MEDIA_ITEM to more methods. We currently only document it for the getCurrentMediaItem(), but the command was always meant to cover all information about the current media item and the position therein. To correctly hide information for controllers, we need to filter the Timeline when bundling the PlayerInfo class if only this command is available. PiperOrigin-RevId: 503098124 (cherry picked from commit 5e9c9ed2346d7fcb10bfa0ffa5f253d7fdc7acc8) * Explicitly document most Player.Listener methods in terms of getters This makes it implicitly clear that if the value of a getter changes due to a change in command availability then the listener will be invoked, without needing to explicitly document every command on every listener method. #minor-release PiperOrigin-RevId: 503178383 (cherry picked from commit aa23920e148191f36b4d9f9d1fd9924e13855762) * Undo unreleased changes from transforming-media.md The "Transforming media" page has been updated with changes that won't be part of the next release. Undo these changes so that this page is consistent with the latest release. PiperOrigin-RevId: 503917637 (cherry picked from commit fdf866617f39261f6b619dd69f56279505ae7466) * Minor fix in transforming-media.md PiperOrigin-RevId: 504281747 (cherry picked from commit 4c1be4c7a1eed2eec714cfaf854683c21dbfec93) * Suppress warnings in ImaUtil ImaUtil calls VideoProgressUpdate.equals() which is annotated as hidden, which causes lint errors with gradle. #minor-release PiperOrigin-RevId: 504306210 (cherry picked from commit f86948f01c2397b9f53ef598e311e2de9055118e) * Document two limitations with subtitle sideloading #minor-release PiperOrigin-RevId: 504517946 (cherry picked from commit f083ff264db8af76a1c9bb14bd72913b2fbb8fe2) * Add missing command checks in UI module The commands are partly checked already before enabling features or calling player methods, but the checks were still missing in many places. #minor-release PiperOrigin-RevId: 504589888 (cherry picked from commit 2d7ddccebb959051ae4a284e9c9380cc3582c411) * Tweak UI behavior when commands are missing. For most missing commands, we already disable the corresponding controls. This change extends this to more UI elements that are disabled in case the corresponding action is unavailable. #minor-release PiperOrigin-RevId: 505057751 (cherry picked from commit 641c3b1b22cc67133151b7af9905473485b0f51c) * Match MergingMediaPeriod track selection by period index in id MergingMediaPeriod creates its track groups with ids concatenating position in its periods array and the underlying child track group id. The ids can be used in selectTracks for matching to periods list. Issue: google/ExoPlayer#10930 PiperOrigin-RevId: 505074653 (cherry picked from commit ee055ef004686ddb3844666f9506a95c6e16a59f) * Fix timestamp comparison for seeks in fMP4 When seeking in fMP4, we try to extract as little samples as possible by only starting at the preceding sync frame. This comparison should use <= to allow sync frames at exactly the seek position. Issue: google/ExoPlayer#10941 #minor-release PiperOrigin-RevId: 505098172 (cherry picked from commit ac3017b5805cb98b4292e4bbe1f7181f47684b88) * Fix (another) `LeanbackPlayerAdapter` param name mismatch I missed this when fixing `positionInMs` for Dackka in https://github.com/google/ExoPlayer/commit/d2a3d8f6fabb6d22ac28a76379725d0915344cba This time I manually verified that all the `@Override` methods have parameter names that match [the docs](https://developer.android.com/reference/androidx/leanback/media/PlayerAdapter). #minor-release PiperOrigin-RevId: 506017063 (cherry picked from commit 736f090cce540de78a968e62fd8c5aec413e8122) * Merge pull request #10793 from fraunhoferfokus:dash-thumbnail-support PiperOrigin-RevId: 506261584 (cherry picked from commit 107e0c6e42c6fd080b1be19e5305597cf880a9dd) * Publish ConcatenatingMediaSource2 Can be used to combine multiple media items into a single timeline window. Issue: androidx/media#247 Issue: google/ExoPlayer#4868 PiperOrigin-RevId: 506283307 (cherry picked from commit eb8fffba15810b8206653d8ffaff233d823fbfc9) * Update release notes for ExoPlayer 2.18.3 #minor-release PiperOrigin-RevId: 509246479 (cherry picked from commit 8ff024e4c0e3d2085b2c690daddd64b53ca448ad) * Version bump for ExoPlayer 2.18.3 & media3-1.0.0-rc01 #minor-release PiperOrigin-RevId: 509501665 (cherry picked from commit b18dccde2a1984562ee42e9b058d4a23451b607d) * Update javadoc for ExoPlayer 2.18.3 #minor-release PiperOrigin-RevId: 509789955 (cherry picked from commit 4759e0075c4a4ac2fe8892147fed1ac341b48c0d) * Update javadoc for ExoPlayer 2.18.3 #minor-release PiperOrigin-RevId: 509864205 (cherry picked from commit 19d4a588295894fb5d5777e0d12a87cd2c9fc5d5) * Update javadoc for ExoPlayer 2.18.3 #minor-release PiperOrigin-RevId: 509867431 (cherry picked from commit 482871fed4fc84009f6d11af3ad4650bc65cd4bc) * Detect HEVC HDR10 codec profile more accurately In MediaCodecUtil, use Format.colorInfo, besides the codec string, to accurately map to a 10bit HEVC profile. PiperOrigin-RevId: 507500071 (cherry picked from commit 80dbaca0e520c32a599a379feedb49e6bed3de30) * Fix AudioTrackPositionTracker logic for playback speed adjustments The AudioTrackPositionTracker needs to correct positions by the speed set on the AudioTrack itself whenever it makes estimations based on real-time (=the real-time playout duration is not equal to the media duration played). This happens for the main playback path already, but not for the mode in which the position is estimated from the playback head position and also not in the phase after the track has been stopped. Both cases are not very noticeable during normal playback, but become relevant when playing in offload mode. PiperOrigin-RevId: 507736408 (cherry picked from commit 4ede931c2a7ad11003194cb0ee638535ecab7f31) * Merge pull request #248 from lemondoglol:update-segment-size PiperOrigin-RevId: 507784608 (cherry picked from commit 08342ea9da96240c87e3e7c486eec0b0929138da) * Merge pull request #10959 from balachandarlinks:handle-sql-exception-in-cached-content-index PiperOrigin-RevId: 508323432 (cherry picked from commit 20a5e468f449e29ecb6f3bd55cc8526fff74acda) * Document spatialization behavior constants. PiperOrigin-RevId: 508602059 (cherry picked from commit 1c29131016c9d140ca40d7f1b9038eeffb343bf7) * Add null check to `ExoPlayerImpl.isTunnelingEnabled` `TrackSelectorResult.rendererConfigurations` can contain null elements: > A null entry indicates the corresponding renderer should be disabled. This wasn't caught by the nullness checker because `ExoPlayerImpl` is currently excluded from analysis. #minor-release Issue: google/ExoPlayer#10977 PiperOrigin-RevId: 508619169 (cherry picked from commit 5e3cd7a3c3f2cd590d77ccd318c5ba4824f414b8) * AsynchronousMediaCodecAdapter: surface queueing errors sooner The AsynchronousMediaCodecAdapter's queuing thread stores any exceptions raised by MediaCodec and re-throws them on the next call to queueInputBuffer()/queueSecureInputBuffer(). However, if MediaCodec raises and error while queueing, it goes into a failed state and does not announce available input buffers. If there is no input available input buffer, the MediaCodecRenderer will never call queueInputBuffer()/queueSecureInputBuffer(), hence playback is stalled. This change surfaces the queueing error through the adapter's dequeueing methods. PiperOrigin-RevId: 508637346 (cherry picked from commit a5f4651d555de8c5e99405b002bcf536cae4567e) * Add ad event listeners in the Looper event of the ad manager callback #minor-release PiperOrigin-RevId: 509189206 (cherry picked from commit e98670e2f94a04d90f6ec7188f748eb1c31fb09f) * Catch IllegalArgumentExceptions in RTSP Response parsing In parsing Describe RTSP response messages, IllegalArgumentExceptions are thrown for invalid parameters and values. These exceptions were not caught and crashed the Playback thread. Now these exceptions will be caught and their errors forwarded to the proper error handling listeners. #minor-release Issue: google/ExoPlayer#10971 PiperOrigin-RevId: 509207881 (cherry picked from commit 711fa44d56678ebdb5c1c3a48f940fa71810c510) * Add exception cause to thrown exception PiperOrigin-RevId: 509473556 (cherry picked from commit 08cf6db305d4ae26bc74769660aa3e687d7120ad) * Map `PLAYER_STATE_LOADING` to `STATE_BUFFERING` #minor-release Issue: androidx/media#245 PiperOrigin-RevId: 510456793 (cherry picked from commit a231ff4fa91471c59d2ab62945603614b8c8a742) * Reduce number of calls to AudioTrack.getPlaybackHeadPosition This call may cause performance overhead in some situations, for example if the AudioTrack needs to query an offload DSP for the current position. We don't need to check this multiple times per doSomeWork iteration as the value is unlikely to change in any meaningful way. PiperOrigin-RevId: 510957116 (cherry picked from commit 829b49d724ed220e7d58397dfdf97752aac73696) * Skip rendering multiple frames on the same vsync When rendering frames at a rate higher than the screen refresh rate, e.g. playing at 8x, the player is releasing multiple frames at the same release time (nanos) which are then dropped by the platform. The output buffers are available later and as a result MediaCodec cannot keep up decoding fast enough. This change skips releasing multiple video frames on the same vsync period and proactivelly drops the frame. The frame is counted as skipped rather than dropped to differentiate with frames dropped due to slow decoding. PiperOrigin-RevId: 510964976 (cherry picked from commit cbb6878f9fef20ea440c6ffda77dd4edc00ce1f2) * Indicate that SCTE-35 metadata in not supported with HLS Issue: google/ExoPlayer#10992 #minor-release PiperOrigin-RevId: 510988140 (cherry picked from commit 57a638aa88a4b85ca9f39573bddfc9b45df11254) * Use ArrayDeque for pending output stream changes. The current logic uses manual array operations to keep track of pending changes. Modernize this code by using an ArrayDeque and a data class. This also allows to extend the output stream information in the future. This also fixes a bug where a position reset accidentally assigns a pending stream offset instead of keeping the current one. PiperOrigin-RevId: 511787571 (cherry picked from commit 4e0babdcd1c272c5470572e3b29dc15e42e9221a) * Add missing variant to package transformations PiperOrigin-RevId: 512002735 (cherry picked from commit 1ef70cd6a02aabf302a7d3c37785e928d93973c3) * Do not specify export flags for protected system broadcasts. Protected system broadcasts should not specify the export flag. Marking them as NOT_EXPORTED breaks sticky broadcasts in some cases. Issue: google/ExoPlayer#10970 #minor-release PiperOrigin-RevId: 512020154 (cherry picked from commit 34b9824201314b4fa6442deac643635f2fa9e541) * Use more realistic time values for MediaCodecVideoRendererTest This test became flaky after https://github.com/google/ExoPlayer/commit/cbb6878f9fef20ea440c6ffda77dd4edc00ce1f2 because some of the unrealistic frame times ended up on the same release time. Using realistic numbers avoids the flakiness. PiperOrigin-RevId: 512566469 (cherry picked from commit 13700e0aec06b2a7f5ed0d710690b44dbb7146bc) * Correctly update output info if previous stream has been fully rendered The output info for a new stream is marked pending until the last sample of the previous stream has been processed. However, this fails if the previous stream has already been fully processed. We need to detect this case explicitly to avoid signalling the output change one sample too late. #minor-release PiperOrigin-RevId: 512572854 (cherry picked from commit 39935d7f1202a4e327b968815bf499cc7bcab4c4) * Add workaround for wrong PerformancePoints on some devices. Some devices were reported to have wrong PerformancePoint sets that cause 60 fps to be marked as unsupported even though they are supported. Issue: google/ExoPlayer#10898 #minor-release PiperOrigin-RevId: 512580395 (cherry picked from commit 04f0cc949f0d524d5a8ab367a15716175bacf18f) * Ensure output format is updated in sync with stream changes. MediaCodecRenderer currently has two independent paths to trigger events at stream changes: 1. Detection of the last output buffer of the old stream to trigger onProcessedStreamChange and setting the new output stream offset. 2. Detection of the first input buffer of the new stream to trigger onOutputFormatChanged. Both events are identical for most media. However, there are two problematic cases: A. (1) happens after (2). This may happen if the declared media duration is shorter than the actual last sample timestamp. B. (2) is too late and there are output samples between (1) and (2). This can happen if the new media outputs samples with a timestamp less than the first input timestamp. This can be made more robust by: - Keeping a separate formatQueue for each stream to avoid case A. - Force outputting the first format after a stream change to avoid case B. Issue: google/ExoPlayer#8594 #minor-release PiperOrigin-RevId: 512586838 (cherry picked from commit a02c8d855c8eae8cb3132365548ecf7a0730815b) * Fix some playback parameter signalling problems. Playback parameter signalling can be quite complex because (a) the renderer clock often has a delay before it realizes that it doesn't support a previously set speed and (b) the speed set on media clock sometimes intentionally differs from the one surfaced to the user, e.g. during live speed adjustment or when overriding ad playback speed to 1.0f. This change fixes two problems related to this signalling: 1. When resetting the media clock speed at a period transition, we don't currently tell the renderers that this happened. 2. When a delayed speed change update from the media clock is pending and the renderer for this media clock is disabled before the change can be handled, the pending update becomes stale but it still applied later and overrides any other valid speed set in the meantime. Both edge cases are also covered by extended or new player tests. Issue: google/ExoPlayer#10882 PiperOrigin-RevId: 512658918 (cherry picked from commit d363977156b49c1fe793bfc9709eb00595bfae6c) * Ensure getPlaybackHeadPosition isn't called if not needed Once the value returned from AudioTimestampPoller advances, we only need getPlaybackHeadPosition to sample sync params and verify the returned timestamp. Both of these happen less often and we can avoid calling getPlaybackHeadPosition if we don't actually need it. PiperOrigin-RevId: 512882170 (cherry picked from commit 4cf7d3c7acc7244bcbf2998f9fdb43c100ce51e1) * Update translations #minor-release PiperOrigin-RevId: 512890813 (cherry picked from commit 13a86b38334bf8e34d79762edcf139e5ab731085) * Minor change in ForwardingPlayer javadoc #minor-release PiperOrigin-RevId: 512897269 (cherry picked from commit 48047cf9e8a75e30c3b464f2e89f9406c71b1271) * Remove @see tags with tags These are not supported by Dackka #minor-release PiperOrigin-RevId: 513176533 (cherry picked from commit ef5a1ce9322352f084b992d370cad740edc43fa2) * Merge pull request #255 from mayurk2:use_edts_offset_if_it_is_for_entire_file PiperOrigin-RevId: 513213229 (cherry picked from commit d2ba290746221c8bd32e32d29050c78774c83f1f) * Extend documentation for ForwardingPlayer Add some additional information which methods to override for available commands. #minor-release PiperOrigin-RevId: 513251805 (cherry picked from commit a64a9e67ca3bf34f29e525b1bdfbb73371a66ae7) * Update migration script to 1.0.0-rc02/2.18.4 PiperOrigin-RevId: 513482096 (cherry picked from commit b634005c5f69f6a5ba47f58534fd41e16e237c25) * Bump version numbers to Media3 1.0.0-rc02 and ExoPlayer 2.18.4 #minor-release PiperOrigin-RevId: 513488487 (cherry picked from commit 3b16231e29e4f952e4f44a179a1e91022f7bad36) * Update Javadoc for 2.18.4 PiperOrigin-RevId: 513516267 (cherry picked from commit 658b5030e45435472d490fe7280a70c0196744d4) * Fix lint-baseline.xml for latest UI translations #minor-release PiperOrigin-RevId: 513533248 (cherry picked from commit af6807d959ff7bb3166177b6d687d41bf937b650) * Update release notes for ExoPlayer 2.18.4 #minor-release PiperOrigin-RevId: 513555559 (cherry picked from commit 4f68f891bca4d506ea552e1389060286474a6aae) * chore: update the yaml file --------- Co-authored-by: tianyifeng Co-authored-by: claincly Co-authored-by: ibaker Co-authored-by: huangdarwin Co-authored-by: christosts Co-authored-by: michaelkatz Co-authored-by: tonihei Co-authored-by: Googler Co-authored-by: kimvde Co-authored-by: bachinger Co-authored-by: samrobinson Co-authored-by: Marc Baechinger Co-authored-by: Rohit Singh Co-authored-by: andrewlewis Co-authored-by: yschimke Co-authored-by: sheenachhabra Co-authored-by: Tolriq Co-authored-by: Michael Katz <45770613+microkatz@users.noreply.github.com> Co-authored-by: christosts <54315740+christosts@users.noreply.github.com> Co-authored-by: tonihei --- .github/ISSUE_TEMPLATE/bug.yml | 2 + RELEASENOTES.md | 118 +- constants.gradle | 4 +- demos/main/src/main/AndroidManifest.xml | 2 + .../demo/SampleChooserActivity.java | 62 +- .../demo/upstream/PlaybackProvider.java | 9 +- demos/main/src/main/res/values/strings.xml | 2 + .../demo/transformer/MediaPipeProcessor.java | 282 - .../transformerdemo/MediaPipeProcessor.java | 0 docs/_includes/media3-known-issue-box.html | 2 + docs/_page_fragments/supported-formats-hls.md | 3 +- docs/customization.md | 22 +- docs/doc/reference/allclasses-index.html | 2113 +- docs/doc/reference/allclasses.html | 8 + .../AbstractConcatenatedTimeline.html | 2 +- .../google/android/exoplayer2/BasePlayer.html | 325 +- .../google/android/exoplayer2/C.Encoding.html | 2 +- .../exoplayer2/C.SpatializationBehavior.html | 2 +- .../com/google/android/exoplayer2/C.html | 289 +- .../exoplayer2/ExoPlaybackException.html | 2 +- .../android/exoplayer2/ExoPlayer.Builder.html | 56 +- .../google/android/exoplayer2/ExoPlayer.html | 34 +- .../android/exoplayer2/Format.Builder.html | 50 +- .../com/google/android/exoplayer2/Format.html | 41 + .../android/exoplayer2/ForwardingPlayer.html | 41 +- .../exoplayer2/LegacyMediaPlayerWrapper.html | 14 +- ...diaItem.ClippingConfiguration.Builder.html | 4 +- .../MediaItem.LiveConfiguration.Builder.html | 4 +- .../exoplayer2/MediaMetadata.Builder.html | 77 +- .../exoplayer2/MediaMetadata.FolderType.html | 5 +- .../exoplayer2/MediaMetadata.MediaType.html | 189 + .../exoplayer2/MediaMetadata.PictureType.html | 6 +- .../android/exoplayer2/MediaMetadata.html | 919 +- .../android/exoplayer2/PlaybackException.html | 27 +- .../android/exoplayer2/Player.Command.html | 45 +- .../exoplayer2/Player.Commands.Builder.html | 18 +- .../android/exoplayer2/Player.Commands.html | 2 +- .../android/exoplayer2/Player.Events.html | 12 +- .../android/exoplayer2/Player.Listener.html | 77 +- .../exoplayer2/Player.PositionInfo.html | 32 +- .../com/google/android/exoplayer2/Player.html | 675 +- .../exoplayer2/RendererCapabilities.html | 12 +- ...impleBasePlayer.MediaItemData.Builder.html | 752 + .../SimpleBasePlayer.MediaItemData.html | 653 + .../SimpleBasePlayer.PeriodData.Builder.html | 419 + .../SimpleBasePlayer.PeriodData.html | 433 + .../SimpleBasePlayer.PositionSupplier.html | 344 + .../SimpleBasePlayer.State.Builder.html | 914 +- .../exoplayer2/SimpleBasePlayer.State.html | 626 +- .../android/exoplayer2/SimpleBasePlayer.html | 1121 +- .../android/exoplayer2/SimpleExoPlayer.html | 279 +- .../Timeline.RemotableTimeline.html | 2 +- .../google/android/exoplayer2/Timeline.html | 28 +- .../analytics/DefaultAnalyticsCollector.html | 105 +- .../audio/Ac3Util.SyncFrameInfo.html | 37 +- ...udioSink.AudioTrackBufferSizeProvider.html | 7 +- .../DefaultAudioTrackBufferSizeProvider.html | 29 +- .../android/exoplayer2/audio/OpusUtil.html | 75 +- .../exoplayer2/ext/cast/CastPlayer.html | 181 +- ...nsertionMediaSource.AdsLoader.Builder.html | 32 +- ...rSideAdInsertionMediaSource.AdsLoader.html | 25 +- .../ext/leanback/LeanbackPlayerAdapter.html | 8 +- .../extractor/DefaultExtractorsFactory.html | 30 +- .../extractor/FlacStreamMetadata.html | 26 +- .../exoplayer2/extractor/VorbisBitArray.html | 10 +- .../extractor/VorbisUtil.VorbisIdHeader.html | 10 +- .../exoplayer2/extractor/VorbisUtil.html | 40 +- .../exoplayer2/mediacodec/MediaCodecInfo.html | 43 +- .../exoplayer2/mediacodec/MediaCodecUtil.html | 8 +- .../exoplayer2/metadata/Metadata.Entry.html | 9 +- .../metadata/flac/PictureFrame.html | 9 +- .../metadata/flac/VorbisComment.html | 9 +- .../exoplayer2/metadata/icy/IcyHeaders.html | 9 +- .../exoplayer2/metadata/icy/IcyInfo.html | 9 +- .../exoplayer2/metadata/id3/ApicFrame.html | 9 +- .../metadata/id3/TextInformationFrame.html | 71 +- .../exoplayer2/offline/DownloadService.html | 68 +- .../exoplayer2/offline/SegmentDownloader.html | 90 +- .../android/exoplayer2/package-summary.html | 85 +- .../android/exoplayer2/package-tree.html | 6 + .../robolectric/TestPlayerRunHelper.html | 48 +- .../source/CompositeMediaSource.html | 2 +- .../ConcatenatingMediaSource2.Builder.html | 522 + .../source/ConcatenatingMediaSource2.html | 597 + .../exoplayer2/source/ForwardingTimeline.html | 2 +- ...askingMediaSource.PlaceholderTimeline.html | 2 +- .../exoplayer2/source/MediaSource.html | 2 +- .../source/SinglePeriodTimeline.html | 2 +- .../source/ads/SinglePeriodAdTimeline.html | 2 +- .../dash/manifest/DashManifestParser.html | 31 +- .../source/dash/offline/DashDownloader.html | 57 +- .../source/hls/offline/HlsDownloader.html | 57 +- .../exoplayer2/source/package-summary.html | 12 + .../exoplayer2/source/package-tree.html | 2 + .../smoothstreaming/manifest/SsManifest.html | 10 +- .../manifest/SsManifestParser.html | 10 +- .../smoothstreaming/offline/SsDownloader.html | 57 +- .../testutil/ExoPlayerTestRunner.html | 10 +- .../testutil/FakeAudioRenderer.html | 6 +- .../FakeMediaSource.InitialTimeline.html | 2 +- .../exoplayer2/testutil/FakeTimeline.html | 2 +- .../testutil/FakeVideoRenderer.html | 6 +- .../exoplayer2/testutil/StubExoPlayer.html | 20 +- .../exoplayer2/testutil/StubPlayer.html | 261 +- .../exoplayer2/text/ttml/TtmlDecoder.html | 8 +- .../text/webvtt/WebvttCssStyle.html | 10 +- .../exoplayer2/text/webvtt/WebvttDecoder.html | 8 +- .../text/webvtt/package-summary.html | 2 +- .../DefaultTrackSelector.Parameters.html | 2 +- .../TrackSelectionParameters.html | 27 +- .../exoplayer2/ui/StyledPlayerView.html | 4 +- .../upstream/SlidingPercentile.html | 14 +- .../android/exoplayer2/util/ColorParser.html | 14 +- .../android/exoplayer2/util/ListenerSet.html | 56 +- .../exoplayer2/util/ParsableByteArray.html | 115 +- .../google/android/exoplayer2/util/Size.html | 16 +- .../google/android/exoplayer2/util/Util.html | 241 +- docs/doc/reference/constant-values.html | 555 +- docs/doc/reference/deprecated-list.html | 599 +- docs/doc/reference/index-all.html | 1175 +- docs/doc/reference/jquery/jszip/dist/jszip.js | 151 +- .../reference/jquery/jszip/dist/jszip.min.js | 4 +- docs/doc/reference/member-search-index.js | 64895 +++++++++++++++- docs/doc/reference/member-search-index.zip | Bin 154846 -> 157719 bytes docs/doc/reference/overview-tree.html | 8 + docs/doc/reference/package-search-index.zip | Bin 708 -> 708 bytes docs/doc/reference/type-search-index.js | 2 +- docs/doc/reference/type-search-index.zip | Bin 10921 -> 10990 bytes docs/media-items.md | 5 +- docs/transforming-media.md | 4 +- docs/troubleshooting.md | 29 +- extensions/av1/README.md | 4 +- extensions/cast/build.gradle | 2 +- .../exoplayer2/ext/cast/CastPlayer.java | 37 +- .../exoplayer2/ext/cast/CastUtils.java | 8 +- extensions/ffmpeg/README.md | 6 +- .../ffmpeg/src/main/jni/build_ffmpeg.sh | 1 + extensions/flac/README.md | 4 +- extensions/ima/build.gradle | 2 +- .../ImaServerSideAdInsertionMediaSource.java | 138 +- .../android/exoplayer2/ext/ima/ImaUtil.java | 4 + .../ext/leanback/LeanbackPlayerAdapter.java | 8 +- .../src/main/res/values-ro/strings.xml | 6 +- .../src/main/res/values-te/strings.xml | 6 +- extensions/opus/README.md | 4 +- .../opus/src/main/jni/convert_android_asm.sh | 2 +- .../jni/generate_libvpx_android_configs.sh | 2 +- .../google/android/exoplayer2/BasePlayer.java | 137 +- .../java/com/google/android/exoplayer2/C.java | 14 +- .../google/android/exoplayer2/DeviceInfo.java | 30 +- .../exoplayer2/ExoPlayerLibraryInfo.java | 6 +- .../com/google/android/exoplayer2/Format.java | 315 +- .../android/exoplayer2/ForwardingPlayer.java | 2 +- .../android/exoplayer2/HeartRating.java | 35 +- .../google/android/exoplayer2/MediaItem.java | 218 +- .../android/exoplayer2/MediaMetadata.java | 630 +- .../android/exoplayer2/PercentageRating.java | 29 +- .../android/exoplayer2/PlaybackException.java | 44 +- .../exoplayer2/PlaybackParameters.java | 29 +- .../com/google/android/exoplayer2/Player.java | 959 +- .../com/google/android/exoplayer2/Rating.java | 16 +- .../android/exoplayer2/SimpleBasePlayer.java | 3544 +- .../google/android/exoplayer2/StarRating.java | 37 +- .../android/exoplayer2/ThumbRating.java | 36 +- .../google/android/exoplayer2/Timeline.java | 305 +- .../com/google/android/exoplayer2/Tracks.java | 69 +- .../exoplayer2/audio/AudioAttributes.java | 64 +- .../android/exoplayer2/metadata/Metadata.java | 7 +- .../android/exoplayer2/source/TrackGroup.java | 31 +- .../source/ads/AdPlaybackState.java | 119 +- .../google/android/exoplayer2/text/Cue.java | 154 +- .../android/exoplayer2/text/CueGroup.java | 30 +- .../TrackSelectionOverride.java | 29 +- .../TrackSelectionParameters.java | 201 +- .../android/exoplayer2/util/ColorParser.java | 8 +- .../android/exoplayer2/util/ListenerSet.java | 60 +- .../android/exoplayer2/util/MimeTypes.java | 2 + .../exoplayer2/util/NetworkTypeObserver.java | 2 +- .../exoplayer2/util/ParsableByteArray.java | 156 +- .../google/android/exoplayer2/util/Size.java | 3 + .../google/android/exoplayer2/util/Util.java | 66 +- .../android/exoplayer2/video/ColorInfo.java | 47 +- .../android/exoplayer2/video/VideoSize.java | 50 +- .../android/exoplayer2/BasePlayerTest.java | 318 + .../google/android/exoplayer2/FormatTest.java | 2 + .../android/exoplayer2/MediaItemTest.java | 141 +- .../android/exoplayer2/MediaMetadataTest.java | 85 +- .../exoplayer2/SimpleBasePlayerTest.java | 7376 +- .../android/exoplayer2/TimelineTest.java | 48 +- .../source/ads/AdPlaybackStateTest.java | 39 +- .../util/ParsableByteArrayTest.java | 383 +- .../exoplayer2/AudioBecomingNoisyManager.java | 5 +- .../exoplayer2/ExoPlaybackException.java | 43 +- .../google/android/exoplayer2/ExoPlayer.java | 54 +- .../android/exoplayer2/ExoPlayerImpl.java | 151 +- .../exoplayer2/ExoPlayerImplInternal.java | 66 +- .../android/exoplayer2/MediaPeriodQueue.java | 5 +- .../android/exoplayer2/MediaSourceList.java | 177 +- .../exoplayer2/RendererCapabilities.java | 6 +- .../android/exoplayer2/SimpleExoPlayer.java | 12 +- .../exoplayer2/StreamVolumeManager.java | 2 +- .../analytics/DefaultAnalyticsCollector.java | 14 + .../exoplayer2/audio/AudioCapabilities.java | 4 +- .../audio/AudioCapabilitiesReceiver.java | 4 +- .../audio/AudioTrackPositionTracker.java | 90 +- .../exoplayer2/audio/DefaultAudioSink.java | 16 +- .../DefaultAudioTrackBufferSizeProvider.java | 25 +- .../AsynchronousMediaCodecAdapter.java | 2 + .../AsynchronousMediaCodecBufferEnqueuer.java | 3 +- .../AsynchronousMediaCodecCallback.java | 3 +- .../exoplayer2/mediacodec/MediaCodecInfo.java | 41 +- .../mediacodec/MediaCodecRenderer.java | 164 +- .../exoplayer2/mediacodec/MediaCodecUtil.java | 28 +- .../offline/DefaultDownloaderFactory.java | 2 +- .../exoplayer2/offline/DownloadService.java | 22 +- .../exoplayer2/offline/SegmentDownloader.java | 36 +- .../exoplayer2/scheduler/Requirements.java | 8 +- .../scheduler/RequirementsWatcher.java | 2 +- .../source/ConcatenatingMediaSource.java | 6 +- .../source/ConcatenatingMediaSource2.java | 608 + .../exoplayer2/source/MergingMediaPeriod.java | 14 +- .../exoplayer2/source/MergingMediaSource.java | 4 +- .../exoplayer2/source/TrackGroupArray.java | 27 +- .../android/exoplayer2/text/TextRenderer.java | 2 +- .../trackselection/DefaultTrackSelector.java | 179 +- .../upstream/DefaultBandwidthMeter.java | 460 +- .../upstream/SlidingPercentile.java | 8 +- .../video/MediaCodecVideoRenderer.java | 16 +- .../core/src/main/res/values-af/strings.xml | 14 - .../core/src/main/res/values-am/strings.xml | 14 - .../core/src/main/res/values-ar/strings.xml | 14 - .../core/src/main/res/values-az/strings.xml | 14 - .../src/main/res/values-b+sr+Latn/strings.xml | 14 - .../core/src/main/res/values-be/strings.xml | 14 - .../core/src/main/res/values-bg/strings.xml | 14 - .../core/src/main/res/values-bn/strings.xml | 14 - .../core/src/main/res/values-bs/strings.xml | 14 - .../core/src/main/res/values-ca/strings.xml | 14 - .../core/src/main/res/values-cs/strings.xml | 14 - .../core/src/main/res/values-da/strings.xml | 14 - .../core/src/main/res/values-de/strings.xml | 14 - .../core/src/main/res/values-el/strings.xml | 14 - .../src/main/res/values-en-rAU/strings.xml | 14 - .../src/main/res/values-en-rGB/strings.xml | 14 - .../src/main/res/values-en-rIN/strings.xml | 14 - .../src/main/res/values-es-rUS/strings.xml | 14 - .../core/src/main/res/values-es/strings.xml | 14 - .../core/src/main/res/values-et/strings.xml | 14 - .../core/src/main/res/values-eu/strings.xml | 14 - .../core/src/main/res/values-fa/strings.xml | 14 - .../core/src/main/res/values-fi/strings.xml | 14 - .../src/main/res/values-fr-rCA/strings.xml | 14 - .../core/src/main/res/values-fr/strings.xml | 14 - .../core/src/main/res/values-gl/strings.xml | 14 - .../core/src/main/res/values-gu/strings.xml | 14 - .../core/src/main/res/values-hi/strings.xml | 14 - .../core/src/main/res/values-hr/strings.xml | 14 - .../core/src/main/res/values-hu/strings.xml | 14 - .../core/src/main/res/values-hy/strings.xml | 14 - .../core/src/main/res/values-in/strings.xml | 14 - .../core/src/main/res/values-is/strings.xml | 14 - .../core/src/main/res/values-it/strings.xml | 14 - .../core/src/main/res/values-iw/strings.xml | 14 - .../core/src/main/res/values-ja/strings.xml | 14 - .../core/src/main/res/values-ka/strings.xml | 14 - .../core/src/main/res/values-kk/strings.xml | 14 - .../core/src/main/res/values-km/strings.xml | 14 - .../core/src/main/res/values-kn/strings.xml | 14 - .../core/src/main/res/values-ko/strings.xml | 14 - .../core/src/main/res/values-ky/strings.xml | 14 - .../core/src/main/res/values-lo/strings.xml | 14 - .../core/src/main/res/values-lt/strings.xml | 14 - .../core/src/main/res/values-lv/strings.xml | 14 - .../core/src/main/res/values-mk/strings.xml | 14 - .../core/src/main/res/values-ml/strings.xml | 14 - .../core/src/main/res/values-mn/strings.xml | 14 - .../core/src/main/res/values-mr/strings.xml | 14 - .../core/src/main/res/values-ms/strings.xml | 14 - .../core/src/main/res/values-my/strings.xml | 14 - .../core/src/main/res/values-nb/strings.xml | 14 - .../core/src/main/res/values-ne/strings.xml | 14 - .../core/src/main/res/values-nl/strings.xml | 14 - .../core/src/main/res/values-pa/strings.xml | 14 - .../core/src/main/res/values-pl/strings.xml | 14 - .../src/main/res/values-pt-rPT/strings.xml | 14 - .../core/src/main/res/values-pt/strings.xml | 14 - .../core/src/main/res/values-ro/strings.xml | 16 +- .../core/src/main/res/values-ru/strings.xml | 14 - .../core/src/main/res/values-si/strings.xml | 14 - .../core/src/main/res/values-sk/strings.xml | 14 - .../core/src/main/res/values-sl/strings.xml | 14 - .../core/src/main/res/values-sq/strings.xml | 14 - .../core/src/main/res/values-sr/strings.xml | 14 - .../core/src/main/res/values-sv/strings.xml | 14 - .../core/src/main/res/values-sw/strings.xml | 14 - .../core/src/main/res/values-ta/strings.xml | 14 - .../core/src/main/res/values-te/strings.xml | 14 - .../core/src/main/res/values-th/strings.xml | 14 - .../core/src/main/res/values-tl/strings.xml | 14 - .../core/src/main/res/values-tr/strings.xml | 14 - .../core/src/main/res/values-uk/strings.xml | 14 - .../core/src/main/res/values-ur/strings.xml | 14 - .../core/src/main/res/values-uz/strings.xml | 14 - .../core/src/main/res/values-vi/strings.xml | 14 - .../src/main/res/values-zh-rCN/strings.xml | 14 - .../src/main/res/values-zh-rHK/strings.xml | 14 - .../src/main/res/values-zh-rTW/strings.xml | 14 - .../core/src/main/res/values-zu/strings.xml | 14 - .../android/exoplayer2/ExoPlayerTest.java | 368 +- .../exoplayer2/MediaPeriodQueueTest.java | 9 +- .../exoplayer2/MediaSourceListTest.java | 2 +- .../DefaultAnalyticsCollectorTest.java | 667 +- ...ltAudioTrackBufferSizeProviderAC3Test.java | 21 +- ...dioTrackBufferSizeProviderEncodedTest.java | 43 + ...ltAudioTrackBufferSizeProviderPcmTest.java | 9 + .../AsynchronousMediaCodecAdapterTest.java | 28 + .../mediacodec/MediaCodecRendererTest.java | 323 + .../metadata/MetadataRendererTest.java | 2 +- .../source/ConcatenatingMediaSource2Test.java | 911 + .../source/MergingMediaPeriodTest.java | 33 + .../video/MediaCodecVideoRendererTest.java | 148 +- .../source/dash/DashMediaSource.java | 16 +- .../dash/manifest/DashManifestParser.java | 44 +- .../source/dash/offline/DashDownloader.java | 38 +- .../dash/manifest/DashManifestParserTest.java | 18 +- .../upstream/cache/CachedContentIndex.java | 14 +- library/effect/README.md | 6 + .../android/exoplayer2/audio/AacUtil.java | 7 +- .../android/exoplayer2/audio/Ac3Util.java | 74 +- .../android/exoplayer2/audio/OpusUtil.java | 59 + .../extractor/DefaultExtractorsFactory.java | 25 +- .../extractor/FlacStreamMetadata.java | 20 +- .../exoplayer2/extractor/VorbisBitArray.java | 4 +- .../exoplayer2/extractor/VorbisUtil.java | 32 +- .../extractor/mkv/MatroskaExtractor.java | 6 +- .../extractor/mp3/Mp3Extractor.java | 2 +- .../exoplayer2/extractor/mp4/AtomParsers.java | 8 +- .../extractor/mp4/FragmentedMp4Extractor.java | 33 +- .../extractor/mp4/MetadataUtil.java | 12 +- .../exoplayer2/extractor/ogg/OpusReader.java | 38 +- .../exoplayer2/extractor/ts/Ac3Reader.java | 10 +- .../exoplayer2/metadata/id3/Id3Decoder.java | 151 +- .../metadata/id3/TextInformationFrame.java | 81 +- .../exoplayer2/text/cea/Cea708Decoder.java | 4 +- .../exoplayer2/text/subrip/SubripDecoder.java | 20 +- .../exoplayer2/text/ttml/TtmlDecoder.java | 2 +- .../exoplayer2/text/tx3g/Tx3gDecoder.java | 18 +- .../text/webvtt/WebvttCssStyle.java | 6 +- .../exoplayer2/text/webvtt/WebvttDecoder.java | 2 +- .../android/exoplayer2/audio/AacUtilTest.java | 65 + .../exoplayer2/audio/OpusUtilTest.java | 575 +- .../metadata/id3/ChapterFrameTest.java | 3 +- .../metadata/id3/ChapterTocFrameTest.java | 3 +- .../metadata/id3/Id3DecoderTest.java | 216 +- .../id3/TextInformationFrameTest.java | 77 +- .../text/subrip/SubripDecoderTest.java | 45 +- .../exoplayer2/text/ttml/TtmlDecoderTest.java | 11 +- .../source/hls/offline/HlsDownloader.java | 38 +- library/rtsp/README.md | 2 +- .../exoplayer2/source/rtsp/RtspClient.java | 2 +- .../source/rtsp/RtspMediaTrack.java | 25 +- .../source/rtsp/RtspClientTest.java | 64 + .../smoothstreaming/manifest/SsManifest.java | 4 +- .../manifest/SsManifestParser.java | 4 +- .../smoothstreaming/offline/SsDownloader.java | 34 +- library/transformer/README.md | 7 +- .../transformer/FallbackListener.java | 28 +- .../transformer/MssimCalculator.java | 2 +- .../exoplayer2/transformer/Transformer.java | 6 +- .../transformer/FallbackListenerTest.java | 31 +- .../transformer/VideoEncoderWrapperTest.java | 1 + library/ui/lint-baseline.xml | 30 +- .../ui/DefaultMediaDescriptionAdapter.java | 11 + .../exoplayer2/ui/PlayerControlView.java | 11 +- .../ui/PlayerNotificationManager.java | 54 +- .../android/exoplayer2/ui/PlayerView.java | 14 +- .../ui/StyledPlayerControlView.java | 285 +- .../exoplayer2/ui/StyledPlayerView.java | 74 +- .../ui/TrackSelectionDialogBuilder.java | 10 +- .../layout/exo_styled_player_control_view.xml | 3 +- library/ui/src/main/res/values-af/strings.xml | 14 - library/ui/src/main/res/values-am/strings.xml | 16 +- library/ui/src/main/res/values-ar/strings.xml | 14 - library/ui/src/main/res/values-az/strings.xml | 14 - .../src/main/res/values-b+sr+Latn/strings.xml | 14 - library/ui/src/main/res/values-be/strings.xml | 14 - library/ui/src/main/res/values-bg/strings.xml | 14 - library/ui/src/main/res/values-bn/strings.xml | 14 - library/ui/src/main/res/values-bs/strings.xml | 14 - library/ui/src/main/res/values-ca/strings.xml | 14 - library/ui/src/main/res/values-cs/strings.xml | 14 - library/ui/src/main/res/values-da/strings.xml | 14 - library/ui/src/main/res/values-de/strings.xml | 14 - library/ui/src/main/res/values-el/strings.xml | 14 - .../ui/src/main/res/values-en-rAU/strings.xml | 14 - .../ui/src/main/res/values-en-rGB/strings.xml | 14 - .../ui/src/main/res/values-en-rIN/strings.xml | 14 - .../ui/src/main/res/values-es-rUS/strings.xml | 14 - library/ui/src/main/res/values-es/strings.xml | 26 +- library/ui/src/main/res/values-et/strings.xml | 14 - library/ui/src/main/res/values-eu/strings.xml | 14 - library/ui/src/main/res/values-fa/strings.xml | 14 - library/ui/src/main/res/values-fi/strings.xml | 14 - .../ui/src/main/res/values-fr-rCA/strings.xml | 14 - library/ui/src/main/res/values-fr/strings.xml | 14 - library/ui/src/main/res/values-gl/strings.xml | 16 +- library/ui/src/main/res/values-gu/strings.xml | 14 - library/ui/src/main/res/values-hi/strings.xml | 14 - library/ui/src/main/res/values-hr/strings.xml | 14 - library/ui/src/main/res/values-hu/strings.xml | 14 - library/ui/src/main/res/values-hy/strings.xml | 14 - library/ui/src/main/res/values-in/strings.xml | 14 - library/ui/src/main/res/values-is/strings.xml | 14 - library/ui/src/main/res/values-it/strings.xml | 14 - library/ui/src/main/res/values-iw/strings.xml | 34 +- library/ui/src/main/res/values-ja/strings.xml | 14 - library/ui/src/main/res/values-ka/strings.xml | 14 - library/ui/src/main/res/values-kk/strings.xml | 20 +- library/ui/src/main/res/values-km/strings.xml | 14 - library/ui/src/main/res/values-kn/strings.xml | 14 - library/ui/src/main/res/values-ko/strings.xml | 14 - library/ui/src/main/res/values-ky/strings.xml | 16 +- library/ui/src/main/res/values-lo/strings.xml | 14 - library/ui/src/main/res/values-lt/strings.xml | 14 - library/ui/src/main/res/values-lv/strings.xml | 14 - library/ui/src/main/res/values-mk/strings.xml | 14 - library/ui/src/main/res/values-ml/strings.xml | 16 +- library/ui/src/main/res/values-mn/strings.xml | 14 - library/ui/src/main/res/values-mr/strings.xml | 14 - library/ui/src/main/res/values-ms/strings.xml | 14 - library/ui/src/main/res/values-my/strings.xml | 14 - library/ui/src/main/res/values-nb/strings.xml | 14 - library/ui/src/main/res/values-ne/strings.xml | 14 - library/ui/src/main/res/values-nl/strings.xml | 14 - library/ui/src/main/res/values-pa/strings.xml | 14 - library/ui/src/main/res/values-pl/strings.xml | 14 - .../ui/src/main/res/values-pt-rPT/strings.xml | 14 - library/ui/src/main/res/values-pt/strings.xml | 14 - library/ui/src/main/res/values-ro/strings.xml | 46 +- library/ui/src/main/res/values-ru/strings.xml | 14 - library/ui/src/main/res/values-si/strings.xml | 14 - library/ui/src/main/res/values-sk/strings.xml | 14 - library/ui/src/main/res/values-sl/strings.xml | 14 - library/ui/src/main/res/values-sq/strings.xml | 14 - library/ui/src/main/res/values-sr/strings.xml | 14 - library/ui/src/main/res/values-sv/strings.xml | 14 - library/ui/src/main/res/values-sw/strings.xml | 14 - library/ui/src/main/res/values-ta/strings.xml | 14 - library/ui/src/main/res/values-te/strings.xml | 24 +- library/ui/src/main/res/values-th/strings.xml | 14 - library/ui/src/main/res/values-tl/strings.xml | 14 - library/ui/src/main/res/values-tr/strings.xml | 14 - library/ui/src/main/res/values-uk/strings.xml | 14 - library/ui/src/main/res/values-ur/strings.xml | 14 - library/ui/src/main/res/values-uz/strings.xml | 14 - library/ui/src/main/res/values-vi/strings.xml | 14 - .../ui/src/main/res/values-zh-rCN/strings.xml | 14 - .../ui/src/main/res/values-zh-rHK/strings.xml | 14 - .../ui/src/main/res/values-zh-rTW/strings.xml | 14 - library/ui/src/main/res/values-zu/strings.xml | 14 - .../DefaultMediaDescriptionAdapterTest.java | 21 +- media3-migration.sh | 14 +- .../robolectric/RobolectricUtil.java | 2 +- .../robolectric/TestPlayerRunHelper.java | 52 + .../flac/bear_with_id3_enabled_flac.0.dump | 2 +- .../flac/bear_with_id3_enabled_flac.1.dump | 2 +- .../flac/bear_with_id3_enabled_flac.2.dump | 2 +- .../flac/bear_with_id3_enabled_flac.3.dump | 2 +- ..._with_id3_enabled_flac.unknown_length.dump | 2 +- .../flac/bear_with_id3_enabled_raw.0.dump | 2 +- .../flac/bear_with_id3_enabled_raw.1.dump | 2 +- .../flac/bear_with_id3_enabled_raw.2.dump | 2 +- .../flac/bear_with_id3_enabled_raw.3.dump | 2 +- ...r_with_id3_enabled_raw.unknown_length.dump | 2 +- .../mp3/bear-id3-enabled.0.dump | 2 +- .../mp3/bear-id3-enabled.1.dump | 2 +- .../mp3/bear-id3-enabled.2.dump | 2 +- .../mp3/bear-id3-enabled.3.dump | 2 +- .../mp3/bear-id3-enabled.unknown_length.dump | 2 +- .../mp3/bear-vbr-xing-header.mp3.0.dump | 2 +- .../mp3/bear-vbr-xing-header.mp3.1.dump | 2 +- .../mp3/bear-vbr-xing-header.mp3.2.dump | 2 +- .../mp3/bear-vbr-xing-header.mp3.3.dump | 2 +- ...ar-vbr-xing-header.mp3.unknown_length.dump | 2 +- .../extractordumps/mp4/sample.mp4.0.dump | 2 +- .../extractordumps/mp4/sample.mp4.1.dump | 2 +- .../extractordumps/mp4/sample.mp4.2.dump | 2 +- .../extractordumps/mp4/sample.mp4.3.dump | 2 +- .../mp4/sample.mp4.unknown_length.dump | 2 +- .../extractordumps/mp4/sample_ac3.mp4.0.dump | 2 + .../extractordumps/mp4/sample_ac3.mp4.1.dump | 2 + .../extractordumps/mp4/sample_ac3.mp4.2.dump | 2 + .../extractordumps/mp4/sample_ac3.mp4.3.dump | 2 + .../mp4/sample_ac3.mp4.unknown_length.dump | 2 + .../mp4/sample_ac3_fragmented.mp4.0.dump | 2 + .../mp4/sample_ac3_fragmented.mp4.1.dump | 20 +- .../mp4/sample_ac3_fragmented.mp4.2.dump | 14 +- .../mp4/sample_ac3_fragmented.mp4.3.dump | 2 + ...ple_ac3_fragmented.mp4.unknown_length.dump | 2 + .../extractordumps/mp4/sample_eac3.mp4.0.dump | 1 + .../extractordumps/mp4/sample_eac3.mp4.1.dump | 1 + .../extractordumps/mp4/sample_eac3.mp4.2.dump | 1 + .../extractordumps/mp4/sample_eac3.mp4.3.dump | 1 + .../mp4/sample_eac3.mp4.unknown_length.dump | 1 + .../mp4/sample_eac3_fragmented.mp4.0.dump | 1 + .../mp4/sample_eac3_fragmented.mp4.1.dump | 79 +- .../mp4/sample_eac3_fragmented.mp4.2.dump | 43 +- .../mp4/sample_eac3_fragmented.mp4.3.dump | 1 + ...le_eac3_fragmented.mp4.unknown_length.dump | 1 + .../mp4/sample_eac3joc.mp4.0.dump | 1 + .../mp4/sample_eac3joc.mp4.1.dump | 1 + .../mp4/sample_eac3joc.mp4.2.dump | 1 + .../mp4/sample_eac3joc.mp4.3.dump | 1 + .../sample_eac3joc.mp4.unknown_length.dump | 1 + .../mp4/sample_eac3joc_fragmented.mp4.0.dump | 1 + .../mp4/sample_eac3joc_fragmented.mp4.1.dump | 1 + .../mp4/sample_eac3joc_fragmented.mp4.2.dump | 1 + .../mp4/sample_eac3joc_fragmented.mp4.3.dump | 1 + ...eac3joc_fragmented.mp4.unknown_length.dump | 1 + .../mp4/sample_mdat_too_long.mp4.0.dump | 2 +- .../mp4/sample_mdat_too_long.mp4.1.dump | 2 +- .../mp4/sample_mdat_too_long.mp4.2.dump | 2 +- .../mp4/sample_mdat_too_long.mp4.3.dump | 2 +- ...mple_mdat_too_long.mp4.unknown_length.dump | 2 +- .../extractordumps/mp4/sample_opus.mp4.0.dump | 2 +- .../extractordumps/mp4/sample_opus.mp4.1.dump | 2 +- .../extractordumps/mp4/sample_opus.mp4.2.dump | 2 +- .../extractordumps/mp4/sample_opus.mp4.3.dump | 2 +- .../mp4/sample_opus.mp4.unknown_length.dump | 2 +- .../sample_with_colr_mdcv_and_clli.mp4.0.dump | 2 +- .../sample_with_colr_mdcv_and_clli.mp4.1.dump | 2 +- .../sample_with_colr_mdcv_and_clli.mp4.2.dump | 2 +- .../sample_with_colr_mdcv_and_clli.mp4.3.dump | 2 +- ...colr_mdcv_and_clli.mp4.unknown_length.dump | 2 +- .../extractordumps/ts/sample.ac3.0.dump | 2 + .../ts/sample.ac3.unknown_length.dump | 2 + .../extractordumps/ts/sample.eac3.0.dump | 1 + .../ts/sample.eac3.unknown_length.dump | 1 + .../extractordumps/ts/sample_ac3.ps.0.dump | 2 + .../ts/sample_ac3.ps.unknown_length.dump | 2 + .../extractordumps/ts/sample_ac3.ts.0.dump | 2 + .../extractordumps/ts/sample_ac3.ts.1.dump | 2 + .../extractordumps/ts/sample_ac3.ts.2.dump | 2 + .../extractordumps/ts/sample_ac3.ts.3.dump | 2 + .../ts/sample_ac3.ts.unknown_length.dump | 2 + .../extractordumps/ts/sample_ait.ts.0.dump | 1 + .../ts/sample_ait.ts.unknown_length.dump | 1 + .../extractordumps/ts/sample_eac3.ts.0.dump | 1 + .../extractordumps/ts/sample_eac3.ts.1.dump | 1 + .../extractordumps/ts/sample_eac3.ts.2.dump | 1 + .../extractordumps/ts/sample_eac3.ts.3.dump | 1 + .../ts/sample_eac3.ts.unknown_length.dump | 1 + .../ts/sample_eac3joc.ec3.0.dump | 1 + .../ts/sample_eac3joc.ec3.unknown_length.dump | 1 + .../ts/sample_eac3joc.ts.0.dump | 1 + .../ts/sample_eac3joc.ts.1.dump | 1 + .../ts/sample_eac3joc.ts.2.dump | 1 + .../ts/sample_eac3joc.ts.3.dump | 1 + .../ts/sample_eac3joc.ts.unknown_length.dump | 1 + .../test/assets/media/mpd/sample_mpd_images | 5 +- .../test/assets/media/subrip/typical_utf16be | Bin 0 -> 434 bytes .../test/assets/media/subrip/typical_utf16le | Bin 0 -> 434 bytes .../transformerdumps/mp4/sample.mp4.dump | 2 +- .../mp4/sample.mp4.novideo.dump | 2 +- ...sing_timestamps_320w_240h.mp4.clipped.dump | 2 +- .../testutil/FakeAudioRenderer.java | 29 +- .../exoplayer2/testutil/FakeClock.java | 17 +- .../testutil/FakeVideoRenderer.java | 51 +- .../exoplayer2/testutil/StubPlayer.java | 6 +- .../testutil/TestExoPlayerBuilder.java | 18 +- .../exoplayer2/testutil/FakeClockTest.java | 54 +- 571 files changed, 98386 insertions(+), 9859 deletions(-) delete mode 100644 demos/transformer/src/withMediaPipe/java/androidx/media3/demo/transformer/MediaPipeProcessor.java create mode 100644 demos/transformer/src/withMediaPipe/java/com/google/android/exoplayer2/transformerdemo/MediaPipeProcessor.java create mode 100644 docs/_includes/media3-known-issue-box.html create mode 100644 docs/doc/reference/com/google/android/exoplayer2/MediaMetadata.MediaType.html create mode 100644 docs/doc/reference/com/google/android/exoplayer2/SimpleBasePlayer.MediaItemData.Builder.html create mode 100644 docs/doc/reference/com/google/android/exoplayer2/SimpleBasePlayer.MediaItemData.html create mode 100644 docs/doc/reference/com/google/android/exoplayer2/SimpleBasePlayer.PeriodData.Builder.html create mode 100644 docs/doc/reference/com/google/android/exoplayer2/SimpleBasePlayer.PeriodData.html create mode 100644 docs/doc/reference/com/google/android/exoplayer2/SimpleBasePlayer.PositionSupplier.html create mode 100644 docs/doc/reference/com/google/android/exoplayer2/source/ConcatenatingMediaSource2.Builder.html create mode 100644 docs/doc/reference/com/google/android/exoplayer2/source/ConcatenatingMediaSource2.html create mode 100644 library/common/src/test/java/com/google/android/exoplayer2/BasePlayerTest.java create mode 100644 library/core/src/main/java/com/google/android/exoplayer2/source/ConcatenatingMediaSource2.java create mode 100644 library/core/src/test/java/com/google/android/exoplayer2/mediacodec/MediaCodecRendererTest.java create mode 100644 library/core/src/test/java/com/google/android/exoplayer2/source/ConcatenatingMediaSource2Test.java create mode 100644 library/extractor/src/test/java/com/google/android/exoplayer2/audio/AacUtilTest.java create mode 100644 testdata/src/test/assets/media/subrip/typical_utf16be create mode 100644 testdata/src/test/assets/media/subrip/typical_utf16le diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml index 62889430ef2..9c539aaea5f 100644 --- a/.github/ISSUE_TEMPLATE/bug.yml +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -18,6 +18,8 @@ body: label: ExoPlayer Version description: What version of ExoPlayer are you using? options: + - 2.18.4 + - 2.18.3 - 2.18.2 - 2.18.1 - 2.18.0 diff --git a/RELEASENOTES.md b/RELEASENOTES.md index ab5aec86e2f..a0b8ded4f31 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -1,5 +1,120 @@ # Release notes +### 2.18.4 (2023-03-02) + +This release corresponds to the +[AndroidX Media3 1.0.0-rc02 release](https://github.com/androidx/media/releases/tag/1.0.0-rc02). + +* Core library: + * Fix network type detection on API 33 + ([#10970](https://github.com/google/ExoPlayer/issues/10970)). + * Fix `NullPointerException` when calling `ExoPlayer.isTunnelingEnabled` + ([#10977](https://github.com/google/ExoPlayer/issues/10977)). +* Downloads: + * Make the maximum difference of the start time of two segments to be + merged configurable in `SegmentDownloader` and subclasses + ([#248](https://github.com/androidx/media/pull/248)). +* Audio: + * Fix broken gapless MP3 playback on Samsung devices + ([#8594](https://github.com/google/ExoPlayer/issues/8594)). + * Fix bug where playback speeds set immediately after disabling audio may + be overridden by a previous speed change + ([#10882](https://github.com/google/ExoPlayer/issues/10882)). +* Video: + * Map HEVC HDR10 format to `HEVCProfileMain10HDR10` instead of + `HEVCProfileMain10`. + * Add workaround for a device issue on Chromecast with Google TV and + Lenovo M10 FHD Plus that causes 60fps AVC streams to be marked as + unsupported + ([#10898](https://github.com/google/ExoPlayer/issues/10898)). + * Fix frame release performance issues when playing media with a frame + rate far higher than the screen refresh rate. +* Cast: + * Fix transient `STATE_IDLE` when transitioning between media items + ([#245](https://github.com/androidx/media/issues/245)). +* RTSP: + * Catch the IllegalArgumentException thrown in parsing of invalid RTSP + Describe response messages + ([#10971](https://github.com/google/ExoPlayer/issues/10971)). +* IMA extension: + * Fix a bug which prevented DAI streams without any ads from starting + because the first (and in the case without ads the only) `LOADED` event + wasn't received. + +### 2.18.3 (2023-02-16) + +This release corresponds to the +[AndroidX Media3 1.0.0-rc01 release](https://github.com/androidx/media/releases/tag/1.0.0-rc01). + +* Core library: + * Tweak the renderer's decoder ordering logic to uphold the + `MediaCodecSelector`'s preferences, even if a decoder reports it may not + be able to play the media performantly. For example with default + selector, hardware decoder with only functional support will be + preferred over software decoder that fully supports the format + ([#10604](https://github.com/google/ExoPlayer/issues/10604)). + * Add `ExoPlayer.Builder.setPlaybackLooper` that sets a pre-existing + playback thread for a new ExoPlayer instance. + * Allow download manager helpers to be cleared + ([#10776](https://github.com/google/ExoPlayer/issues/10776)). + * Add parameter to `BasePlayer.seekTo` to also indicate the command used + for seeking. + * Use theme when loading drawables on API 21+ + ([#220](https://github.com/androidx/media/issues/220)). + * Add `ConcatenatingMediaSource2` that allows combining multiple media + items into a single window + ([#247](https://github.com/androidx/media/issues/247)). +* Extractors: + * Throw a `ParserException` instead of a `NullPointerException` if the + sample table (stbl) is missing a required sample description (stsd) when + parsing trak atoms. + * Correctly skip samples when seeking directly to a sync frame in fMP4 + ([#10941](https://github.com/google/ExoPlayer/issues/10941)). +* Audio: + * Use the compressed audio format bitrate to calculate the min buffer size + for `AudioTrack` in direct playbacks (passthrough). +* Text: + * Fix `TextRenderer` passing an invalid (negative) index to + `Subtitle.getEventTime` if a subtitle file contains no cues. + * SubRip: Add support for UTF-16 files if they start with a byte order + mark. +* Metadata: + * Parse multiple null-separated values from ID3 frames, as permitted by + ID3 v2.4. + * Add `MediaMetadata.mediaType` to denote the type of content or the type + of folder described by the metadata. + * Add `MediaMetadata.isBrowsable` as a replacement for + `MediaMetadata.folderType`. The folder type will be deprecated in the + next release. +* DASH: + * Add full parsing for image adaptation sets, including tile counts + ([#3752](https://github.com/google/ExoPlayer/issues/3752)). +* UI: + * Fix the deprecated + `StyledPlayerView.setControllerVisibilityListener(StyledPlayerControlView.VisibilityListener)` + to ensure visibility changes are passed to the registered listener + ([#229](https://github.com/androidx/media/issues/229)). + * Fix the ordering of the center player controls in `StyledPlayerView` + when using a right-to-left (RTL) layout + ([#227](https://github.com/androidx/media/issues/227)). +* Cast extension: + * Bump Cast SDK version to 21.2.0. +* IMA extension: + * Remove player listener of the `ImaServerSideAdInsertionMediaSource` on + the application thread to avoid threading issues. + * Add a property `focusSkipButtonWhenAvailable` to the + `ImaServerSideAdInsertionMediaSource.AdsLoader.Builder` to request + focusing the skip button on TV devices and set it to true by default. + * Add a method `focusSkipButton()` to the + `ImaServerSideAdInsertionMediaSource.AdsLoader` to programmatically + request to focus the skip button. + * Fix a bug which prevented playback from starting for a DAI stream + without any ads. + * Bump IMA SDK version to 3.29.0. +* Demo app: + * Request notification permission for download notifications at runtime + ([#10884](https://github.com/google/ExoPlayer/issues/10884)). + ### 2.18.2 (2022-11-22) This release corresponds to the @@ -27,7 +142,6 @@ This release corresponds to the * Build: * Enforce minimum `compileSdkVersion` to avoid compilation errors ([#10684](https://github.com/google/ExoPlayer/issues/10684)). - * Avoid publishing block when included in another gradle build. * Track selection: * Prefer other tracks to Dolby Vision if display does not support it. ([#8944](https://github.com/google/ExoPlayer/issues/8944)). @@ -52,8 +166,6 @@ This release corresponds to the * Make `AudioTrackBufferSizeProvider` a public interface. * Add `ExoPlayer.setPreferredAudioDevice` to set the preferred audio output device ([#135](https://github.com/androidx/media/issues/135)). - * Rename `com.google.android.exoplayer2.audio.AudioProcessor` to - `com.google.android.exoplayer2.audio.AudioProcessor`. * Map 8-channel and 12-channel audio to the 7.1 and 7.1.4 channel masks respectively on all Android versions ([#10701](https://github.com/google/ExoPlayer/issues/10701)). diff --git a/constants.gradle b/constants.gradle index 3068e7646b5..fe6f6c299ce 100644 --- a/constants.gradle +++ b/constants.gradle @@ -13,8 +13,8 @@ // limitations under the License. project.ext { // ExoPlayer version and version code. - releaseVersion = '2.18.2' - releaseVersionCode = 2_018_002 + releaseVersion = '2.18.4' + releaseVersionCode = 2_018_004 minSdkVersion = 16 appTargetSdkVersion = 33 // API version before restricting local file access. diff --git a/demos/main/src/main/AndroidManifest.xml b/demos/main/src/main/AndroidManifest.xml index 596b5ea0f70..bc86ecd4467 100644 --- a/demos/main/src/main/AndroidManifest.xml +++ b/demos/main/src/main/AndroidManifest.xml @@ -23,6 +23,7 @@ + @@ -36,6 +37,7 @@ android:largeHeap="true" android:allowBackup="false" android:requestLegacyExternalStorage="true" + android:supportsRtl="true" android:name="androidx.multidex.MultiDexApplication" tools:targetApi="29"> diff --git a/demos/main/src/main/java/com/google/android/exoplayer2/demo/SampleChooserActivity.java b/demos/main/src/main/java/com/google/android/exoplayer2/demo/SampleChooserActivity.java index c2ffce17bf5..85f93bc2573 100644 --- a/demos/main/src/main/java/com/google/android/exoplayer2/demo/SampleChooserActivity.java +++ b/demos/main/src/main/java/com/google/android/exoplayer2/demo/SampleChooserActivity.java @@ -19,6 +19,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkState; +import android.Manifest; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; @@ -41,7 +42,9 @@ import android.widget.ImageButton; import android.widget.TextView; import android.widget.Toast; +import androidx.annotation.DoNotInline; import androidx.annotation.Nullable; +import androidx.annotation.RequiresApi; import androidx.appcompat.app.AppCompatActivity; import com.facebook.stetho.Stetho; import com.google.android.exoplayer2.MediaItem; @@ -79,6 +82,7 @@ public class SampleChooserActivity extends AppCompatActivity private static final String TAG = "SampleChooserActivity"; private static final String GROUP_POSITION_PREFERENCE_KEY = "sample_chooser_group_position"; private static final String CHILD_POSITION_PREFERENCE_KEY = "sample_chooser_child_position"; + private static final int POST_NOTIFICATION_PERMISSION_REQUEST_CODE = 100; private String[] uris; private boolean useExtensionRenderers; @@ -86,6 +90,8 @@ public class SampleChooserActivity extends AppCompatActivity private SampleAdapter sampleAdapter; private MenuItem preferExtensionDecodersMenuItem; private ExpandableListView sampleListView; + @Nullable private MediaItem downloadMediaItemWaitingForNotificationPermission; + private boolean notificationPermissionToastShown; @Override public void onCreate(Bundle savedInstanceState) { @@ -179,12 +185,34 @@ public void onDownloadsChanged() { public void onRequestPermissionsResult( int requestCode, String[] permissions, int[] grantResults) { super.onRequestPermissionsResult(requestCode, permissions, grantResults); + if (requestCode == POST_NOTIFICATION_PERMISSION_REQUEST_CODE) { + handlePostNotificationPermissionGrantResults(grantResults); + } else { + handleExternalStoragePermissionGrantResults(grantResults); + } + } + + private void handlePostNotificationPermissionGrantResults(int[] grantResults) { + if (!notificationPermissionToastShown + && (grantResults.length == 0 || grantResults[0] != PackageManager.PERMISSION_GRANTED)) { + Toast.makeText( + getApplicationContext(), R.string.post_notification_not_granted, Toast.LENGTH_LONG) + .show(); + notificationPermissionToastShown = true; + } + if (downloadMediaItemWaitingForNotificationPermission != null) { + // Download with or without permission to post notifications. + toggleDownload(downloadMediaItemWaitingForNotificationPermission); + downloadMediaItemWaitingForNotificationPermission = null; + } + } + + private void handleExternalStoragePermissionGrantResults(int[] grantResults) { if (grantResults.length == 0) { // Empty results are triggered if a permission is requested while another request was already // pending and can be safely ignored in this case. return; - } - if (grantResults[0] == PackageManager.PERMISSION_GRANTED) { + } else if (grantResults[0] == PackageManager.PERMISSION_GRANTED) { loadSample(); } else { Toast.makeText(getApplicationContext(), R.string.sample_list_load_error, Toast.LENGTH_LONG) @@ -271,15 +299,26 @@ private void onSampleDownloadButtonClicked(PlaylistHolder playlistHolder) { if (downloadUnsupportedStringId != 0) { Toast.makeText(getApplicationContext(), downloadUnsupportedStringId, Toast.LENGTH_LONG) .show(); + } else if (!notificationPermissionToastShown + && Util.SDK_INT >= 33 + && checkSelfPermission(Api33.getPostNotificationPermissionString()) + != PackageManager.PERMISSION_GRANTED) { + downloadMediaItemWaitingForNotificationPermission = playlistHolder.mediaItems.get(0); + requestPermissions( + new String[] {Api33.getPostNotificationPermissionString()}, + /* requestCode= */ POST_NOTIFICATION_PERMISSION_REQUEST_CODE); } else { - RenderersFactory renderersFactory = - DemoUtil.buildRenderersFactory( - /* context= */ this, isNonNullAndChecked(preferExtensionDecodersMenuItem)); - downloadTracker.toggleDownload( - getSupportFragmentManager(), playlistHolder.mediaItems.get(0), renderersFactory); + toggleDownload(playlistHolder.mediaItems.get(0)); } } + private void toggleDownload(MediaItem mediaItem) { + RenderersFactory renderersFactory = + DemoUtil.buildRenderersFactory( + /* context= */ this, isNonNullAndChecked(preferExtensionDecodersMenuItem)); + downloadTracker.toggleDownload(getSupportFragmentManager(), mediaItem, renderersFactory); + } + private int getDownloadUnsupportedStringId(PlaylistHolder playlistHolder) { if (playlistHolder.mediaItems.size() > 1) { return R.string.download_playlist_unsupported; @@ -656,4 +695,13 @@ public PlaylistGroup(String title) { this.playlists = new ArrayList<>(); } } + + @RequiresApi(33) + private static class Api33 { + + @DoNotInline + public static String getPostNotificationPermissionString() { + return Manifest.permission.POST_NOTIFICATIONS; + } + } } diff --git a/demos/main/src/main/java/com/google/android/exoplayer2/demo/upstream/PlaybackProvider.java b/demos/main/src/main/java/com/google/android/exoplayer2/demo/upstream/PlaybackProvider.java index 64cc2babced..c300bdb08ed 100644 --- a/demos/main/src/main/java/com/google/android/exoplayer2/demo/upstream/PlaybackProvider.java +++ b/demos/main/src/main/java/com/google/android/exoplayer2/demo/upstream/PlaybackProvider.java @@ -55,19 +55,16 @@ private Media buildRequestMedia(Uri uri) { if (uri == null || !Media.GAME_DOMAIN.equals(uri.getHost())) { return null; } + Media.Builder builder = new Media.Builder(); int id = Integer.parseInt(uri.getQueryParameter("id")); String realm = uri.getQueryParameter("realm"); String usr = uri.getQueryParameter("usr"); String pwd = uri.getQueryParameter("pwd"); boolean live = "true".equals(uri.getQueryParameter("live")); if (id > 0 && !TextUtils.isEmpty(realm) && !TextUtils.isEmpty(usr) && !TextUtils.isEmpty(pwd)) { - return new Media.Builder() - .setId(id) - .setLive(live) - .setRealm(new Realm(realm).setUsername(usr).setPassword(pwd)) - .build(); + builder.setId(id).setLive(live).setRealm(new Realm(realm).setUsername(usr).setPassword(pwd)); } - return null; + return builder.build(); } private MediaItem buildResponseMedia(Uri uri, PlaybackResult result) { diff --git a/demos/main/src/main/res/values/strings.xml b/demos/main/src/main/res/values/strings.xml index 49441ef7dac..ce9c90d0c24 100644 --- a/demos/main/src/main/res/values/strings.xml +++ b/demos/main/src/main/res/values/strings.xml @@ -45,6 +45,8 @@ One or more sample lists failed to load + Notifications suppressed. Grant permission to see download notifications. + Failed to start download Failed to obtain offline license diff --git a/demos/transformer/src/withMediaPipe/java/androidx/media3/demo/transformer/MediaPipeProcessor.java b/demos/transformer/src/withMediaPipe/java/androidx/media3/demo/transformer/MediaPipeProcessor.java deleted file mode 100644 index 9e919a68e27..00000000000 --- a/demos/transformer/src/withMediaPipe/java/androidx/media3/demo/transformer/MediaPipeProcessor.java +++ /dev/null @@ -1,282 +0,0 @@ -/* - * Copyright 2022 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.android.exoplayer2.transformerdemo; - -import static com.google.android.exoplayer2.util.Assertions.checkArgument; -import static com.google.android.exoplayer2.util.Assertions.checkState; -import static com.google.android.exoplayer2.util.Assertions.checkStateNotNull; -import static java.util.concurrent.TimeUnit.MILLISECONDS; - -import android.content.Context; -import android.opengl.EGL14; -import androidx.annotation.Nullable; -import com.google.android.exoplayer2.C; -import com.google.android.exoplayer2.effect.GlTextureProcessor; -import com.google.android.exoplayer2.effect.TextureInfo; -import com.google.android.exoplayer2.util.FrameProcessingException; -import com.google.android.exoplayer2.util.LibraryLoader; -import com.google.android.exoplayer2.util.Util; -import com.google.mediapipe.components.FrameProcessor; -import com.google.mediapipe.framework.AppTextureFrame; -import com.google.mediapipe.framework.TextureFrame; -import com.google.mediapipe.glutil.EglManager; -import java.util.ArrayDeque; -import java.util.Queue; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Future; - -/** Runs a MediaPipe graph on input frames. */ -/* package */ final class MediaPipeProcessor implements GlTextureProcessor { - - private static final String THREAD_NAME = "Demo:MediaPipeProcessor"; - private static final long RELEASE_WAIT_TIME_MS = 100; - private static final long RETRY_WAIT_TIME_MS = 1; - - private static final LibraryLoader LOADER = - new LibraryLoader("mediapipe_jni") { - @Override - protected void loadLibrary(String name) { - System.loadLibrary(name); - } - }; - - static { - // Not all build configurations require OpenCV to be loaded separately, so attempt to load the - // library but ignore the error if it's not present. - try { - System.loadLibrary("opencv_java3"); - } catch (UnsatisfiedLinkError e) { - // Do nothing. - } - } - - private final FrameProcessor frameProcessor; - private final ConcurrentHashMap outputFrames; - private final boolean isSingleFrameGraph; - @Nullable private final ExecutorService singleThreadExecutorService; - private final Queue> futures; - - private InputListener inputListener; - private OutputListener outputListener; - private ErrorListener errorListener; - private boolean acceptedFrame; - - /** - * Creates a new texture processor that wraps a MediaPipe graph. - * - *

If {@code isSingleFrameGraph} is {@code false}, the {@code MediaPipeProcessor} may waste CPU - * time by continuously attempting to queue input frames to MediaPipe until they are accepted or - * waste memory if MediaPipe accepts and stores many frames internally. - * - * @param context The {@link Context}. - * @param useHdr Whether input textures come from an HDR source. If {@code true}, colors will be - * in linear RGB BT.2020. If {@code false}, colors will be in linear RGB BT.709. - * @param graphName Name of a MediaPipe graph asset to load. - * @param isSingleFrameGraph Whether the MediaPipe graph will eventually produce one output frame - * each time an input frame (and no other input) has been queued. - * @param inputStreamName Name of the input video stream in the graph. - * @param outputStreamName Name of the input video stream in the graph. - */ - public MediaPipeProcessor( - Context context, - boolean useHdr, - String graphName, - boolean isSingleFrameGraph, - String inputStreamName, - String outputStreamName) { - checkState(LOADER.isAvailable()); - // TODO(b/227624622): Confirm whether MediaPipeProcessor could support HDR colors. - checkArgument(!useHdr, "MediaPipeProcessor does not support HDR colors."); - - this.isSingleFrameGraph = isSingleFrameGraph; - singleThreadExecutorService = - isSingleFrameGraph ? null : Util.newSingleThreadExecutor(THREAD_NAME); - futures = new ArrayDeque<>(); - inputListener = new InputListener() {}; - outputListener = new OutputListener() {}; - errorListener = (frameProcessingException) -> {}; - EglManager eglManager = new EglManager(EGL14.eglGetCurrentContext()); - frameProcessor = - new FrameProcessor( - context, eglManager.getNativeContext(), graphName, inputStreamName, outputStreamName); - outputFrames = new ConcurrentHashMap<>(); - // OnWillAddFrameListener is called on the same thread as frameProcessor.onNewFrame(...), so no - // synchronization is needed for acceptedFrame. - frameProcessor.setOnWillAddFrameListener((long timestamp) -> acceptedFrame = true); - } - - @Override - public void setInputListener(InputListener inputListener) { - this.inputListener = inputListener; - if (!isSingleFrameGraph || outputFrames.isEmpty()) { - inputListener.onReadyToAcceptInputFrame(); - } - } - - @Override - public void setOutputListener(OutputListener outputListener) { - this.outputListener = outputListener; - frameProcessor.setConsumer( - frame -> { - TextureInfo texture = - new TextureInfo( - frame.getTextureName(), - /* fboId= */ C.INDEX_UNSET, - frame.getWidth(), - frame.getHeight()); - outputFrames.put(texture, frame); - outputListener.onOutputFrameAvailable(texture, frame.getTimestamp()); - }); - } - - @Override - public void setErrorListener(ErrorListener errorListener) { - this.errorListener = errorListener; - frameProcessor.setAsynchronousErrorListener( - error -> errorListener.onFrameProcessingError(new FrameProcessingException(error))); - } - - @Override - public void queueInputFrame(TextureInfo inputTexture, long presentationTimeUs) { - AppTextureFrame appTextureFrame = - new AppTextureFrame(inputTexture.texId, inputTexture.width, inputTexture.height); - // TODO(b/238302213): Handle timestamps restarting from 0 when applying effects to a playlist. - // MediaPipe will fail if the timestamps are not monotonically increasing. - // Also make sure that a MediaPipe graph producing additional frames only starts producing - // frames for the next MediaItem after receiving the first frame of that MediaItem as input - // to avoid MediaPipe producing extra frames after the last MediaItem has ended. - appTextureFrame.setTimestamp(presentationTimeUs); - if (isSingleFrameGraph) { - boolean acceptedFrame = maybeQueueInputFrameSynchronous(appTextureFrame, inputTexture); - checkState( - acceptedFrame, - "queueInputFrame must only be called when a new input frame can be accepted"); - return; - } - - // TODO(b/241782273): Avoid retrying continuously until the frame is accepted by using a - // currently non-existent MediaPipe API to be notified when MediaPipe has capacity to accept a - // new frame. - queueInputFrameAsynchronous(appTextureFrame, inputTexture); - } - - private boolean maybeQueueInputFrameSynchronous( - AppTextureFrame appTextureFrame, TextureInfo inputTexture) { - acceptedFrame = false; - frameProcessor.onNewFrame(appTextureFrame); - try { - appTextureFrame.waitUntilReleasedWithGpuSync(); - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); - errorListener.onFrameProcessingError(new FrameProcessingException(e)); - } - if (acceptedFrame) { - inputListener.onInputFrameProcessed(inputTexture); - } - return acceptedFrame; - } - - private void queueInputFrameAsynchronous( - AppTextureFrame appTextureFrame, TextureInfo inputTexture) { - removeFinishedFutures(); - futures.add( - checkStateNotNull(singleThreadExecutorService) - .submit( - () -> { - while (!maybeQueueInputFrameSynchronous(appTextureFrame, inputTexture)) { - try { - Thread.sleep(RETRY_WAIT_TIME_MS); - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); - if (errorListener != null) { - errorListener.onFrameProcessingError(new FrameProcessingException(e)); - } - } - } - inputListener.onReadyToAcceptInputFrame(); - })); - } - - @Override - public void releaseOutputFrame(TextureInfo outputTexture) { - checkStateNotNull(outputFrames.get(outputTexture)).release(); - if (isSingleFrameGraph) { - inputListener.onReadyToAcceptInputFrame(); - } - } - - @Override - public void release() { - if (isSingleFrameGraph) { - frameProcessor.close(); - return; - } - - Queue> futures = checkStateNotNull(this.futures); - while (!futures.isEmpty()) { - futures.remove().cancel(/* mayInterruptIfRunning= */ false); - } - ExecutorService singleThreadExecutorService = - checkStateNotNull(this.singleThreadExecutorService); - singleThreadExecutorService.shutdown(); - try { - if (!singleThreadExecutorService.awaitTermination(RELEASE_WAIT_TIME_MS, MILLISECONDS)) { - errorListener.onFrameProcessingError(new FrameProcessingException("Release timed out")); - } - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); - errorListener.onFrameProcessingError(new FrameProcessingException(e)); - } - - frameProcessor.close(); - } - - @Override - public final void signalEndOfCurrentInputStream() { - if (isSingleFrameGraph) { - frameProcessor.waitUntilIdle(); - outputListener.onCurrentOutputStreamEnded(); - return; - } - - removeFinishedFutures(); - futures.add( - checkStateNotNull(singleThreadExecutorService) - .submit( - () -> { - frameProcessor.waitUntilIdle(); - outputListener.onCurrentOutputStreamEnded(); - })); - } - - private void removeFinishedFutures() { - while (!futures.isEmpty()) { - if (!futures.element().isDone()) { - return; - } - try { - futures.remove().get(); - } catch (ExecutionException e) { - errorListener.onFrameProcessingError(new FrameProcessingException(e)); - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); - errorListener.onFrameProcessingError(new FrameProcessingException(e)); - } - } - } -} diff --git a/demos/transformer/src/withMediaPipe/java/com/google/android/exoplayer2/transformerdemo/MediaPipeProcessor.java b/demos/transformer/src/withMediaPipe/java/com/google/android/exoplayer2/transformerdemo/MediaPipeProcessor.java new file mode 100644 index 00000000000..e69de29bb2d diff --git a/docs/_includes/media3-known-issue-box.html b/docs/_includes/media3-known-issue-box.html new file mode 100644 index 00000000000..93d2989c048 --- /dev/null +++ b/docs/_includes/media3-known-issue-box.html @@ -0,0 +1,2 @@ +**[Known issue #{{include.issue-id}}](https://github.com/androidx/media/issues/{{include.issue-id}})** - {{ include.description }} +{:.error} diff --git a/docs/_page_fragments/supported-formats-hls.md b/docs/_page_fragments/supported-formats-hls.md index 420608b4bfe..dd72a659f09 100644 --- a/docs/_page_fragments/supported-formats-hls.md +++ b/docs/_page_fragments/supported-formats-hls.md @@ -16,7 +16,8 @@ as described | CEA-608 | YES || | WebVTT | YES || | **Metadata** ||| -| ID3 metadata | YES || +| ID3 | YES || +| SCTE-35 | NO || | **Content protection** ||| | AES-128 | YES || | Sample AES-128 | NO || diff --git a/docs/customization.md b/docs/customization.md index 28446dacbd4..1c41162be3c 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -225,14 +225,20 @@ the following: When overriding `ForwardingPlayer` methods it's important to ensure the implementation remains self-consistent and compliant with the `Player` interface, especially when dealing with methods that are intended to have -identical or related behavior. For example, if you want to override every 'play' -operation, you need to override both `ForwardingPlayer.play` and -`ForwardingPlayer.setPlayWhenReady`, because a caller will expect the behavior -of these methdods to be identical when `playWhenReady = true`. Similarly, if you -want to change the seek-forward increment you need to override both -`ForwardingPlayer.seekForward` to perform a seek with your customized increment, -and `ForwardingPlayer.getSeekForwardIncrement` in order to report the correct -customized increment back to the caller. +identical or related behavior. For example: +* If you want to override every 'play' operation, you need to override both + `ForwardingPlayer.play` and `ForwardingPlayer.setPlayWhenReady`, because a + caller will expect the behavior of these methods to be identical when + `playWhenReady = true`. +* If you want to change the seek-forward increment you need to override both + `ForwardingPlayer.seekForward` to perform a seek with your customized + increment, and `ForwardingPlayer.getSeekForwardIncrement` in order to report + the correct customized increment back to the caller. +* If you want to control what `Player.Commands` are advertised by a player + instance, you must override `Player.getAvailableCommands()`, + `Player.isCommandAvailable()` and also listen to the + `Player.Listener.onAvailableCommandsChanged()` callback to get notified of +changes coming from the underlying player. ## MediaSource customization ## diff --git a/docs/doc/reference/allclasses-index.html b/docs/doc/reference/allclasses-index.html index f89fe5717b2..4777975afd6 100644 --- a/docs/doc/reference/allclasses-index.html +++ b/docs/doc/reference/allclasses-index.html @@ -25,7 +25,7 @@ catch(err) { } //--> -var data = {"i0":2,"i1":32,"i2":2,"i3":2,"i4":2,"i5":2,"i6":2,"i7":2,"i8":32,"i9":2,"i10":2,"i11":2,"i12":2,"i13":2,"i14":2,"i15":2,"i16":2,"i17":2,"i18":2,"i19":2,"i20":2,"i21":2,"i22":2,"i23":2,"i24":2,"i25":2,"i26":2,"i27":2,"i28":2,"i29":2,"i30":2,"i31":2,"i32":2,"i33":2,"i34":2,"i35":2,"i36":2,"i37":2,"i38":2,"i39":2,"i40":2,"i41":2,"i42":2,"i43":2,"i44":2,"i45":2,"i46":1,"i47":2,"i48":2,"i49":1,"i50":2,"i51":2,"i52":2,"i53":2,"i54":2,"i55":2,"i56":2,"i57":32,"i58":2,"i59":2,"i60":32,"i61":1,"i62":1,"i63":1,"i64":2,"i65":8,"i66":32,"i67":2,"i68":32,"i69":2,"i70":1,"i71":2,"i72":2,"i73":2,"i74":2,"i75":1,"i76":1,"i77":2,"i78":32,"i79":1,"i80":1,"i81":32,"i82":2,"i83":2,"i84":2,"i85":2,"i86":2,"i87":2,"i88":1,"i89":32,"i90":2,"i91":2,"i92":2,"i93":8,"i94":2,"i95":2,"i96":2,"i97":2,"i98":2,"i99":2,"i100":1,"i101":1,"i102":2,"i103":8,"i104":1,"i105":1,"i106":2,"i107":1,"i108":8,"i109":8,"i110":1,"i111":32,"i112":8,"i113":8,"i114":2,"i115":2,"i116":2,"i117":1,"i118":1,"i119":2,"i120":2,"i121":2,"i122":2,"i123":2,"i124":2,"i125":2,"i126":2,"i127":2,"i128":2,"i129":2,"i130":2,"i131":8,"i132":2,"i133":2,"i134":2,"i135":2,"i136":2,"i137":1,"i138":2,"i139":1,"i140":2,"i141":1,"i142":1,"i143":2,"i144":2,"i145":2,"i146":2,"i147":2,"i148":2,"i149":2,"i150":2,"i151":2,"i152":32,"i153":32,"i154":32,"i155":32,"i156":32,"i157":32,"i158":32,"i159":32,"i160":32,"i161":32,"i162":32,"i163":32,"i164":32,"i165":32,"i166":32,"i167":32,"i168":32,"i169":32,"i170":32,"i171":32,"i172":32,"i173":32,"i174":32,"i175":32,"i176":32,"i177":32,"i178":32,"i179":32,"i180":1,"i181":8,"i182":1,"i183":2,"i184":2,"i185":2,"i186":8,"i187":2,"i188":2,"i189":32,"i190":1,"i191":2,"i192":32,"i193":2,"i194":1,"i195":1,"i196":2,"i197":2,"i198":1,"i199":1,"i200":2,"i201":2,"i202":32,"i203":2,"i204":2,"i205":2,"i206":2,"i207":2,"i208":2,"i209":2,"i210":2,"i211":2,"i212":1,"i213":1,"i214":1,"i215":2,"i216":2,"i217":2,"i218":1,"i219":1,"i220":2,"i221":2,"i222":8,"i223":32,"i224":1,"i225":1,"i226":1,"i227":1,"i228":2,"i229":2,"i230":1,"i231":2,"i232":2,"i233":2,"i234":2,"i235":1,"i236":2,"i237":2,"i238":2,"i239":1,"i240":2,"i241":2,"i242":8,"i243":1,"i244":2,"i245":2,"i246":2,"i247":2,"i248":2,"i249":8,"i250":2,"i251":2,"i252":2,"i253":2,"i254":1,"i255":8,"i256":2,"i257":2,"i258":32,"i259":2,"i260":32,"i261":32,"i262":32,"i263":2,"i264":2,"i265":2,"i266":1,"i267":1,"i268":2,"i269":2,"i270":2,"i271":2,"i272":8,"i273":2,"i274":2,"i275":1,"i276":2,"i277":2,"i278":8,"i279":1,"i280":2,"i281":1,"i282":2,"i283":1,"i284":1,"i285":1,"i286":1,"i287":2,"i288":2,"i289":2,"i290":2,"i291":8,"i292":2,"i293":2,"i294":2,"i295":2,"i296":32,"i297":32,"i298":2,"i299":1,"i300":2,"i301":1,"i302":1,"i303":2,"i304":2,"i305":2,"i306":8,"i307":2,"i308":32,"i309":8,"i310":2,"i311":1,"i312":2,"i313":32,"i314":32,"i315":2,"i316":2,"i317":2,"i318":2,"i319":1,"i320":1,"i321":2,"i322":2,"i323":8,"i324":32,"i325":32,"i326":2,"i327":2,"i328":2,"i329":2,"i330":2,"i331":2,"i332":2,"i333":2,"i334":2,"i335":2,"i336":2,"i337":2,"i338":2,"i339":2,"i340":2,"i341":2,"i342":2,"i343":2,"i344":2,"i345":2,"i346":8,"i347":32,"i348":2,"i349":2,"i350":2,"i351":2,"i352":2,"i353":2,"i354":2,"i355":2,"i356":2,"i357":2,"i358":2,"i359":2,"i360":2,"i361":2,"i362":2,"i363":2,"i364":2,"i365":2,"i366":2,"i367":2,"i368":2,"i369":1,"i370":2,"i371":2,"i372":2,"i373":2,"i374":32,"i375":2,"i376":2,"i377":2,"i378":2,"i379":2,"i380":2,"i381":2,"i382":2,"i383":2,"i384":2,"i385":32,"i386":2,"i387":2,"i388":32,"i389":2,"i390":2,"i391":32,"i392":2,"i393":2,"i394":2,"i395":32,"i396":32,"i397":2,"i398":1,"i399":1,"i400":1,"i401":1,"i402":8,"i403":2,"i404":1,"i405":8,"i406":1,"i407":2,"i408":1,"i409":2,"i410":2,"i411":2,"i412":2,"i413":8,"i414":2,"i415":2,"i416":2,"i417":1,"i418":8,"i419":32,"i420":1,"i421":2,"i422":1,"i423":1,"i424":1,"i425":2,"i426":32,"i427":2,"i428":2,"i429":2,"i430":2,"i431":2,"i432":1,"i433":2,"i434":2,"i435":2,"i436":1,"i437":2,"i438":2,"i439":2,"i440":1,"i441":32,"i442":1,"i443":2,"i444":32,"i445":1,"i446":1,"i447":2,"i448":1,"i449":1,"i450":2,"i451":1,"i452":2,"i453":2,"i454":2,"i455":2,"i456":2,"i457":2,"i458":2,"i459":2,"i460":1,"i461":2,"i462":2,"i463":32,"i464":2,"i465":1,"i466":1,"i467":1,"i468":1,"i469":2,"i470":8,"i471":32,"i472":1,"i473":1,"i474":1,"i475":2,"i476":1,"i477":1,"i478":1,"i479":2,"i480":2,"i481":2,"i482":2,"i483":8,"i484":32,"i485":1,"i486":2,"i487":1,"i488":1,"i489":32,"i490":2,"i491":2,"i492":2,"i493":1,"i494":2,"i495":1,"i496":1,"i497":1,"i498":2,"i499":2,"i500":2,"i501":2,"i502":2,"i503":2,"i504":2,"i505":2,"i506":2,"i507":2,"i508":2,"i509":2,"i510":2,"i511":2,"i512":2,"i513":2,"i514":2,"i515":2,"i516":2,"i517":2,"i518":2,"i519":2,"i520":2,"i521":8,"i522":2,"i523":2,"i524":2,"i525":2,"i526":2,"i527":1,"i528":2,"i529":2,"i530":2,"i531":2,"i532":2,"i533":2,"i534":2,"i535":2,"i536":2,"i537":2,"i538":2,"i539":1,"i540":2,"i541":2,"i542":2,"i543":2,"i544":8,"i545":2,"i546":2,"i547":2,"i548":8,"i549":2,"i550":32,"i551":1,"i552":2,"i553":2,"i554":2,"i555":2,"i556":2,"i557":8,"i558":2,"i559":2,"i560":32,"i561":32,"i562":2,"i563":2,"i564":2,"i565":2,"i566":2,"i567":2,"i568":2,"i569":2,"i570":2,"i571":2,"i572":2,"i573":2,"i574":2,"i575":2,"i576":2,"i577":2,"i578":2,"i579":2,"i580":2,"i581":32,"i582":2,"i583":8,"i584":1,"i585":1,"i586":1,"i587":2,"i588":2,"i589":2,"i590":2,"i591":8,"i592":2,"i593":2,"i594":1,"i595":2,"i596":2,"i597":1,"i598":2,"i599":1,"i600":1,"i601":1,"i602":1,"i603":2,"i604":8,"i605":2,"i606":2,"i607":2,"i608":2,"i609":1,"i610":1,"i611":2,"i612":2,"i613":1,"i614":2,"i615":1,"i616":2,"i617":2,"i618":1,"i619":2,"i620":2,"i621":2,"i622":32,"i623":2,"i624":2,"i625":2,"i626":2,"i627":2,"i628":2,"i629":32,"i630":2,"i631":2,"i632":2,"i633":2,"i634":2,"i635":8,"i636":1,"i637":1,"i638":1,"i639":1,"i640":8,"i641":8,"i642":1,"i643":2,"i644":2,"i645":2,"i646":2,"i647":1,"i648":2,"i649":2,"i650":1,"i651":2,"i652":8,"i653":1,"i654":8,"i655":32,"i656":8,"i657":8,"i658":2,"i659":2,"i660":2,"i661":2,"i662":2,"i663":2,"i664":2,"i665":2,"i666":1,"i667":2,"i668":2,"i669":2,"i670":8,"i671":2,"i672":2,"i673":2,"i674":2,"i675":2,"i676":2,"i677":2,"i678":2,"i679":2,"i680":2,"i681":2,"i682":2,"i683":2,"i684":8,"i685":1,"i686":2,"i687":2,"i688":2,"i689":2,"i690":2,"i691":2,"i692":2,"i693":2,"i694":2,"i695":2,"i696":1,"i697":1,"i698":1,"i699":1,"i700":2,"i701":1,"i702":1,"i703":2,"i704":1,"i705":8,"i706":1,"i707":2,"i708":1,"i709":2,"i710":2,"i711":32,"i712":2,"i713":2,"i714":2,"i715":2,"i716":1,"i717":32,"i718":2,"i719":2,"i720":2,"i721":2,"i722":32,"i723":2,"i724":1,"i725":2,"i726":2,"i727":1,"i728":2,"i729":32,"i730":2,"i731":2,"i732":2,"i733":1,"i734":1,"i735":1,"i736":2,"i737":1,"i738":1,"i739":2,"i740":8,"i741":2,"i742":2,"i743":8,"i744":1,"i745":2,"i746":8,"i747":8,"i748":2,"i749":2,"i750":1,"i751":8,"i752":2,"i753":2,"i754":2,"i755":2,"i756":2,"i757":2,"i758":2,"i759":2,"i760":2,"i761":2,"i762":2,"i763":2,"i764":2,"i765":2,"i766":2,"i767":2,"i768":2,"i769":2,"i770":2,"i771":1,"i772":1,"i773":2,"i774":2,"i775":2,"i776":32,"i777":32,"i778":2,"i779":2,"i780":2,"i781":2,"i782":2,"i783":1,"i784":1,"i785":2,"i786":1,"i787":2,"i788":2,"i789":1,"i790":1,"i791":1,"i792":2,"i793":1,"i794":1,"i795":32,"i796":1,"i797":1,"i798":1,"i799":1,"i800":1,"i801":1,"i802":2,"i803":1,"i804":1,"i805":2,"i806":1,"i807":2,"i808":2,"i809":8,"i810":32,"i811":2,"i812":1,"i813":1,"i814":1,"i815":2,"i816":1,"i817":2,"i818":2,"i819":2,"i820":2,"i821":2,"i822":2,"i823":32,"i824":2,"i825":32,"i826":2,"i827":2,"i828":2,"i829":2,"i830":1,"i831":1,"i832":8,"i833":2,"i834":2,"i835":2,"i836":2,"i837":2,"i838":1,"i839":32,"i840":2,"i841":2,"i842":2,"i843":32,"i844":2,"i845":2,"i846":2,"i847":2,"i848":2,"i849":2,"i850":8,"i851":2,"i852":2,"i853":2,"i854":2,"i855":2,"i856":2,"i857":8,"i858":2,"i859":1,"i860":2,"i861":2,"i862":2,"i863":2,"i864":2,"i865":2,"i866":2,"i867":2,"i868":2,"i869":2,"i870":8,"i871":32,"i872":2,"i873":2,"i874":1,"i875":1,"i876":2,"i877":2,"i878":2,"i879":2,"i880":2,"i881":1,"i882":1,"i883":32,"i884":2,"i885":2,"i886":32,"i887":32,"i888":2,"i889":1,"i890":32,"i891":32,"i892":32,"i893":2,"i894":32,"i895":32,"i896":32,"i897":2,"i898":1,"i899":1,"i900":2,"i901":1,"i902":2,"i903":2,"i904":1,"i905":1,"i906":2,"i907":2,"i908":1,"i909":1,"i910":1,"i911":32,"i912":32,"i913":2,"i914":32,"i915":2,"i916":2,"i917":32,"i918":2,"i919":2,"i920":2,"i921":2,"i922":8,"i923":2,"i924":2,"i925":2,"i926":2,"i927":2,"i928":1,"i929":1,"i930":2,"i931":2,"i932":2,"i933":2,"i934":2,"i935":2,"i936":2,"i937":2,"i938":2,"i939":2,"i940":8,"i941":1,"i942":32,"i943":32,"i944":1,"i945":1,"i946":32,"i947":32,"i948":32,"i949":32,"i950":32,"i951":32,"i952":2,"i953":1,"i954":2,"i955":2,"i956":32,"i957":2,"i958":2,"i959":2,"i960":2,"i961":32,"i962":2,"i963":1,"i964":2,"i965":2,"i966":1,"i967":2,"i968":2,"i969":2,"i970":1,"i971":2,"i972":2,"i973":2,"i974":2,"i975":2,"i976":2,"i977":2,"i978":2,"i979":1,"i980":1,"i981":2,"i982":2,"i983":2,"i984":2,"i985":8,"i986":2,"i987":2,"i988":2,"i989":1,"i990":8,"i991":1,"i992":32,"i993":32,"i994":2,"i995":2,"i996":1,"i997":1,"i998":2,"i999":1,"i1000":2,"i1001":2,"i1002":2,"i1003":2,"i1004":2,"i1005":2,"i1006":2,"i1007":2,"i1008":2,"i1009":2,"i1010":2,"i1011":2,"i1012":2,"i1013":1,"i1014":1,"i1015":2,"i1016":1,"i1017":2,"i1018":2,"i1019":1,"i1020":2,"i1021":1,"i1022":1,"i1023":2,"i1024":1,"i1025":2,"i1026":1,"i1027":1,"i1028":1,"i1029":1,"i1030":2,"i1031":2,"i1032":1,"i1033":2,"i1034":2,"i1035":2,"i1036":2,"i1037":2,"i1038":2,"i1039":2,"i1040":2,"i1041":2,"i1042":2,"i1043":2,"i1044":2,"i1045":2,"i1046":2,"i1047":2,"i1048":2,"i1049":2,"i1050":2,"i1051":2,"i1052":2,"i1053":2,"i1054":2,"i1055":2,"i1056":2,"i1057":2,"i1058":2,"i1059":2,"i1060":2,"i1061":1,"i1062":2,"i1063":2,"i1064":1,"i1065":1,"i1066":1,"i1067":1,"i1068":1,"i1069":1,"i1070":1,"i1071":1,"i1072":1,"i1073":2,"i1074":2,"i1075":1,"i1076":2,"i1077":2,"i1078":2,"i1079":2,"i1080":2,"i1081":2,"i1082":2,"i1083":2,"i1084":2,"i1085":1,"i1086":1,"i1087":2,"i1088":2,"i1089":2,"i1090":2,"i1091":2,"i1092":8,"i1093":2,"i1094":2,"i1095":2,"i1096":2,"i1097":2,"i1098":2,"i1099":2,"i1100":2,"i1101":2,"i1102":2,"i1103":2,"i1104":1,"i1105":1,"i1106":1,"i1107":2,"i1108":1,"i1109":1,"i1110":32,"i1111":2,"i1112":1,"i1113":1,"i1114":8,"i1115":1,"i1116":2,"i1117":2,"i1118":2,"i1119":2,"i1120":32,"i1121":2,"i1122":2,"i1123":2,"i1124":2,"i1125":2,"i1126":1,"i1127":2,"i1128":2,"i1129":2,"i1130":2,"i1131":2,"i1132":2,"i1133":2,"i1134":32,"i1135":2,"i1136":32,"i1137":32,"i1138":2,"i1139":1,"i1140":2,"i1141":2,"i1142":2,"i1143":1,"i1144":1,"i1145":2,"i1146":2,"i1147":2,"i1148":2,"i1149":2,"i1150":2,"i1151":2,"i1152":1,"i1153":2,"i1154":1,"i1155":2,"i1156":2,"i1157":2,"i1158":2,"i1159":1,"i1160":2,"i1161":2,"i1162":32,"i1163":2,"i1164":2,"i1165":2,"i1166":1,"i1167":1,"i1168":2,"i1169":32,"i1170":2,"i1171":2,"i1172":1,"i1173":32,"i1174":2,"i1175":2,"i1176":1,"i1177":2,"i1178":2,"i1179":2,"i1180":2,"i1181":1,"i1182":2,"i1183":1,"i1184":2,"i1185":1,"i1186":2,"i1187":1,"i1188":8,"i1189":32,"i1190":2,"i1191":2,"i1192":2,"i1193":2,"i1194":2,"i1195":2,"i1196":1,"i1197":32,"i1198":2,"i1199":2,"i1200":32,"i1201":1,"i1202":2,"i1203":2,"i1204":1,"i1205":32,"i1206":2,"i1207":2,"i1208":2,"i1209":2,"i1210":2,"i1211":8,"i1212":32,"i1213":8,"i1214":8,"i1215":32,"i1216":2,"i1217":2,"i1218":2,"i1219":2,"i1220":2,"i1221":2,"i1222":2,"i1223":2,"i1224":1,"i1225":2,"i1226":32,"i1227":2,"i1228":1,"i1229":2,"i1230":1,"i1231":2,"i1232":2,"i1233":2,"i1234":2,"i1235":2,"i1236":2,"i1237":2,"i1238":2,"i1239":2,"i1240":2,"i1241":8,"i1242":2,"i1243":2,"i1244":2,"i1245":2,"i1246":2,"i1247":2,"i1248":2,"i1249":32,"i1250":32,"i1251":2,"i1252":2,"i1253":2,"i1254":2,"i1255":2,"i1256":2,"i1257":2,"i1258":2,"i1259":2,"i1260":1,"i1261":2}; +var data = {"i0":2,"i1":32,"i2":2,"i3":2,"i4":2,"i5":2,"i6":2,"i7":2,"i8":32,"i9":2,"i10":2,"i11":2,"i12":2,"i13":2,"i14":2,"i15":2,"i16":2,"i17":2,"i18":2,"i19":2,"i20":2,"i21":2,"i22":2,"i23":2,"i24":2,"i25":2,"i26":2,"i27":2,"i28":2,"i29":2,"i30":2,"i31":2,"i32":2,"i33":2,"i34":2,"i35":2,"i36":2,"i37":2,"i38":2,"i39":2,"i40":2,"i41":2,"i42":2,"i43":2,"i44":2,"i45":2,"i46":1,"i47":2,"i48":2,"i49":1,"i50":2,"i51":2,"i52":2,"i53":2,"i54":2,"i55":2,"i56":2,"i57":32,"i58":2,"i59":2,"i60":32,"i61":1,"i62":1,"i63":1,"i64":2,"i65":8,"i66":32,"i67":2,"i68":32,"i69":2,"i70":1,"i71":2,"i72":2,"i73":2,"i74":2,"i75":1,"i76":1,"i77":2,"i78":32,"i79":1,"i80":1,"i81":32,"i82":2,"i83":2,"i84":2,"i85":2,"i86":2,"i87":2,"i88":1,"i89":32,"i90":2,"i91":2,"i92":2,"i93":8,"i94":2,"i95":2,"i96":2,"i97":2,"i98":2,"i99":2,"i100":1,"i101":1,"i102":2,"i103":8,"i104":1,"i105":1,"i106":2,"i107":1,"i108":8,"i109":8,"i110":1,"i111":32,"i112":8,"i113":8,"i114":2,"i115":2,"i116":2,"i117":1,"i118":1,"i119":2,"i120":2,"i121":2,"i122":2,"i123":2,"i124":2,"i125":2,"i126":2,"i127":2,"i128":2,"i129":2,"i130":2,"i131":8,"i132":2,"i133":2,"i134":2,"i135":2,"i136":2,"i137":1,"i138":2,"i139":1,"i140":2,"i141":1,"i142":1,"i143":2,"i144":2,"i145":2,"i146":2,"i147":2,"i148":2,"i149":2,"i150":2,"i151":2,"i152":32,"i153":32,"i154":32,"i155":32,"i156":32,"i157":32,"i158":32,"i159":32,"i160":32,"i161":32,"i162":32,"i163":32,"i164":32,"i165":32,"i166":32,"i167":32,"i168":32,"i169":32,"i170":32,"i171":32,"i172":32,"i173":32,"i174":32,"i175":32,"i176":32,"i177":32,"i178":32,"i179":32,"i180":1,"i181":8,"i182":1,"i183":2,"i184":2,"i185":2,"i186":8,"i187":2,"i188":2,"i189":32,"i190":1,"i191":2,"i192":32,"i193":2,"i194":1,"i195":1,"i196":2,"i197":2,"i198":1,"i199":1,"i200":2,"i201":2,"i202":32,"i203":2,"i204":2,"i205":2,"i206":2,"i207":2,"i208":2,"i209":2,"i210":2,"i211":2,"i212":1,"i213":1,"i214":1,"i215":2,"i216":2,"i217":2,"i218":1,"i219":1,"i220":2,"i221":2,"i222":8,"i223":32,"i224":1,"i225":1,"i226":1,"i227":1,"i228":2,"i229":2,"i230":1,"i231":2,"i232":2,"i233":2,"i234":2,"i235":1,"i236":2,"i237":2,"i238":2,"i239":2,"i240":2,"i241":1,"i242":2,"i243":2,"i244":8,"i245":1,"i246":2,"i247":2,"i248":2,"i249":2,"i250":2,"i251":8,"i252":2,"i253":2,"i254":2,"i255":2,"i256":1,"i257":8,"i258":2,"i259":2,"i260":32,"i261":2,"i262":32,"i263":32,"i264":32,"i265":2,"i266":2,"i267":2,"i268":1,"i269":1,"i270":2,"i271":2,"i272":2,"i273":2,"i274":8,"i275":2,"i276":2,"i277":1,"i278":2,"i279":2,"i280":8,"i281":1,"i282":2,"i283":1,"i284":2,"i285":1,"i286":1,"i287":1,"i288":1,"i289":2,"i290":2,"i291":2,"i292":2,"i293":8,"i294":2,"i295":2,"i296":2,"i297":2,"i298":32,"i299":32,"i300":2,"i301":1,"i302":2,"i303":1,"i304":1,"i305":2,"i306":2,"i307":2,"i308":8,"i309":2,"i310":32,"i311":8,"i312":2,"i313":1,"i314":2,"i315":32,"i316":32,"i317":2,"i318":2,"i319":2,"i320":2,"i321":1,"i322":1,"i323":2,"i324":2,"i325":8,"i326":32,"i327":32,"i328":2,"i329":2,"i330":2,"i331":2,"i332":2,"i333":2,"i334":2,"i335":2,"i336":2,"i337":2,"i338":2,"i339":2,"i340":2,"i341":2,"i342":2,"i343":2,"i344":2,"i345":2,"i346":2,"i347":2,"i348":8,"i349":32,"i350":2,"i351":2,"i352":2,"i353":2,"i354":2,"i355":2,"i356":2,"i357":2,"i358":2,"i359":2,"i360":2,"i361":2,"i362":2,"i363":2,"i364":2,"i365":2,"i366":2,"i367":2,"i368":2,"i369":2,"i370":2,"i371":1,"i372":2,"i373":2,"i374":2,"i375":2,"i376":32,"i377":2,"i378":2,"i379":2,"i380":2,"i381":2,"i382":2,"i383":2,"i384":2,"i385":2,"i386":2,"i387":32,"i388":2,"i389":2,"i390":32,"i391":2,"i392":2,"i393":32,"i394":2,"i395":2,"i396":2,"i397":32,"i398":32,"i399":2,"i400":1,"i401":1,"i402":1,"i403":1,"i404":8,"i405":2,"i406":1,"i407":8,"i408":1,"i409":2,"i410":1,"i411":2,"i412":2,"i413":2,"i414":2,"i415":8,"i416":2,"i417":2,"i418":2,"i419":1,"i420":8,"i421":32,"i422":1,"i423":2,"i424":1,"i425":1,"i426":1,"i427":2,"i428":32,"i429":2,"i430":2,"i431":2,"i432":2,"i433":2,"i434":1,"i435":2,"i436":2,"i437":2,"i438":1,"i439":2,"i440":2,"i441":2,"i442":1,"i443":32,"i444":1,"i445":2,"i446":32,"i447":1,"i448":1,"i449":2,"i450":1,"i451":1,"i452":2,"i453":1,"i454":2,"i455":2,"i456":2,"i457":2,"i458":2,"i459":2,"i460":2,"i461":2,"i462":1,"i463":2,"i464":2,"i465":32,"i466":2,"i467":1,"i468":1,"i469":1,"i470":1,"i471":2,"i472":8,"i473":32,"i474":1,"i475":1,"i476":1,"i477":2,"i478":1,"i479":1,"i480":1,"i481":2,"i482":2,"i483":2,"i484":2,"i485":8,"i486":32,"i487":1,"i488":2,"i489":1,"i490":1,"i491":32,"i492":2,"i493":2,"i494":2,"i495":1,"i496":2,"i497":1,"i498":1,"i499":1,"i500":2,"i501":2,"i502":2,"i503":2,"i504":2,"i505":2,"i506":2,"i507":2,"i508":2,"i509":2,"i510":2,"i511":2,"i512":2,"i513":2,"i514":2,"i515":2,"i516":2,"i517":2,"i518":2,"i519":2,"i520":2,"i521":2,"i522":2,"i523":8,"i524":2,"i525":2,"i526":2,"i527":2,"i528":2,"i529":1,"i530":2,"i531":2,"i532":2,"i533":2,"i534":2,"i535":2,"i536":2,"i537":2,"i538":2,"i539":2,"i540":2,"i541":1,"i542":2,"i543":2,"i544":2,"i545":2,"i546":8,"i547":2,"i548":2,"i549":2,"i550":8,"i551":2,"i552":32,"i553":1,"i554":2,"i555":2,"i556":2,"i557":2,"i558":2,"i559":8,"i560":2,"i561":2,"i562":32,"i563":32,"i564":2,"i565":2,"i566":2,"i567":2,"i568":2,"i569":2,"i570":2,"i571":2,"i572":2,"i573":2,"i574":2,"i575":2,"i576":2,"i577":2,"i578":2,"i579":2,"i580":2,"i581":2,"i582":2,"i583":32,"i584":2,"i585":8,"i586":1,"i587":1,"i588":1,"i589":2,"i590":2,"i591":2,"i592":2,"i593":8,"i594":2,"i595":2,"i596":1,"i597":2,"i598":2,"i599":1,"i600":2,"i601":1,"i602":1,"i603":1,"i604":1,"i605":2,"i606":8,"i607":2,"i608":2,"i609":2,"i610":2,"i611":1,"i612":1,"i613":2,"i614":2,"i615":1,"i616":2,"i617":1,"i618":2,"i619":2,"i620":1,"i621":2,"i622":2,"i623":2,"i624":32,"i625":2,"i626":2,"i627":2,"i628":2,"i629":2,"i630":2,"i631":32,"i632":2,"i633":2,"i634":2,"i635":2,"i636":2,"i637":8,"i638":1,"i639":1,"i640":1,"i641":1,"i642":8,"i643":8,"i644":1,"i645":2,"i646":2,"i647":2,"i648":2,"i649":1,"i650":2,"i651":2,"i652":1,"i653":2,"i654":8,"i655":1,"i656":8,"i657":32,"i658":8,"i659":8,"i660":2,"i661":2,"i662":2,"i663":2,"i664":2,"i665":2,"i666":2,"i667":2,"i668":1,"i669":2,"i670":2,"i671":2,"i672":8,"i673":2,"i674":2,"i675":2,"i676":2,"i677":2,"i678":2,"i679":2,"i680":2,"i681":2,"i682":2,"i683":2,"i684":2,"i685":2,"i686":8,"i687":1,"i688":2,"i689":2,"i690":2,"i691":2,"i692":2,"i693":2,"i694":2,"i695":2,"i696":2,"i697":2,"i698":1,"i699":1,"i700":1,"i701":1,"i702":2,"i703":1,"i704":1,"i705":2,"i706":1,"i707":8,"i708":1,"i709":2,"i710":1,"i711":2,"i712":2,"i713":32,"i714":2,"i715":2,"i716":2,"i717":2,"i718":1,"i719":32,"i720":2,"i721":2,"i722":2,"i723":2,"i724":32,"i725":2,"i726":1,"i727":2,"i728":2,"i729":1,"i730":2,"i731":32,"i732":2,"i733":2,"i734":2,"i735":1,"i736":1,"i737":1,"i738":2,"i739":1,"i740":1,"i741":2,"i742":8,"i743":2,"i744":2,"i745":8,"i746":1,"i747":2,"i748":8,"i749":8,"i750":2,"i751":2,"i752":1,"i753":8,"i754":2,"i755":2,"i756":2,"i757":2,"i758":2,"i759":2,"i760":2,"i761":2,"i762":2,"i763":2,"i764":2,"i765":2,"i766":2,"i767":2,"i768":2,"i769":2,"i770":2,"i771":2,"i772":2,"i773":1,"i774":1,"i775":2,"i776":2,"i777":2,"i778":32,"i779":32,"i780":32,"i781":2,"i782":2,"i783":2,"i784":2,"i785":2,"i786":1,"i787":1,"i788":2,"i789":1,"i790":2,"i791":2,"i792":1,"i793":1,"i794":1,"i795":2,"i796":1,"i797":1,"i798":32,"i799":1,"i800":1,"i801":1,"i802":1,"i803":1,"i804":1,"i805":2,"i806":1,"i807":1,"i808":2,"i809":1,"i810":2,"i811":2,"i812":8,"i813":32,"i814":2,"i815":1,"i816":1,"i817":1,"i818":2,"i819":1,"i820":2,"i821":2,"i822":2,"i823":2,"i824":2,"i825":2,"i826":32,"i827":2,"i828":32,"i829":2,"i830":2,"i831":2,"i832":2,"i833":1,"i834":1,"i835":8,"i836":2,"i837":2,"i838":2,"i839":2,"i840":2,"i841":1,"i842":32,"i843":2,"i844":2,"i845":2,"i846":32,"i847":2,"i848":2,"i849":2,"i850":2,"i851":2,"i852":2,"i853":8,"i854":2,"i855":2,"i856":2,"i857":2,"i858":2,"i859":2,"i860":8,"i861":2,"i862":1,"i863":2,"i864":2,"i865":2,"i866":2,"i867":2,"i868":2,"i869":2,"i870":2,"i871":2,"i872":2,"i873":8,"i874":32,"i875":2,"i876":2,"i877":1,"i878":1,"i879":2,"i880":2,"i881":2,"i882":2,"i883":2,"i884":1,"i885":1,"i886":32,"i887":2,"i888":2,"i889":32,"i890":32,"i891":2,"i892":1,"i893":32,"i894":32,"i895":32,"i896":2,"i897":32,"i898":32,"i899":32,"i900":2,"i901":1,"i902":1,"i903":2,"i904":1,"i905":2,"i906":2,"i907":1,"i908":1,"i909":2,"i910":2,"i911":1,"i912":1,"i913":1,"i914":32,"i915":32,"i916":2,"i917":32,"i918":2,"i919":2,"i920":32,"i921":2,"i922":2,"i923":2,"i924":2,"i925":8,"i926":2,"i927":2,"i928":2,"i929":2,"i930":2,"i931":1,"i932":1,"i933":2,"i934":2,"i935":2,"i936":2,"i937":2,"i938":2,"i939":2,"i940":2,"i941":2,"i942":2,"i943":8,"i944":1,"i945":32,"i946":32,"i947":1,"i948":1,"i949":32,"i950":32,"i951":32,"i952":32,"i953":32,"i954":32,"i955":2,"i956":1,"i957":2,"i958":2,"i959":32,"i960":2,"i961":2,"i962":2,"i963":2,"i964":32,"i965":2,"i966":1,"i967":2,"i968":2,"i969":1,"i970":2,"i971":2,"i972":2,"i973":1,"i974":2,"i975":2,"i976":2,"i977":2,"i978":2,"i979":2,"i980":2,"i981":2,"i982":1,"i983":1,"i984":2,"i985":2,"i986":2,"i987":2,"i988":8,"i989":2,"i990":2,"i991":2,"i992":1,"i993":8,"i994":1,"i995":32,"i996":32,"i997":2,"i998":2,"i999":1,"i1000":1,"i1001":2,"i1002":1,"i1003":2,"i1004":2,"i1005":2,"i1006":2,"i1007":2,"i1008":2,"i1009":2,"i1010":2,"i1011":2,"i1012":2,"i1013":2,"i1014":2,"i1015":2,"i1016":1,"i1017":1,"i1018":2,"i1019":1,"i1020":2,"i1021":2,"i1022":1,"i1023":2,"i1024":1,"i1025":1,"i1026":2,"i1027":1,"i1028":2,"i1029":1,"i1030":1,"i1031":1,"i1032":1,"i1033":2,"i1034":2,"i1035":1,"i1036":2,"i1037":2,"i1038":2,"i1039":2,"i1040":2,"i1041":2,"i1042":2,"i1043":2,"i1044":2,"i1045":2,"i1046":1,"i1047":2,"i1048":2,"i1049":2,"i1050":2,"i1051":2,"i1052":2,"i1053":2,"i1054":2,"i1055":2,"i1056":2,"i1057":2,"i1058":2,"i1059":2,"i1060":2,"i1061":2,"i1062":2,"i1063":2,"i1064":2,"i1065":2,"i1066":2,"i1067":2,"i1068":2,"i1069":1,"i1070":2,"i1071":2,"i1072":1,"i1073":1,"i1074":1,"i1075":1,"i1076":1,"i1077":1,"i1078":1,"i1079":1,"i1080":1,"i1081":2,"i1082":2,"i1083":1,"i1084":2,"i1085":2,"i1086":2,"i1087":2,"i1088":2,"i1089":2,"i1090":2,"i1091":2,"i1092":2,"i1093":1,"i1094":1,"i1095":2,"i1096":2,"i1097":2,"i1098":2,"i1099":2,"i1100":8,"i1101":2,"i1102":2,"i1103":2,"i1104":2,"i1105":2,"i1106":2,"i1107":2,"i1108":2,"i1109":2,"i1110":2,"i1111":2,"i1112":1,"i1113":1,"i1114":1,"i1115":2,"i1116":1,"i1117":1,"i1118":32,"i1119":2,"i1120":1,"i1121":1,"i1122":8,"i1123":1,"i1124":2,"i1125":2,"i1126":2,"i1127":2,"i1128":32,"i1129":2,"i1130":2,"i1131":2,"i1132":2,"i1133":2,"i1134":1,"i1135":2,"i1136":2,"i1137":2,"i1138":2,"i1139":2,"i1140":2,"i1141":2,"i1142":32,"i1143":2,"i1144":32,"i1145":32,"i1146":2,"i1147":1,"i1148":2,"i1149":2,"i1150":2,"i1151":1,"i1152":1,"i1153":2,"i1154":2,"i1155":2,"i1156":2,"i1157":2,"i1158":2,"i1159":2,"i1160":1,"i1161":2,"i1162":1,"i1163":2,"i1164":2,"i1165":2,"i1166":2,"i1167":1,"i1168":2,"i1169":2,"i1170":32,"i1171":2,"i1172":2,"i1173":2,"i1174":1,"i1175":1,"i1176":2,"i1177":32,"i1178":2,"i1179":2,"i1180":1,"i1181":32,"i1182":2,"i1183":2,"i1184":1,"i1185":2,"i1186":2,"i1187":2,"i1188":2,"i1189":1,"i1190":2,"i1191":1,"i1192":2,"i1193":1,"i1194":2,"i1195":1,"i1196":8,"i1197":32,"i1198":2,"i1199":2,"i1200":2,"i1201":2,"i1202":2,"i1203":2,"i1204":1,"i1205":32,"i1206":2,"i1207":2,"i1208":32,"i1209":1,"i1210":2,"i1211":2,"i1212":1,"i1213":32,"i1214":2,"i1215":2,"i1216":2,"i1217":2,"i1218":2,"i1219":8,"i1220":32,"i1221":8,"i1222":8,"i1223":32,"i1224":2,"i1225":2,"i1226":2,"i1227":2,"i1228":2,"i1229":2,"i1230":2,"i1231":2,"i1232":1,"i1233":2,"i1234":32,"i1235":2,"i1236":1,"i1237":2,"i1238":1,"i1239":2,"i1240":2,"i1241":2,"i1242":2,"i1243":2,"i1244":2,"i1245":2,"i1246":2,"i1247":2,"i1248":2,"i1249":8,"i1250":2,"i1251":2,"i1252":2,"i1253":2,"i1254":2,"i1255":2,"i1256":2,"i1257":32,"i1258":32,"i1259":2,"i1260":2,"i1261":2,"i1262":2,"i1263":2,"i1264":2,"i1265":2,"i1266":2,"i1267":2,"i1268":1,"i1269":2}; var tabs = {65535:["t0","All Classes"],1:["t1","Interface Summary"],2:["t2","Class Summary"],8:["t4","Exception Summary"],32:["t6","Annotation Types Summary"]}; var altColor = "altColor"; var rowColor = "rowColor"; @@ -1556,706 +1556,718 @@

All Classes

+
ConcatenatingMediaSource2 + +
Concatenates multiple MediaSources, combining everything in one single Timeline.Window.
+ + + +ConcatenatingMediaSource2.Builder + +
A builder for ConcatenatingMediaSource2 instances.
+ + + ConditionVariable
An interruptible condition variable.
- + ConstantBitrateSeekMap
A SeekMap implementation that assumes the stream has a constant bitrate and consists of multiple independent frames of the same size.
- + Consumer<T>
Represents an operation that accepts a single input argument and returns no result.
- + ContainerMediaChunk
A BaseMediaChunk that uses an Extractor to decode sample data.
- + ContentDataSource
A DataSource for reading from a content URI.
- + ContentDataSource.ContentDataSourceException
Thrown when an IOException is encountered reading from a content URI.
- + ContentMetadata
Interface for an immutable snapshot of keyed metadata.
- + ContentMetadataMutations
Defines multiple mutations on metadata value which are applied atomically.
- + Contrast
A GlEffect to control the contrast of video frames.
- + CopyOnWriteMultiset<E>
An unordered collection of elements that allows duplicates, but also allows access to a set of unique elements.
- + CronetDataSource
DataSource without intermediate buffer based on Cronet API set using UrlRequest.
- + CronetDataSource.Factory - + CronetDataSource.OpenException
Thrown when an error is encountered when trying to open a CronetDataSource.
- + CronetDataSourceFactory Deprecated. - + CronetEngineWrapper Deprecated.
Use CronetEngine directly.
- + CronetUtil
Cronet utility methods.
- + Crop
Specifies a crop to apply in the vertex shader.
- + CryptoConfig
Configuration for a decoder to allow it to decode encrypted media data.
- + CryptoException
Thrown when a non-platform component fails to decrypt data.
- + CryptoInfo
Metadata describing the structure of an encrypted input sample.
- + Cue
Contains information about a specific cue, including textual content and formatting data.
- + Cue.AnchorType
The type of anchor, which may be unset.
- + Cue.Builder
A builder for Cue objects.
- + Cue.LineType
The type of line, which may be unset.
- + Cue.TextSizeType
The type of default text size for this cue, which may be unset.
- + Cue.VerticalType
The type of vertical layout for this cue, which may be unset (i.e.
- + CueDecoder
Decodes data encoded by CueEncoder.
- + CueEncoder
Encodes data that can be decoded by CueDecoder.
- + CueGroup
Class to represent the state of active Cues at a particular time.
- + DashChunkSource
A ChunkSource for DASH streams.
- + DashChunkSource.Factory
Factory for DashChunkSources.
- + DashDownloader
A downloader for DASH streams.
- + DashManifest
Represents a DASH media presentation description (mpd), as defined by ISO/IEC 23009-1:2014 Section 5.3.1.2.
- + DashManifestParser
A parser of media presentation description files.
- + DashManifestParser.RepresentationInfo
A parsed Representation element.
- + DashManifestStaleException
Thrown when a live playback's manifest is stale and a new manifest could not be loaded.
- + DashMediaSource
A DASH MediaSource.
- + DashMediaSource.Factory
Factory for DashMediaSources.
- + DashSegmentIndex
Indexes the segments within a media stream.
- + DashUtil
Utility methods for DASH streams.
- + DashWrappingSegmentIndex
An implementation of DashSegmentIndex that wraps a ChunkIndex parsed from a media stream.
- + DatabaseIOException
An IOException whose cause is an SQLException.
- + DatabaseProvider
Provides SQLiteDatabase instances to media library components, which may read and write tables prefixed with DatabaseProvider.TABLE_PREFIX.
- + DataChunk
A base class for Chunk implementations where the data should be loaded into a byte[] before being consumed.
- + DataReader
Reads bytes from a data stream.
- + DataSchemeDataSource
A DataSource for reading data URLs, as defined by RFC 2397.
- + DataSink
A component to which streams of data can be written.
- + DataSink.Factory
A factory for DataSink instances.
- + DataSource
Reads data from URI-identified resources.
- + DataSource.Factory
A factory for DataSource instances.
- + DataSourceContractTest
A collection of contract tests for DataSource implementations.
- + DataSourceContractTest.FakeTransferListener
A TransferListener that only keeps track of the transferred bytes.
- + DataSourceContractTest.TestResource
Information about a resource that can be used to test the DataSource instance.
- + DataSourceContractTest.TestResource.Builder - + DataSourceException
Used to specify reason of a DataSource error.
- + DataSourceInputStream
Allows data corresponding to a given DataSpec to be read from a DataSource and consumed through an InputStream.
- + DataSourceUtil
Utility methods for DataSource.
- + DataSpec
Defines a region of data in a resource.
- + DataSpec.Builder
Builds DataSpec instances.
- + DataSpec.Flags
The flags that apply to any request for data.
- + DataSpec.HttpMethod
HTTP methods supported by ExoPlayer HttpDataSources.
- + DebugTextViewHelper
A helper class for periodically updating a TextView with debug information obtained from an ExoPlayer.
- + DebugViewProvider
Provider for views to show diagnostic information during a transformation, for debugging.
- + DecodeOneFrameUtil
Utilities for decoding a frame for tests.
- + DecodeOneFrameUtil.Listener
Listener for decoding events.
- + Decoder<I,​O,​E extends DecoderException>
A media decoder.
- + DecoderAudioRenderer<T extends Decoder<DecoderInputBuffer,​? extends SimpleDecoderOutputBuffer,​? extends DecoderException>>
Decodes and renders audio using a Decoder.
- + DecoderCounters
Maintains decoder event counts, for debugging purposes only.
- + DecoderCountersUtil
Assertions for DecoderCounters.
- + DecoderException
Thrown when a Decoder error occurs.
- + DecoderInputBuffer
Holds input for a decoder.
- + DecoderInputBuffer.BufferReplacementMode
The buffer replacement mode.
- + DecoderInputBuffer.InsufficientCapacityException
Thrown when an attempt is made to write into a DecoderInputBuffer whose DecoderInputBuffer.bufferReplacementMode is DecoderInputBuffer.BUFFER_REPLACEMENT_MODE_DISABLED and who DecoderInputBuffer.data capacity is smaller than required.
- + DecoderOutputBuffer
Output buffer decoded by a Decoder.
- + DecoderOutputBuffer.Owner<S extends DecoderOutputBuffer>
Buffer owner.
- + DecoderReuseEvaluation
The result of an evaluation to determine whether a decoder can be reused for a new input format.
- + DecoderReuseEvaluation.DecoderDiscardReasons
Possible reasons why reuse is not possible.
- + DecoderReuseEvaluation.DecoderReuseResult
Possible outcomes of the evaluation.
- + DecoderVideoRenderer
Decodes and renders video using a Decoder.
- + DefaultAllocator
Default implementation of Allocator.
- + DefaultAnalyticsCollector
Data collector that forwards analytics events to AnalyticsListeners.
- + DefaultAudioSink
Plays audio data.
- + DefaultAudioSink.AudioProcessorChain Deprecated. - + DefaultAudioSink.AudioTrackBufferSizeProvider
Provides the buffer size to use when creating an AudioTrack.
- + DefaultAudioSink.Builder
A builder to create DefaultAudioSink instances.
- + DefaultAudioSink.DefaultAudioProcessorChain
The default audio processor chain, which applies a (possibly empty) chain of user-defined audio processors followed by SilenceSkippingAudioProcessor and SonicAudioProcessor.
- + DefaultAudioSink.InvalidAudioTrackTimestampException
Thrown when the audio track has provided a spurious timestamp, if DefaultAudioSink.failOnSpuriousAudioTimestamp is set.
- + DefaultAudioSink.OffloadMode
Audio offload mode configuration.
- + DefaultAudioSink.OutputMode
Output mode of the audio sink.
- + DefaultAudioTrackBufferSizeProvider
Provide the buffer size to use when creating an AudioTrack.
- + DefaultAudioTrackBufferSizeProvider.Builder
A builder to create DefaultAudioTrackBufferSizeProvider instances.
- + DefaultBandwidthMeter
Estimates bandwidth by listening to data transfers.
- + DefaultBandwidthMeter.Builder
Builder for a bandwidth meter.
- + DefaultCastOptionsProvider
A convenience OptionsProvider to target the default cast receiver app.
- + DefaultCodec
A default Codec implementation that uses MediaCodec.
- + DefaultCompositeSequenceableLoaderFactory
Default implementation of CompositeSequenceableLoaderFactory.
- + DefaultContentMetadata
Default implementation of ContentMetadata.
- + DefaultDashChunkSource
A default DashChunkSource implementation.
- + DefaultDashChunkSource.Factory   - + DefaultDashChunkSource.RepresentationHolder
Holds information about a snapshot of a single Representation.
- + DefaultDashChunkSource.RepresentationSegmentIterator - + DefaultDatabaseProvider
A DatabaseProvider that provides instances obtained from a SQLiteOpenHelper.
- + DefaultDataSource
A DataSource that supports multiple URI schemes.
- + DefaultDataSource.Factory - + DefaultDataSourceFactory Deprecated. - + DefaultDownloaderFactory
Default DownloaderFactory, supporting creation of progressive, DASH, HLS and SmoothStreaming downloaders.
- + DefaultDownloadIndex
A DownloadIndex that uses SQLite to persist Downloads.
- + DefaultDrmSessionManager
A DrmSessionManager that supports playbacks using ExoMediaDrm.
- + DefaultDrmSessionManager.Builder
Builder for DefaultDrmSessionManager instances.
- + DefaultDrmSessionManager.MissingSchemeDataException - + DefaultDrmSessionManager.Mode
Determines the action to be done after a session acquired.
- + DefaultDrmSessionManagerProvider
Default implementation of DrmSessionManagerProvider.
- + DefaultEncoderFactory
A default implementation of Codec.EncoderFactory.
- + DefaultEncoderFactory.Builder
A builder for DefaultEncoderFactory instances.
- + DefaultExtractorInput
An ExtractorInput that wraps a DataReader.
- + DefaultExtractorsFactory
An ExtractorsFactory that provides an array of extractors for the following formats: @@ -2280,1851 +2292,1851 @@

All Classes

com.google.android.exoplayer2.ext.flac.FlacExtractor is used.
- + DefaultHlsDataSourceFactory
Default implementation of HlsDataSourceFactory.
- + DefaultHlsExtractorFactory
Default HlsExtractorFactory implementation.
- + DefaultHlsPlaylistParserFactory
Default implementation for HlsPlaylistParserFactory.
- + DefaultHlsPlaylistTracker
Default implementation for HlsPlaylistTracker.
- + DefaultHttpDataSource
An HttpDataSource that uses Android's HttpURLConnection.
- + DefaultHttpDataSource.Factory - + DefaultLivePlaybackSpeedControl
A LivePlaybackSpeedControl that adjusts the playback speed using a proportional controller.
- + DefaultLivePlaybackSpeedControl.Builder - + DefaultLoadControl
The default LoadControl implementation.
- + DefaultLoadControl.Builder
Builder for DefaultLoadControl.
- + DefaultLoadErrorHandlingPolicy
Default implementation of LoadErrorHandlingPolicy.
- + DefaultMediaCodecAdapterFactory - + DefaultMediaDescriptionAdapter - + DefaultMediaItemConverter
Default MediaItemConverter implementation.
- + DefaultMediaItemConverter
Default implementation of MediaItemConverter.
- + DefaultMediaSourceFactory
The default MediaSource.Factory implementation.
- + DefaultMediaSourceFactory.AdsLoaderProvider Deprecated.
Use AdsLoader.Provider instead.
- + DefaultMuxer
A default Muxer implementation.
- + DefaultMuxer.Factory - + DefaultPlaybackSessionManager
Default PlaybackSessionManager which instantiates a new session for each window in the timeline and also for each ad within the windows.
- + DefaultRenderersFactory
Default RenderersFactory implementation.
- + DefaultRenderersFactory.ExtensionRendererMode
Modes for using extension renderers.
- + DefaultRenderersFactoryAsserts
Assertions for DefaultRenderersFactory.
- + DefaultRtpPayloadReaderFactory
Default RtpPayloadReader.Factory implementation.
- + DefaultSsChunkSource
A default SsChunkSource implementation.
- + DefaultSsChunkSource.Factory   - + DefaultTimeBar
A time bar that shows a current position, buffered position, duration and ad markers.
- + DefaultTrackNameProvider - + DefaultTrackSelector
A default TrackSelector suitable for most use cases.
- + DefaultTrackSelector.Parameters
Extends DefaultTrackSelector.Parameters by adding fields that are specific to DefaultTrackSelector.
- + DefaultTrackSelector.Parameters.Builder - + DefaultTrackSelector.ParametersBuilder Deprecated. - + DefaultTrackSelector.SelectionEligibility
The extent to which tracks are eligible for selection.
- + DefaultTrackSelector.SelectionOverride
A track selection override.
- + DefaultTsPayloadReaderFactory
Default TsPayloadReader.Factory implementation.
- + DefaultTsPayloadReaderFactory.Flags
Flags controlling elementary stream readers' behavior.
- + Descriptor
A descriptor, as defined by ISO 23009-1, 2nd edition, 5.8.2.
- + DeviceInfo
Information about the playback device.
- + DeviceInfo.PlaybackType
Types of playback.
- + DeviceMappedEncoderBitrateProvider
Provides encoder bitrates that should target 0.95 SSIM or higher, accounting for device used.
- + DolbyVisionConfig
Dolby Vision configuration data.
- + Download
Represents state of a download.
- + Download.FailureReason
Failure reasons.
- + Download.State
Download states.
- + DownloadBuilder
Builder for Download.
- + DownloadCursor
Provides random read-write access to the result set returned by a database query.
- + Downloader
Downloads and removes a piece of content.
- + Downloader.ProgressListener
Receives progress updates during download operations.
- + DownloaderFactory
Creates Downloaders for given DownloadRequests.
- + DownloadException
Thrown on an error during downloading.
- + DownloadHelper
A helper for initializing and removing downloads.
- + DownloadHelper.Callback
A callback to be notified when the DownloadHelper is prepared.
- + DownloadHelper.LiveContentUnsupportedException
Thrown at an attempt to download live content.
- + DownloadIndex
An index of Downloads.
- + DownloadManager
Manages downloads.
- + DownloadManager.Listener
Listener for DownloadManager events.
- + DownloadNotificationHelper
Helper for creating download notifications.
- + DownloadProgress
Mutable Download progress.
- + DownloadRequest
Defines content to be downloaded.
- + DownloadRequest.Builder
A builder for download requests.
- + DownloadRequest.UnsupportedRequestException
Thrown when the encoded request data belongs to an unsupported request type.
- + DownloadService
A Service for downloading media.
- + DrmInitData
Initialization data for one or more DRM schemes.
- + DrmInitData.SchemeData
Scheme initialization data.
- + DrmSession
A DRM session.
- + DrmSession.DrmSessionException
Wraps the throwable which is the cause of the error state.
- + DrmSession.State
The state of the DRM session.
- + DrmSessionEventListener
Listener of DrmSessionManager events.
- + DrmSessionEventListener.EventDispatcher
Dispatches events to DrmSessionEventListeners.
- + DrmSessionManager
Manages a DRM session.
- + DrmSessionManager.DrmSessionReference
Represents a single reference count of a DrmSession, while deliberately not giving access to the underlying session.
- + DrmSessionManagerProvider
A provider to obtain a DrmSessionManager suitable for playing the content described by a MediaItem.
- + DrmUtil
DRM-related utility methods.
- + DrmUtil.ErrorSource
Identifies the operation which caused a DRM-related error.
- + DtsReader
Parses a continuous DTS byte stream and extracts individual samples.
- + DtsUtil
Utility methods for parsing DTS frames.
- + DummyExoMediaDrm
An ExoMediaDrm that does not support any protection schemes.
- + DummyExtractorOutput
A fake ExtractorOutput implementation.
- + DummyMainThread
Helper class to simulate main/UI thread in tests.
- + DummyMainThread.TestRunnable
Runnable variant which can throw a checked exception.
- + DummyTrackOutput
A fake TrackOutput implementation.
- + DumpableFormat
Wraps a Format to allow dumping it.
- + Dumper
Helper utility to dump field values.
- + Dumper.Dumpable
Provides custom dump method.
- + DumpFileAsserts
Helper class to enable assertions based on golden-data dump files.
- + DvbDecoder
A SimpleSubtitleDecoder for DVB subtitles.
- + DvbSubtitleReader
Parses DVB subtitle data and extracts individual frames.
- + EbmlProcessor
Defines EBML element IDs/types and processes events.
- + EbmlProcessor.ElementType
EBML element types.
- + Effect
Marker interface for a video frame effect.
- + EGLSurfaceTexture
Generates a SurfaceTexture using EGL/GLES functions.
- + EGLSurfaceTexture.SecureMode
Secure mode to be used by the EGL surface and context.
- + EGLSurfaceTexture.TextureImageListener
Listener to be called when the texture image on SurfaceTexture has been updated.
- + ElementaryStreamReader
Extracts individual samples from an elementary media stream, preserving original order.
- + EmptySampleStream
An empty SampleStream.
- + EncoderBitrateProvider
Provides bitrates for encoders to use as a target.
- + EncoderSelector
Selector of MediaCodec encoder instances.
- + EncoderUtil
Utility methods for MediaCodec encoders.
- + ErrorMessageProvider<T extends Throwable>
Converts throwables into error codes and user readable error messages.
- + ErrorStateDrmSession
A DrmSession that's in a terminal error state.
- + EventLogger
Logs events from Player and other core components using Log.
- + EventMessage
An Event Message (emsg) as defined in ISO 23009-1.
- + EventMessageDecoder
Decodes data encoded by EventMessageEncoder.
- + EventMessageEncoder
Encodes data that can be decoded by EventMessageDecoder.
- + EventStream
A DASH in-MPD EventStream element, as defined by ISO/IEC 23009-1, 2nd edition, section 5.10.
- + ExoDatabaseProvider Deprecated. - + ExoHostedTest
A HostActivity.HostedTest for ExoPlayer playback tests.
- + ExoMediaDrm
Used to obtain keys for decrypting protected media streams.
- + ExoMediaDrm.AppManagedProvider
Provides an ExoMediaDrm instance owned by the app.
- + ExoMediaDrm.KeyRequest
Contains data used to request keys from a license server.
- + ExoMediaDrm.KeyRequest.RequestType
Key request types.
- + ExoMediaDrm.KeyStatus
Defines the status of a key.
- + ExoMediaDrm.OnEventListener
Called when a DRM event occurs.
- + ExoMediaDrm.OnExpirationUpdateListener
Called when a session expiration update occurs.
- + ExoMediaDrm.OnKeyStatusChangeListener
Called when the keys in a DRM session change state.
- + ExoMediaDrm.Provider
Provider for ExoMediaDrm instances.
- + ExoMediaDrm.ProvisionRequest
Contains data to request a certificate from a provisioning server.
- + ExoPlaybackException
Thrown when a non locally recoverable playback failure occurs.
- + ExoPlaybackException.Type
The type of source that produced the error.
- + ExoPlayer
An extensible media player that plays MediaSources.
- + ExoPlayer.AudioComponent Deprecated.
Use ExoPlayer, as the ExoPlayer.AudioComponent methods are defined by that interface.
- + ExoPlayer.AudioOffloadListener
A listener for audio offload events.
- + ExoPlayer.Builder
A builder for ExoPlayer instances.
- + ExoPlayer.DeviceComponent Deprecated.
Use Player, as the ExoPlayer.DeviceComponent methods are defined by that interface.
- + ExoPlayer.TextComponent Deprecated.
Use Player, as the ExoPlayer.TextComponent methods are defined by that interface.
- + ExoPlayer.VideoComponent Deprecated.
Use ExoPlayer, as the ExoPlayer.VideoComponent methods are defined by that interface.
- + ExoplayerCuesDecoder
A SubtitleDecoder that decodes subtitle samples of type MimeTypes.TEXT_EXOPLAYER_CUES
- + ExoPlayerLibraryInfo
Information about the media libraries.
- + ExoPlayerTestRunner
Helper class to run an ExoPlayer test.
- + ExoPlayerTestRunner.Builder
Builder to set-up an ExoPlayerTestRunner.
- + ExoTimeoutException
A timeout of an operation on the ExoPlayer playback thread.
- + ExoTimeoutException.TimeoutOperation
The operation which produced the timeout error.
- + ExoTrackSelection - + ExoTrackSelection.Definition
Contains of a subset of selected tracks belonging to a TrackGroup.
- + ExoTrackSelection.Factory
Factory for ExoTrackSelection instances.
- + Extractor
Extracts media data from a container format.
- + Extractor.ReadResult
Result values that can be returned by Extractor.read(ExtractorInput, PositionHolder).
- + ExtractorAsserts
Assertion methods for Extractor.
- + ExtractorAsserts.AssertionConfig
A config for the assertions made (e.g.
- + ExtractorAsserts.AssertionConfig.Builder
Builder for ExtractorAsserts.AssertionConfig instances.
- + ExtractorAsserts.ExtractorFactory
A factory for Extractor instances.
- + ExtractorAsserts.SimulationConfig
A config of different environments to simulate and extractor behaviours to test.
- + ExtractorInput
Provides data to be consumed by an Extractor.
- + ExtractorOutput
Receives stream level data extracted by an Extractor.
- + ExtractorsFactory
Factory for arrays of Extractor instances.
- + ExtractorUtil
Extractor related utility methods.
- + FailOnCloseDataSink
A DataSink that can simulate caching the bytes being written to it, and then failing to persist them when FailOnCloseDataSink.close() is called.
- + FailOnCloseDataSink.Factory
Factory to create a FailOnCloseDataSink.
- + FakeAdaptiveDataSet
Fake data set emulating the data of an adaptive media source.
- + FakeAdaptiveDataSet.Factory
Factory for FakeAdaptiveDataSets.
- + FakeAdaptiveDataSet.Iterator
MediaChunkIterator for the chunks defined by a fake adaptive data set.
- + FakeAdaptiveMediaPeriod
Fake MediaPeriod that provides tracks from the given TrackGroupArray.
- + FakeAdaptiveMediaSource
Fake MediaSource that provides a given timeline.
- + FakeAudioRenderer - + FakeChunkSource
Fake ChunkSource with adaptive media chunks of a given duration.
- + FakeChunkSource.Factory
Factory for a FakeChunkSource.
- + FakeClock
Fake Clock implementation that allows to advance the time manually to trigger pending timed messages.
- + FakeCryptoConfig - + FakeDataSet
Collection of FakeDataSet.FakeData to be served by a FakeDataSource.
- + FakeDataSet.FakeData
Container of fake data to be served by a FakeDataSource.
- + FakeDataSet.FakeData.Segment
A segment of FakeDataSet.FakeData.
- + FakeDataSource
A fake DataSource capable of simulating various scenarios.
- + FakeDataSource.Factory
Factory to create a FakeDataSource.
- + FakeExoMediaDrm
A fake implementation of ExoMediaDrm for use in tests.
- + FakeExoMediaDrm.Builder
Builder for FakeExoMediaDrm instances.
- + FakeExoMediaDrm.LicenseServer
An license server implementation to interact with FakeExoMediaDrm.
- + FakeExtractorInput
A fake ExtractorInput capable of simulating various scenarios.
- + FakeExtractorInput.Builder
Builder of FakeExtractorInput instances.
- + FakeExtractorInput.SimulatedIOException
Thrown when simulating an IOException.
- + FakeExtractorOutput - + FakeMediaChunk - + FakeMediaChunkIterator - + FakeMediaClockRenderer
Fake abstract Renderer which is also a MediaClock.
- + FakeMediaPeriod
Fake MediaPeriod that provides tracks from the given TrackGroupArray.
- + FakeMediaPeriod.TrackDataFactory
A factory to create the test data for a particular track.
- + FakeMediaSource
Fake MediaSource that provides a given timeline.
- + FakeMediaSource.InitialTimeline
A forwarding timeline to provide an initial timeline for fake multi window sources.
- + FakeMediaSourceFactory
Fake MediaSourceFactory that creates a FakeMediaSource.
- + FakeMetadataEntry - + FakeRenderer
Fake Renderer that supports any format with the matching track type.
- + FakeSampleStream
Fake SampleStream that outputs a given Format and any amount of items.
- + FakeSampleStream.FakeSampleStreamItem - + FakeShuffleOrder
Fake ShuffleOrder which returns a reverse order.
- + FakeTimeline
Fake Timeline which can be setup to return custom FakeTimeline.TimelineWindowDefinitions.
- + FakeTimeline.TimelineWindowDefinition
Definition used to define a FakeTimeline.
- + FakeTrackOutput
A fake TrackOutput.
- + FakeTrackOutput.Factory
Factory for FakeTrackOutput instances.
- + FakeTrackSelection
A fake ExoTrackSelection that only returns 1 fixed track, and allows querying the number of calls to its methods.
- + FakeTrackSelector - + FakeVideoRenderer - + FfmpegAudioRenderer
Decodes and renders audio using FFmpeg.
- + FfmpegDecoderException
Thrown when an FFmpeg decoder error occurs.
- + FfmpegLibrary
Configures and queries the underlying native library.
- + FileDataSource
A DataSource for reading local files.
- + FileDataSource.Factory - + FileDataSource.FileDataSourceException
Thrown when a FileDataSource encounters an error reading a file.
- + FileTypes
Defines common file type constants and helper methods.
- + FileTypes.Type
File types.
- + FilterableManifest<T>
A manifest that can generate copies of itself including only the streams specified by the given keys.
- + FilteringHlsPlaylistParserFactory
A HlsPlaylistParserFactory that includes only the streams identified by the given stream keys.
- + FilteringManifestParser<T extends FilterableManifest<T>>
A manifest parser that includes only the streams identified by the given stream keys.
- + FixedTrackSelection
A TrackSelection consisting of a single track.
- + FlacConstants
Defines constants used by the FLAC extractor.
- + FlacDecoder
Flac decoder.
- + FlacDecoderException
Thrown when an Flac decoder error occurs.
- + FlacExtractor
Facilitates the extraction of data from the FLAC container format.
- + FlacExtractor
Extracts data from FLAC container format.
- + FlacExtractor.Flags
Flags controlling the behavior of the extractor.
- + FlacExtractor.Flags
Flags controlling the behavior of the extractor.
- + FlacFrameReader
Reads and peeks FLAC frame elements according to the FLAC format specification.
- + FlacFrameReader.SampleNumberHolder
Holds a sample number.
- + FlacLibrary
Configures and queries the underlying native library.
- + FlacMetadataReader
Reads and peeks FLAC stream metadata elements according to the FLAC format specification.
- + FlacMetadataReader.FlacStreamMetadataHolder - + FlacSeekTableSeekMap
A SeekMap implementation for FLAC streams that contain a seek table.
- + FlacStreamMetadata
Holder for FLAC metadata.
- + FlacStreamMetadata.SeekTable
A FLAC seek table.
- + FlagSet
A set of integer flags.
- + FlagSet.Builder
A builder for FlagSet instances.
- + FlvExtractor
Extracts data from the FLV container format.
- + Format
Represents a media format.
- + Format.Builder
Builds Format instances.
- + FormatHolder
Holds a Format.
- + ForwardingAudioSink
An overridable AudioSink implementation forwarding all methods to another sink.
- + ForwardingExtractorInput
An overridable ExtractorInput implementation forwarding all methods to another input.
- + ForwardingPlayer -
A Player that forwards operations to another Player.
+
A Player that forwards method calls to another Player.
- + ForwardingTimeline
An overridable Timeline implementation forwarding all methods to another timeline.
- + FragmentedMp4Extractor
Extracts data from the FMP4 container format.
- + FragmentedMp4Extractor.Flags
Flags controlling the behavior of the extractor.
- + FrameInfo
Value class specifying information about a decoded video frame.
- + FrameProcessingException
Thrown when an exception occurs while applying effects to video frames.
- + FrameProcessor
Interface for a frame processor that applies changes to individual video frames.
- + FrameProcessor.Factory
A factory for FrameProcessor instances.
- + FrameProcessor.Listener
Listener for asynchronous frame processing events.
- + FrameworkCryptoConfig - + FrameworkMediaDrm
An ExoMediaDrm implementation that wraps the framework MediaDrm.
- + GaplessInfoHolder
Holder for gapless playback information.
- + Gav1Decoder
Gav1 decoder.
- + Gav1DecoderException
Thrown when a libgav1 decoder error occurs.
- + Gav1Library
Configures and queries the underlying native library.
- + GeobFrame
GEOB (General Encapsulated Object) ID3 frame.
- + GlEffect
Interface for a video frame effect with a GlTextureProcessor implementation.
- + GlEffectsFrameProcessor
A FrameProcessor implementation that applies GlEffect instances using OpenGL on a background thread.
- + GlEffectsFrameProcessor.Factory
A factory for GlEffectsFrameProcessor instances.
- + GlMatrixTransformation
Specifies a 4x4 transformation Matrix to apply in the vertex shader for each frame.
- + GlProgram
Represents a GLSL shader program.
- + GlTextureProcessor
Processes frames from one OpenGL 2D texture to another.
- + GlTextureProcessor.ErrorListener
Listener for frame processing errors.
- + GlTextureProcessor.InputListener
Listener for input-related frame processing events.
- + GlTextureProcessor.OutputListener
Listener for output-related frame processing events.
- + GlUtil
OpenGL ES utilities.
- + GlUtil.GlException
Thrown when an OpenGL error occurs.
- + H262Reader
Parses a continuous H262 byte stream and extracts individual frames.
- + H263Reader
Parses an ISO/IEC 14496-2 (MPEG-4 Part 2) or ITU-T Recommendation H.263 byte stream and extracts individual frames.
- + H264Reader
Parses a continuous H264 byte stream and extracts individual frames.
- + H265Reader
Parses a continuous H.265 byte stream and extracts individual frames.
- + HandlerWrapper
An interface to call through to a Handler.
- + HandlerWrapper.Message
A message obtained from the handler.
- + HeartRating
A rating expressed as "heart" or "no heart".
- + HevcConfig
HEVC configuration data.
- + HlsDataSourceFactory
Creates DataSources for HLS playlists, encryption and media chunks.
- + HlsDownloader
A downloader for HLS streams.
- + HlsExtractorFactory
Factory for HLS media chunk extractors.
- + HlsManifest
Holds a multivariant playlist along with a snapshot of one of its media playlists.
- + HlsMasterPlaylist Deprecated. - + HlsMediaChunkExtractor
Extracts samples and track Formats from HlsMediaChunks.
- + HlsMediaPeriod
A MediaPeriod that loads an HLS stream.
- + HlsMediaPlaylist
Represents an HLS media playlist.
- + HlsMediaPlaylist.Part
A media part.
- + HlsMediaPlaylist.PlaylistType
Type of the playlist, as defined by #EXT-X-PLAYLIST-TYPE.
- + HlsMediaPlaylist.RenditionReport
A rendition report for an alternative rendition defined in another media playlist.
- + HlsMediaPlaylist.Segment
Media segment reference.
- + HlsMediaPlaylist.SegmentBase
The base for a HlsMediaPlaylist.Segment or a HlsMediaPlaylist.Part required for playback.
- + HlsMediaPlaylist.ServerControl
Server control attributes.
- + HlsMediaSource
An HLS MediaSource.
- + HlsMediaSource.Factory
Factory for HlsMediaSources.
- + HlsMediaSource.MetadataType
The types of metadata that can be extracted from HLS streams.
- + HlsMultivariantPlaylist
Represents an HLS multivariant playlist.
- + HlsMultivariantPlaylist.Rendition
A rendition (i.e.
- + HlsMultivariantPlaylist.Variant
A variant (i.e.
- + HlsPlaylist
Represents an HLS playlist.
- + HlsPlaylistParser
HLS playlists parsing logic.
- + HlsPlaylistParser.DeltaUpdateException
Exception thrown when merging a delta update fails.
- + HlsPlaylistParserFactory
Factory for HlsPlaylist parsers.
- + HlsPlaylistTracker
Tracks playlists associated to an HLS stream and provides snapshots.
- + HlsPlaylistTracker.Factory
Factory for HlsPlaylistTracker instances.
- + HlsPlaylistTracker.PlaylistEventListener
Called on playlist loading events.
- + HlsPlaylistTracker.PlaylistResetException
Thrown when the media sequence of a new snapshot indicates the server has reset.
- + HlsPlaylistTracker.PlaylistStuckException
Thrown when a playlist is considered to be stuck due to a server side error.
- + HlsPlaylistTracker.PrimaryPlaylistListener
Listener for primary playlist changes.
- + HlsTrackMetadataEntry
Holds metadata associated to an HLS media track.
- + HlsTrackMetadataEntry.VariantInfo
Holds attributes defined in an EXT-X-STREAM-INF tag.
- + HorizontalTextInVerticalContextSpan
A styling span for horizontal text in a vertical context.
- + HostActivity
A host activity for performing playback tests.
- + HostActivity.HostedTest
Interface for tests that run inside of a HostActivity.
- + HslAdjustment
Adjusts the HSL (Hue, Saturation, and Lightness) of a frame.
- + HslAdjustment.Builder
A builder for HslAdjustment instances.
- + HttpDataSource
An HTTP DataSource.
- + HttpDataSource.BaseFactory
Base implementation of HttpDataSource.Factory that sets default request properties.
- + HttpDataSource.CleartextNotPermittedException
Thrown when cleartext HTTP traffic is not permitted.
- + HttpDataSource.Factory
A factory for HttpDataSource instances.
- + HttpDataSource.HttpDataSourceException
Thrown when an error is encountered when trying to read from a HttpDataSource.
- + HttpDataSource.HttpDataSourceException.Type
The type of operation that produced the error.
- + HttpDataSource.InvalidContentTypeException
Thrown when the content type is invalid.
- + HttpDataSource.InvalidResponseCodeException
Thrown when an attempt to open a connection results in a response code not in the 2xx range.
- + HttpDataSource.RequestProperties
Stores HTTP request properties (aka HTTP headers) and provides methods to modify the headers in @@ -4132,379 +4144,379 @@

All Classes

state.
- + HttpDataSourceTestEnv
A JUnit Rule that creates test resources for HttpDataSource contract tests.
- + HttpMediaDrmCallback
A MediaDrmCallback that makes requests using DataSource instances.
- + HttpUtil
Utility methods for HTTP.
- + IcyDecoder
Decodes ICY stream information.
- + IcyHeaders
ICY headers.
- + IcyInfo
ICY in-stream information.
- + Id3Decoder
Decodes ID3 tags.
- + Id3Decoder.FramePredicate
A predicate for determining whether individual frames should be decoded.
- + Id3Frame
Base class for ID3 frames.
- + Id3Peeker
Peeks data from the beginning of an ExtractorInput to determine if there is any ID3 tag.
- + Id3Reader
Parses ID3 data and extracts individual text information frames.
- + IllegalSeekPositionException
Thrown when an attempt is made to seek to a position that does not exist in the player's Timeline.
- + ImaAdsLoader
AdsLoader using the IMA SDK.
- + ImaAdsLoader.Builder
Builder for ImaAdsLoader.
- + ImaServerSideAdInsertionMediaSource
MediaSource for IMA server side inserted ad streams.
- + ImaServerSideAdInsertionMediaSource.AdsLoader
An ads loader for IMA server side ad insertion streams.
- + ImaServerSideAdInsertionMediaSource.AdsLoader.Builder - + ImaServerSideAdInsertionMediaSource.AdsLoader.State
The state of the ImaServerSideAdInsertionMediaSource.AdsLoader that can be used when resuming from the background.
- + ImaServerSideAdInsertionMediaSource.Factory - + ImaServerSideAdInsertionUriBuilder
Builder for URI for IMA DAI streams.
- + IndexSeekMap
A SeekMap implementation based on a mapping between times and positions in the input stream.
- + InitializationChunk
A Chunk that uses an Extractor to decode initialization data for single track.
- + InputReaderAdapterV30
MediaParser.SeekableInputReader implementation wrapping a DataReader.
- + InternalFrame
Internal ID3 frame that is intended for use by the player.
- + JpegExtractor
Extracts JPEG image using the Exif format.
- + KeysExpiredException
Thrown when the drm keys loaded into an open session expire.
- + LanguageFeatureSpan
Marker interface for span classes that carry language features rather than style information.
- + LatmReader
Parses and extracts samples from an AAC/LATM elementary stream.
- + LeanbackPlayerAdapter
Leanback PlayerAdapter implementation for Player.
- + LeastRecentlyUsedCacheEvictor
Evicts least recently used cache files first.
- + LegacyMediaPlayerWrapper
A Player wrapper for the legacy Android platform MediaPlayer.
- + LibflacAudioRenderer
Decodes and renders audio using the native Flac decoder.
- + Libgav1VideoRenderer
Decodes and renders video using libgav1 decoder.
- + LibopusAudioRenderer
Decodes and renders audio using the native Opus decoder.
- + LibraryLoader
Configurable loader for native libraries.
- + LibvpxVideoRenderer
Decodes and renders video using the native VP9 decoder.
- + ListenerSet<T extends @NonNull Object>
A set of listeners.
- + ListenerSet.Event<T>
An event sent to a listener.
- + ListenerSet.IterationFinishedEvent<T>
An event sent to a listener when all other events sent during one Looper message queue iteration were handled by the listener.
- + LivePlaybackSpeedControl
Controls the playback speed while playing live content in order to maintain a steady target live offset.
- + LoadControl
Controls buffering of media.
- + Loader
Manages the background loading of Loader.Loadables.
- + Loader.Callback<T extends Loader.Loadable>
A callback to be notified of Loader events.
- + Loader.Loadable
An object that can be loaded using a Loader.
- + Loader.LoadErrorAction - + Loader.ReleaseCallback
A callback to be notified when a Loader has finished being released.
- + Loader.UnexpectedLoaderException
Thrown when an unexpected exception or error is encountered during loading.
- + LoaderErrorThrower
Conditionally throws errors affecting a Loader.
- + LoaderErrorThrower.Dummy
A LoaderErrorThrower that never throws.
- + LoadErrorHandlingPolicy
A policy that defines how load errors are handled.
- + LoadErrorHandlingPolicy.FallbackOptions
Holds information about the available fallback options.
- + LoadErrorHandlingPolicy.FallbackSelection
A selected fallback option.
- + LoadErrorHandlingPolicy.FallbackType
Fallback type.
- + LoadErrorHandlingPolicy.LoadErrorInfo
Holds information about a load task error.
- + LoadEventInfo
MediaSource load event information.
- + LocalMediaDrmCallback
A MediaDrmCallback that provides a fixed response to key requests.
- + Log
Wrapper around Log which allows to set the log level and to specify a custom log output.
- + Log.Logger
Interface for a logger that can output messages with a tag.
- + Log.LogLevel
Log level for ExoPlayer logcat logging.
- + LongArray
An append-only, auto-growing long[].
- + LoopingMediaSource Deprecated.
To loop a MediaSource indefinitely, use Player.setRepeatMode(int) instead of this class.
- + MappingTrackSelector
Base class for TrackSelectors that first establish a mapping between TrackGroups @@ -4512,1184 +4524,1191 @@

All Classes

renderer.
- + MappingTrackSelector.MappedTrackInfo
Provides mapped track information for each renderer.
- + MappingTrackSelector.MappedTrackInfo.RendererSupport
Levels of renderer support.
- + MaskingMediaPeriod
Media period that defers calling MediaSource.createPeriod(MediaPeriodId, Allocator, long) on a given source until MaskingMediaPeriod.createPeriod(MediaPeriodId) has been called.
- + MaskingMediaPeriod.PrepareListener
Listener for preparation events.
- + MaskingMediaSource
A MediaSource that masks the Timeline with a placeholder until the actual media structure is known.
- + MaskingMediaSource.PlaceholderTimeline
A timeline with one dynamic window with a period of indeterminate duration.
- + MatrixTransformation
Specifies a 3x3 transformation Matrix to apply in the vertex shader for each frame.
- + MatroskaExtractor
Extracts data from the Matroska and WebM container formats.
- + MatroskaExtractor.Flags
Flags controlling the behavior of the extractor.
- + MatroskaExtractor.Track
Holds data corresponding to a single track.
- + MdtaMetadataEntry
Stores extensible metadata with handler type 'mdta'.
- + MediaChunk
An abstract base class for Chunks that contain media samples.
- + MediaChunkIterator
Iterator for media chunk sequences.
- + MediaClock
Tracks the progression of media time.
- + MediaCodecAdapter
Abstracts MediaCodec operations.
- + MediaCodecAdapter.Configuration
Configuration parameters for a MediaCodecAdapter.
- + MediaCodecAdapter.Factory
A factory for MediaCodecAdapter instances.
- + MediaCodecAdapter.OnFrameRenderedListener
Listener to be called when an output frame has rendered on the output surface.
- + MediaCodecAudioRenderer
Decodes and renders audio using MediaCodec and an AudioSink.
- + MediaCodecDecoderException
Thrown when a failure occurs in a MediaCodec decoder.
- + MediaCodecInfo
Information about a MediaCodec for a given mime type.
- + MediaCodecRenderer
An abstract renderer that uses MediaCodec to decode samples for rendering.
- + MediaCodecRenderer.DecoderInitializationException
Thrown when a failure occurs instantiating a decoder.
- + MediaCodecSelector
Selector of MediaCodec instances.
- + MediaCodecUtil
A utility class for querying the available codecs.
- + MediaCodecUtil.DecoderQueryException
Thrown when an error occurs querying the device for its underlying media capabilities.
- + MediaCodecVideoDecoderException
Thrown when a failure occurs in a MediaCodec video decoder.
- + MediaCodecVideoRenderer
Decodes and renders video using MediaCodec.
- + MediaCodecVideoRenderer.CodecMaxValues   - + MediaDrmCallback
Performs ExoMediaDrm key and provisioning requests.
- + MediaDrmCallbackException
Thrown when an error occurs while executing a DRM key or provisioning request.
- + MediaFormatUtil
Helper class containing utility methods for managing MediaFormat instances.
- + MediaItem
Representation of a media item.
- + MediaItem.AdsConfiguration
Configuration for playing back linear ads with a media item.
- + MediaItem.AdsConfiguration.Builder
Builder for MediaItem.AdsConfiguration instances.
- + MediaItem.Builder
A builder for MediaItem instances.
- + MediaItem.ClippingConfiguration
Optionally clips the media item to a custom start and end position.
- + MediaItem.ClippingConfiguration.Builder
Builder for MediaItem.ClippingConfiguration instances.
- + MediaItem.ClippingProperties Deprecated. - + MediaItem.DrmConfiguration
DRM configuration for a media item.
- + MediaItem.DrmConfiguration.Builder - + MediaItem.LiveConfiguration
Live playback configuration.
- + MediaItem.LiveConfiguration.Builder
Builder for MediaItem.LiveConfiguration instances.
- + MediaItem.LocalConfiguration
Properties for local playback.
- + MediaItem.PlaybackProperties Deprecated. - + MediaItem.RequestMetadata
Metadata that helps the player to understand a playback request represented by a MediaItem.
- + MediaItem.RequestMetadata.Builder
Builder for MediaItem.RequestMetadata instances.
- + MediaItem.Subtitle Deprecated. - + MediaItem.SubtitleConfiguration
Properties for a text track.
- + MediaItem.SubtitleConfiguration.Builder
Builder for MediaItem.SubtitleConfiguration instances.
- + MediaItemConverter
Converts between MediaItem and the Cast SDK's MediaQueueItem.
- + MediaItemConverter
Converts between Media2 MediaItem and ExoPlayer MediaItem.
- + MediaLoadData
Descriptor for data being loaded or selected by a MediaSource.
- + MediaMetadata
Metadata of a MediaItem, playlist, or a combination of multiple sources of Metadata.
- + MediaMetadata.Builder
A builder for MediaMetadata instances.
- + MediaMetadata.FolderType
The folder type of the media item.
- + +MediaMetadata.MediaType + +
The type of content described by the media item.
+ + + MediaMetadata.PictureType
The picture type of the artwork.
- + MediaMetricsListener
An AnalyticsListener that interacts with the Android MediaMetricsManager.
- + MediaParserChunkExtractor
ChunkExtractor implemented on top of the platform's MediaParser.
- + MediaParserExtractorAdapter
ProgressiveMediaExtractor implemented on top of the platform's MediaParser.
- + MediaParserHlsMediaChunkExtractor
HlsMediaChunkExtractor implemented on top of the platform's MediaParser.
- + MediaParserUtil
Miscellaneous constants and utility methods related to the MediaParser integration.
- + MediaPeriod
Loads media corresponding to a Timeline.Period, and allows that media to be read.
- + MediaPeriod.Callback
A callback to be notified of MediaPeriod events.
- + MediaPeriodAsserts
Assertion methods for MediaPeriod.
- + MediaPeriodAsserts.FilterableManifestMediaPeriodFactory<T extends FilterableManifest<T>>
Interface to create media periods for testing based on a FilterableManifest.
- + MediaPeriodId
Identifies a specific playback of a Timeline.Period.
- + MediaSessionConnector
Connects a MediaSessionCompat to a Player.
- + MediaSessionConnector.CaptionCallback
Handles requests for enabling or disabling captions.
- + MediaSessionConnector.CommandReceiver
Receiver of media commands sent by a media controller.
- + MediaSessionConnector.CustomActionProvider
Provides a PlaybackStateCompat.CustomAction to be published and handles the action when sent by a media controller.
- + MediaSessionConnector.DefaultMediaMetadataProvider
Provides a default MediaMetadataCompat with properties and extras taken from the MediaDescriptionCompat of the MediaSessionCompat.QueueItem of the active queue item.
- + MediaSessionConnector.MediaButtonEventHandler
Handles a media button event.
- + MediaSessionConnector.MediaMetadataProvider
Provides a MediaMetadataCompat for a given player state.
- + MediaSessionConnector.PlaybackActions
Playback actions supported by the connector.
- + MediaSessionConnector.PlaybackPreparer
Interface to which playback preparation and play actions are delegated.
- + MediaSessionConnector.QueueEditor
Handles media session queue edits.
- + MediaSessionConnector.QueueNavigator
Handles queue navigation actions, and updates the media session queue by calling MediaSessionCompat.setQueue().
- + MediaSessionConnector.RatingCallback
Callback receiving a user rating for the active media item.
- + MediaSource
Defines and provides media to be played by an ExoPlayer.
- + MediaSource.Factory
Factory for creating MediaSources from MediaItems.
- + MediaSource.MediaPeriodId
Identifier for a MediaPeriod.
- + MediaSource.MediaSourceCaller
A caller of media sources, which will be notified of source events.
- + MediaSourceEventListener
Interface for callbacks to be notified of MediaSource events.
- + MediaSourceEventListener.EventDispatcher
Dispatches events to MediaSourceEventListeners.
- + MediaSourceFactory Deprecated. - + MediaSourceTestRunner
A runner for MediaSource tests.
- + MergingMediaSource
Merges multiple MediaSources.
- + MergingMediaSource.IllegalMergeException
Thrown when a MergingMediaSource cannot merge its sources.
- + MergingMediaSource.IllegalMergeException.Reason
The reason the merge failed.
- + Metadata
A collection of metadata entries.
- + Metadata.Entry
A metadata entry.
- + MetadataDecoder
Decodes metadata from binary data.
- + MetadataDecoderFactory
A factory for MetadataDecoder instances.
- + MetadataInputBuffer - + MetadataOutput
Receives metadata output.
- + MetadataRenderer
A renderer for metadata.
- + MetadataRetriever
Retrieves the static metadata of MediaItems.
- + MimeTypes
Defines common MIME types and helper methods.
- + MlltFrame
MPEG location lookup table frame.
- + MotionPhotoMetadata
Metadata of a motion photo file.
- + Mp3Extractor
Extracts data from the MP3 container format.
- + Mp3Extractor.Flags
Flags controlling the behavior of the extractor.
- + Mp4Extractor
Extracts data from the MP4 container format.
- + Mp4Extractor.Flags
Flags controlling the behavior of the extractor.
- + Mp4WebvttDecoder
A SimpleSubtitleDecoder for Webvtt embedded in a Mp4 container file.
- + MpegAudioReader
Parses a continuous MPEG Audio byte stream and extracts individual frames.
- + MpegAudioUtil
Utility methods for handling MPEG audio streams.
- + MpegAudioUtil.Header
Stores the metadata for an MPEG audio frame.
- + Muxer
Abstracts media muxing operations.
- + Muxer.Factory
Factory for muxers.
- + Muxer.MuxerException
Thrown when a muxing failure occurs.
- + NalUnitUtil
Utility methods for handling H.264/AVC and H.265/HEVC NAL units.
- + NalUnitUtil.H265SpsData
Holds data parsed from a H.265 sequence parameter set NAL unit.
- + NalUnitUtil.PpsData
Holds data parsed from a picture parameter set NAL unit.
- + NalUnitUtil.SpsData
Holds data parsed from a H.264 sequence parameter set NAL unit.
- + NetworkTypeObserver
Observer for network type changes.
- + NetworkTypeObserver.Listener
A listener for network type changes.
- + NonNullApi
Annotation to declare all type usages in the annotated instance as Nonnull, unless explicitly marked with a nullable annotation.
- + NoOpCacheEvictor
Evictor that doesn't ever evict cache files.
- + NoSampleRenderer
A Renderer implementation whose track type is C.TRACK_TYPE_NONE and does not consume data from its SampleStream.
- + NotificationUtil
Utility methods for displaying Notifications.
- + NotificationUtil.Importance
Notification channel importance levels.
- + OfflineLicenseHelper
Helper class to download, renew and release offline licenses.
- + OggExtractor
Extracts data from the Ogg container format.
- + OkHttpDataSource
An HttpDataSource that delegates to Square's Call.Factory.
- + OkHttpDataSource.Factory - + OkHttpDataSourceFactory Deprecated. - + OpusDecoder
Opus decoder.
- + OpusDecoderException
Thrown when an Opus decoder error occurs.
- + OpusLibrary
Configures and queries the underlying native library.
- + OpusUtil
Utility methods for handling Opus audio streams.
- + OutputConsumerAdapterV30
MediaParser.OutputConsumer implementation that redirects output to an ExtractorOutput.
- + ParsableBitArray
Wraps a byte array, providing methods that allow it to be read as a bitstream.
- + ParsableByteArray
Wraps a byte array, providing a set of methods for parsing data from it.
- + ParsableNalUnitBitArray
Wraps a byte array, providing methods that allow it to be read as a NAL unit bitstream.
- + ParserException
Thrown when an error occurs parsing media data and metadata.
- + ParsingLoadable<T>
A Loader.Loadable for objects that can be parsed from binary data using a ParsingLoadable.Parser.
- + ParsingLoadable.Parser<T>
Parses an object from loaded data.
- + PassthroughSectionPayloadReader
A SectionPayloadReader that directly outputs the section bytes as sample data.
- + PercentageRating
A rating expressed as a percentage.
- + Period
Encapsulates media content components over a contiguous period of time.
- + PesReader
Parses PES packet data and extracts samples.
- + PgsDecoder
A SimpleSubtitleDecoder for PGS subtitles.
- + PictureFrame
A picture parsed from a Vorbis Comment or a FLAC picture block.
- + PlaceholderDataSource
A DataSource which provides no data.
- + PlaceholderSurface
A placeholder Surface.
- + PlatformScheduler
A Scheduler that uses JobScheduler.
- + PlatformScheduler.PlatformSchedulerService
A JobService that starts the target service if the requirements are met.
- + PlaybackException
Thrown when a non locally recoverable playback failure occurs.
- + PlaybackException.ErrorCode
Codes that identify causes of player errors.
- + PlaybackOutput
Class to capture output from a playback test.
- + PlaybackParameters
Parameters that apply to playback, including speed setting.
- + PlaybackSessionManager
Manager for active playback sessions.
- + PlaybackSessionManager.Listener
A listener for session updates.
- + PlaybackStats
Statistics about playbacks.
- + PlaybackStats.EventTimeAndException
Stores an exception with the event time at which it occurred.
- + PlaybackStats.EventTimeAndFormat
Stores a format with the event time at which it started being used, or null to indicate that no format was used.
- + PlaybackStats.EventTimeAndPlaybackState
Stores a playback state with the event time at which it became active.
- + PlaybackStatsListener
AnalyticsListener to gather PlaybackStats from the player.
- + PlaybackStatsListener.Callback
A listener for PlaybackStats updates.
- + Player
A media player interface defining traditional high-level functionality, such as the ability to play, pause, seek and query properties of the currently playing media.
- + Player.Command -
Commands that can be executed on a Player.
+
Commands that indicate which method calls are currently permitted on a particular + Player instance.
- + Player.Commands -
A set of commands.
+
A set of commands.
- + Player.Commands.Builder
A builder for Player.Commands instances.
- + Player.DiscontinuityReason
Reasons for position discontinuities.
- + Player.Event
Events that can be reported via Player.Listener.onEvents(Player, Events).
- + Player.Events -
A set of events.
+
A set of events.
- + Player.Listener -
Listener of all changes in the Player.
+
Listener for changes in a Player.
- + Player.MediaItemTransitionReason
Reasons for media item transitions.
- + Player.PlaybackSuppressionReason
Reason why playback is suppressed even though Player.getPlayWhenReady() is true.
- + Player.PlayWhenReadyChangeReason
Reasons for playWhenReady changes.
- + Player.PositionInfo
Position info describing a playback position involved in a discontinuity.
- + Player.RepeatMode
Repeat modes for playback.
- + Player.State
Playback state.
- + Player.TimelineChangeReason
Reasons for timeline changes.
- + PlayerControlView
A view for controlling Player instances.
- + PlayerControlView.ProgressUpdateListener
Listener to be notified when progress has been updated.
- + PlayerControlView.VisibilityListener
Listener to be notified about changes of the visibility of the UI control.
- + PlayerEmsgHandler
Handles all emsg messages from all media tracks for the player.
- + PlayerEmsgHandler.PlayerEmsgCallback
Callbacks for player emsg events encountered during DASH live stream.
- + PlayerId
Identifier for a player instance.
- + PlayerMessage
Defines a player message which can be sent with a PlayerMessage.Sender and received by a PlayerMessage.Target.
- + PlayerMessage.Sender
A sender for messages.
- + PlayerMessage.Target
A target for messages.
- + PlayerNotificationManager
Starts, updates and cancels a media style notification reflecting the player state.
- + PlayerNotificationManager.Builder
A builder for PlayerNotificationManager instances.
- + PlayerNotificationManager.CustomActionReceiver
Defines and handles custom actions.
- + PlayerNotificationManager.MediaDescriptionAdapter
An adapter to provide content assets of the media currently playing.
- + PlayerNotificationManager.NotificationListener
A listener for changes to the notification.
- + PlayerNotificationManager.Priority
Priority of the notification (required for API 25 and lower).
- + PlayerNotificationManager.Visibility
Visibility of notification on the lock screen.
- + PlayerView Deprecated.
Use StyledPlayerView instead.
- + PlayerView.ShowBuffering
Determines when the buffering view is shown.
- + PositionHolder
Holds a position in the stream.
- + Presentation
Controls how a frame is presented with options to set the output resolution and choose how to map @@ -5697,646 +5716,646 @@

All Classes

match the specified output frame, or fitting the input frame using letterboxing).
- + Presentation.Layout
Strategies controlling the layout of input pixels in the output frame.
- + PriorityDataSource
A DataSource that can be used as part of a task registered with a PriorityTaskManager.
- + PriorityDataSource.Factory - + PriorityDataSourceFactory Deprecated. - + PriorityTaskManager
Allows tasks with associated priorities to control how they proceed relative to one another.
- + PriorityTaskManager.PriorityTooLowException
Thrown when task attempts to proceed when another registered task has a higher priority.
- + PrivateCommand
Represents a private command as defined in SCTE35, Section 9.3.6.
- + PrivFrame
PRIV (Private) ID3 frame.
- + ProgramInformation
A parsed program information element.
- + ProgressHolder
Holds a progress percentage.
- + ProgressiveDownloader
A downloader for progressive media streams.
- + ProgressiveMediaExtractor
Extracts the contents of a container file from a progressive media stream.
- + ProgressiveMediaExtractor.Factory
Creates ProgressiveMediaExtractor instances.
- + ProgressiveMediaSource
Provides one period that loads data from a Uri and extracted using an Extractor.
- + ProgressiveMediaSource.Factory - + PsExtractor
Extracts data from the MPEG-2 PS container format.
- + PsshAtomUtil
Utility methods for handling PSSH atoms.
- + RandomizedMp3Decoder
Generates randomized, but correct amount of data on MP3 audio input.
- + RandomTrackSelection
An ExoTrackSelection whose selected track is updated randomly.
- + RandomTrackSelection.Factory
Factory for RandomTrackSelection instances.
- + RangedUri
Defines a range of data located at a reference uri.
- + Rating
A rating for media content.
- + RawResourceDataSource
A DataSource for reading a raw resource inside the APK.
- + RawResourceDataSource.RawResourceDataSourceException
Thrown when an IOException is encountered reading from a raw resource.
- + Renderer
Renders media read from a SampleStream.
- + Renderer.MessageType
Represents a type of message that can be passed to a renderer.
- + Renderer.State
The renderer states.
- + Renderer.WakeupListener
Some renderers can signal when Renderer.render(long, long) should be called.
- + RendererCapabilities
Defines the capabilities of a Renderer.
- + RendererCapabilities.AdaptiveSupport
Level of renderer support for adaptive format switches.
- + RendererCapabilities.Capabilities
Combined renderer capabilities.
- + RendererCapabilities.DecoderSupport
Level of decoder support.
- + RendererCapabilities.FormatSupport Deprecated.
Use C.FormatSupport instead.
- + RendererCapabilities.HardwareAccelerationSupport
Level of renderer support for hardware acceleration.
- + RendererCapabilities.TunnelingSupport
Level of renderer support for tunneling.
- + RendererConfiguration
The configuration of a Renderer.
- + RenderersFactory
Builds Renderer instances for use by an ExoPlayer.
- + RepeatModeActionProvider
Provides a custom action for toggling repeat modes.
- + RepeatModeUtil
Util class for repeat mode handling.
- + RepeatModeUtil.RepeatToggleModes
Set of repeat toggle modes.
- + Representation
A DASH representation.
- + Representation.MultiSegmentRepresentation
A DASH representation consisting of multiple segments.
- + Representation.SingleSegmentRepresentation
A DASH representation consisting of a single segment.
- + Requirements
Defines a set of device state requirements.
- + Requirements.RequirementFlags
Requirement flags.
- + RequirementsWatcher
Watches whether the Requirements are met and notifies the RequirementsWatcher.Listener on changes.
- + RequirementsWatcher.Listener
Notified when RequirementsWatcher instance first created and on changes whether the Requirements are met.
- + ResolvingDataSource
DataSource wrapper allowing just-in-time resolution of DataSpecs.
- + ResolvingDataSource.Factory - + ResolvingDataSource.Resolver
Resolves DataSpecs.
- + RgbAdjustment
Scales the red, green, and blue color channels of a frame.
- + RgbAdjustment.Builder
A builder for RgbAdjustment instances.
- + RgbFilter
Provides common color filters.
- + RgbMatrix
Specifies a 4x4 RGB color transformation matrix to apply to each frame in the fragment shader.
- + RobolectricUtil
Utility methods for Robolectric-based tests.
- + RtmpDataSource
A Real-Time Messaging Protocol (RTMP) DataSource.
- + RtmpDataSource.Factory - + RtmpDataSourceFactory Deprecated. - + RtpAc3Reader
Parses an AC3 byte stream carried on RTP packets, and extracts AC3 frames.
- + RtpPacket
Represents the header and the payload of an RTP packet.
- + RtpPacket.Builder
Builder class for an RtpPacket
- + RtpPayloadFormat
Represents the payload format used in RTP.
- + RtpPayloadReader
Extracts media samples from the payload of received RTP packets.
- + RtpPayloadReader.Factory
Factory of RtpPayloadReader instances.
- + RtpPcmReader
Parses byte stream carried on RTP packets, and extracts PCM frames.
- + RtpUtils
Utility methods for RTP.
- + RtspMediaSource
An Rtsp MediaSource
- + RtspMediaSource.Factory
Factory for RtspMediaSource
- + RtspMediaSource.RtspPlaybackException
Thrown when an exception or error is encountered during loading an RTSP stream.
- + RubySpan
A styling span for ruby text.
- + RunnableFutureTask<R,​E extends Exception>
A RunnableFuture that supports additional uninterruptible operations to query whether execution has started and finished.
- + SampleQueue
A queue of media samples.
- + SampleQueue.UpstreamFormatChangedListener
A listener for changes to the upstream format.
- + SampleQueueMappingException
Thrown when it is not possible to map a TrackGroup to a SampleQueue.
- + SampleStream
A stream of media samples (and associated format information).
- + SampleStream.ReadDataResult - + SampleStream.ReadFlags - + ScaleToFitTransformation
Specifies a simple rotation and/or scale to apply in the vertex shader.
- + ScaleToFitTransformation.Builder
A builder for ScaleToFitTransformation instances.
- + Scheduler
Schedules a service to be started in the foreground when some Requirements are met.
- + SectionPayloadReader
Reads section data.
- + SectionReader
Reads section data packets and feeds the whole sections to a given SectionPayloadReader.
- + SeekMap
Maps seek positions (in microseconds) to corresponding positions (byte offsets) in the stream.
- + SeekMap.SeekPoints
Contains one or two SeekPoints.
- + SeekMap.Unseekable
A SeekMap that does not support seeking.
- + SeekParameters
Parameters that apply to seeking.
- + SeekPoint
Defines a seek point in a media stream.
- + SegmentBase
An approximate representation of a SegmentBase manifest element.
- + SegmentBase.MultiSegmentBase
A SegmentBase that consists of multiple segments.
- + SegmentBase.SegmentList
A SegmentBase.MultiSegmentBase that uses a SegmentList to define its segments.
- + SegmentBase.SegmentTemplate
A SegmentBase.MultiSegmentBase that uses a SegmentTemplate to define its segments.
- + SegmentBase.SegmentTimelineElement
Represents a timeline segment from the MPD's SegmentTimeline list.
- + SegmentBase.SingleSegmentBase
A SegmentBase that defines a single segment.
- + SegmentDownloader<M extends FilterableManifest<M>>
Base class for multi segment stream downloaders.
- + SegmentDownloader.Segment
Smallest unit of content to be downloaded.
- + SeiReader
Consumes SEI buffers, outputting contained CEA-608/708 messages to a TrackOutput.
- + SequenceableLoader
A loader that can proceed in approximate synchronization with other loaders.
- + SequenceableLoader.Callback<T extends SequenceableLoader>
A callback to be notified of SequenceableLoader events.
- + ServerSideAdInsertionMediaSource
A MediaSource for server-side inserted ad breaks.
- + ServerSideAdInsertionMediaSource.AdPlaybackStateUpdater
Receives ad playback state update requests when the Timeline of the content media source has changed.
- + ServerSideAdInsertionUtil
A static utility class with methods to work with server-side inserted ads.
- + ServiceDescriptionElement
Represents a service description element.
- + SessionAvailabilityListener
Listener of changes in the cast session availability.
- + SessionCallbackBuilder
Builds a MediaSession.SessionCallback with various collaborators.
- + SessionCallbackBuilder.AllowedCommandProvider
Provides allowed commands for MediaController.
- + SessionCallbackBuilder.CustomCommandProvider
Callbacks for querying what custom commands are supported, and for handling a custom command when a controller sends it.
- + SessionCallbackBuilder.DefaultAllowedCommandProvider
Default implementation of SessionCallbackBuilder.AllowedCommandProvider that behaves as follows: @@ -6347,906 +6366,938 @@

All Classes

Controller is in the same package as the session.
- + SessionCallbackBuilder.DisconnectedCallback
Callback for handling controller disconnection.
- + SessionCallbackBuilder.MediaIdMediaItemProvider
A SessionCallbackBuilder.MediaItemProvider that creates media items containing only a media ID.
- + SessionCallbackBuilder.MediaItemProvider
Provides the MediaItem.
- + SessionCallbackBuilder.PostConnectCallback
Callback for handling extra initialization after the connection.
- + SessionCallbackBuilder.RatingCallback
Callback receiving a user rating for a specified media id.
- + SessionCallbackBuilder.SkipCallback
Callback receiving skip backward and skip forward.
- + SessionPlayerConnector
An implementation of SessionPlayer that wraps a given ExoPlayer Player instance.
- + ShadowMediaCodecConfig
A JUnit @Rule to configure Roboelectric's ShadowMediaCodec.
- + ShuffleOrder
Shuffled order of indices.
- + ShuffleOrder.DefaultShuffleOrder
The default ShuffleOrder implementation for random shuffle order.
- + ShuffleOrder.UnshuffledShuffleOrder
A ShuffleOrder implementation which does not shuffle.
- + SilenceMediaSource
Media source with a single period consisting of silent raw audio of a given duration.
- + SilenceMediaSource.Factory
Factory for SilenceMediaSources.
- + SilenceSkippingAudioProcessor
An AudioProcessor that skips silence in the input stream.
- + SimpleBasePlayer
A base implementation for Player that reduces the number of methods to implement to a minimum.
- + +SimpleBasePlayer.MediaItemData + +
An immutable description of an item in the playlist, containing both static setup information + like MediaItem and dynamic data that is generally read from the media like the + duration.
+ + + +SimpleBasePlayer.MediaItemData.Builder + +
A builder for SimpleBasePlayer.MediaItemData objects.
+ + + +SimpleBasePlayer.PeriodData + +
Data describing the properties of a period inside a SimpleBasePlayer.MediaItemData.
+ + + +SimpleBasePlayer.PeriodData.Builder + +
A builder for SimpleBasePlayer.PeriodData objects.
+ + + +SimpleBasePlayer.PositionSupplier + +
A supplier for a position.
+ + + SimpleBasePlayer.State
An immutable state description of the player.
- + SimpleBasePlayer.State.Builder
A builder for SimpleBasePlayer.State objects.
- + SimpleCache
A Cache implementation that maintains an in-memory representation.
- + SimpleDecoder<I extends DecoderInputBuffer,​O extends DecoderOutputBuffer,​E extends DecoderException>
Base class for Decoders that use their own decode thread and decode each input buffer immediately into a corresponding output buffer.
- + SimpleDecoderOutputBuffer
Buffer for SimpleDecoder output.
- + SimpleExoPlayer Deprecated.
Use ExoPlayer instead.
- + SimpleExoPlayer.Builder Deprecated.
Use ExoPlayer.Builder instead.
- + SimpleMetadataDecoder
A MetadataDecoder base class that validates input buffers and discards any for which Buffer.isDecodeOnly() is true.
- + SimpleSubtitleDecoder
Base class for subtitle parsers that use their own decode thread.
- + SingleColorLut
Transforms the colors of a frame by applying the same color lookup table to each frame.
- + SingleFrameGlTextureProcessor
Manages a GLSL shader program for processing a frame.
- + SinglePeriodAdTimeline
A Timeline for sources that have ads.
- + SinglePeriodTimeline
A Timeline consisting of a single period and static window.
- + SingleSampleMediaChunk
A BaseMediaChunk for chunks consisting of a single raw sample.
- + SingleSampleMediaSource
Loads data at a given Uri as a single sample belonging to a single MediaPeriod.
- + SingleSampleMediaSource.Factory - + Size
Immutable class for describing width and height dimensions in pixels.
- + SlidingPercentile
Calculate any percentile over a sliding window of weighted values.
- + SlowMotionData
Holds information about the segments of slow motion playback within a track.
- + SlowMotionData.Segment
Holds information about a single segment of slow motion playback within a track.
- + SmtaMetadataEntry
Stores metadata from the Samsung smta box.
- + SntpClient
Static utility to retrieve the device time offset using SNTP.
- + SntpClient.InitializationCallback - + SonicAudioProcessor
An AudioProcessor that uses the Sonic library to modify audio speed/pitch/sample rate.
- + SpannedSubject
A Truth Subject for assertions on Spanned instances containing text styling.
- + SpannedSubject.AbsoluteSized
Allows assertions about the absolute size of a span.
- + SpannedSubject.Aligned
Allows assertions about the alignment of a span.
- + SpannedSubject.AndSpanFlags
Allows additional assertions to be made on the flags of matching spans.
- + SpannedSubject.Colored
Allows assertions about the color of a span.
- + SpannedSubject.EmphasizedText
Allows assertions about a span's text emphasis mark and its position.
- + SpannedSubject.RelativeSized
Allows assertions about the relative size of a span.
- + SpannedSubject.RubyText
Allows assertions about a span's ruby text and its position.
- + SpannedSubject.Typefaced
Allows assertions about the typeface of a span.
- + SpannedSubject.WithSpanFlags
Allows additional assertions to be made on the flags of matching spans.
- + SpanUtil
Utility methods for Android span styling.
- + SphericalGLSurfaceView
Renders a GL scene in a non-VR Activity that is affected by phone orientation and touch input.
- + SphericalGLSurfaceView.VideoSurfaceListener
Listener for the Surface to which video frames should be rendered.
- + SpliceCommand
Superclass for SCTE35 splice commands.
- + SpliceInfoDecoder
Decodes splice info sections and produces splice commands.
- + SpliceInsertCommand
Represents a splice insert command defined in SCTE35, Section 9.3.3.
- + SpliceInsertCommand.ComponentSplice
Holds splicing information for specific splice insert command components.
- + SpliceNullCommand
Represents a splice null command as defined in SCTE35, Section 9.3.1.
- + SpliceScheduleCommand
Represents a splice schedule command as defined in SCTE35, Section 9.3.2.
- + SpliceScheduleCommand.ComponentSplice
Holds splicing information for specific splice schedule command components.
- + SpliceScheduleCommand.Event
Represents a splice event as contained in a SpliceScheduleCommand.
- + SsaDecoder
A SimpleSubtitleDecoder for SSA/ASS.
- + SsChunkSource
A ChunkSource for SmoothStreaming.
- + SsChunkSource.Factory
Factory for SsChunkSources.
- + SsDownloader
A downloader for SmoothStreaming streams.
- + SsManifest
Represents a SmoothStreaming manifest.
- + SsManifest.ProtectionElement
Represents a protection element containing a single header.
- + SsManifest.StreamElement
Represents a StreamIndex element.
- + SsManifestParser
Parses SmoothStreaming client manifests.
- + SsManifestParser.MissingFieldException
Thrown if a required field is missing.
- + SsMediaSource
A SmoothStreaming MediaSource.
- + SsMediaSource.Factory
Factory for SsMediaSource.
- + StandaloneDatabaseProvider
An SQLiteOpenHelper that provides instances of a standalone database.
- + StandaloneMediaClock
A MediaClock whose position advances with real time based on the playback parameters when started.
- + StarRating
A rating expressed as a fractional number of stars.
- + StartOffsetExtractorOutput
An extractor output that wraps another extractor output and applies a give start byte offset to seek positions.
- + StatsDataSource
DataSource wrapper which keeps track of bytes transferred, redirected uris, and response headers.
- + StreamKey
A key for a subset of media that can be separately loaded (a "stream").
- + StubExoPlayer
An abstract ExoPlayer implementation that throws UnsupportedOperationException from every method.
- + StubPlayer
An abstract Player implementation that throws UnsupportedOperationException from every method.
- + StyledPlayerControlView
A view for controlling Player instances.
- + StyledPlayerControlView.OnFullScreenModeChangedListener Deprecated. - + StyledPlayerControlView.ProgressUpdateListener
Listener to be notified when progress has been updated.
- + StyledPlayerControlView.VisibilityListener Deprecated. - + StyledPlayerView
A high level view for Player media playbacks.
- + StyledPlayerView.ControllerVisibilityListener
Listener to be notified about changes of the visibility of the UI controls.
- + StyledPlayerView.FullscreenButtonClickListener
Listener invoked when the fullscreen button is clicked.
- + StyledPlayerView.ShowBuffering
Determines when the buffering view is shown.
- + SubripDecoder
A SimpleSubtitleDecoder for SubRip.
- + Subtitle
A subtitle consisting of timed Cues.
- + SubtitleDecoder - + SubtitleDecoderException
Thrown when an error occurs decoding subtitle data.
- + SubtitleDecoderFactory
A factory for SubtitleDecoder instances.
- + SubtitleExtractor
Generic extractor for extracting subtitles from various subtitle formats.
- + SubtitleInputBuffer - + SubtitleOutputBuffer
Base class for SubtitleDecoder output buffers.
- + SubtitleView
A view for displaying subtitle Cues.
- + SubtitleView.ViewType
The type of View to use to display subtitles.
- + SurfaceInfo
Immutable value class for a Surface and supporting information.
- + SynchronousMediaCodecAdapter
A MediaCodecAdapter that operates the underlying MediaCodec in synchronous mode.
- + SynchronousMediaCodecAdapter.Factory
A factory for SynchronousMediaCodecAdapter instances.
- + SystemClock
The standard implementation of Clock, an instance of which is available via Clock.DEFAULT.
- + TeeAudioProcessor
Audio processor that outputs its input unmodified and also outputs its input to a given sink.
- + TeeAudioProcessor.AudioBufferSink
A sink for audio buffers handled by the audio processor.
- + TeeAudioProcessor.WavFileAudioBufferSink
A sink for audio buffers that writes output audio as .wav files with a given path prefix.
- + TeeDataSource
Tees data into a DataSink as the data is read.
- + TestDownloadManagerListener
Allows tests to block for, and assert properties of, calls from a DownloadManager to its DownloadManager.Listener.
- + TestExoPlayerBuilder
A builder of ExoPlayer instances for testing.
- + TestPlayerRunHelper
Helper methods to block the calling thread until the provided ExoPlayer instance reaches a particular state.
- + TestUtil
Utility methods for tests.
- + TextAnnotation
Properties of a text annotation (i.e.
- + TextAnnotation.Position
The possible positions of the annotation text relative to the base text.
- + TextEmphasisSpan
A styling span for text emphasis marks.
- + TextEmphasisSpan.MarkFill
The possible mark fills that can be used.
- + TextEmphasisSpan.MarkShape
The possible mark shapes that can be used.
- + TextInformationFrame
Text information ID3 frame.
- + TextOutput
Receives text output.
- + TextRenderer
A renderer for text.
- + TextureInfo
Contains information describing an OpenGL texture.
- + ThumbRating
A rating expressed as "thumbs up" or "thumbs down".
- + TimeBar
Interface for time bar views that can display a playback position, buffered position, duration and ad markers, and that have a listener for scrubbing (seeking) events.
- + TimeBar.OnScrubListener
Listener for scrubbing events.
- + TimedValueQueue<V>
A utility class to keep a queue of values with timestamps.
- + Timeline
A flexible representation of the structure of media.
- + Timeline.Period
Holds information about a period in a Timeline.
- + Timeline.RemotableTimeline
A concrete class of Timeline to restore a Timeline instance from a Bundle sent by another process via IBinder.
- + Timeline.Window
Holds information about a window in a Timeline.
- + TimelineAsserts
Assertion methods for Timeline.
- + TimelineQueueEditor - + TimelineQueueEditor.MediaDescriptionConverter
Converts a MediaDescriptionCompat to a MediaItem.
- + TimelineQueueEditor.MediaIdEqualityChecker
Media description comparator comparing the media IDs.
- + TimelineQueueEditor.QueueDataAdapter
Adapter to get MediaDescriptionCompat of items in the queue and to notify the application about changes in the queue to sync the data structure backing the MediaSessionConnector.
- + TimelineQueueNavigator
An abstract implementation of the MediaSessionConnector.QueueNavigator that maps the windows of a Player's Timeline to the media session queue.
- + TimeSignalCommand
Represents a time signal command as defined in SCTE35, Section 9.3.4.
- + TimestampAdjuster
Adjusts and offsets sample timestamps.
- + TimestampAdjusterProvider
Provides TimestampAdjuster instances for use during HLS playbacks.
- + TimeToFirstByteEstimator
Provides an estimate of the time to first byte of a transfer.
- + TraceUtil
Calls through to Trace methods on supported API levels.
- + Track
Encapsulates information describing an MP4 track.
- + Track.Transformation
The transformation to apply to samples in the track, if any.
- + TrackEncryptionBox
Encapsulates information parsed from a track encryption (tenc) box or sample group description (sgpd) box in an MP4 stream.
- + TrackGroup
An immutable group of tracks available within a media stream.
- + TrackGroupArray
An immutable array of TrackGroups.
- + TrackNameProvider
Converts Formats to user readable track names.
- + TrackOutput
Receives track level data extracted by an Extractor.
- + TrackOutput.CryptoData
Holds data required to decrypt a sample.
- + TrackOutput.SampleDataPart
Defines the part of the sample data to which a call to TrackOutput.sampleData(com.google.android.exoplayer2.upstream.DataReader, int, boolean) corresponds.
- + Tracks
Information about groups of tracks.
- + Tracks.Group
Information about a single group of tracks, including the underlying TrackGroup, the @@ -7254,544 +7305,544 @@

All Classes

selected.
- + TrackSelection
A track selection consisting of a static subset of selected tracks belonging to a TrackGroup.
- + TrackSelection.Type
Represents a type track selection.
- + TrackSelectionArray
An array of TrackSelections.
- + TrackSelectionDialogBuilder
Builder for a dialog with a TrackSelectionView.
- + TrackSelectionDialogBuilder.DialogCallback
Callback which is invoked when a track selection has been made.
- + TrackSelectionOverride
A track selection override, consisting of a TrackGroup and the indices of the tracks within the group that should be selected.
- + TrackSelectionParameters
Parameters for controlling track selection.
- + TrackSelectionParameters.Builder - + TrackSelectionUtil
Track selection related utility methods.
- + TrackSelectionUtil.AdaptiveTrackSelectionFactory
Functional interface to create a single adaptive track selection.
- + TrackSelectionView
A view for making track selections.
- + TrackSelectionView.TrackSelectionListener
Listener for changes to the selected tracks.
- + TrackSelector
The component of an ExoPlayer responsible for selecting tracks to be consumed by each of the player's Renderers.
- + TrackSelector.InvalidationListener
Notified when selections previously made by a TrackSelector are no longer valid.
- + TrackSelectorResult
The result of a TrackSelector operation.
- + TransferListener
A listener of data transfer events.
- + TransformationException
Thrown when a non-locally recoverable transformation failure occurs.
- + TransformationException.ErrorCode
Codes that identify causes of Transformer errors.
- + TransformationRequest
A media transformation request.
- + TransformationRequest.Builder
A builder for TransformationRequest instances.
- + TransformationResult
Information about the result of a successful transformation.
- + TransformationResult.Builder
A builder for TransformationResult instances.
- + Transformer
A transformer to transform media inputs.
- + Transformer.Builder
A builder for Transformer instances.
- + Transformer.Listener
A listener for the transformation events.
- + Transformer.ProgressState
Progress state.
- + TrueHdSampleRechunker
Rechunks TrueHD sample data into groups of Ac3Util.TRUEHD_RECHUNK_SAMPLE_COUNT samples.
- + TsExtractor
Extracts data from the MPEG-2 TS container format.
- + TsExtractor.Mode
Modes for the extractor.
- + TsPayloadReader
Parses TS packet payload data.
- + TsPayloadReader.DvbSubtitleInfo
Holds information about a DVB subtitle, as defined in ETSI EN 300 468 V1.11.1 section 6.2.41.
- + TsPayloadReader.EsInfo
Holds information associated with a PMT entry.
- + TsPayloadReader.Factory
Factory of TsPayloadReader instances.
- + TsPayloadReader.Flags
Contextual flags indicating the presence of indicators in the TS packet or PES packet headers.
- + TsPayloadReader.TrackIdGenerator
Generates track ids for initializing TsPayloadReaders' TrackOutputs.
- + TsUtil
Utilities method for extracting MPEG-TS streams.
- + TtmlDecoder
A SimpleSubtitleDecoder for TTML supporting the DFXP presentation profile.
- + Tx3gDecoder - + UdpDataSource
A UDP DataSource.
- + UdpDataSource.UdpDataSourceException
Thrown when an error is encountered when trying to read from a UdpDataSource.
- + UnknownNull
Annotation for specifying unknown nullness.
- + UnrecognizedInputFormatException
Thrown if the input format was not recognized.
- + UnsupportedDrmException
Thrown when the requested DRM scheme is not supported.
- + UnsupportedDrmException.Reason
The reason for the exception.
- + UriUtil
Utility methods for manipulating URIs.
- + UrlLinkFrame
Url link ID3 frame.
- + UrlTemplate
A template from which URLs can be built.
- + UtcTimingElement
Represents a UTCTiming element.
- + Util
Miscellaneous utility methods.
- + VersionTable
Utility methods for accessing versions of media library database components.
- + VideoDecoderGLSurfaceView
GLSurfaceView implementing VideoDecoderOutputBufferRenderer for rendering VideoDecoderOutputBuffers.
- + VideoDecoderOutputBuffer
Video decoder output buffer containing video frame data.
- + VideoDecoderOutputBufferRenderer - + VideoEncoderSettings
Represents the video encoder settings.
- + VideoEncoderSettings.BitrateMode
The allowed values for bitrateMode.
- + VideoEncoderSettings.Builder
Builds VideoEncoderSettings instances.
- + VideoFrameMetadataListener
A listener for metadata corresponding to video frames being rendered.
- + VideoFrameReleaseHelper
Helps a video Renderer release frames to a Surface.
- + VideoRendererEventListener
Listener of video Renderer events.
- + VideoRendererEventListener.EventDispatcher
Dispatches events to a VideoRendererEventListener.
- + VideoSize
Represents the video size.
- + VorbisBitArray
Wraps a byte array, providing methods that allow it to be read as a Vorbis bitstream.
- + VorbisComment Deprecated.
Use VorbisComment instead.
- + VorbisComment
A vorbis comment, extracted from a FLAC or Ogg file.
- + VorbisUtil
Utility methods for parsing Vorbis streams.
- + VorbisUtil.CommentHeader
Vorbis comment header.
- + VorbisUtil.Mode
Vorbis setup header modes.
- + VorbisUtil.VorbisIdHeader
Vorbis identification header.
- + VpxDecoder
Vpx decoder.
- + VpxDecoderException
Thrown when a libvpx decoder error occurs.
- + VpxLibrary
Configures and queries the underlying native library.
- + WavExtractor
Extracts data from WAV byte streams.
- + WavUtil
Utilities for handling WAVE files.
- + WebServerDispatcher
A Dispatcher for MockWebServer that allows per-path customisation of the static data served.
- + WebServerDispatcher.Resource
A resource served by WebServerDispatcher.
- + WebServerDispatcher.Resource.Builder - + WebvttCssStyle -
Style object of a Css style block in a Webvtt file.
+
Style object of a CSS style block in a WebVTT file.
- + WebvttCssStyle.FontSizeUnit
Font size unit enum.
- + WebvttCssStyle.StyleFlags
Style flag enum.
- + WebvttCueInfo
A representation of a WebVTT cue.
- + WebvttCueParser
Parser for WebVTT cues.
- + WebvttDecoder
A SimpleSubtitleDecoder for WebVTT.
- + WebvttExtractor
A special purpose extractor for WebVTT content in HLS.
- + WebvttParserUtil
Utility methods for parsing WebVTT data.
- + WidevineUtil
Utility methods for Widevine.
- + WorkManagerScheduler
A Scheduler that uses WorkManager.
- + WorkManagerScheduler.SchedulerWorker
A Worker that starts the target service if the requirements are met.
- + WrappingMediaSource
An abstract MediaSource wrapping a single child MediaSource.
- + WritableDownloadIndex
A writable index of Downloads.
- + XmlPullParserUtil
XmlPullParser utility methods.
diff --git a/docs/doc/reference/allclasses.html b/docs/doc/reference/allclasses.html index e33a5d8aa3a..55fdc38cb92 100644 --- a/docs/doc/reference/allclasses.html +++ b/docs/doc/reference/allclasses.html @@ -256,6 +256,8 @@

All Classes

  • CompositeSequenceableLoader
  • CompositeSequenceableLoaderFactory
  • ConcatenatingMediaSource
  • +
  • ConcatenatingMediaSource2
  • +
  • ConcatenatingMediaSource2.Builder
  • ConditionVariable
  • ConstantBitrateSeekMap
  • Consumer
  • @@ -796,6 +798,7 @@

    All Classes

  • MediaMetadata
  • MediaMetadata.Builder
  • MediaMetadata.FolderType
  • +
  • MediaMetadata.MediaType
  • MediaMetadata.PictureType
  • MediaMetricsListener
  • MediaParserChunkExtractor
  • @@ -1058,6 +1061,11 @@

    All Classes

  • SilenceMediaSource.Factory
  • SilenceSkippingAudioProcessor
  • SimpleBasePlayer
  • +
  • SimpleBasePlayer.MediaItemData
  • +
  • SimpleBasePlayer.MediaItemData.Builder
  • +
  • SimpleBasePlayer.PeriodData
  • +
  • SimpleBasePlayer.PeriodData.Builder
  • +
  • SimpleBasePlayer.PositionSupplier
  • SimpleBasePlayer.State
  • SimpleBasePlayer.State.Builder
  • SimpleCache
  • diff --git a/docs/doc/reference/com/google/android/exoplayer2/AbstractConcatenatedTimeline.html b/docs/doc/reference/com/google/android/exoplayer2/AbstractConcatenatedTimeline.html index 6dfc96dea18..1a1f52797c7 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/AbstractConcatenatedTimeline.html +++ b/docs/doc/reference/com/google/android/exoplayer2/AbstractConcatenatedTimeline.html @@ -380,7 +380,7 @@

    Method Summary

    Methods inherited from class com.google.android.exoplayer2.Timeline

    -equals, getNextPeriodIndex, getPeriod, getPeriodCount, getPeriodPosition, getPeriodPosition, getPeriodPositionUs, getPeriodPositionUs, getWindow, getWindowCount, hashCode, isEmpty, isLastPeriod, toBundle, toBundle +equals, getNextPeriodIndex, getPeriod, getPeriodCount, getPeriodPosition, getPeriodPosition, getPeriodPositionUs, getPeriodPositionUs, getWindow, getWindowCount, hashCode, isEmpty, isLastPeriod, toBundle, toBundleWithOneWindowOnly diff --git a/docs/doc/reference/com/google/android/exoplayer2/MediaItem.ClippingConfiguration.Builder.html b/docs/doc/reference/com/google/android/exoplayer2/MediaItem.ClippingConfiguration.Builder.html index 24decbb4701..ac8f3b8e0d4 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/MediaItem.ClippingConfiguration.Builder.html +++ b/docs/doc/reference/com/google/android/exoplayer2/MediaItem.ClippingConfiguration.Builder.html @@ -158,7 +158,7 @@

    Constructor Summary

    Builder() -
    Constructs an instance.
    +
    Creates a new instance with default values.
    @@ -266,7 +266,7 @@

    Constructor Detail

  • Builder

    public Builder()
    -
    Constructs an instance.
    +
    Creates a new instance with default values.
  • diff --git a/docs/doc/reference/com/google/android/exoplayer2/MediaItem.LiveConfiguration.Builder.html b/docs/doc/reference/com/google/android/exoplayer2/MediaItem.LiveConfiguration.Builder.html index b57ad073626..8c413257148 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/MediaItem.LiveConfiguration.Builder.html +++ b/docs/doc/reference/com/google/android/exoplayer2/MediaItem.LiveConfiguration.Builder.html @@ -158,7 +158,7 @@

    Constructor Summary

    Builder() -
    Constructs an instance.
    +
    Creates a new instance with default values.
    @@ -252,7 +252,7 @@

    Constructor Detail

  • Builder

    public Builder()
    -
    Constructs an instance.
    +
    Creates a new instance with default values.
  • diff --git a/docs/doc/reference/com/google/android/exoplayer2/MediaMetadata.Builder.html b/docs/doc/reference/com/google/android/exoplayer2/MediaMetadata.Builder.html index 7ab03cbc382..eeb1ba465b6 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/MediaMetadata.Builder.html +++ b/docs/doc/reference/com/google/android/exoplayer2/MediaMetadata.Builder.html @@ -25,7 +25,7 @@ catch(err) { } //--> -var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":42,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10,"i33":10,"i34":10,"i35":10,"i36":42}; +var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":42,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10,"i33":10,"i34":10,"i35":10,"i36":10,"i37":10,"i38":42}; var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; @@ -324,117 +324,131 @@

    Method Summary

    MediaMetadata.Builder +setIsBrowsable​(Boolean isBrowsable) + +
    Sets whether the media is a browsable folder.
    + + + +MediaMetadata.Builder setIsPlayable​(Boolean isPlayable)
    Sets whether the media is playable.
    - + +MediaMetadata.Builder +setMediaType​(@MediaType Integer mediaType) + + + + + MediaMetadata.Builder setOverallRating​(Rating overallRating)
    Sets the overall Rating.
    - + MediaMetadata.Builder setRecordingDay​(Integer recordingDay)
    Sets the day of the recording date.
    - + MediaMetadata.Builder setRecordingMonth​(Integer recordingMonth)
    Sets the month of the recording date.
    - + MediaMetadata.Builder setRecordingYear​(Integer recordingYear)
    Sets the year of the recording date.
    - + MediaMetadata.Builder setReleaseDay​(Integer releaseDay)
    Sets the day of the release date.
    - + MediaMetadata.Builder setReleaseMonth​(Integer releaseMonth)
    Sets the month of the release date.
    - + MediaMetadata.Builder setReleaseYear​(Integer releaseYear)
    Sets the year of the release date.
    - + MediaMetadata.Builder setStation​(CharSequence station)
    Sets the name of the station streaming the media.
    - + MediaMetadata.Builder setSubtitle​(CharSequence subtitle)
    Sets the subtitle.
    - + MediaMetadata.Builder setTitle​(CharSequence title)
    Sets the title.
    - + MediaMetadata.Builder setTotalDiscCount​(Integer totalDiscCount)
    Sets the total number of discs.
    - + MediaMetadata.Builder setTotalTrackCount​(Integer totalTrackCount)
    Sets the total number of tracks.
    - + MediaMetadata.Builder setTrackNumber​(Integer trackNumber)
    Sets the track number.
    - + MediaMetadata.Builder setUserRating​(Rating userRating)
    Sets the user Rating.
    - + MediaMetadata.Builder setWriter​(CharSequence writer)
    Sets the writer.
    - + MediaMetadata.Builder setYear​(Integer year) @@ -687,7 +701,22 @@

    setFolderType

    @CanIgnoreReturnValue
     public MediaMetadata.Builder setFolderType​(@Nullable @FolderType
                                                @FolderType Integer folderType)
    - +
    Sets the MediaMetadata.FolderType. + +

    This method will be deprecated. Use setIsBrowsable(java.lang.Boolean) to indicate if an item is a + browsable folder and use setMediaType(java.lang.Integer) to indicate the type of the folder.

    + + + + + +
      +
    • +

      setIsBrowsable

      +
      @CanIgnoreReturnValue
      +public MediaMetadata.Builder setIsBrowsable​(@Nullable
      +                                            Boolean isBrowsable)
      +
      Sets whether the media is a browsable folder.
    @@ -893,6 +922,18 @@

    setStation

    Sets the name of the station streaming the media.
    +
    + + + diff --git a/docs/doc/reference/com/google/android/exoplayer2/MediaMetadata.FolderType.html b/docs/doc/reference/com/google/android/exoplayer2/MediaMetadata.FolderType.html index c555f2c606d..c46d19187d5 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/MediaMetadata.FolderType.html +++ b/docs/doc/reference/com/google/android/exoplayer2/MediaMetadata.FolderType.html @@ -120,7 +120,10 @@

    Annotation Ty
    The folder type of the media item.

    This can be used as the type of a browsable bluetooth folder (see section 6.10.2.2 of the Bluetooth - AVRCP 1.6.2).

    + AVRCP 1.6.2). + +

    One of MediaMetadata.FOLDER_TYPE_NONE, MediaMetadata.FOLDER_TYPE_MIXED, MediaMetadata.FOLDER_TYPE_TITLES, + MediaMetadata.FOLDER_TYPE_ALBUMS, MediaMetadata.FOLDER_TYPE_ARTISTS, MediaMetadata.FOLDER_TYPE_GENRES, MediaMetadata.FOLDER_TYPE_PLAYLISTS or MediaMetadata.FOLDER_TYPE_YEARS. diff --git a/docs/doc/reference/com/google/android/exoplayer2/MediaMetadata.MediaType.html b/docs/doc/reference/com/google/android/exoplayer2/MediaMetadata.MediaType.html new file mode 100644 index 00000000000..043ee27217f --- /dev/null +++ b/docs/doc/reference/com/google/android/exoplayer2/MediaMetadata.MediaType.html @@ -0,0 +1,189 @@ + + + + +MediaMetadata.MediaType (ExoPlayer library) + + + + + + + + + + + + +

    JavaScript is disabled on your browser.
    + +
    + +
    + +
    +
    + +

    Annotation Type MediaMetadata.MediaType

    +
    +
    +
    + +
    +
    +
    + +
    + +
    + + diff --git a/docs/doc/reference/com/google/android/exoplayer2/MediaMetadata.PictureType.html b/docs/doc/reference/com/google/android/exoplayer2/MediaMetadata.PictureType.html index 06dab22929e..c1f86afb1b4 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/MediaMetadata.PictureType.html +++ b/docs/doc/reference/com/google/android/exoplayer2/MediaMetadata.PictureType.html @@ -120,7 +120,11 @@

    Annotation T
    The picture type of the artwork.

    Values sourced from the ID3 v2.4 specification (See section 4.14 of - https://id3.org/id3v2.4.0-frames).

    + https://id3.org/id3v2.4.0-frames). + +

    One of MediaMetadata.PICTURE_TYPE_OTHER, MediaMetadata.PICTURE_TYPE_FILE_ICON, MediaMetadata.PICTURE_TYPE_FILE_ICON_OTHER, MediaMetadata.PICTURE_TYPE_FRONT_COVER, MediaMetadata.PICTURE_TYPE_BACK_COVER, MediaMetadata.PICTURE_TYPE_LEAFLET_PAGE, MediaMetadata.PICTURE_TYPE_MEDIA, + MediaMetadata.PICTURE_TYPE_LEAD_ARTIST_PERFORMER, MediaMetadata.PICTURE_TYPE_ARTIST_PERFORMER, MediaMetadata.PICTURE_TYPE_CONDUCTOR, MediaMetadata.PICTURE_TYPE_BAND_ORCHESTRA, MediaMetadata.PICTURE_TYPE_COMPOSER, + MediaMetadata.PICTURE_TYPE_LYRICIST, MediaMetadata.PICTURE_TYPE_RECORDING_LOCATION, MediaMetadata.PICTURE_TYPE_DURING_RECORDING, MediaMetadata.PICTURE_TYPE_DURING_PERFORMANCE, MediaMetadata.PICTURE_TYPE_MOVIE_VIDEO_SCREEN_CAPTURE, MediaMetadata.PICTURE_TYPE_A_BRIGHT_COLORED_FISH, MediaMetadata.PICTURE_TYPE_ILLUSTRATION, MediaMetadata.PICTURE_TYPE_BAND_ARTIST_LOGO or MediaMetadata.PICTURE_TYPE_PUBLISHER_STUDIO_LOGO. diff --git a/docs/doc/reference/com/google/android/exoplayer2/MediaMetadata.html b/docs/doc/reference/com/google/android/exoplayer2/MediaMetadata.html index 4b7789a4a94..f9204bb3bdc 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/MediaMetadata.html +++ b/docs/doc/reference/com/google/android/exoplayer2/MediaMetadata.html @@ -173,6 +173,13 @@

    Nested Class Summary

    static interface  +MediaMetadata.MediaType + +
    The type of content described by the media item.
    + + + +static interface  MediaMetadata.PictureType
    The picture type of the artwork.
    @@ -380,9 +387,281 @@

    Field Summary

    Boolean +isBrowsable + +
    Optional boolean to indicate that the media is a browsable folder.
    + + + +Boolean isPlayable -
    Optional boolean for media playability.
    +
    Optional boolean to indicate that the media is playable.
    + + + +static int +MEDIA_TYPE_ALBUM + +
    MediaMetadata.MediaType for a group of items (e.g., music) belonging to an + album.
    + + + +static int +MEDIA_TYPE_ARTIST + +
    MediaMetadata.MediaType for a group of items (e.g., music) from the same + artist.
    + + + +static int +MEDIA_TYPE_AUDIO_BOOK + +
    MediaMetadata.MediaType for a group of items forming an audio book.
    + + + +static int +MEDIA_TYPE_AUDIO_BOOK_CHAPTER + +
    MediaMetadata.MediaType for an audio book chapter.
    + + + +static int +MEDIA_TYPE_FOLDER_ALBUMS + +
    MediaMetadata.MediaType for a folder containing albums.
    + + + +static int +MEDIA_TYPE_FOLDER_ARTISTS + +
    MediaMetadata.MediaType for a folder containing artists.
    + + + +static int +MEDIA_TYPE_FOLDER_AUDIO_BOOKS + +
    MediaMetadata.MediaType for a folder containing audio books.
    + + + +static int +MEDIA_TYPE_FOLDER_GENRES + +
    MediaMetadata.MediaType for a folder containing genres.
    + + + +static int +MEDIA_TYPE_FOLDER_MIXED + +
    MediaMetadata.MediaType for a folder with mixed or undetermined content.
    + + + +static int +MEDIA_TYPE_FOLDER_MOVIES + +
    MediaMetadata.MediaType for a folder containing movies.
    + + + +static int +MEDIA_TYPE_FOLDER_NEWS + +
    MediaMetadata.MediaType for a folder containing news.
    + + + +static int +MEDIA_TYPE_FOLDER_PLAYLISTS + +
    MediaMetadata.MediaType for a folder containing playlists.
    + + + +static int +MEDIA_TYPE_FOLDER_PODCASTS + +
    MediaMetadata.MediaType for a folder containing podcasts.
    + + + +static int +MEDIA_TYPE_FOLDER_RADIO_STATIONS + +
    MediaMetadata.MediaType for a folder containing radio + stations.
    + + + +static int +MEDIA_TYPE_FOLDER_TRAILERS + +
    MediaMetadata.MediaType for a folder containing movie trailers.
    + + + +static int +MEDIA_TYPE_FOLDER_TV_CHANNELS + +
    MediaMetadata.MediaType for a folder containing TV channels.
    + + + +static int +MEDIA_TYPE_FOLDER_TV_SERIES + +
    MediaMetadata.MediaType for a folder containing TV series.
    + + + +static int +MEDIA_TYPE_FOLDER_TV_SHOWS + +
    MediaMetadata.MediaType for a folder containing TV shows.
    + + + +static int +MEDIA_TYPE_FOLDER_VIDEOS + +
    MediaMetadata.MediaType for a folder containing videos.
    + + + +static int +MEDIA_TYPE_FOLDER_YEARS + +
    MediaMetadata.MediaType for a folder containing years.
    + + + +static int +MEDIA_TYPE_GENRE + +
    MediaMetadata.MediaType for a group of items (e.g., music) of the same + genre.
    + + + +static int +MEDIA_TYPE_MIXED + +
    Media of undetermined type or a mix of multiple media types.
    + + + +static int +MEDIA_TYPE_MOVIE + + + + + +static int +MEDIA_TYPE_MUSIC + + + + + +static int +MEDIA_TYPE_NEWS + + + + + +static int +MEDIA_TYPE_PLAYLIST + +
    MediaMetadata.MediaType for a group of items (e.g., music) forming a + playlist.
    + + + +static int +MEDIA_TYPE_PODCAST + +
    MediaMetadata.MediaType for a group of items belonging to a podcast.
    + + + +static int +MEDIA_TYPE_PODCAST_EPISODE + +
    MediaMetadata.MediaType for a podcast episode.
    + + + +static int +MEDIA_TYPE_RADIO_STATION + +
    MediaMetadata.MediaType for a radio station.
    + + + +static int +MEDIA_TYPE_TRAILER + +
    MediaMetadata.MediaType for a movie trailer.
    + + + +static int +MEDIA_TYPE_TV_CHANNEL + +
    MediaMetadata.MediaType for a group of items that are part of a TV channel.
    + + + +static int +MEDIA_TYPE_TV_SEASON + +
    MediaMetadata.MediaType for a group of items that are part of a TV series.
    + + + +static int +MEDIA_TYPE_TV_SERIES + +
    MediaMetadata.MediaType for a group of items that are part of a TV series.
    + + + +static int +MEDIA_TYPE_TV_SHOW + + + + + +static int +MEDIA_TYPE_VIDEO + + + + + +static int +MEDIA_TYPE_YEAR + +
    MediaMetadata.MediaType for a group of items (e.g., music) from the same + year.
    + + + +@MediaType Integer +mediaType + + @@ -607,69 +886,584 @@

    Field Summary

    - - -
    +
    + +
    + +
    + + + +
    +
    -
    + + + + + + + -

    Field Detail

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1231,7 +2025,21 @@

    folderType

    @Nullable
     @FolderType
     public final @FolderType Integer folderType
    - +
    Optional MediaMetadata.FolderType. + +

    This field will be deprecated. Use isBrowsable to indicate if an item is a + browsable folder and use mediaType to indicate the type of the folder.

    + + + + + +
      +
    • +

      isBrowsable

      +
      @Nullable
      +public final Boolean isBrowsable
      +
      Optional boolean to indicate that the media is a browsable folder.
    @@ -1242,7 +2050,7 @@

    folderType

    isPlayable

    @Nullable
     public final Boolean isPlayable
    -
    Optional boolean for media playability.
    +
    Optional boolean to indicate that the media is playable.
    @@ -1421,6 +2229,17 @@

    station

    Optional name of the station streaming the media.
    +
    + + + diff --git a/docs/doc/reference/com/google/android/exoplayer2/PlaybackException.html b/docs/doc/reference/com/google/android/exoplayer2/PlaybackException.html index 7b1b28921d2..29a823975f8 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/PlaybackException.html +++ b/docs/doc/reference/com/google/android/exoplayer2/PlaybackException.html @@ -25,7 +25,7 @@ catch(err) { } //--> -var data = {"i0":10,"i1":10,"i2":9,"i3":9,"i4":10}; +var data = {"i0":10,"i1":10,"i2":9,"i3":10}; var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; @@ -570,14 +570,6 @@

    Method Summary

    -protected static String -keyForField​(int field) - -
    Converts the given field number to a string which can be used as a field key when implementing - toBundle() and Bundleable.Creator.
    - - - Bundle toBundle() @@ -1166,7 +1158,7 @@

    FIELD_CUSTOM_ID_BASE

    and Bundleable.Creator.

    Subclasses should obtain their Bundle's field keys by applying a non-negative - offset on this constant and passing the result to keyForField(int).

    + offset on this constant and passing the result to Util.intToStringMaxRadix(int).
    See Also:
    Constant Field Values
    @@ -1289,7 +1281,7 @@

    errorInfoEquals

    -
      +
      • toBundle

        @CallSuper
        @@ -1302,19 +1294,6 @@ 

        toBundle

    - - - -
      -
    • -

      keyForField

      -
      protected static String keyForField​(int field)
      -
      Converts the given field number to a string which can be used as a field key when implementing - toBundle() and Bundleable.Creator. - -

      Subclasses should use field values greater than or equal to FIELD_CUSTOM_ID_BASE.

      -
    • -
    diff --git a/docs/doc/reference/com/google/android/exoplayer2/Player.Command.html b/docs/doc/reference/com/google/android/exoplayer2/Player.Command.html index 1c100edb13b..141f8158081 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/Player.Command.html +++ b/docs/doc/reference/com/google/android/exoplayer2/Player.Command.html @@ -117,7 +117,50 @@

    Annotation Type Player. @Retention(SOURCE) @Target({FIELD,METHOD,PARAMETER,LOCAL_VARIABLE,TYPE_USE}) public static @interface Player.Command - + diff --git a/docs/doc/reference/com/google/android/exoplayer2/Player.Commands.Builder.html b/docs/doc/reference/com/google/android/exoplayer2/Player.Commands.Builder.html index 95785e88e17..926399528ce 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/Player.Commands.Builder.html +++ b/docs/doc/reference/com/google/android/exoplayer2/Player.Commands.Builder.html @@ -190,7 +190,7 @@

    Method Summary

    Player.Commands.Builder addAll​(@com.google.android.exoplayer2.Player.Command int... commands) -
    Adds commands.
    +
    Adds commands.
    @@ -204,7 +204,7 @@

    Method Summary

    Player.Commands.Builder addAllCommands() -
    Adds all existing commands.
    +
    Adds all existing commands.
    @@ -233,7 +233,7 @@

    Method Summary

    Player.Commands.Builder removeAll​(@com.google.android.exoplayer2.Player.Command int... commands) -
    Removes commands.
    +
    Removes commands.
    @@ -339,10 +339,10 @@

    addAll

    @CanIgnoreReturnValue
     public Player.Commands.Builder addAll​(@Command
                                           @com.google.android.exoplayer2.Player.Command int... commands)
    -
    Adds commands.
    +
    Adds commands.
    Parameters:
    -
    commands - The commands to add.
    +
    commands - The commands to add.
    Returns:
    This builder.
    Throws:
    @@ -361,7 +361,7 @@

    addAll

    Parameters:
    -
    commands - The set of commands to add.
    +
    commands - The set of commands to add.
    Returns:
    This builder.
    Throws:
    @@ -377,7 +377,7 @@

    addAll

    addAllCommands

    @CanIgnoreReturnValue
     public Player.Commands.Builder addAllCommands()
    -
    Adds all existing commands.
    +
    Adds all existing commands.
    Returns:
    This builder.
    @@ -437,10 +437,10 @@

    removeAll

    @CanIgnoreReturnValue
     public Player.Commands.Builder removeAll​(@Command
                                              @com.google.android.exoplayer2.Player.Command int... commands)
    -
    Removes commands.
    +
    Removes commands.
    Parameters:
    -
    commands - The commands to remove.
    +
    commands - The commands to remove.
    Returns:
    This builder.
    Throws:
    diff --git a/docs/doc/reference/com/google/android/exoplayer2/Player.Commands.html b/docs/doc/reference/com/google/android/exoplayer2/Player.Commands.html index 4a740da08a4..e7bd9969281 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/Player.Commands.html +++ b/docs/doc/reference/com/google/android/exoplayer2/Player.Commands.html @@ -140,7 +140,7 @@

    Class Player.Commands

    public static final class Player.Commands
     extends Object
     implements Bundleable
    -
    A set of commands. +
    A set of commands.

    Instances are immutable.

    diff --git a/docs/doc/reference/com/google/android/exoplayer2/Player.Events.html b/docs/doc/reference/com/google/android/exoplayer2/Player.Events.html index cbca9d7e72a..4bd57270826 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/Player.Events.html +++ b/docs/doc/reference/com/google/android/exoplayer2/Player.Events.html @@ -135,7 +135,7 @@

    Class Player.Events


    public static final class Player.Events
     extends Object
    -
    A set of events.
    +
    A set of events.
    @@ -190,7 +190,7 @@

    Method Summary

    boolean containsAny​(@com.google.android.exoplayer2.Player.Event int... events) -
    Returns whether any of the given events occurred.
    +
    Returns whether any of the given events occurred.
    @@ -251,7 +251,7 @@

    Events

    Creates an instance.
    Parameters:
    -
    flags - The FlagSet containing the events.
    +
    flags - The FlagSet containing the events.
    @@ -290,12 +290,12 @@

    contains

    containsAny

    public boolean containsAny​(@Event
                                @com.google.android.exoplayer2.Player.Event int... events)
    -
    Returns whether any of the given events occurred.
    +
    Returns whether any of the given events occurred.
    Parameters:
    -
    events - The events.
    +
    events - The events.
    Returns:
    -
    Whether any of the events occurred.
    +
    Whether any of the events occurred.
    diff --git a/docs/doc/reference/com/google/android/exoplayer2/Player.Listener.html b/docs/doc/reference/com/google/android/exoplayer2/Player.Listener.html index d0471f4c52e..a42186549ab 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/Player.Listener.html +++ b/docs/doc/reference/com/google/android/exoplayer2/Player.Listener.html @@ -134,9 +134,14 @@

    Interface Player.Listener
    public static interface Player.Listener
    -
    Listener of all changes in the Player. +
    Listener for changes in a Player. -

    All methods have no-op default implementations to allow selective overrides.

    +

    All methods have no-op default implementations to allow selective overrides. + +

    If the return value of a Player getter changes due to a change in command availability, the corresponding listener + method(s) will be invoked. If the return value of a Player getter does not change + because the corresponding command is not + available, the corresponding listener method will not be invoked.

    @@ -161,7 +166,7 @@

    Method Summary

    default void onAudioAttributesChanged​(AudioAttributes audioAttributes) -
    Called when the audio attributes change.
    +
    Called when the value of Player.getAudioAttributes() changes.
    @@ -183,7 +188,7 @@

    Method Summary

    default void onCues​(CueGroup cueGroup) -
    Called when there is a change in the CueGroup.
    +
    Called when the value of Player.getCurrentCues() changes.
    @@ -207,7 +212,7 @@

    Method Summary

    onDeviceVolumeChanged​(int volume, boolean muted) -
    Called when the device volume or mute state changes.
    +
    Called when the value of Player.getDeviceVolume() or Player.isDeviceMuted() changes.
    @@ -261,7 +266,7 @@

    Method Summary

    default void onMediaMetadataChanged​(MediaMetadata mediaMetadata) -
    Called when the combined MediaMetadata changes.
    +
    Called when the value of Player.getMediaMetadata() changes.
    @@ -275,7 +280,7 @@

    Method Summary

    default void onPlaybackParametersChanged​(PlaybackParameters playbackParameters) -
    Called when the current playback parameters change.
    +
    Called when the value of Player.getPlaybackParameters() changes.
    @@ -320,7 +325,7 @@

    Method Summary

    default void onPlaylistMetadataChanged​(MediaMetadata mediaMetadata) -
    Called when the playlist MediaMetadata changes.
    +
    Called when the value of Player.getPlaylistMetadata() changes.
    @@ -415,14 +420,14 @@

    Method Summary

    onTimelineChanged​(Timeline timeline, @com.google.android.exoplayer2.Player.TimelineChangeReason int reason) -
    Called when the timeline has been refreshed.
    +
    Called when the value of Player.getCurrentTimeline() changes.
    default void onTracksChanged​(Tracks tracks) -
    Called when the tracks change.
    +
    Called when the value of Player.getCurrentTracks() changes.
    @@ -443,7 +448,7 @@

    Method Summary

    default void onVolumeChanged​(float volume) -
    Called when the volume changes.
    +
    Called when the value of Player.getVolume() changes.
    @@ -476,8 +481,6 @@

    onEvents

    State changes and events that happen within one Looper message queue iteration are reported together and only after all individual callbacks were triggered. -

    Only state changes represented by events are reported through this method. -

    Listeners should prefer this method over individual callbacks in the following cases:

      @@ -510,7 +513,7 @@

      onTimelineChanged

      default void onTimelineChanged​(Timeline timeline,
                                      @TimelineChangeReason
                                      @com.google.android.exoplayer2.Player.TimelineChangeReason int reason)
      -
      Called when the timeline has been refreshed. +
      Called when the value of Player.getCurrentTimeline() changes.

      Note that the current MediaItem or playback position may change as a result of a timeline change. If playback can't continue smoothly because of this timeline change, a @@ -539,8 +542,8 @@

      onMediaItemTransition

      Called when playback transitions to a media item or starts repeating a media item according to the current repeat mode. -

      Note that this callback is also called when the playlist becomes non-empty or empty as a - consequence of a playlist change. +

      Note that this callback is also called when the value of Player.getCurrentTimeline() + becomes non-empty or empty.

      onEvents(Player, Events) will also be called to report this event along with other events that happen in the same Looper message queue iteration.

      @@ -558,7 +561,7 @@

      onMediaItemTransition

    • onTracksChanged

      default void onTracksChanged​(Tracks tracks)
      -
      Called when the tracks change. +
      Called when the value of Player.getCurrentTracks() changes.

      onEvents(Player, Events) will also be called to report this event along with other events that happen in the same Looper message queue iteration.

      @@ -575,11 +578,7 @@

      onTracksChanged

    • onMediaMetadataChanged

      default void onMediaMetadataChanged​(MediaMetadata mediaMetadata)
      -
      Called when the combined MediaMetadata changes. - -

      The provided MediaMetadata is a combination of the MediaItem metadata, the static metadata in the media's Format, and - any timed metadata that has been parsed from the media and output via onMetadata(Metadata). If a field is populated in the MediaItem.mediaMetadata, it will be prioritised above the same field coming from static or - timed metadata. +

      Called when the value of Player.getMediaMetadata() changes.

      This method may be called multiple times in quick succession. @@ -598,7 +597,7 @@

      onMediaMetadataChanged

    • onPlaylistMetadataChanged

      default void onPlaylistMetadataChanged​(MediaMetadata mediaMetadata)
      -
      Called when the playlist MediaMetadata changes. +
      Called when the value of Player.getPlaylistMetadata() changes.

      onEvents(Player, Events) will also be called to report this event along with other events that happen in the same Looper message queue iteration.

      @@ -698,7 +697,7 @@

      onPlaybackStateChanged

      other events that happen in the same Looper message queue iteration.
      Parameters:
      -
      playbackState - The new playback state.
      +
      playbackState - The new playback Player.State.
    @@ -718,7 +717,7 @@

    onPlayWhenReadyChanged

    Parameters:
    playWhenReady - Whether playback will proceed when ready.
    -
    reason - The reason for the change.
    +
    reason - The Player.PlayWhenReadyChangeReason for the change.
    @@ -788,7 +787,7 @@

    onShuffleModeEnabledChanged

    other events that happen in the same Looper message queue iteration.
    Parameters:
    -
    shuffleModeEnabled - Whether shuffling of media items is enabled.
    +
    shuffleModeEnabled - Whether shuffling of media items is enabled.
    @@ -881,10 +880,10 @@

    onPositionDiscontinuity

  • onPlaybackParametersChanged

    default void onPlaybackParametersChanged​(PlaybackParameters playbackParameters)
    -
    Called when the current playback parameters change. The playback parameters may change due to - a call to Player.setPlaybackParameters(PlaybackParameters), or the player itself may change - them (for example, if audio playback switches to passthrough or offload mode, where speed - adjustment is no longer possible). +
    Called when the value of Player.getPlaybackParameters() changes. The playback parameters + may change due to a call to Player.setPlaybackParameters(PlaybackParameters), or the player + itself may change them (for example, if audio playback switches to passthrough or offload + mode, where speed adjustment is no longer possible).

    onEvents(Player, Events) will also be called to report this event along with other events that happen in the same Looper message queue iteration.

    @@ -983,7 +982,7 @@

    onAudioSessionIdChanged

  • onAudioAttributesChanged

    default void onAudioAttributesChanged​(AudioAttributes audioAttributes)
    -
    Called when the audio attributes change. +
    Called when the value of Player.getAudioAttributes() changes.

    onEvents(Player, Events) will also be called to report this event along with other events that happen in the same Looper message queue iteration.

    @@ -1000,7 +999,7 @@

    onAudioAttributesChanged

  • onVolumeChanged

    default void onVolumeChanged​(float volume)
    -
    Called when the volume changes. +
    Called when the value of Player.getVolume() changes.

    onEvents(Player, Events) will also be called to report this event along with other events that happen in the same Looper message queue iteration.

    @@ -1052,7 +1051,7 @@

    onDeviceInfoChanged

    onDeviceVolumeChanged

    default void onDeviceVolumeChanged​(int volume,
                                        boolean muted)
    -
    Called when the device volume or mute state changes. +
    Called when the value of Player.getDeviceVolume() or Player.isDeviceMuted() changes.

    onEvents(Player, Events) will also be called to report this event along with other events that happen in the same Looper message queue iteration.

    @@ -1127,10 +1126,10 @@

    onCues

    Deprecated.
    Use onCues(CueGroup) instead.
    -
    Called when there is a change in the Cues. +
    Called when the value of Player.getCurrentCues() changes. -

    Both onCues(List) and onCues(CueGroup) are called when there is a change - in the cues. You should only implement one or the other. +

    Both this method and onCues(CueGroup) are called when there is a change in the + cues. You should only implement one or the other.

    onEvents(Player, Events) will also be called to report this event along with other events that happen in the same Looper message queue iteration.

    @@ -1143,10 +1142,10 @@

    onCues

  • onCues

    default void onCues​(CueGroup cueGroup)
    -
    Called when there is a change in the CueGroup. +
    Called when the value of Player.getCurrentCues() changes. -

    Both onCues(List) and onCues(CueGroup) are called when there is a change - in the cues. You should only implement one or the other. +

    Both this method and onCues(List) are called when there is a change in the cues. + You should only implement one or the other.

    onEvents(Player, Events) will also be called to report this event along with other events that happen in the same Looper message queue iteration.

    diff --git a/docs/doc/reference/com/google/android/exoplayer2/Player.PositionInfo.html b/docs/doc/reference/com/google/android/exoplayer2/Player.PositionInfo.html index 14ab0b95893..52221c65265 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/Player.PositionInfo.html +++ b/docs/doc/reference/com/google/android/exoplayer2/Player.PositionInfo.html @@ -25,7 +25,7 @@ catch(err) { } //--> -var data = {"i0":10,"i1":10,"i2":10}; +var data = {"i0":10,"i1":10,"i2":10,"i3":10}; var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; @@ -339,6 +339,15 @@

    Method Summary

    Returns a Bundle representing the information stored in this object.
    + +Bundle +toBundle​(boolean canAccessCurrentMediaItem, + boolean canAccessTimeline) + +
    Returns a Bundle representing the information stored in this object, filtered by + available commands.
    + +
  • + + + +
      +
    • +

      toBundle

      +
      public Bundle toBundle​(boolean canAccessCurrentMediaItem,
      +                       boolean canAccessTimeline)
      +
      Returns a Bundle representing the information stored in this object, filtered by + available commands.
      +
      +
      Parameters:
      +
      canAccessCurrentMediaItem - Whether the Bundle should contain information + accessbile with Player.COMMAND_GET_CURRENT_MEDIA_ITEM.
      +
      canAccessTimeline - Whether the Bundle should contain information accessbile + with Player.COMMAND_GET_TIMELINE.
      +
      +
    • +
    diff --git a/docs/doc/reference/com/google/android/exoplayer2/Player.html b/docs/doc/reference/com/google/android/exoplayer2/Player.html index eaca85fcb01..3e52a33c9ae 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/Player.html +++ b/docs/doc/reference/com/google/android/exoplayer2/Player.html @@ -133,6 +133,10 @@

    Interface Player

    A media player interface defining traditional high-level functionality, such as the ability to play, pause, seek and query properties of the currently playing media. +

    All methods must be called from a single application + thread unless indicated otherwise. Callbacks in registered listeners are called on the same + thread. +

    This interface includes some convenience methods that can be implemented by calling other methods in the interface. BasePlayer implements these convenience methods so inheriting BasePlayer is recommended when implementing the interface so that only the minimal set of @@ -170,14 +174,15 @@

    Nested Class Summary

    static interface  Player.Command -
    Commands that can be executed on a Player.
    +
    Commands that indicate which method calls are currently permitted on a particular + Player instance.
    static class  Player.Commands -
    A set of commands.
    +
    A set of commands.
    @@ -198,14 +203,14 @@

    Nested Class Summary

    static class  Player.Events -
    A set of events.
    +
    A set of events.
    static interface  Player.Listener -
    Listener of all changes in the Player.
    +
    Listener for changes in a Player.
    @@ -286,7 +291,7 @@

    Field Summary

    static int COMMAND_CHANGE_MEDIA_ITEMS -
    Command to change the MediaItems in the playlist.
    +
    Command to change the media items in the playlist.
    @@ -300,7 +305,7 @@

    Field Summary

    static int COMMAND_GET_CURRENT_MEDIA_ITEM -
    Command to get the currently playing MediaItem.
    +
    Command to get information about the currently playing MediaItem.
    @@ -314,7 +319,7 @@

    Field Summary

    static int COMMAND_GET_MEDIA_ITEMS_METADATA -
    Command to get the MediaItems metadata.
    +
    Command to get metadata related to the playlist and current MediaItem.
    @@ -370,21 +375,21 @@

    Field Summary

    static int COMMAND_SEEK_BACK -
    Command to seek back by a fixed increment into the current MediaItem.
    +
    Command to seek back by a fixed increment inside the current MediaItem.
    static int COMMAND_SEEK_FORWARD -
    Command to seek forward by a fixed increment into the current MediaItem.
    +
    Command to seek forward by a fixed increment inside the current MediaItem.
    static int COMMAND_SEEK_IN_CURRENT_MEDIA_ITEM -
    Command to seek anywhere into the current MediaItem.
    +
    Command to seek anywhere inside the current MediaItem.
    @@ -414,7 +419,8 @@

    Field Summary

    static int COMMAND_SEEK_TO_NEXT -
    Command to seek to a later position in the current or next MediaItem.
    +
    Command to seek to a later position in the current MediaItem or the default position of + the next MediaItem.
    @@ -437,7 +443,8 @@

    Field Summary

    static int COMMAND_SEEK_TO_PREVIOUS -
    Command to seek to an earlier position in the current or previous MediaItem.
    +
    Command to seek to an earlier position in the current MediaItem or the default position + of the previous MediaItem.
    @@ -469,7 +476,7 @@

    Field Summary

    static int COMMAND_SET_DEVICE_VOLUME -
    Command to set the device volume and mute it.
    +
    Command to set the device volume.
    @@ -483,7 +490,7 @@

    Field Summary

    static int COMMAND_SET_MEDIA_ITEMS_METADATA -
    Command to set the MediaItems metadata.
    +
    Command to set the playlist metadata.
    @@ -532,7 +539,7 @@

    Field Summary

    static int COMMAND_STOP -
    Command to stop playback or release the player.
    +
    Command to stop playback.
    @@ -1243,7 +1250,7 @@

    Method Summary

    int getMediaItemCount() -
    Returns the number of media items in the playlist.
    +
    Returns the number of media items in the playlist.
    @@ -1282,7 +1289,7 @@

    Method Summary

    @com.google.android.exoplayer2.Player.State int getPlaybackState() -
    Returns the current playback state of the player.
    +
    Returns the current playback state of the player.
    @@ -1757,8 +1764,8 @@

    Method Summary

    void setMediaItems​(List<MediaItem> mediaItems) -
    Clears the playlist, adds the specified MediaItems and resets the position to - the default position.
    +
    Clears the playlist, adds the specified media items and resets the + position to the default position.
    @@ -1766,7 +1773,7 @@

    Method Summary

    setMediaItems​(List<MediaItem> mediaItems, boolean resetPosition) -
    Clears the playlist and adds the specified MediaItems.
    +
    Clears the playlist and adds the specified media items.
    @@ -1775,7 +1782,7 @@

    Method Summary

    int startIndex, long startPositionMs) -
    Clears the playlist and adds the specified MediaItems.
    +
    Clears the playlist and adds the specified media items.
    @@ -2729,7 +2736,15 @@

    EVENT_DEVICE_VOLUME_CHANGED

  • COMMAND_PLAY_PAUSE

    static final int COMMAND_PLAY_PAUSE
    -
    Command to start, pause or resume playback.
    +
    Command to start, pause or resume playback. + +

    The following methods must only be called if this command is available: + +

    See Also:
    Constant Field Values
    @@ -2743,7 +2758,9 @@

    COMMAND_PLAY_PAUSE

  • COMMAND_PREPARE

    static final int COMMAND_PREPARE
    -
    Command to prepare the player.
    +
    Command to prepare the player. + +

    The prepare() method must only be called if this command is available.

    See Also:
    Constant Field Values
    @@ -2757,7 +2774,9 @@

    COMMAND_PREPARE

  • COMMAND_STOP

    static final int COMMAND_STOP
    -
    Command to stop playback or release the player.
    +
    Command to stop playback. + +

    The stop() method must only be called if this command is available.

    See Also:
    Constant Field Values
    @@ -2771,7 +2790,10 @@

    COMMAND_STOP

  • COMMAND_SEEK_TO_DEFAULT_POSITION

    static final int COMMAND_SEEK_TO_DEFAULT_POSITION
    -
    Command to seek to the default position of the current MediaItem.
    +
    Command to seek to the default position of the current MediaItem. + +

    The seekToDefaultPosition() method must only be called if this command is + available.

    See Also:
    Constant Field Values
    @@ -2785,7 +2807,9 @@

    COMMAND_SEEK_TO_DEFAULT_POSITION

  • COMMAND_SEEK_IN_CURRENT_MEDIA_ITEM

    static final int COMMAND_SEEK_IN_CURRENT_MEDIA_ITEM
    -
    Command to seek anywhere into the current MediaItem.
    +
    Command to seek anywhere inside the current MediaItem. + +

    The seekTo(long) method must only be called if this command is available.

    See Also:
    Constant Field Values
    @@ -2816,7 +2840,10 @@

    COMMAND_SEEK_IN_CURRENT_WINDOW

  • COMMAND_SEEK_TO_PREVIOUS_MEDIA_ITEM

    static final int COMMAND_SEEK_TO_PREVIOUS_MEDIA_ITEM
    -
    Command to seek to the default position of the previous MediaItem.
    +
    Command to seek to the default position of the previous MediaItem. + +

    The seekToPreviousMediaItem() method must only be called if this command is + available.

    See Also:
    Constant Field Values
    @@ -2847,7 +2874,10 @@

    COMMAND_SEEK_TO_PREVIOUS_WINDOW

  • COMMAND_SEEK_TO_PREVIOUS

    static final int COMMAND_SEEK_TO_PREVIOUS
    -
    Command to seek to an earlier position in the current or previous MediaItem.
    +
    Command to seek to an earlier position in the current MediaItem or the default position + of the previous MediaItem. + +

    The seekToPrevious() method must only be called if this command is available.

    See Also:
    Constant Field Values
    @@ -2861,7 +2891,9 @@

    COMMAND_SEEK_TO_PREVIOUS

  • COMMAND_SEEK_TO_NEXT_MEDIA_ITEM

    static final int COMMAND_SEEK_TO_NEXT_MEDIA_ITEM
    -
    Command to seek to the default position of the next MediaItem.
    +
    Command to seek to the default position of the next MediaItem. + +

    The seekToNextMediaItem() method must only be called if this command is available.

    See Also:
    Constant Field Values
    @@ -2892,7 +2924,10 @@

    COMMAND_SEEK_TO_NEXT_WINDOW

  • COMMAND_SEEK_TO_NEXT

    static final int COMMAND_SEEK_TO_NEXT
    -
    Command to seek to a later position in the current or next MediaItem.
    +
    Command to seek to a later position in the current MediaItem or the default position of + the next MediaItem. + +

    The seekToNext() method must only be called if this command is available.

    See Also:
    Constant Field Values
    @@ -2906,7 +2941,14 @@

    COMMAND_SEEK_TO_NEXT

  • COMMAND_SEEK_TO_MEDIA_ITEM

    static final int COMMAND_SEEK_TO_MEDIA_ITEM
    -
    Command to seek anywhere in any MediaItem.
    +
    Command to seek anywhere in any MediaItem. + +

    The following methods must only be called if this command is available: + +

    See Also:
    Constant Field Values
    @@ -2937,7 +2979,9 @@

    COMMAND_SEEK_TO_WINDOW

  • COMMAND_SEEK_BACK

    static final int COMMAND_SEEK_BACK
    -
    Command to seek back by a fixed increment into the current MediaItem.
    +
    Command to seek back by a fixed increment inside the current MediaItem. + +

    The seekBack() method must only be called if this command is available.

    See Also:
    Constant Field Values
    @@ -2951,7 +2995,9 @@

    COMMAND_SEEK_BACK

  • COMMAND_SEEK_FORWARD

    static final int COMMAND_SEEK_FORWARD
    -
    Command to seek forward by a fixed increment into the current MediaItem.
    +
    Command to seek forward by a fixed increment inside the current MediaItem. + +

    The seekForward() method must only be called if this command is available.

    See Also:
    Constant Field Values
    @@ -2965,7 +3011,14 @@

    COMMAND_SEEK_FORWARD

  • COMMAND_SET_SPEED_AND_PITCH

    static final int COMMAND_SET_SPEED_AND_PITCH
    -
    Command to set the playback speed and pitch.
    +
    Command to set the playback speed and pitch. + +

    The following methods must only be called if this command is available: + +

    See Also:
    Constant Field Values
    @@ -2979,7 +3032,10 @@

    COMMAND_SET_SPEED_AND_PITCH

  • COMMAND_SET_SHUFFLE_MODE

    static final int COMMAND_SET_SHUFFLE_MODE
    -
    Command to enable shuffling.
    +
    Command to enable shuffling. + +

    The setShuffleModeEnabled(boolean) method must only be called if this command is + available.

    See Also:
    Constant Field Values
    @@ -2993,7 +3049,9 @@

    COMMAND_SET_SHUFFLE_MODE

  • COMMAND_SET_REPEAT_MODE

    static final int COMMAND_SET_REPEAT_MODE
    -
    Command to set the repeat mode.
    +
    Command to set the repeat mode. + +

    The setRepeatMode(int) method must only be called if this command is available.

    See Also:
    Constant Field Values
    @@ -3007,7 +3065,27 @@

    COMMAND_SET_REPEAT_MODE

  • COMMAND_GET_CURRENT_MEDIA_ITEM

    static final int COMMAND_GET_CURRENT_MEDIA_ITEM
    -
    Command to get the currently playing MediaItem.
    +
    See Also:
    Constant Field Values
    @@ -3021,7 +3099,21 @@

    COMMAND_GET_CURRENT_MEDIA_ITEM

  • COMMAND_GET_TIMELINE

    static final int COMMAND_GET_TIMELINE
    -
    Command to get the information about the current timeline.
    +
    Command to get the information about the current timeline. + +

    The following methods must only be called if this command is available: + +

    See Also:
    Constant Field Values
    @@ -3035,7 +3127,14 @@

    COMMAND_GET_TIMELINE

  • COMMAND_GET_MEDIA_ITEMS_METADATA

    static final int COMMAND_GET_MEDIA_ITEMS_METADATA
    -
    Command to get the MediaItems metadata.
    +
    Command to get metadata related to the playlist and current MediaItem. + +

    The following methods must only be called if this command is available: + +

    See Also:
    Constant Field Values
    @@ -3049,7 +3148,10 @@

    COMMAND_GET_MEDIA_ITEMS_METADATA

  • COMMAND_SET_MEDIA_ITEMS_METADATA

    static final int COMMAND_SET_MEDIA_ITEMS_METADATA
    -
    Command to set the MediaItems metadata.
    +
    Command to set the playlist metadata. + +

    The setPlaylistMetadata(MediaMetadata) method must only be called if this command + is available.

    See Also:
    Constant Field Values
    @@ -3063,7 +3165,15 @@

    COMMAND_SET_MEDIA_ITEMS_METADATA

  • COMMAND_SET_MEDIA_ITEM

    static final int COMMAND_SET_MEDIA_ITEM
    -
    Command to set a MediaItem.
    +
    Command to set a MediaItem. + +

    The following methods must only be called if this command is available: + +

    See Also:
    Constant Field Values
    @@ -3077,7 +3187,24 @@

    COMMAND_SET_MEDIA_ITEM

  • COMMAND_CHANGE_MEDIA_ITEMS

    static final int COMMAND_CHANGE_MEDIA_ITEMS
    -
    Command to change the MediaItems in the playlist.
    +
    See Also:
    Constant Field Values
    @@ -3091,7 +3218,9 @@

    COMMAND_CHANGE_MEDIA_ITEMS

  • COMMAND_GET_AUDIO_ATTRIBUTES

    static final int COMMAND_GET_AUDIO_ATTRIBUTES
    -
    Command to get the player current AudioAttributes.
    +
    Command to get the player current AudioAttributes. + +

    The getAudioAttributes() method must only be called if this command is available.

    See Also:
    Constant Field Values
    @@ -3105,7 +3234,9 @@

    COMMAND_GET_AUDIO_ATTRIBUTES

  • COMMAND_GET_VOLUME

    static final int COMMAND_GET_VOLUME
    -
    Command to get the player volume.
    +
    Command to get the player volume. + +

    The getVolume() method must only be called if this command is available.

    See Also:
    Constant Field Values
    @@ -3119,7 +3250,14 @@

    COMMAND_GET_VOLUME

  • COMMAND_GET_DEVICE_VOLUME

    static final int COMMAND_GET_DEVICE_VOLUME
    -
    Command to get the device volume and whether it is muted.
    +
    Command to get the device volume and whether it is muted. + +

    The following methods must only be called if this command is available: + +

    See Also:
    Constant Field Values
    @@ -3133,7 +3271,9 @@

    COMMAND_GET_DEVICE_VOLUME

  • COMMAND_SET_VOLUME

    static final int COMMAND_SET_VOLUME
    -
    Command to set the player volume.
    +
    Command to set the player volume. + +

    The setVolume(float) method must only be called if this command is available.

    See Also:
    Constant Field Values
    @@ -3147,7 +3287,9 @@

    COMMAND_SET_VOLUME

  • COMMAND_SET_DEVICE_VOLUME

    static final int COMMAND_SET_DEVICE_VOLUME
    -
    Command to set the device volume and mute it.
    +
    Command to set the device volume. + +

    The setDeviceVolume(int) method must only be called if this command is available.

    See Also:
    Constant Field Values
    @@ -3161,7 +3303,15 @@

    COMMAND_SET_DEVICE_VOLUME

  • COMMAND_ADJUST_DEVICE_VOLUME

    static final int COMMAND_ADJUST_DEVICE_VOLUME
    -
    Command to increase and decrease the device volume and mute it.
    +
    Command to increase and decrease the device volume and mute it. + +

    The following methods must only be called if this command is available: + +

    See Also:
    Constant Field Values
    @@ -3175,7 +3325,19 @@

    COMMAND_ADJUST_DEVICE_VOLUME

  • COMMAND_SET_VIDEO_SURFACE

    static final int COMMAND_SET_VIDEO_SURFACE
    -
    Command to set and clear the surface on which to render the video.
    +
    Command to set and clear the surface on which to render the video. + +

    The following methods must only be called if this command is available: + +

    See Also:
    Constant Field Values
    @@ -3189,7 +3351,9 @@

    COMMAND_SET_VIDEO_SURFACE

  • COMMAND_GET_TEXT

    static final int COMMAND_GET_TEXT
    -
    Command to get the text that should currently be displayed by the player.
    +
    Command to get the text that should currently be displayed by the player. + +

    The getCurrentCues() method must only be called if this command is available.

    See Also:
    Constant Field Values
    @@ -3203,7 +3367,10 @@

    COMMAND_GET_TEXT

  • COMMAND_SET_TRACK_SELECTION_PARAMETERS

    static final int COMMAND_SET_TRACK_SELECTION_PARAMETERS
    -
    Command to set the player's track selection parameters.
    +
    Command to set the player's track selection parameters. + +

    The setTrackSelectionParameters(TrackSelectionParameters) method must only be + called if this command is available.

    See Also:
    Constant Field Values
    @@ -3217,7 +3384,9 @@

    COMMAND_SET_TRACK_SELECTION_PARAMETERS

  • COMMAND_GET_TRACKS

    static final int COMMAND_GET_TRACKS
    -
    Command to get details of the current track selection.
    +
    Command to get details of the current track selection. + +

    The getCurrentTracks() method must only be called if this command is available.

    See Also:
    Constant Field Values
    @@ -3256,7 +3425,9 @@

    Method Detail

    getApplicationLooper

    Looper getApplicationLooper()
    Returns the Looper associated with the application thread that's used to access the - player and on which player events are received.
    + player and on which player events are received. + +

    This method can be called from any thread.

  • @@ -3268,7 +3439,9 @@

    addListener

    void addListener​(Player.Listener listener)
    Registers a listener to receive all events from the player. -

    The listener's methods will be called on the thread associated with getApplicationLooper().

    +

    The listener's methods will be called on the thread associated with getApplicationLooper(). + +

    This method can be called from any thread.

    Parameters:
    listener - The listener to register.
    @@ -3297,11 +3470,13 @@

    removeListener

  • setMediaItems

    void setMediaItems​(List<MediaItem> mediaItems)
    -
    Clears the playlist, adds the specified MediaItems and resets the position to - the default position.
    +
    Clears the playlist, adds the specified media items and resets the + position to the default position. + +

    This method must only be called if COMMAND_CHANGE_MEDIA_ITEMS is available.

    Parameters:
    -
    mediaItems - The new MediaItems.
    +
    mediaItems - The new media items.
  • @@ -3313,10 +3488,12 @@

    setMediaItems

    setMediaItems

    void setMediaItems​(List<MediaItem> mediaItems,
                        boolean resetPosition)
    -
    Clears the playlist and adds the specified MediaItems.
    +
    Clears the playlist and adds the specified media items. + +

    This method must only be called if COMMAND_CHANGE_MEDIA_ITEMS is available.

    Parameters:
    -
    mediaItems - The new MediaItems.
    +
    mediaItems - The new media items.
    resetPosition - Whether the playback position should be reset to the default position in the first Timeline.Window. If false, playback will start from the position defined by getCurrentMediaItemIndex() and getCurrentPosition().
    @@ -3332,10 +3509,12 @@

    setMediaItems

    void setMediaItems​(List<MediaItem> mediaItems,
                        int startIndex,
                        long startPositionMs)
    -
    Clears the playlist and adds the specified MediaItems.
    +
    Clears the playlist and adds the specified media items. + +

    This method must only be called if COMMAND_CHANGE_MEDIA_ITEMS is available.

    Parameters:
    -
    mediaItems - The new MediaItems.
    +
    mediaItems - The new media items.
    startIndex - The MediaItem index to start playback from. If C.INDEX_UNSET is passed, the current position is not reset.
    startPositionMs - The position in milliseconds to start playback from. If C.TIME_UNSET is passed, the default position of the given MediaItem is used. In @@ -3355,7 +3534,9 @@

    setMediaItems

    setMediaItem

    void setMediaItem​(MediaItem mediaItem)
    Clears the playlist, adds the specified MediaItem and resets the position to the - default position.
    + default position. + +

    This method must only be called if COMMAND_SET_MEDIA_ITEM is available.

    Parameters:
    mediaItem - The new MediaItem.
    @@ -3370,7 +3551,9 @@

    setMediaItem

    setMediaItem

    void setMediaItem​(MediaItem mediaItem,
                       long startPositionMs)
    -
    Clears the playlist and adds the specified MediaItem.
    +
    Clears the playlist and adds the specified MediaItem. + +

    This method must only be called if COMMAND_SET_MEDIA_ITEM is available.

    Parameters:
    mediaItem - The new MediaItem.
    @@ -3386,7 +3569,9 @@

    setMediaItem

    setMediaItem

    void setMediaItem​(MediaItem mediaItem,
                       boolean resetPosition)
    -
    Clears the playlist and adds the specified MediaItem.
    +
    Clears the playlist and adds the specified MediaItem. + +

    This method must only be called if COMMAND_SET_MEDIA_ITEM is available.

    Parameters:
    mediaItem - The new MediaItem.
    @@ -3403,7 +3588,9 @@

    setMediaItem

  • addMediaItem

    void addMediaItem​(MediaItem mediaItem)
    -
    Adds a media item to the end of the playlist.
    +
    Adds a media item to the end of the playlist. + +

    This method must only be called if COMMAND_CHANGE_MEDIA_ITEMS is available.

    Parameters:
    mediaItem - The MediaItem to add.
    @@ -3418,7 +3605,9 @@

    addMediaItem

    addMediaItem

    void addMediaItem​(int index,
                       MediaItem mediaItem)
    -
    Adds a media item at the given index of the playlist.
    +
    Adds a media item at the given index of the playlist. + +

    This method must only be called if COMMAND_CHANGE_MEDIA_ITEMS is available.

    Parameters:
    index - The index at which to add the media item. If the index is larger than the size of @@ -3434,10 +3623,12 @@

    addMediaItem

  • addMediaItems

    void addMediaItems​(List<MediaItem> mediaItems)
    -
    Adds a list of media items to the end of the playlist.
    +
    Adds a list of media items to the end of the playlist. + +

    This method must only be called if COMMAND_CHANGE_MEDIA_ITEMS is available.

    Parameters:
    -
    mediaItems - The MediaItems to add.
    +
    mediaItems - The media items to add.
  • @@ -3449,12 +3640,14 @@

    addMediaItems

    addMediaItems

    void addMediaItems​(int index,
                        List<MediaItem> mediaItems)
    -
    Adds a list of media items at the given index of the playlist.
    +
    Adds a list of media items at the given index of the playlist. + +

    This method must only be called if COMMAND_CHANGE_MEDIA_ITEMS is available.

    Parameters:
    index - The index at which to add the media items. If the index is larger than the size of the playlist, the media items are added to the end of the playlist.
    -
    mediaItems - The MediaItems to add.
    +
    mediaItems - The media items to add.
  • @@ -3466,10 +3659,13 @@

    addMediaItems

    moveMediaItem

    void moveMediaItem​(int currentIndex,
                        int newIndex)
    -
    Moves the media item at the current index to the new index.
    +
    Moves the media item at the current index to the new index. + +

    This method must only be called if COMMAND_CHANGE_MEDIA_ITEMS is available.

    Parameters:
    -
    currentIndex - The current index of the media item to move.
    +
    currentIndex - The current index of the media item to move. If the index is larger than + the size of the playlist, the request is ignored.
    newIndex - The new index of the media item. If the new index is larger than the size of the playlist the item is moved to the end of the playlist.
    @@ -3484,11 +3680,15 @@

    moveMediaItems

    void moveMediaItems​(int fromIndex,
                         int toIndex,
                         int newIndex)
    -
    Moves the media item range to the new index.
    +
    Moves the media item range to the new index. + +

    This method must only be called if COMMAND_CHANGE_MEDIA_ITEMS is available.

    Parameters:
    -
    fromIndex - The start of the range to move.
    -
    toIndex - The first item not to be included in the range (exclusive).
    +
    fromIndex - The start of the range to move. If the index is larger than the size of the + playlist, the request is ignored.
    +
    toIndex - The first item not to be included in the range (exclusive). If the index is + larger than the size of the playlist, items up to the end of the playlist are moved.
    newIndex - The new index of the first media item of the range. If the new index is larger than the size of the remaining playlist after removing the range, the range is moved to the end of the playlist.
    @@ -3502,10 +3702,13 @@

    moveMediaItems

  • removeMediaItem

    void removeMediaItem​(int index)
    -
    Removes the media item at the given index of the playlist.
    +
    Removes the media item at the given index of the playlist. + +

    This method must only be called if COMMAND_CHANGE_MEDIA_ITEMS is available.

    Parameters:
    -
    index - The index at which to remove the media item.
    +
    index - The index at which to remove the media item. If the index is larger than the size + of the playlist, the request is ignored.
  • @@ -3517,12 +3720,15 @@

    removeMediaItem

    removeMediaItems

    void removeMediaItems​(int fromIndex,
                           int toIndex)
    -
    Removes a range of media items from the playlist.
    +
    Removes a range of media items from the playlist. + +

    This method must only be called if COMMAND_CHANGE_MEDIA_ITEMS is available.

    Parameters:
    -
    fromIndex - The index at which to start removing media items.
    +
    fromIndex - The index at which to start removing media items. If the index is larger than + the size of the playlist, the request is ignored.
    toIndex - The index of the first item to be kept (exclusive). If the index is larger than - the size of the playlist, media items to the end of the playlist are removed.
    + the size of the playlist, media items up to the end of the playlist are removed.
    @@ -3533,7 +3739,9 @@

    removeMediaItems

  • clearMediaItems

    void clearMediaItems()
    -
    Clears the playlist.
    +
    Clears the playlist. + +

    This method must only be called if COMMAND_CHANGE_MEDIA_ITEMS is available.

  • @@ -3546,13 +3754,7 @@

    isCommandAvailable

    @com.google.android.exoplayer2.Player.Command int command)
    Returns whether the provided Player.Command is available. -

    This method does not execute the command. - -

    Executing a command that is not available (for example, calling seekToNextMediaItem() if COMMAND_SEEK_TO_NEXT_MEDIA_ITEM is unavailable) will - neither throw an exception nor generate a getPlayerError() player error}. - -

    COMMAND_SEEK_TO_PREVIOUS_MEDIA_ITEM and COMMAND_SEEK_TO_NEXT_MEDIA_ITEM - are unavailable if there is no such MediaItem.

    +

    This method does not execute the command.

    Parameters:
    command - A Player.Command.
    @@ -3583,13 +3785,7 @@

    getAvailableCommands

    Returns the player's currently available Player.Commands.

    The returned Player.Commands are not updated when available commands change. Use Player.Listener.onAvailableCommandsChanged(Commands) to get an update when the available commands - change. - -

    Executing a command that is not available (for example, calling seekToNextMediaItem() if COMMAND_SEEK_TO_NEXT_MEDIA_ITEM is unavailable) will - neither throw an exception nor generate a getPlayerError() player error}. - -

    COMMAND_SEEK_TO_PREVIOUS_MEDIA_ITEM and COMMAND_SEEK_TO_NEXT_MEDIA_ITEM - are unavailable if there is no such MediaItem.

    + change.
    Returns:
    The currently available Player.Commands.
    @@ -3607,6 +3803,8 @@

    prepare

    void prepare()
    Prepares the player. +

    This method must only be called if COMMAND_PREPARE is available. +

    This will move the player out of idle state and the player will start loading media and acquire resources needed for playback.

    @@ -3619,10 +3817,10 @@

    prepare

    getPlaybackState

    @State
     @com.google.android.exoplayer2.Player.State int getPlaybackState()
    -
    Returns the current playback state of the player.
    +
    Returns the current playback state of the player.
    Returns:
    -
    The current playback state.
    +
    The current playback state.
    See Also:
    Player.Listener.onPlaybackStateChanged(int)
    @@ -3640,7 +3838,7 @@

    getPlaybackSuppressionReason

    true, or PLAYBACK_SUPPRESSION_REASON_NONE if playback is not suppressed.
    Returns:
    -
    The current playback suppression reason.
    +
    The current Player.PlaybackSuppressionReason.
    See Also:
    Player.Listener.onPlaybackSuppressionReasonChanged(int)
    @@ -3700,7 +3898,9 @@

    getPlayerError

    play

    void play()
    Resumes playback as soon as getPlaybackState() == STATE_READY. Equivalent to - setPlayWhenReady(true).
    + setPlayWhenReady(true). + +

    This method must only be called if COMMAND_PLAY_PAUSE is available. @@ -3710,7 +3910,9 @@

    play

  • pause

    void pause()
    -
    Pauses playback. Equivalent to setPlayWhenReady(false).
    +
  • @@ -3722,7 +3924,9 @@

    setPlayWhenReady

    void setPlayWhenReady​(boolean playWhenReady)
    Sets whether playback should proceed when getPlaybackState() == STATE_READY. -

    If the player is already in the ready state then this method pauses and resumes playback.

    +

    If the player is already in the ready state then this method pauses and resumes playback. + +

    This method must only be called if COMMAND_PLAY_PAUSE is available.

    Parameters:
    playWhenReady - Whether playback should proceed when ready.
    @@ -3753,7 +3957,9 @@

    getPlayWhenReady

    setRepeatMode

    void setRepeatMode​(@RepeatMode
                        @com.google.android.exoplayer2.Player.RepeatMode int repeatMode)
    -
    Sets the Player.RepeatMode to be used for playback.
    +
    Sets the Player.RepeatMode to be used for playback. + +

    This method must only be called if COMMAND_SET_REPEAT_MODE is available.

    Parameters:
    repeatMode - The repeat mode.
    @@ -3784,7 +3990,9 @@

    getRepeatMode

  • setShuffleModeEnabled

    void setShuffleModeEnabled​(boolean shuffleModeEnabled)
    -
    Sets whether shuffling of media items is enabled.
    +
    Sets whether shuffling of media items is enabled. + +

    This method must only be called if COMMAND_SET_SHUFFLE_MODE is available.

    Parameters:
    shuffleModeEnabled - Whether shuffling is enabled.
    @@ -3830,7 +4038,9 @@

    seekToDefaultPosition

    void seekToDefaultPosition()
    Seeks to the default position associated with the current MediaItem. The position can depend on the type of media being played. For live streams it will typically be the live edge. - For other streams it will typically be the start.
    + For other streams it will typically be the start. + +

    This method must only be called if COMMAND_SEEK_TO_DEFAULT_POSITION is available.

  • @@ -3842,14 +4052,14 @@

    seekToDefaultPosition

    void seekToDefaultPosition​(int mediaItemIndex)
    Seeks to the default position associated with the specified MediaItem. The position can depend on the type of media being played. For live streams it will typically be the live edge. - For other streams it will typically be the start.
    + For other streams it will typically be the start. + +

    This method must only be called if COMMAND_SEEK_TO_MEDIA_ITEM is available.

    Parameters:
    mediaItemIndex - The index of the MediaItem whose associated default position - should be seeked to.
    -
    Throws:
    -
    IllegalSeekPositionException - If the player has a non-empty timeline and the provided - mediaItemIndex is not within the bounds of the current timeline.
    + should be seeked to. If the index is larger than the size of the playlist, the request is + ignored.
    @@ -3860,7 +4070,10 @@

    seekToDefaultPosition

  • seekTo

    void seekTo​(long positionMs)
    -
    Seeks to a position specified in milliseconds in the current MediaItem.
    +
    Seeks to a position specified in milliseconds in the current MediaItem. + +

    This method must only be called if COMMAND_SEEK_IN_CURRENT_MEDIA_ITEM is + available.

    Parameters:
    positionMs - The seek position in the current MediaItem, or C.TIME_UNSET @@ -3876,15 +4089,15 @@

    seekTo

    seekTo

    void seekTo​(int mediaItemIndex,
                 long positionMs)
    -
    Seeks to a position specified in milliseconds in the specified MediaItem.
    +
    Seeks to a position specified in milliseconds in the specified MediaItem. + +

    This method must only be called if COMMAND_SEEK_TO_MEDIA_ITEM is available.

    Parameters:
    -
    mediaItemIndex - The index of the MediaItem.
    +
    mediaItemIndex - The index of the MediaItem. If the index is larger than the size + of the playlist, the request is ignored.
    positionMs - The seek position in the specified MediaItem, or C.TIME_UNSET to seek to the media item's default position.
    -
    Throws:
    -
    IllegalSeekPositionException - If the player has a non-empty timeline and the provided - mediaItemIndex is not within the bounds of the current timeline.
  • @@ -3911,7 +4124,9 @@

    getSeekBackIncrement

  • seekBack

    void seekBack()
    -
    Seeks back in the current MediaItem by getSeekBackIncrement() milliseconds.
    +
    Seeks back in the current MediaItem by getSeekBackIncrement() milliseconds. + +

    This method must only be called if COMMAND_SEEK_BACK is available.

  • @@ -3938,7 +4153,9 @@

    getSeekForwardIncrement

    seekForward

    void seekForward()
    + milliseconds. + +

    This method must only be called if COMMAND_SEEK_FORWARD is available. @@ -3979,7 +4196,9 @@

    hasPreviousMediaItem

    Note: When the repeat mode is REPEAT_MODE_ONE, this method behaves the same as when the current repeat mode is REPEAT_MODE_OFF. See REPEAT_MODE_ONE for more - details. + details. + +

    This method must only be called if COMMAND_GET_TIMELINE is available. @@ -4020,7 +4239,10 @@

    seekToPreviousMediaItem

    Note: When the repeat mode is REPEAT_MODE_ONE, this method behaves the same as when the current repeat mode is REPEAT_MODE_OFF. See REPEAT_MODE_ONE for more - details. + details. + +

    This method must only be called if COMMAND_SEEK_TO_PREVIOUS_MEDIA_ITEM is + available. @@ -4060,7 +4282,9 @@

    seekToPrevious

  • Otherwise, if a previous media item exists and the current position is less than getMaxSeekToPreviousPosition(), seeks to the default position of the previous MediaItem.
  • Otherwise, seeks to 0 in the current MediaItem. - + + +

    This method must only be called if COMMAND_SEEK_TO_PREVIOUS is available.

  • @@ -4101,7 +4325,9 @@

    hasNextMediaItem

    Note: When the repeat mode is REPEAT_MODE_ONE, this method behaves the same as when the current repeat mode is REPEAT_MODE_OFF. See REPEAT_MODE_ONE for more - details. + details. + +

    This method must only be called if COMMAND_GET_TIMELINE is available. @@ -4143,7 +4369,9 @@

    seekToNextMediaItem

    Note: When the repeat mode is REPEAT_MODE_ONE, this method behaves the same as when the current repeat mode is REPEAT_MODE_OFF. See REPEAT_MODE_ONE for more - details. + details. + +

    This method must only be called if COMMAND_SEEK_TO_NEXT_MEDIA_ITEM is available. @@ -4163,7 +4391,9 @@

    seekToNext

  • Otherwise, if the current MediaItem is live and has not ended, seeks to the live edge of the current MediaItem.
  • Otherwise, does nothing. - + + +

    This method must only be called if COMMAND_SEEK_TO_NEXT is available.

  • @@ -4177,7 +4407,9 @@

    setPlaybackParameters

    player to the default, which means there is no speed or pitch adjustment.

    Playback parameters changes may cause the player to buffer. Player.Listener.onPlaybackParametersChanged(PlaybackParameters) will be called whenever the currently - active playback parameters change. + active playback parameters change. + +

    This method must only be called if COMMAND_SET_SPEED_AND_PITCH is available.

    Parameters:
    playbackParameters - The playback parameters.
    @@ -4195,11 +4427,13 @@

    setPlaybackSpeed

    Changes the rate at which playback occurs. The pitch is not changed.

    This is equivalent to - setPlaybackParameters(getPlaybackParameters().withSpeed(speed)).

    + setPlaybackParameters(getPlaybackParameters().withSpeed(speed)). + +

    This method must only be called if COMMAND_SET_SPEED_AND_PITCH is available.

    Parameters:
    speed - The linear factor by which playback will be sped up. Must be higher than 0. 1 is - normal speed, 2 is twice as fast, 0.5 is half normal speed...
    + normal speed, 2 is twice as fast, 0.5 is half normal speed.
    @@ -4233,7 +4467,9 @@

    stop

    still be called on the player if it's no longer required.

    Calling this method does not clear the playlist, reset the playback position or the playback - error. + error. + +

    This method must only be called if COMMAND_STOP is available. @@ -4269,7 +4505,9 @@

    release

  • getCurrentTracks

    Tracks getCurrentTracks()
    -
    Returns the current tracks.
    +
    Returns the current tracks. + +

    This method must only be called if COMMAND_GET_TRACKS is available.

    See Also:
    Player.Listener.onTracksChanged(Tracks)
    @@ -4311,7 +4549,10 @@

    setTrackSelectionParameters

    .buildUpon() .setMaxVideoSizeSd() .build()) - + + +

    This method must only be called if COMMAND_SET_TRACK_SELECTION_PARAMETERS is + available.

  • @@ -4327,7 +4568,9 @@

    getMediaMetadata

    This MediaMetadata is a combination of the MediaItem metadata, the static metadata in the media's Format, and any timed metadata that has been parsed from the media and output via Player.Listener.onMetadata(Metadata). If a field is populated in the MediaItem.mediaMetadata, - it will be prioritised above the same field coming from static or timed metadata. + it will be prioritised above the same field coming from static or timed metadata. + +

    This method must only be called if COMMAND_GET_MEDIA_ITEMS_METADATA is available. @@ -4337,7 +4580,9 @@

    getMediaMetadata

  • getPlaylistMetadata

    MediaMetadata getPlaylistMetadata()
    -
    Returns the playlist MediaMetadata, as set by setPlaylistMetadata(MediaMetadata), or MediaMetadata.EMPTY if not supported.
    +
    Returns the playlist MediaMetadata, as set by setPlaylistMetadata(MediaMetadata), or MediaMetadata.EMPTY if not supported. + +

    This method must only be called if COMMAND_GET_MEDIA_ITEMS_METADATA is available.

  • @@ -4347,7 +4592,9 @@

    getPlaylistMetadata

  • setPlaylistMetadata

    void setPlaylistMetadata​(MediaMetadata mediaMetadata)
    -
    Sets the playlist MediaMetadata.
    +
    Sets the playlist MediaMetadata. + +

    This method must only be called if COMMAND_SET_MEDIA_ITEMS_METADATA is available.

  • @@ -4368,7 +4615,9 @@

    getCurrentManifest

  • getCurrentTimeline

    Timeline getCurrentTimeline()
    -
    Returns the current Timeline. Never null, but may be empty.
    +
    Returns the current Timeline. Never null, but may be empty. + +

    This method must only be called if COMMAND_GET_TIMELINE is available.

    See Also:
    Player.Listener.onTimelineChanged(Timeline, int)
    @@ -4382,7 +4631,9 @@

    getCurrentTimeline

  • getCurrentPeriodIndex

    int getCurrentPeriodIndex()
    -
    Returns the index of the period currently being played.
    +
    Returns the index of the period currently being played. + +

    This method must only be called if COMMAND_GET_TIMELINE is available.

  • @@ -4406,7 +4657,9 @@

    getCurrentWindowIndex

    getCurrentMediaItemIndex

    int getCurrentMediaItemIndex()
    Returns the index of the current MediaItem in the timeline, or the prospective index if the current timeline is - empty.
    + empty. + +

    This method must only be called if COMMAND_GET_TIMELINE is available.

  • @@ -4435,7 +4688,9 @@

    getNextMediaItemIndex

    Note: When the repeat mode is REPEAT_MODE_ONE, this method behaves the same as when the current repeat mode is REPEAT_MODE_OFF. See REPEAT_MODE_ONE for more - details. + details. + +

    This method must only be called if COMMAND_GET_TIMELINE is available. @@ -4464,7 +4719,9 @@

    getPreviousMediaItemIndex

    Note: When the repeat mode is REPEAT_MODE_ONE, this method behaves the same as when the current repeat mode is REPEAT_MODE_OFF. See REPEAT_MODE_ONE for more - details. + details. + +

    This method must only be called if COMMAND_GET_TIMELINE is available. @@ -4475,7 +4732,9 @@

    getPreviousMediaItemIndex

    getCurrentMediaItem

    @Nullable
     MediaItem getCurrentMediaItem()
    -
    Returns the currently playing MediaItem. May be null if the timeline is empty.
    +
    Returns the currently playing MediaItem. May be null if the timeline is empty. + +

    This method must only be called if COMMAND_GET_CURRENT_MEDIA_ITEM is available.

    See Also:
    Player.Listener.onMediaItemTransition(MediaItem, int)
    @@ -4489,7 +4748,9 @@

    getCurrentMediaItem

  • getMediaItemCount

    int getMediaItemCount()
    -
    Returns the number of media items in the playlist.
    +
    Returns the number of media items in the playlist. + +

    This method must only be called if COMMAND_GET_TIMELINE is available.

  • @@ -4499,7 +4760,9 @@

    getMediaItemCount

  • getMediaItemAt

    MediaItem getMediaItemAt​(int index)
    -
    Returns the MediaItem at the given index.
    +
    Returns the MediaItem at the given index. + +

    This method must only be called if COMMAND_GET_TIMELINE is available.

  • @@ -4510,7 +4773,9 @@

    getMediaItemAt

    getDuration

    long getDuration()
    + the duration is not known. + +

    This method must only be called if COMMAND_GET_CURRENT_MEDIA_ITEM is available. @@ -4521,7 +4786,9 @@

    getDuration

    getCurrentPosition

    long getCurrentPosition()
    + position in milliseconds if the current timeline is empty. + +

    This method must only be called if COMMAND_GET_CURRENT_MEDIA_ITEM is available. @@ -4532,7 +4799,9 @@

    getCurrentPosition

    getBufferedPosition

    long getBufferedPosition()
    Returns an estimate of the position in the current content or ad up to which data is buffered, - in milliseconds.
    + in milliseconds. + +

    This method must only be called if COMMAND_GET_CURRENT_MEDIA_ITEM is available. @@ -4556,7 +4825,9 @@

    getBufferedPercentage

    getTotalBufferedDuration

    long getTotalBufferedDuration()
    + This includes pre-buffered data for subsequent ads and media items. + +

    This method must only be called if COMMAND_GET_CURRENT_MEDIA_ITEM is available. @@ -4580,7 +4851,9 @@

    isCurrentWindowDynamic

    isCurrentMediaItemDynamic

    boolean isCurrentMediaItemDynamic()
    Returns whether the current MediaItem is dynamic (may change when the Timeline - is updated), or false if the Timeline is empty.
    + is updated), or false if the Timeline is empty. + +

    This method must only be called if COMMAND_GET_CURRENT_MEDIA_ITEM is available.

    See Also:
    Timeline.Window.isDynamic
    @@ -4608,7 +4881,9 @@

    isCurrentWindowLive

    isCurrentMediaItemLive

    boolean isCurrentMediaItemLive()
    Returns whether the current MediaItem is live, or false if the Timeline - is empty.
    + is empty. + +

    This method must only be called if COMMAND_GET_CURRENT_MEDIA_ITEM is available.

    See Also:
    Timeline.Window.isLive()
    @@ -4630,7 +4905,9 @@

    getCurrentLiveOffset

    positive.

    Note that this offset may rely on an accurate local time, so this method may return an - incorrect value if the difference between system clock and server clock is unknown. + incorrect value if the difference between system clock and server clock is unknown. + +

    This method must only be called if COMMAND_GET_CURRENT_MEDIA_ITEM is available. @@ -4653,7 +4930,9 @@

    isCurrentWindowSeekable

  • isCurrentMediaItemSeekable

    boolean isCurrentMediaItemSeekable()
    -
    Returns whether the current MediaItem is seekable, or false if the Timeline is empty.
    +
    Returns whether the current MediaItem is seekable, or false if the Timeline is empty. + +

    This method must only be called if COMMAND_GET_CURRENT_MEDIA_ITEM is available.

    See Also:
    Timeline.Window.isSeekable
    @@ -4667,7 +4946,9 @@

    isCurrentMediaItemSeekable

  • isPlayingAd

    boolean isPlayingAd()
    -
    Returns whether the player is currently playing an ad.
    +
    Returns whether the player is currently playing an ad. + +

    This method must only be called if COMMAND_GET_CURRENT_MEDIA_ITEM is available.

  • @@ -4678,7 +4959,9 @@

    isPlayingAd

    getCurrentAdGroupIndex

    int getCurrentAdGroupIndex()
    If isPlayingAd() returns true, returns the index of the ad group in the period - currently being played. Returns C.INDEX_UNSET otherwise.
    + currently being played. Returns C.INDEX_UNSET otherwise. + +

    This method must only be called if COMMAND_GET_CURRENT_MEDIA_ITEM is available.

  • @@ -4689,7 +4972,9 @@

    getCurrentAdGroupIndex

    getCurrentAdIndexInAdGroup

    int getCurrentAdIndexInAdGroup()
    If isPlayingAd() returns true, returns the index of the ad in its ad group. Returns - C.INDEX_UNSET otherwise.
    + C.INDEX_UNSET otherwise. + +

    This method must only be called if COMMAND_GET_CURRENT_MEDIA_ITEM is available. @@ -4701,7 +4986,9 @@

    getContentDuration

    long getContentDuration()
    If isPlayingAd() returns true, returns the duration of the current content in milliseconds, or C.TIME_UNSET if the duration is not known. If there is no ad playing, - the returned duration is the same as that returned by getDuration().
    + the returned duration is the same as that returned by getDuration(). + +

    This method must only be called if COMMAND_GET_CURRENT_MEDIA_ITEM is available. @@ -4713,7 +5000,9 @@

    getContentPosition

    long getContentPosition()
    If isPlayingAd() returns true, returns the content position that will be played once all ads in the ad group have finished playing, in milliseconds. If there is no ad - playing, the returned position is the same as that returned by getCurrentPosition().
    + playing, the returned position is the same as that returned by getCurrentPosition(). + +

    This method must only be called if COMMAND_GET_CURRENT_MEDIA_ITEM is available. @@ -4725,7 +5014,9 @@

    getContentBufferedPosition

    long getContentBufferedPosition()
    If isPlayingAd() returns true, returns an estimate of the content position in the current content up to which data is buffered, in milliseconds. If there is no ad playing, - the returned position is the same as that returned by getBufferedPosition().
    + the returned position is the same as that returned by getBufferedPosition(). + +

    This method must only be called if COMMAND_GET_CURRENT_MEDIA_ITEM is available. @@ -4735,7 +5026,9 @@

    getContentBufferedPosition

  • getAudioAttributes

    AudioAttributes getAudioAttributes()
    -
    Returns the attributes for audio playback.
    +
    Returns the attributes for audio playback. + +

    This method must only be called if COMMAND_GET_AUDIO_ATTRIBUTES is available.

  • @@ -4747,7 +5040,9 @@

    setVolume

    void setVolume​(@FloatRange(from=0.0,to=1.0)
                    float volume)
    Sets the audio volume, valid values are between 0 (silence) and 1 (unity gain, signal - unchanged), inclusive.
    + unchanged), inclusive. + +

    This method must only be called if COMMAND_SET_VOLUME is available.

    Parameters:
    volume - Linear output gain to apply to all audio channels.
    @@ -4763,7 +5058,9 @@

    getVolume

    @FloatRange(from=0.0,
                 to=1.0)
     float getVolume()
    -
    Returns the audio volume, with 0 being silence and 1 being unity gain (signal unchanged).
    +
    Returns the audio volume, with 0 being silence and 1 being unity gain (signal unchanged). + +

    This method must only be called if COMMAND_GET_VOLUME is available.

    Returns:
    The linear gain applied to all audio channels.
    @@ -4778,7 +5075,9 @@

    getVolume

    clearVideoSurface

    void clearVideoSurface()
    Clears any Surface, SurfaceHolder, SurfaceView or TextureView - currently set on the player.
    + currently set on the player. + +

    This method must only be called if COMMAND_SET_VIDEO_SURFACE is available. @@ -4790,7 +5089,9 @@

    clearVideoSurface

    void clearVideoSurface​(@Nullable
                            Surface surface)
    Clears the Surface onto which video is being rendered if it matches the one passed. - Else does nothing.
    + Else does nothing. + +

    This method must only be called if COMMAND_SET_VIDEO_SURFACE is available.

    Parameters:
    surface - The surface to clear.
    @@ -4811,7 +5112,9 @@

    setVideoSurface

    If the surface is held by a SurfaceView, TextureView or SurfaceHolder then it's recommended to use setVideoSurfaceView(SurfaceView), setVideoTextureView(TextureView) or setVideoSurfaceHolder(SurfaceHolder) rather than this method, since passing the holder allows the player to track the lifecycle of the surface - automatically. + automatically. + +

    This method must only be called if COMMAND_SET_VIDEO_SURFACE is available.

    Parameters:
    surface - The Surface.
    @@ -4830,7 +5133,9 @@

    setVideoSurfaceHolder

    rendered. The player will track the lifecycle of the surface automatically.

    The thread that calls the SurfaceHolder.Callback methods must be the thread - associated with getApplicationLooper(). + associated with getApplicationLooper(). + +

    This method must only be called if COMMAND_SET_VIDEO_SURFACE is available.

    Parameters:
    surfaceHolder - The surface holder.
    @@ -4846,7 +5151,9 @@

    clearVideoSurfaceHolder

    void clearVideoSurfaceHolder​(@Nullable
                                  SurfaceHolder surfaceHolder)
    Clears the SurfaceHolder that holds the Surface onto which video is being - rendered if it matches the one passed. Else does nothing.
    + rendered if it matches the one passed. Else does nothing. + +

    This method must only be called if COMMAND_SET_VIDEO_SURFACE is available.

    Parameters:
    surfaceHolder - The surface holder to clear.
    @@ -4865,7 +5172,9 @@

    setVideoSurfaceView

    lifecycle of the surface automatically.

    The thread that calls the SurfaceHolder.Callback methods must be the thread - associated with getApplicationLooper(). + associated with getApplicationLooper(). + +

    This method must only be called if COMMAND_SET_VIDEO_SURFACE is available.

    Parameters:
    surfaceView - The surface view.
    @@ -4881,7 +5190,9 @@

    clearVideoSurfaceView

    void clearVideoSurfaceView​(@Nullable
                                SurfaceView surfaceView)
    Clears the SurfaceView onto which video is being rendered if it matches the one passed. - Else does nothing.
    + Else does nothing. + +

    This method must only be called if COMMAND_SET_VIDEO_SURFACE is available.

    Parameters:
    surfaceView - The texture view to clear.
    @@ -4900,7 +5211,9 @@

    setVideoTextureView

    lifecycle of the surface automatically.

    The thread that calls the TextureView.SurfaceTextureListener methods must be the - thread associated with getApplicationLooper(). + thread associated with getApplicationLooper(). + +

    This method must only be called if COMMAND_SET_VIDEO_SURFACE is available.

    Parameters:
    textureView - The texture view.
    @@ -4916,7 +5229,9 @@

    clearVideoTextureView

    void clearVideoTextureView​(@Nullable
                                TextureView textureView)
    Clears the TextureView onto which video is being rendered if it matches the one passed. - Else does nothing.
    + Else does nothing. + +

    This method must only be called if COMMAND_SET_VIDEO_SURFACE is available.

    Parameters:
    textureView - The texture view to clear.
    @@ -4961,7 +5276,9 @@

    getSurfaceSize

  • getCurrentCues

    CueGroup getCurrentCues()
    -
    Returns the current CueGroup.
    +
    Returns the current CueGroup. + +

    This method must only be called if COMMAND_GET_TEXT is available.

  • @@ -4990,7 +5307,9 @@

    getDeviceVolume

    Util.getStreamTypeForAudioUsage(int).

    For devices with remote playback, the volume of the - remote device is returned. + remote device is returned. + +

    This method must only be called if COMMAND_GET_DEVICE_VOLUME is available. @@ -5000,7 +5319,9 @@

    getDeviceVolume

  • isDeviceMuted

    boolean isDeviceMuted()
    -
    Gets whether the device is muted or not.
    +
  • @@ -5011,7 +5332,9 @@

    isDeviceMuted

    setDeviceVolume

    void setDeviceVolume​(@IntRange(from=0L)
                          int volume)
    -
    Sets the volume of the device.
    +
    Parameters:
    volume - The volume to set.
    @@ -5025,7 +5348,9 @@

    setDeviceVolume

  • increaseDeviceVolume

    void increaseDeviceVolume()
    -
    Increases the volume of the device.
    +
    Increases the volume of the device. + +

    This method must only be called if COMMAND_ADJUST_DEVICE_VOLUME is available.

  • @@ -5035,7 +5360,9 @@

    increaseDeviceVolume

  • decreaseDeviceVolume

    void decreaseDeviceVolume()
    -
    Decreases the volume of the device.
    +
  • @@ -5045,7 +5372,9 @@

    decreaseDeviceVolume

  • setDeviceMuted

    void setDeviceMuted​(boolean muted)
    -
    Sets the mute state of the device.
    +
  • diff --git a/docs/doc/reference/com/google/android/exoplayer2/RendererCapabilities.html b/docs/doc/reference/com/google/android/exoplayer2/RendererCapabilities.html index 6169dca9ca2..9fa2e0be7c1 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/RendererCapabilities.html +++ b/docs/doc/reference/com/google/android/exoplayer2/RendererCapabilities.html @@ -242,15 +242,15 @@

    Field Summary

    static int DECODER_SUPPORT_FALLBACK -
    The renderer will use a fallback decoder.
    +
    The format exceeds the primary decoder's capabilities but is supported by fallback decoder
    static int DECODER_SUPPORT_FALLBACK_MIMETYPE -
    The renderer will use a decoder for fallback mimetype if possible as format's MIME type is - unsupported
    +
    The format's MIME type is unsupported and the renderer may use a decoder for a fallback MIME + type.
    @@ -748,8 +748,8 @@

    MODE_SUPPORT_MASK

  • DECODER_SUPPORT_FALLBACK_MIMETYPE

    static final int DECODER_SUPPORT_FALLBACK_MIMETYPE
    -
    The renderer will use a decoder for fallback mimetype if possible as format's MIME type is - unsupported
    +
    The format's MIME type is unsupported and the renderer may use a decoder for a fallback MIME + type.
    See Also:
    Constant Field Values
    @@ -777,7 +777,7 @@

    DECODER_SUPPORT_PRIMARY

  • DECODER_SUPPORT_FALLBACK

    static final int DECODER_SUPPORT_FALLBACK
    -
    The renderer will use a fallback decoder.
    +
    The format exceeds the primary decoder's capabilities but is supported by fallback decoder
    See Also:
    Constant Field Values
    diff --git a/docs/doc/reference/com/google/android/exoplayer2/SimpleBasePlayer.MediaItemData.Builder.html b/docs/doc/reference/com/google/android/exoplayer2/SimpleBasePlayer.MediaItemData.Builder.html new file mode 100644 index 00000000000..dd886cc7b07 --- /dev/null +++ b/docs/doc/reference/com/google/android/exoplayer2/SimpleBasePlayer.MediaItemData.Builder.html @@ -0,0 +1,752 @@ + + + + +SimpleBasePlayer.MediaItemData.Builder (ExoPlayer library) + + + + + + + + + + + + + +
    + +
    + +
    +
    + +

    Class SimpleBasePlayer.MediaItemData.Builder

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.google.android.exoplayer2.SimpleBasePlayer.MediaItemData.Builder
      • +
      +
    • +
    +
    + +
    +
    + +
    +
    +
      +
    • + +
      +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          Builder

          +
          public Builder​(Object uid)
          +
          Creates the builder.
          +
          +
          Parameters:
          +
          uid - The unique identifier of the media item within a playlist. This value will be + set as Timeline.Window.uid for this item.
          +
          +
        • +
        +
      • +
      +
      + +
      +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          setUid

          +
          @CanIgnoreReturnValue
          +public SimpleBasePlayer.MediaItemData.Builder setUid​(Object uid)
          +
          Sets the unique identifier of this media item within a playlist. + +

          This value will be set as Timeline.Window.uid for this item.

          +
          +
          Parameters:
          +
          uid - The unique identifier of this media item within a playlist.
          +
          Returns:
          +
          This builder.
          +
          +
        • +
        + + + + + + + + + + + +
          +
        • +

          setMediaMetadata

          +
          @CanIgnoreReturnValue
          +public SimpleBasePlayer.MediaItemData.Builder setMediaMetadata​(@Nullable
          +                                                               MediaMetadata mediaMetadata)
          +
          Sets the MediaMetadata. + +

          This data includes static data from the MediaItem and + the media's Format, as well any dynamic metadata that has been + parsed from the media. If null, the metadata is assumed to be the simple combination of the + MediaItem metadata and the metadata of the selected Formats.

          +
          +
          Parameters:
          +
          mediaMetadata - The MediaMetadata, or null to assume that the metadata is the + simple combination of the MediaItem metadata and the + metadata of the selected Formats.
          +
          Returns:
          +
          This builder.
          +
          +
        • +
        + + + +
          +
        • +

          setManifest

          +
          @CanIgnoreReturnValue
          +public SimpleBasePlayer.MediaItemData.Builder setManifest​(@Nullable
          +                                                          Object manifest)
          +
          Sets the manifest of the media item.
          +
          +
          Parameters:
          +
          manifest - The manifest of the media item, or null if not applicable.
          +
          Returns:
          +
          This builder.
          +
          +
        • +
        + + + + + + + +
          +
        • +

          setPresentationStartTimeMs

          +
          @CanIgnoreReturnValue
          +public SimpleBasePlayer.MediaItemData.Builder setPresentationStartTimeMs​(long presentationStartTimeMs)
          +
          Sets the start time of the live presentation. + +

          This value can only be set to anything other than C.TIME_UNSET if the stream is + live.

          +
          +
          Parameters:
          +
          presentationStartTimeMs - The start time of the live presentation, in milliseconds + since the Unix epoch, or C.TIME_UNSET if unknown or not applicable.
          +
          Returns:
          +
          This builder.
          +
          +
        • +
        + + + +
          +
        • +

          setWindowStartTimeMs

          +
          @CanIgnoreReturnValue
          +public SimpleBasePlayer.MediaItemData.Builder setWindowStartTimeMs​(long windowStartTimeMs)
          +
          Sets the start time of the live window. + +

          This value can only be set to anything other than C.TIME_UNSET if the stream is + live. The value should also be greater or equal than the + presentation start time, if set.

          +
          +
          Parameters:
          +
          windowStartTimeMs - The start time of the live window, in milliseconds since the Unix + epoch, or C.TIME_UNSET if unknown or not applicable.
          +
          Returns:
          +
          This builder.
          +
          +
        • +
        + + + +
          +
        • +

          setElapsedRealtimeEpochOffsetMs

          +
          @CanIgnoreReturnValue
          +public SimpleBasePlayer.MediaItemData.Builder setElapsedRealtimeEpochOffsetMs​(long elapsedRealtimeEpochOffsetMs)
          +
          Sets the offset between SystemClock.elapsedRealtime() and the time since the Unix + epoch according to the clock of the media origin server. + +

          This value can only be set to anything other than C.TIME_UNSET if the stream is + live.

          +
          +
          Parameters:
          +
          elapsedRealtimeEpochOffsetMs - The offset between SystemClock.elapsedRealtime() and the time since the Unix epoch according to the clock + of the media origin server, or C.TIME_UNSET if unknown or not applicable.
          +
          Returns:
          +
          This builder.
          +
          +
        • +
        + + + +
          +
        • +

          setIsSeekable

          +
          @CanIgnoreReturnValue
          +public SimpleBasePlayer.MediaItemData.Builder setIsSeekable​(boolean isSeekable)
          +
          Sets whether it's possible to seek within this media item.
          +
          +
          Parameters:
          +
          isSeekable - Whether it's possible to seek within this media item.
          +
          Returns:
          +
          This builder.
          +
          +
        • +
        + + + +
          +
        • +

          setIsDynamic

          +
          @CanIgnoreReturnValue
          +public SimpleBasePlayer.MediaItemData.Builder setIsDynamic​(boolean isDynamic)
          +
          Sets whether this media item may change over time, for example a moving live window.
          +
          +
          Parameters:
          +
          isDynamic - Whether this media item may change over time, for example a moving live + window.
          +
          Returns:
          +
          This builder.
          +
          +
        • +
        + + + +
          +
        • +

          setDefaultPositionUs

          +
          @CanIgnoreReturnValue
          +public SimpleBasePlayer.MediaItemData.Builder setDefaultPositionUs​(long defaultPositionUs)
          +
          Sets the default position relative to the start of the media item at which to begin + playback, in microseconds. + +

          The default position must be less or equal to the duration, + is set.

          +
          +
          Parameters:
          +
          defaultPositionUs - The default position relative to the start of the media item at + which to begin playback, in microseconds.
          +
          Returns:
          +
          This builder.
          +
          +
        • +
        + + + +
          +
        • +

          setDurationUs

          +
          @CanIgnoreReturnValue
          +public SimpleBasePlayer.MediaItemData.Builder setDurationUs​(long durationUs)
          +
          Sets the duration of the media item, in microseconds. + +

          If both this duration and all period durations are set, the sum + of this duration and the offset in the first + period must match the total duration of all periods.

          +
          +
          Parameters:
          +
          durationUs - The duration of the media item, in microseconds, or C.TIME_UNSET + if unknown.
          +
          Returns:
          +
          This builder.
          +
          +
        • +
        + + + +
          +
        • +

          setPositionInFirstPeriodUs

          +
          @CanIgnoreReturnValue
          +public SimpleBasePlayer.MediaItemData.Builder setPositionInFirstPeriodUs​(long positionInFirstPeriodUs)
          +
          Sets the position of the start of this media item relative to the start of the first period + belonging to it, in microseconds.
          +
          +
          Parameters:
          +
          positionInFirstPeriodUs - The position of the start of this media item relative to the + start of the first period belonging to it, in microseconds.
          +
          Returns:
          +
          This builder.
          +
          +
        • +
        + + + +
          +
        • +

          setIsPlaceholder

          +
          @CanIgnoreReturnValue
          +public SimpleBasePlayer.MediaItemData.Builder setIsPlaceholder​(boolean isPlaceholder)
          +
          Sets whether this media item contains placeholder information because the real information + has yet to be loaded.
          +
          +
          Parameters:
          +
          isPlaceholder - Whether this media item contains placeholder information because the + real information has yet to be loaded.
          +
          Returns:
          +
          This builder.
          +
          +
        • +
        + + + +
          +
        • +

          setPeriods

          +
          @CanIgnoreReturnValue
          +public SimpleBasePlayer.MediaItemData.Builder setPeriods​(List<SimpleBasePlayer.PeriodData> periods)
          +
          Sets the list of periods in this media item. + +

          All periods must have unique UIDs and only the + last period is allowed to have an unset duration.

          +
          +
          Parameters:
          +
          periods - The list of periods in this media item, or an empty + list to assume a single period without ads and the same duration as the media item.
          +
          Returns:
          +
          This builder.
          +
          +
        • +
        + + + + +
      • +
      +
      +
    • +
    +
    +
    +
    + + + + diff --git a/docs/doc/reference/com/google/android/exoplayer2/SimpleBasePlayer.MediaItemData.html b/docs/doc/reference/com/google/android/exoplayer2/SimpleBasePlayer.MediaItemData.html new file mode 100644 index 00000000000..ed29421df57 --- /dev/null +++ b/docs/doc/reference/com/google/android/exoplayer2/SimpleBasePlayer.MediaItemData.html @@ -0,0 +1,653 @@ + + + + +SimpleBasePlayer.MediaItemData (ExoPlayer library) + + + + + + + + + + + + + +
    + +
    + +
    +
    + +

    Class SimpleBasePlayer.MediaItemData

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.google.android.exoplayer2.SimpleBasePlayer.MediaItemData
      • +
      +
    • +
    +
    +
      +
    • +
      +
      Enclosing class:
      +
      SimpleBasePlayer
      +
      +
      +
      protected static final class SimpleBasePlayer.MediaItemData
      +extends Object
      +
      An immutable description of an item in the playlist, containing both static setup information + like MediaItem and dynamic data that is generally read from the media like the + duration.
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
      +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          uid

          +
          public final Object uid
          +
          The unique identifier of this media item.
          +
        • +
        + + + +
          +
        • +

          tracks

          +
          public final Tracks tracks
          +
          The Tracks of this media item.
          +
        • +
        + + + + + + + +
          +
        • +

          mediaMetadata

          +
          @Nullable
          +public final MediaMetadata mediaMetadata
          +
          The MediaMetadata, including static data from the MediaItem and the media's Format, as well any dynamic metadata that + has been parsed from the media. If null, the metadata is assumed to be the simple combination + of the MediaItem metadata and the metadata of the selected + Formats.
          +
        • +
        + + + +
          +
        • +

          manifest

          +
          @Nullable
          +public final Object manifest
          +
          The manifest of the media item, or null if not applicable.
          +
        • +
        + + + + + + + +
          +
        • +

          presentationStartTimeMs

          +
          public final long presentationStartTimeMs
          +
          The start time of the live presentation, in milliseconds since the Unix epoch, or C.TIME_UNSET if unknown or not applicable.
          +
        • +
        + + + +
          +
        • +

          windowStartTimeMs

          +
          public final long windowStartTimeMs
          +
          The start time of the live window, in milliseconds since the Unix epoch, or C.TIME_UNSET if unknown or not applicable.
          +
        • +
        + + + +
          +
        • +

          elapsedRealtimeEpochOffsetMs

          +
          public final long elapsedRealtimeEpochOffsetMs
          +
          The offset between SystemClock.elapsedRealtime() and the time since the Unix epoch + according to the clock of the media origin server, or C.TIME_UNSET if unknown or not + applicable.
          +
        • +
        + + + +
          +
        • +

          isSeekable

          +
          public final boolean isSeekable
          +
          Whether it's possible to seek within this media item.
          +
        • +
        + + + +
          +
        • +

          isDynamic

          +
          public final boolean isDynamic
          +
          Whether this media item may change over time, for example a moving live window.
          +
        • +
        + + + +
          +
        • +

          defaultPositionUs

          +
          public final long defaultPositionUs
          +
          The default position relative to the start of the media item at which to begin playback, in + microseconds.
          +
        • +
        + + + +
          +
        • +

          durationUs

          +
          public final long durationUs
          +
          The duration of the media item, in microseconds, or C.TIME_UNSET if unknown.
          +
        • +
        + + + +
          +
        • +

          positionInFirstPeriodUs

          +
          public final long positionInFirstPeriodUs
          +
          The position of the start of this media item relative to the start of the first period + belonging to it, in microseconds.
          +
        • +
        + + + +
          +
        • +

          isPlaceholder

          +
          public final boolean isPlaceholder
          +
          Whether this media item contains placeholder information because the real information has yet + to be loaded.
          +
        • +
        + + + + +
      • +
      +
      + +
      + +
      +
    • +
    +
    +
    +
    + + + + diff --git a/docs/doc/reference/com/google/android/exoplayer2/SimpleBasePlayer.PeriodData.Builder.html b/docs/doc/reference/com/google/android/exoplayer2/SimpleBasePlayer.PeriodData.Builder.html new file mode 100644 index 00000000000..482b9ecc398 --- /dev/null +++ b/docs/doc/reference/com/google/android/exoplayer2/SimpleBasePlayer.PeriodData.Builder.html @@ -0,0 +1,419 @@ + + + + +SimpleBasePlayer.PeriodData.Builder (ExoPlayer library) + + + + + + + + + + + + + +
    + +
    + +
    +
    + +

    Class SimpleBasePlayer.PeriodData.Builder

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.google.android.exoplayer2.SimpleBasePlayer.PeriodData.Builder
      • +
      +
    • +
    +
    + +
    +
    + +
    +
    +
      +
    • + +
      +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          Builder

          +
          public Builder​(Object uid)
          +
          Creates the builder.
          +
          +
          Parameters:
          +
          uid - The unique identifier of the period within its media item.
          +
          +
        • +
        +
      • +
      +
      + +
      +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          setUid

          +
          @CanIgnoreReturnValue
          +public SimpleBasePlayer.PeriodData.Builder setUid​(Object uid)
          +
          Sets the unique identifier of the period within its media item.
          +
          +
          Parameters:
          +
          uid - The unique identifier of the period within its media item.
          +
          Returns:
          +
          This builder.
          +
          +
        • +
        + + + +
          +
        • +

          setDurationUs

          +
          @CanIgnoreReturnValue
          +public SimpleBasePlayer.PeriodData.Builder setDurationUs​(long durationUs)
          +
          Sets the total duration of the period, in microseconds, or C.TIME_UNSET if unknown. + +

          Only the last period in a media item can have an unknown duration.

          +
          +
          Parameters:
          +
          durationUs - The total duration of the period, in microseconds, or C.TIME_UNSET if unknown.
          +
          Returns:
          +
          This builder.
          +
          +
        • +
        + + + + + + + +
          +
        • +

          setIsPlaceholder

          +
          @CanIgnoreReturnValue
          +public SimpleBasePlayer.PeriodData.Builder setIsPlaceholder​(boolean isPlaceholder)
          +
          Sets whether this period contains placeholder information because the real information has + yet to be loaded
          +
          +
          Parameters:
          +
          isPlaceholder - Whether this period contains placeholder information because the real + information has yet to be loaded.
          +
          Returns:
          +
          This builder.
          +
          +
        • +
        + + + + +
      • +
      +
      +
    • +
    +
    +
    +
    + + + + diff --git a/docs/doc/reference/com/google/android/exoplayer2/SimpleBasePlayer.PeriodData.html b/docs/doc/reference/com/google/android/exoplayer2/SimpleBasePlayer.PeriodData.html new file mode 100644 index 00000000000..2135123bacc --- /dev/null +++ b/docs/doc/reference/com/google/android/exoplayer2/SimpleBasePlayer.PeriodData.html @@ -0,0 +1,433 @@ + + + + +SimpleBasePlayer.PeriodData (ExoPlayer library) + + + + + + + + + + + + + +
    + +
    + +
    +
    + +

    Class SimpleBasePlayer.PeriodData

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.google.android.exoplayer2.SimpleBasePlayer.PeriodData
      • +
      +
    • +
    +
    + +
    +
    + +
    +
    +
      +
    • + +
      +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          uid

          +
          public final Object uid
          +
          The unique identifier of the period within its media item.
          +
        • +
        + + + +
          +
        • +

          durationUs

          +
          public final long durationUs
          +
          The total duration of the period, in microseconds, or C.TIME_UNSET if unknown. Only + the last period in a media item can have an unknown duration.
          +
        • +
        + + + + + + + +
          +
        • +

          isPlaceholder

          +
          public final boolean isPlaceholder
          +
          Whether this period contains placeholder information because the real information has yet to + be loaded.
          +
        • +
        +
      • +
      +
      + +
      + +
      +
    • +
    +
    +
    +
    + + + + diff --git a/docs/doc/reference/com/google/android/exoplayer2/SimpleBasePlayer.PositionSupplier.html b/docs/doc/reference/com/google/android/exoplayer2/SimpleBasePlayer.PositionSupplier.html new file mode 100644 index 00000000000..4a5177366fa --- /dev/null +++ b/docs/doc/reference/com/google/android/exoplayer2/SimpleBasePlayer.PositionSupplier.html @@ -0,0 +1,344 @@ + + + + +SimpleBasePlayer.PositionSupplier (ExoPlayer library) + + + + + + + + + + + + + +
    + +
    + +
    +
    + +

    Interface SimpleBasePlayer.PositionSupplier

    +
    +
    +
    +
      +
    • +
      +
      Enclosing class:
      +
      SimpleBasePlayer
      +
      +
      +
      protected static interface SimpleBasePlayer.PositionSupplier
      +
      A supplier for a position.
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
      + +
      + +
      +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getConstant

          +
          static SimpleBasePlayer.PositionSupplier getConstant​(long positionMs)
          +
          Returns an instance that returns a constant value.
          +
          +
          Parameters:
          +
          positionMs - The constant position to return, in milliseconds.
          +
          +
        • +
        + + + +
          +
        • +

          getExtrapolating

          +
          static SimpleBasePlayer.PositionSupplier getExtrapolating​(long currentPositionMs,
          +                                                          float playbackSpeed)
          +
          Returns an instance that extrapolates the provided position into the future.
          +
          +
          Parameters:
          +
          currentPositionMs - The current position in milliseconds.
          +
          playbackSpeed - The playback speed with which the position is assumed to increase.
          +
          +
        • +
        + + + +
          +
        • +

          get

          +
          long get()
          +
          Returns the position.
          +
        • +
        +
      • +
      +
      +
    • +
    +
    +
    +
    + + + + diff --git a/docs/doc/reference/com/google/android/exoplayer2/SimpleBasePlayer.State.Builder.html b/docs/doc/reference/com/google/android/exoplayer2/SimpleBasePlayer.State.Builder.html index 3b802f0a267..4ce001a524f 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/SimpleBasePlayer.State.Builder.html +++ b/docs/doc/reference/com/google/android/exoplayer2/SimpleBasePlayer.State.Builder.html @@ -25,7 +25,7 @@ catch(err) { } //--> -var data = {"i0":10,"i1":10,"i2":10}; +var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10,"i33":10,"i34":10,"i35":10,"i36":10}; var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; @@ -188,12 +188,179 @@

    Method Summary

    SimpleBasePlayer.State.Builder +clearPositionDiscontinuity() + +
    Clears a previously set position discontinuity signal.
    + + + +SimpleBasePlayer.State.Builder +setAdBufferedPositionMs​(SimpleBasePlayer.PositionSupplier adBufferedPositionMsSupplier) + +
    Sets the SimpleBasePlayer.PositionSupplier for the estimated position up to which the currently + playing ad is buffered, in milliseconds.
    + + + +SimpleBasePlayer.State.Builder +setAdPositionMs​(long positionMs) + +
    Sets the current ad playback position in milliseconds.
    + + + +SimpleBasePlayer.State.Builder +setAdPositionMs​(SimpleBasePlayer.PositionSupplier adPositionMsSupplier) + +
    Sets the SimpleBasePlayer.PositionSupplier for the current ad playback position in milliseconds.
    + + + +SimpleBasePlayer.State.Builder +setAudioAttributes​(AudioAttributes audioAttributes) + +
    Sets the current AudioAttributes.
    + + + +SimpleBasePlayer.State.Builder setAvailableCommands​(Player.Commands availableCommands)
    Sets the available Player.Commands.
    - + +SimpleBasePlayer.State.Builder +setContentBufferedPositionMs​(SimpleBasePlayer.PositionSupplier contentBufferedPositionMsSupplier) + +
    Sets the SimpleBasePlayer.PositionSupplier for the estimated position up to which the currently + playing content is buffered, in milliseconds.
    + + + +SimpleBasePlayer.State.Builder +setContentPositionMs​(long positionMs) + +
    Sets the current content playback position in milliseconds.
    + + + +SimpleBasePlayer.State.Builder +setContentPositionMs​(SimpleBasePlayer.PositionSupplier contentPositionMsSupplier) + +
    Sets the SimpleBasePlayer.PositionSupplier for the current content playback position in + milliseconds.
    + + + +SimpleBasePlayer.State.Builder +setCurrentAd​(int adGroupIndex, + int adIndexInAdGroup) + +
    Sets the current ad indices, or C.INDEX_UNSET if no ad is playing.
    + + + +SimpleBasePlayer.State.Builder +setCurrentCues​(CueGroup currentCues) + +
    Sets the current cues.
    + + + +SimpleBasePlayer.State.Builder +setCurrentMediaItemIndex​(int currentMediaItemIndex) + +
    Sets the current media item index.
    + + + +SimpleBasePlayer.State.Builder +setDeviceInfo​(DeviceInfo deviceInfo) + +
    Sets the DeviceInfo.
    + + + +SimpleBasePlayer.State.Builder +setDeviceVolume​(int deviceVolume) + +
    Sets the current device volume.
    + + + +SimpleBasePlayer.State.Builder +setIsDeviceMuted​(boolean isDeviceMuted) + +
    Sets whether the device is muted.
    + + + +SimpleBasePlayer.State.Builder +setIsLoading​(boolean isLoading) + +
    Sets whether the player is currently loading its source.
    + + + +SimpleBasePlayer.State.Builder +setMaxSeekToPreviousPositionMs​(long maxSeekToPreviousPositionMs) + +
    Sets the maximum position for which BasePlayer.seekToPrevious() seeks to the previous item, + in milliseconds.
    + + + +SimpleBasePlayer.State.Builder +setNewlyRenderedFirstFrame​(boolean newlyRenderedFirstFrame) + +
    Sets whether a frame has been rendered for the first time since setting the surface, a + rendering reset, or since the stream being rendered was changed.
    + + + +SimpleBasePlayer.State.Builder +setPlaybackParameters​(PlaybackParameters playbackParameters) + +
    Sets the currently active PlaybackParameters.
    + + + +SimpleBasePlayer.State.Builder +setPlaybackState​(@com.google.android.exoplayer2.Player.State int playbackState) + +
    Sets the state of the player.
    + + + +SimpleBasePlayer.State.Builder +setPlaybackSuppressionReason​(@com.google.android.exoplayer2.Player.PlaybackSuppressionReason int playbackSuppressionReason) + +
    Sets the reason why playback is suppressed even if SimpleBasePlayer.getPlayWhenReady() is true.
    + + + +SimpleBasePlayer.State.Builder +setPlayerError​(PlaybackException playerError) + +
    Sets last error that caused playback to fail, or null if there was no error.
    + + + +SimpleBasePlayer.State.Builder +setPlaylist​(List<SimpleBasePlayer.MediaItemData> playlist) + +
    Sets the list of media items in the playlist.
    + + + +SimpleBasePlayer.State.Builder +setPlaylistMetadata​(MediaMetadata playlistMetadata) + +
    Sets the playlist MediaMetadata.
    + + + SimpleBasePlayer.State.Builder setPlayWhenReady​(boolean playWhenReady, @com.google.android.exoplayer2.Player.PlayWhenReadyChangeReason int playWhenReadyChangeReason) @@ -201,6 +368,87 @@

    Method Summary

    Sets whether playback should proceed when ready and not suppressed.
    + +SimpleBasePlayer.State.Builder +setPositionDiscontinuity​(@com.google.android.exoplayer2.Player.DiscontinuityReason int positionDiscontinuityReason, + long discontinuityPositionMs) + +
    Signals that a position discontinuity happened since the last player update and sets the + reason for it.
    + + + +SimpleBasePlayer.State.Builder +setRepeatMode​(@com.google.android.exoplayer2.Player.RepeatMode int repeatMode) + +
    Sets the Player.RepeatMode used for playback.
    + + + +SimpleBasePlayer.State.Builder +setSeekBackIncrementMs​(long seekBackIncrementMs) + +
    Sets the Player.seekBack() increment in milliseconds.
    + + + +SimpleBasePlayer.State.Builder +setSeekForwardIncrementMs​(long seekForwardIncrementMs) + +
    Sets the Player.seekForward() increment in milliseconds.
    + + + +SimpleBasePlayer.State.Builder +setShuffleModeEnabled​(boolean shuffleModeEnabled) + +
    Sets whether shuffling of media items is enabled.
    + + + +SimpleBasePlayer.State.Builder +setSurfaceSize​(Size surfaceSize) + +
    Sets the size of the surface onto which the video is being rendered.
    + + + +SimpleBasePlayer.State.Builder +setTimedMetadata​(Metadata timedMetadata) + +
    Sets the most recent timed Metadata.
    + + + +SimpleBasePlayer.State.Builder +setTotalBufferedDurationMs​(SimpleBasePlayer.PositionSupplier totalBufferedDurationMsSupplier) + +
    Sets the SimpleBasePlayer.PositionSupplier for the estimated total buffered duration in + milliseconds.
    + + + +SimpleBasePlayer.State.Builder +setTrackSelectionParameters​(TrackSelectionParameters trackSelectionParameters) + +
    Sets the currently active TrackSelectionParameters.
    + + + +SimpleBasePlayer.State.Builder +setVideoSize​(VideoSize videoSize) + +
    Sets the current video size.
    + + + +SimpleBasePlayer.State.Builder +setVolume​(float volume) + +
    Sets the current audio volume, with 0 being silence and 1 being unity gain (signal + unchanged).
    + +
  • + + + + + + + + + + + +
      +
    • +

      setPlayerError

      +
      @CanIgnoreReturnValue
      +public SimpleBasePlayer.State.Builder setPlayerError​(@Nullable
      +                                                     PlaybackException playerError)
      +
      Sets last error that caused playback to fail, or null if there was no error. + +

      The playback state must be set to Player.STATE_IDLE while an error is set.

      +
      +
      Parameters:
      +
      playerError - The last error that caused playback to fail, or null if there was no + error.
      +
      Returns:
      +
      This builder.
      +
      +
    • +
    + + + + + + + +
      +
    • +

      setShuffleModeEnabled

      +
      @CanIgnoreReturnValue
      +public SimpleBasePlayer.State.Builder setShuffleModeEnabled​(boolean shuffleModeEnabled)
      +
      Sets whether shuffling of media items is enabled.
      +
      +
      Parameters:
      +
      shuffleModeEnabled - Whether shuffling of media items is enabled.
      +
      Returns:
      +
      This builder.
      +
      +
    • +
    + + + +
      +
    • +

      setIsLoading

      +
      @CanIgnoreReturnValue
      +public SimpleBasePlayer.State.Builder setIsLoading​(boolean isLoading)
      +
      Sets whether the player is currently loading its source. + +

      The player can not be marked as loading if the state is + Player.STATE_IDLE or Player.STATE_ENDED.

      +
      +
      Parameters:
      +
      isLoading - Whether the player is currently loading its source.
      +
      Returns:
      +
      This builder.
      +
      +
    • +
    + + + + + + + + + + + +
      +
    • +

      setMaxSeekToPreviousPositionMs

      +
      @CanIgnoreReturnValue
      +public SimpleBasePlayer.State.Builder setMaxSeekToPreviousPositionMs​(long maxSeekToPreviousPositionMs)
      +
      Sets the maximum position for which BasePlayer.seekToPrevious() seeks to the previous item, + in milliseconds.
      +
      +
      Parameters:
      +
      maxSeekToPreviousPositionMs - The maximum position for which BasePlayer.seekToPrevious() + seeks to the previous item, in milliseconds.
      +
      Returns:
      +
      This builder.
      +
      +
    • +
    + + + + + + + + + + + + + + + +
      +
    • +

      setVolume

      +
      @CanIgnoreReturnValue
      +public SimpleBasePlayer.State.Builder setVolume​(@FloatRange(from=0.0,to=1.0)
      +                                                float volume)
      +
      Sets the current audio volume, with 0 being silence and 1 being unity gain (signal + unchanged).
      +
      +
      Parameters:
      +
      volume - The current audio volume, with 0 being silence and 1 being unity gain (signal + unchanged).
      +
      Returns:
      +
      This builder.
      +
      +
    • +
    + + + +
      +
    • +

      setVideoSize

      +
      @CanIgnoreReturnValue
      +public SimpleBasePlayer.State.Builder setVideoSize​(VideoSize videoSize)
      +
      Sets the current video size.
      +
      +
      Parameters:
      +
      videoSize - The current video size.
      +
      Returns:
      +
      This builder.
      +
      +
    • +
    + + + + + + + + + + + +
      +
    • +

      setDeviceVolume

      +
      @CanIgnoreReturnValue
      +public SimpleBasePlayer.State.Builder setDeviceVolume​(@IntRange(from=0L)
      +                                                      int deviceVolume)
      +
      Sets the current device volume.
      +
      +
      Parameters:
      +
      deviceVolume - The current device volume.
      +
      Returns:
      +
      This builder.
      +
      +
    • +
    + + + +
      +
    • +

      setIsDeviceMuted

      +
      @CanIgnoreReturnValue
      +public SimpleBasePlayer.State.Builder setIsDeviceMuted​(boolean isDeviceMuted)
      +
      Sets whether the device is muted.
      +
      +
      Parameters:
      +
      isDeviceMuted - Whether the device is muted.
      +
      Returns:
      +
      This builder.
      +
      +
    • +
    + + + +
      +
    • +

      setSurfaceSize

      +
      @CanIgnoreReturnValue
      +public SimpleBasePlayer.State.Builder setSurfaceSize​(Size surfaceSize)
      +
      Sets the size of the surface onto which the video is being rendered.
      +
      +
      Parameters:
      +
      surfaceSize - The surface size. Dimensions may be C.LENGTH_UNSET if unknown, + or 0 if the video is not rendered onto a surface.
      +
      Returns:
      +
      This builder.
      +
      +
    • +
    + + + +
      +
    • +

      setNewlyRenderedFirstFrame

      +
      @CanIgnoreReturnValue
      +public SimpleBasePlayer.State.Builder setNewlyRenderedFirstFrame​(boolean newlyRenderedFirstFrame)
      +
      Sets whether a frame has been rendered for the first time since setting the surface, a + rendering reset, or since the stream being rendered was changed. + +

      Note: As this will trigger a Player.Listener.onRenderedFirstFrame() event, the flag + should only be set for the first SimpleBasePlayer.State update after the first frame was rendered.

      +
      +
      Parameters:
      +
      newlyRenderedFirstFrame - Whether the first frame was newly rendered.
      +
      Returns:
      +
      This builder.
      +
      +
    • +
    + + + + + + + + + + + + + + + +
      +
    • +

      setCurrentMediaItemIndex

      +
      @CanIgnoreReturnValue
      +public SimpleBasePlayer.State.Builder setCurrentMediaItemIndex​(int currentMediaItemIndex)
      +
      Sets the current media item index. + +

      The media item index must be less than the number of media + items in the playlist, if set.

      +
      +
      Parameters:
      +
      currentMediaItemIndex - The current media item index, or C.INDEX_UNSET to + assume the default first item in the playlist.
      +
      Returns:
      +
      This builder.
      +
      +
    • +
    + + + +
      +
    • +

      setCurrentAd

      +
      @CanIgnoreReturnValue
      +public SimpleBasePlayer.State.Builder setCurrentAd​(int adGroupIndex,
      +                                                   int adIndexInAdGroup)
      +
      Sets the current ad indices, or C.INDEX_UNSET if no ad is playing. + +

      Either both indices need to be C.INDEX_UNSET or both are not C.INDEX_UNSET. + +

      Ads indices can only be set if there is a corresponding AdPlaybackState defined + in the current period.

      +
      +
      Parameters:
      +
      adGroupIndex - The current ad group index, or C.INDEX_UNSET if no ad is + playing.
      +
      adIndexInAdGroup - The current ad index in the ad group, or C.INDEX_UNSET if + no ad is playing.
      +
      Returns:
      +
      This builder.
      +
      +
    • +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +
    • +

      setPositionDiscontinuity

      +
      @CanIgnoreReturnValue
      +public SimpleBasePlayer.State.Builder setPositionDiscontinuity​(@DiscontinuityReason
      +                                                               @com.google.android.exoplayer2.Player.DiscontinuityReason int positionDiscontinuityReason,
      +                                                               long discontinuityPositionMs)
      +
      Signals that a position discontinuity happened since the last player update and sets the + reason for it.
      +
      +
      Parameters:
      +
      positionDiscontinuityReason - The reason for + the discontinuity.
      +
      discontinuityPositionMs - The position, in milliseconds, in the current content or ad + from which playback continues after the discontinuity.
      +
      Returns:
      +
      This builder.
      +
      See Also:
      +
      clearPositionDiscontinuity()
      +
      +
    • +
    + + + + diff --git a/docs/doc/reference/com/google/android/exoplayer2/SimpleBasePlayer.State.html b/docs/doc/reference/com/google/android/exoplayer2/SimpleBasePlayer.State.html index 007b7212c50..5c3c7db2222 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/SimpleBasePlayer.State.html +++ b/docs/doc/reference/com/google/android/exoplayer2/SimpleBasePlayer.State.html @@ -182,26 +182,279 @@

    Field Summary

    Description +SimpleBasePlayer.PositionSupplier +adBufferedPositionMsSupplier + +
    The SimpleBasePlayer.PositionSupplier for the estimated position up to which the currently playing ad + is buffered, in milliseconds.
    + + + +SimpleBasePlayer.PositionSupplier +adPositionMsSupplier + +
    The SimpleBasePlayer.PositionSupplier for the current ad playback position in milliseconds.
    + + + +AudioAttributes +audioAttributes + +
    The current AudioAttributes.
    + + + Player.Commands availableCommands
    The available Player.Commands.
    + +SimpleBasePlayer.PositionSupplier +contentBufferedPositionMsSupplier + +
    The SimpleBasePlayer.PositionSupplier for the estimated position up to which the currently playing + content is buffered, in milliseconds, or C.TIME_UNSET to indicate the default start + position.
    + + + +SimpleBasePlayer.PositionSupplier +contentPositionMsSupplier + +
    The SimpleBasePlayer.PositionSupplier for the current content playback position in milliseconds, or + C.TIME_UNSET to indicate the default start position.
    + + + +int +currentAdGroupIndex + +
    The current ad group index, or C.INDEX_UNSET if no ad is playing.
    + + + +int +currentAdIndexInAdGroup + +
    The current ad index in the ad group, or C.INDEX_UNSET if no ad is playing.
    + + + +CueGroup +currentCues + +
    The current cues.
    + + + +int +currentMediaItemIndex + +
    The current media item index, or C.INDEX_UNSET to assume the default first item of + the playlist is played.
    + + + +DeviceInfo +deviceInfo + + + + + +int +deviceVolume + +
    The current device volume.
    + + + +long +discontinuityPositionMs + +
    The position, in milliseconds, in the current content or ad from which playback continued + after the discontinuity.
    + + + +boolean +hasPositionDiscontinuity + +
    Signals that a position discontinuity happened since the last update to the player.
    + + + +boolean +isDeviceMuted + +
    Whether the device is muted.
    + + + +boolean +isLoading + +
    Whether the player is currently loading its source.
    + + + +long +maxSeekToPreviousPositionMs + +
    The maximum position for which BasePlayer.seekToPrevious() seeks to the previous item, in + milliseconds.
    + + + +boolean +newlyRenderedFirstFrame + +
    Whether a frame has been rendered for the first time since setting the surface, a rendering + reset, or since the stream being rendered was changed.
    + + + +PlaybackParameters +playbackParameters + +
    The currently active PlaybackParameters.
    + + + +@com.google.android.exoplayer2.Player.State int +playbackState + +
    The state of the player.
    + + + +@com.google.android.exoplayer2.Player.PlaybackSuppressionReason int +playbackSuppressionReason + +
    The reason why playback is suppressed even if SimpleBasePlayer.getPlayWhenReady() is true.
    + + + +PlaybackException +playerError + +
    The last error that caused playback to fail, or null if there was no error.
    + + + +ImmutableList<SimpleBasePlayer.MediaItemData> +playlist + +
    The media items in the playlist.
    + + +MediaMetadata +playlistMetadata + +
    The playlist MediaMetadata.
    + + + boolean playWhenReady
    Whether playback should proceed when ready and not suppressed.
    - + @com.google.android.exoplayer2.Player.PlayWhenReadyChangeReason int playWhenReadyChangeReason
    The last reason for changing playWhenReady.
    + +@com.google.android.exoplayer2.Player.DiscontinuityReason int +positionDiscontinuityReason + +
    The reason for the last position discontinuity.
    + + + +@com.google.android.exoplayer2.Player.RepeatMode int +repeatMode + +
    The Player.RepeatMode used for playback.
    + + + +long +seekBackIncrementMs + +
    The Player.seekBack() increment in milliseconds.
    + + + +long +seekForwardIncrementMs + +
    The Player.seekForward() increment in milliseconds.
    + + + +boolean +shuffleModeEnabled + +
    Whether shuffling of media items is enabled.
    + + + +Size +surfaceSize + +
    The size of the surface onto which the video is being rendered.
    + + + +Metadata +timedMetadata + +
    The most recent timed metadata.
    + + + +Timeline +timeline + +
    The Timeline derived from the playlist.
    + + + +SimpleBasePlayer.PositionSupplier +totalBufferedDurationMsSupplier + +
    The SimpleBasePlayer.PositionSupplier for the estimated total buffered duration in milliseconds.
    + + + +TrackSelectionParameters +trackSelectionParameters + +
    The currently active TrackSelectionParameters.
    + + + +VideoSize +videoSize + +
    The current video size.
    + + + +float +volume + +
    The current audio volume, with 0 being silence and 1 being unity gain (signal unchanged).
    + +
  • @@ -284,7 +537,7 @@

    playWhenReady

    -
      + + + + +
        +
      • +

        playbackState

        +
        @State
        +public final @com.google.android.exoplayer2.Player.State int playbackState
        +
        The state of the player.
        +
      • +
      + + + + + + + +
        +
      • +

        playerError

        +
        @Nullable
        +public final PlaybackException playerError
        +
        The last error that caused playback to fail, or null if there was no error.
        +
      • +
      + + + +
        +
      • +

        repeatMode

        +
        @RepeatMode
        +public final @com.google.android.exoplayer2.Player.RepeatMode int repeatMode
        +
        The Player.RepeatMode used for playback.
        +
      • +
      + + + +
        +
      • +

        shuffleModeEnabled

        +
        public final boolean shuffleModeEnabled
        +
        Whether shuffling of media items is enabled.
        +
      • +
      + + + +
        +
      • +

        isLoading

        +
        public final boolean isLoading
        +
        Whether the player is currently loading its source.
        +
      • +
      + + + +
        +
      • +

        seekBackIncrementMs

        +
        public final long seekBackIncrementMs
        +
        The Player.seekBack() increment in milliseconds.
        +
      • +
      + + + +
        +
      • +

        seekForwardIncrementMs

        +
        public final long seekForwardIncrementMs
        +
        The Player.seekForward() increment in milliseconds.
        +
      • +
      + + + +
        +
      • +

        maxSeekToPreviousPositionMs

        +
        public final long maxSeekToPreviousPositionMs
        +
        The maximum position for which BasePlayer.seekToPrevious() seeks to the previous item, in + milliseconds.
        +
      • +
      + + + + + + + + + + + + + + + +
        +
      • +

        volume

        +
        @FloatRange(from=0.0,
        +            to=1.0)
        +public final float volume
        +
        The current audio volume, with 0 being silence and 1 being unity gain (signal unchanged).
        +
      • +
      + + + +
        +
      • +

        videoSize

        +
        public final VideoSize videoSize
        +
        The current video size.
        +
      • +
      + + + +
        +
      • +

        currentCues

        +
        public final CueGroup currentCues
        +
        The current cues.
        +
      • +
      + + + + + + + +
        +
      • +

        deviceVolume

        +
        @IntRange(from=0L)
        +public final int deviceVolume
        +
        The current device volume.
        +
      • +
      + + + +
        +
      • +

        isDeviceMuted

        +
        public final boolean isDeviceMuted
        +
        Whether the device is muted.
        +
      • +
      + + + +
        +
      • +

        surfaceSize

        +
        public final Size surfaceSize
        +
        The size of the surface onto which the video is being rendered.
        +
      • +
      + + + +
        +
      • +

        newlyRenderedFirstFrame

        +
        public final boolean newlyRenderedFirstFrame
        +
        Whether a frame has been rendered for the first time since setting the surface, a rendering + reset, or since the stream being rendered was changed.
        +
      • +
      + + + +
        +
      • +

        timedMetadata

        +
        public final Metadata timedMetadata
        +
        The most recent timed metadata.
        +
      • +
      + + + + + + + + + + + + + + + +
        +
      • +

        currentMediaItemIndex

        +
        public final int currentMediaItemIndex
        +
        The current media item index, or C.INDEX_UNSET to assume the default first item of + the playlist is played.
        +
      • +
      + + + +
        +
      • +

        currentAdGroupIndex

        +
        public final int currentAdGroupIndex
        +
        The current ad group index, or C.INDEX_UNSET if no ad is playing.
        +
      • +
      + + + +
        +
      • +

        currentAdIndexInAdGroup

        +
        public final int currentAdIndexInAdGroup
        +
        The current ad index in the ad group, or C.INDEX_UNSET if no ad is playing.
        +
      • +
      + + + + + + + + + + + + + + + + + + + + + + + +
        +
      • +

        hasPositionDiscontinuity

        +
        public final boolean hasPositionDiscontinuity
        +
        Signals that a position discontinuity happened since the last update to the player.
        +
      • +
      + + + +
        +
      • +

        positionDiscontinuityReason

        +
        @DiscontinuityReason
        +public final @com.google.android.exoplayer2.Player.DiscontinuityReason int positionDiscontinuityReason
        +
        The reason for the last position discontinuity. The + value is unused if hasPositionDiscontinuity is false.
        +
      • +
      + + + +
        +
      • +

        discontinuityPositionMs

        +
        public final long discontinuityPositionMs
        +
        The position, in milliseconds, in the current content or ad from which playback continued + after the discontinuity. The value is unused if hasPositionDiscontinuity is + false.
        +
      • +
    diff --git a/docs/doc/reference/com/google/android/exoplayer2/SimpleBasePlayer.html b/docs/doc/reference/com/google/android/exoplayer2/SimpleBasePlayer.html index f3c093bf299..f4f42c3f7c9 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/SimpleBasePlayer.html +++ b/docs/doc/reference/com/google/android/exoplayer2/SimpleBasePlayer.html @@ -25,7 +25,7 @@ catch(err) { } //--> -var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10,"i33":10,"i34":10,"i35":10,"i36":10,"i37":10,"i38":6,"i39":10,"i40":10,"i41":10,"i42":10,"i43":10,"i44":10,"i45":10,"i46":10,"i47":10,"i48":10,"i49":10,"i50":10,"i51":10,"i52":10,"i53":10,"i54":10,"i55":10,"i56":10,"i57":10,"i58":10,"i59":10,"i60":10,"i61":10,"i62":10,"i63":10,"i64":10,"i65":10,"i66":10,"i67":10,"i68":10,"i69":10,"i70":10,"i71":10,"i72":10}; +var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10,"i33":10,"i34":10,"i35":10,"i36":10,"i37":10,"i38":10,"i39":6,"i40":10,"i41":10,"i42":10,"i43":10,"i44":10,"i45":10,"i46":10,"i47":10,"i48":10,"i49":10,"i50":10,"i51":10,"i52":10,"i53":10,"i54":10,"i55":10,"i56":10,"i57":10,"i58":10,"i59":10,"i60":10,"i61":10,"i62":10,"i63":10,"i64":10,"i65":10,"i66":10,"i67":10,"i68":10,"i69":10,"i70":10,"i71":10,"i72":10,"i73":10,"i74":10,"i75":10,"i76":10,"i77":10,"i78":10,"i79":10,"i80":10,"i81":10,"i82":10,"i83":10,"i84":10,"i85":10,"i86":10,"i87":10,"i88":10,"i89":10,"i90":10,"i91":10,"i92":10,"i93":10}; var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],8:["t4","Concrete Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; @@ -198,6 +198,29 @@

    Nested Class Summary

    protected static class  +SimpleBasePlayer.MediaItemData + +
    An immutable description of an item in the playlist, containing both static setup information + like MediaItem and dynamic data that is generally read from the media like the + duration.
    + + + +protected static class  +SimpleBasePlayer.PeriodData + +
    Data describing the properties of a period inside a SimpleBasePlayer.MediaItemData.
    + + + +protected static interface  +SimpleBasePlayer.PositionSupplier + +
    A supplier for a position.
    + + + +protected static class  SimpleBasePlayer.State
    An immutable state description of the player.
    @@ -487,27 +510,35 @@

    Method Summary

    +protected SimpleBasePlayer.MediaItemData +getPlaceholderMediaItemData​(MediaItem mediaItem) + +
    Returns the placeholder SimpleBasePlayer.MediaItemData used for a new MediaItem added to the + playlist.
    + + + protected SimpleBasePlayer.State getPlaceholderState​(SimpleBasePlayer.State suggestedPlaceholderState)
    Returns the placeholder state used while a player method is handled asynchronously.
    - + PlaybackParameters getPlaybackParameters()
    Returns the currently active playback parameters.
    - -int + +@com.google.android.exoplayer2.Player.State int getPlaybackState() -
    Returns the current playback state of the player.
    +
    Returns the current playback state of the player.
    - + int getPlaybackSuppressionReason() @@ -515,140 +546,288 @@

    Method Summary

    true, or Player.PLAYBACK_SUPPRESSION_REASON_NONE if playback is not suppressed. - + PlaybackException getPlayerError()
    Returns the error that caused playback to fail.
    - + MediaMetadata getPlaylistMetadata()
    Returns the playlist MediaMetadata, as set by Player.setPlaylistMetadata(MediaMetadata), or MediaMetadata.EMPTY if not supported.
    - + boolean getPlayWhenReady()
    Whether playback will proceed when Player.getPlaybackState() == Player.STATE_READY.
    - -int + +@com.google.android.exoplayer2.Player.RepeatMode int getRepeatMode()
    Returns the current Player.RepeatMode used for playback.
    - + long getSeekBackIncrement()
    Returns the Player.seekBack() increment.
    - + long getSeekForwardIncrement()
    Returns the Player.seekForward() increment.
    - + boolean getShuffleModeEnabled()
    Returns whether shuffling of media items is enabled.
    - + protected abstract SimpleBasePlayer.State getState()
    Returns the current SimpleBasePlayer.State of the player.
    - + Size getSurfaceSize()
    Gets the size of the surface on which the video is rendered.
    - + long getTotalBufferedDuration()
    Returns an estimate of the total buffered duration from the current position, in milliseconds.
    - + TrackSelectionParameters getTrackSelectionParameters()
    Returns the parameters constraining the track selection.
    - + VideoSize getVideoSize()
    Gets the size of the video.
    - + float getVolume()
    Returns the audio volume, with 0 being silence and 1 being unity gain (signal unchanged).
    - + +protected ListenableFuture<?> +handleAddMediaItems​(int index, + List<MediaItem> mediaItems) + + + + + +protected ListenableFuture<?> +handleClearVideoOutput​(Object videoOutput) + +
    Handles calls to clear the video output.
    + + + +protected ListenableFuture<?> +handleDecreaseDeviceVolume() + + + + + +protected ListenableFuture<?> +handleIncreaseDeviceVolume() + + + + + +protected ListenableFuture<?> +handleMoveMediaItems​(int fromIndex, + int toIndex, + int newIndex) + + + + + +protected ListenableFuture<?> +handlePrepare() + +
    Handles calls to Player.prepare().
    + + + +protected ListenableFuture<?> +handleRelease() + +
    Handles calls to Player.release().
    + + + +protected ListenableFuture<?> +handleRemoveMediaItems​(int fromIndex, + int toIndex) + + + + + +protected ListenableFuture<?> +handleSeek​(int mediaItemIndex, + long positionMs, + @com.google.android.exoplayer2.Player.Command int seekCommand) + +
    Handles calls to Player.seekTo(long) and other seek operations (for example, Player.seekToNext()).
    + + + +protected ListenableFuture<?> +handleSetDeviceMuted​(boolean muted) + + + + + +protected ListenableFuture<?> +handleSetDeviceVolume​(int deviceVolume) + +
    Handles calls to Player.setDeviceVolume(int).
    + + + +protected ListenableFuture<?> +handleSetMediaItems​(List<MediaItem> mediaItems, + int startIndex, + long startPositionMs) + + + + + +protected ListenableFuture<?> +handleSetPlaybackParameters​(PlaybackParameters playbackParameters) + + + + + +protected ListenableFuture<?> +handleSetPlaylistMetadata​(MediaMetadata playlistMetadata) + + + + + protected ListenableFuture<?> handleSetPlayWhenReady​(boolean playWhenReady) - + - + +protected ListenableFuture<?> +handleSetRepeatMode​(@com.google.android.exoplayer2.Player.RepeatMode int repeatMode) + + + + + +protected ListenableFuture<?> +handleSetShuffleModeEnabled​(boolean shuffleModeEnabled) + + + + + +protected ListenableFuture<?> +handleSetTrackSelectionParameters​(TrackSelectionParameters trackSelectionParameters) + + + + + +protected ListenableFuture<?> +handleSetVideoOutput​(Object videoOutput) + +
    Handles calls to set the video output.
    + + + +protected ListenableFuture<?> +handleSetVolume​(float volume) + +
    Handles calls to Player.setVolume(float).
    + + + +protected ListenableFuture<?> +handleStop() + +
    Handles calls to Player.stop().
    + + + void increaseDeviceVolume()
    Increases the volume of the device.
    - + protected void invalidateState()
    Invalidates the current state.
    - + boolean isDeviceMuted()
    Gets whether the device is muted or not.
    - + boolean isLoading()
    Whether the player is currently loading the source.
    - + boolean isPlayingAd()
    Returns whether the player is currently playing an ad.
    - + void moveMediaItems​(int fromIndex, int toIndex, @@ -657,28 +836,28 @@

    Method Summary

    Moves the media item range to the new index.
    - + void prepare()
    Prepares the player.
    - + void release()
    Releases the player.
    - + void removeListener​(Player.Listener listener)
    Unregister a listener registered through Player.addListener(Listener).
    - + void removeMediaItems​(int fromIndex, int toIndex) @@ -686,95 +865,97 @@

    Method Summary

    Removes a range of media items from the playlist.
    - + void -seekTo​(int mediaItemIndex, - long positionMs) +seekTo​(int mediaItemIndex, + long positionMs, + @com.google.android.exoplayer2.Player.Command int seekCommand, + boolean isRepeatingCurrentItem) -
    Seeks to a position specified in milliseconds in the specified MediaItem.
    +
    Seeks to a position in the specified MediaItem.
    - + void setDeviceMuted​(boolean muted)
    Sets the mute state of the device.
    - + void setDeviceVolume​(int volume)
    Sets the volume of the device.
    - + void setMediaItems​(List<MediaItem> mediaItems, boolean resetPosition) -
    Clears the playlist and adds the specified MediaItems.
    +
    Clears the playlist and adds the specified media items.
    - + void setMediaItems​(List<MediaItem> mediaItems, int startIndex, long startPositionMs) -
    Clears the playlist and adds the specified MediaItems.
    +
    Clears the playlist and adds the specified media items.
    - + void setPlaybackParameters​(PlaybackParameters playbackParameters)
    Attempts to set the playback parameters.
    - + void setPlaylistMetadata​(MediaMetadata mediaMetadata)
    Sets the playlist MediaMetadata.
    - + void setPlayWhenReady​(boolean playWhenReady)
    Sets whether playback should proceed when Player.getPlaybackState() == Player.STATE_READY.
    - + void -setRepeatMode​(int repeatMode) +setRepeatMode​(@com.google.android.exoplayer2.Player.RepeatMode int repeatMode)
    Sets the Player.RepeatMode to be used for playback.
    - + void setShuffleModeEnabled​(boolean shuffleModeEnabled)
    Sets whether shuffling of media items is enabled.
    - + void setTrackSelectionParameters​(TrackSelectionParameters parameters)
    Sets the parameters constraining the track selection.
    - + void setVideoSurface​(Surface surface)
    Sets the Surface onto which video will be rendered.
    - + void setVideoSurfaceHolder​(SurfaceHolder surfaceHolder) @@ -782,21 +963,21 @@

    Method Summary

    rendered. - + void setVideoSurfaceView​(SurfaceView surfaceView)
    Sets the SurfaceView onto which video will be rendered.
    - + void setVideoTextureView​(TextureView textureView)
    Sets the TextureView onto which video will be rendered.
    - + void setVolume​(float volume) @@ -804,14 +985,14 @@

    Method Summary

    unchanged), inclusive. - + void stop()
    Stops playback without resetting the playlist.
    - + void stop​(boolean reset)   @@ -822,7 +1003,7 @@

    Method Summary

    Methods inherited from class com.google.android.exoplayer2.BasePlayer

    -addMediaItem, addMediaItem, addMediaItems, canAdvertiseSession, clearMediaItems, getBufferedPercentage, getContentDuration, getCurrentLiveOffset, getCurrentManifest, getCurrentMediaItem, getCurrentWindowIndex, getMediaItemAt, getMediaItemCount, getNextMediaItemIndex, getNextWindowIndex, getPreviousMediaItemIndex, getPreviousWindowIndex, hasNext, hasNextMediaItem, hasNextWindow, hasPrevious, hasPreviousMediaItem, hasPreviousWindow, isCommandAvailable, isCurrentMediaItemDynamic, isCurrentMediaItemLive, isCurrentMediaItemSeekable, isCurrentWindowDynamic, isCurrentWindowLive, isCurrentWindowSeekable, isPlaying, moveMediaItem, next, pause, play, previous, removeMediaItem, repeatCurrentMediaItem, seekBack, seekForward, seekTo, seekToDefaultPosition, seekToDefaultPosition, seekToNext, seekToNextMediaItem, seekToNextWindow, seekToPrevious, seekToPreviousMediaItem, seekToPreviousWindow, setMediaItem, setMediaItem, setMediaItem, setMediaItems, setPlaybackSpeed +addMediaItem, addMediaItem, addMediaItems, canAdvertiseSession, clearMediaItems, getBufferedPercentage, getContentDuration, getCurrentLiveOffset, getCurrentManifest, getCurrentMediaItem, getCurrentWindowIndex, getMediaItemAt, getMediaItemCount, getNextMediaItemIndex, getNextWindowIndex, getPreviousMediaItemIndex, getPreviousWindowIndex, hasNext, hasNextMediaItem, hasNextWindow, hasPrevious, hasPreviousMediaItem, hasPreviousWindow, isCommandAvailable, isCurrentMediaItemDynamic, isCurrentMediaItemLive, isCurrentMediaItemSeekable, isCurrentWindowDynamic, isCurrentWindowLive, isCurrentWindowSeekable, isPlaying, moveMediaItem, next, pause, play, previous, removeMediaItem, seekBack, seekForward, seekTo, seekTo, seekToDefaultPosition, seekToDefaultPosition, seekToNext, seekToNextMediaItem, seekToNextWindow, seekToPrevious, seekToPreviousMediaItem, seekToPreviousWindow, setMediaItem, setMediaItem, setMediaItem, setMediaItems, setPlaybackSpeed
    • @@ -899,7 +1080,9 @@

      addListener

      Registers a listener to receive all events from the player. -

      The listener's methods will be called on the thread associated with Player.getApplicationLooper().

      +

      The listener's methods will be called on the thread associated with Player.getApplicationLooper(). + +

      This method can be called from any thread.

      Parameters:
      listener - The listener to register.
      @@ -931,7 +1114,9 @@

      getApplicationLooper

      public final Looper getApplicationLooper()
      Description copied from interface: Player
      Returns the Looper associated with the application thread that's used to access the - player and on which player events are received.
      + player and on which player events are received. + +

      This method can be called from any thread.

    @@ -945,13 +1130,7 @@

    getAvailableCommands

    Returns the player's currently available Player.Commands.

    The returned Player.Commands are not updated when available commands change. Use Player.Listener.onAvailableCommandsChanged(Commands) to get an update when the available commands - change. - -

    Executing a command that is not available (for example, calling Player.seekToNextMediaItem() if Player.COMMAND_SEEK_TO_NEXT_MEDIA_ITEM is unavailable) will - neither throw an exception nor generate a Player.getPlayerError() player error}. - -

    Player.COMMAND_SEEK_TO_PREVIOUS_MEDIA_ITEM and Player.COMMAND_SEEK_TO_NEXT_MEDIA_ITEM - are unavailable if there is no such MediaItem.

    + change.
    Returns:
    The currently available Player.Commands.
    @@ -970,7 +1149,9 @@

    setPlayWhenReady

    Description copied from interface: Player
    Sets whether playback should proceed when Player.getPlaybackState() == Player.STATE_READY. -

    If the player is already in the ready state then this method pauses and resumes playback.

    +

    If the player is already in the ready state then this method pauses and resumes playback. + +

    This method must only be called if Player.COMMAND_PLAY_PAUSE is available.

    Parameters:
    playWhenReady - Whether playback should proceed when ready.
    @@ -1003,10 +1184,12 @@

    setMediaItems

    public final void setMediaItems​(List<MediaItem> mediaItems,
                                     boolean resetPosition)
    Description copied from interface: Player
    -
    Clears the playlist and adds the specified MediaItems.
    +
    Clears the playlist and adds the specified media items. + +

    This method must only be called if Player.COMMAND_CHANGE_MEDIA_ITEMS is available.

    Parameters:
    -
    mediaItems - The new MediaItems.
    +
    mediaItems - The new media items.
    resetPosition - Whether the playback position should be reset to the default position in the first Timeline.Window. If false, playback will start from the position defined by Player.getCurrentMediaItemIndex() and Player.getCurrentPosition().
    @@ -1023,10 +1206,12 @@

    setMediaItems

    int startIndex, long startPositionMs)
    Description copied from interface: Player
    -
    Clears the playlist and adds the specified MediaItems.
    +
    Clears the playlist and adds the specified media items. + +

    This method must only be called if Player.COMMAND_CHANGE_MEDIA_ITEMS is available.

    Parameters:
    -
    mediaItems - The new MediaItems.
    +
    mediaItems - The new media items.
    startIndex - The MediaItem index to start playback from. If C.INDEX_UNSET is passed, the current position is not reset.
    startPositionMs - The position in milliseconds to start playback from. If C.TIME_UNSET is passed, the default position of the given MediaItem is used. In @@ -1044,12 +1229,14 @@

    addMediaItems

    public final void addMediaItems​(int index,
                                     List<MediaItem> mediaItems)
    Description copied from interface: Player
    -
    Adds a list of media items at the given index of the playlist.
    +
    Adds a list of media items at the given index of the playlist. + +

    This method must only be called if Player.COMMAND_CHANGE_MEDIA_ITEMS is available.

    Parameters:
    index - The index at which to add the media items. If the index is larger than the size of the playlist, the media items are added to the end of the playlist.
    -
    mediaItems - The MediaItems to add.
    +
    mediaItems - The media items to add.
    @@ -1063,11 +1250,15 @@

    moveMediaItems

    int toIndex, int newIndex)
    Description copied from interface: Player
    -
    Moves the media item range to the new index.
    +
    Moves the media item range to the new index. + +

    This method must only be called if Player.COMMAND_CHANGE_MEDIA_ITEMS is available.

    Parameters:
    -
    fromIndex - The start of the range to move.
    -
    toIndex - The first item not to be included in the range (exclusive).
    +
    fromIndex - The start of the range to move. If the index is larger than the size of the + playlist, the request is ignored.
    +
    toIndex - The first item not to be included in the range (exclusive). If the index is + larger than the size of the playlist, items up to the end of the playlist are moved.
    newIndex - The new index of the first media item of the range. If the new index is larger than the size of the remaining playlist after removing the range, the range is moved to the end of the playlist.
    @@ -1083,12 +1274,15 @@

    removeMediaItems

    public final void removeMediaItems​(int fromIndex,
                                        int toIndex)
    Description copied from interface: Player
    -
    Removes a range of media items from the playlist.
    +
    Removes a range of media items from the playlist. + +

    This method must only be called if Player.COMMAND_CHANGE_MEDIA_ITEMS is available.

    Parameters:
    -
    fromIndex - The index at which to start removing media items.
    +
    fromIndex - The index at which to start removing media items. If the index is larger than + the size of the playlist, the request is ignored.
    toIndex - The index of the first item to be kept (exclusive). If the index is larger than - the size of the playlist, media items to the end of the playlist are removed.
    + the size of the playlist, media items up to the end of the playlist are removed.
    @@ -1102,6 +1296,8 @@

    prepare

    Description copied from interface: Player
    Prepares the player. +

    This method must only be called if Player.COMMAND_PREPARE is available. +

    This will move the player out of idle state and the player will start loading media and acquire resources needed for playback.

    @@ -1112,12 +1308,13 @@

    prepare

    - +
    • setRepeatMode

      -
      public final void setRepeatMode​(int repeatMode)
      +
      public final void setRepeatMode​(@RepeatMode
      +                                @com.google.android.exoplayer2.Player.RepeatMode int repeatMode)
      Description copied from interface: Player
      -
      Sets the Player.RepeatMode to be used for playback.
      +
      Sets the Player.RepeatMode to be used for playback. + +

      This method must only be called if Player.COMMAND_SET_REPEAT_MODE is available.

      Parameters:
      repeatMode - The repeat mode.
      @@ -1185,7 +1385,8 @@

      setRepeatMode

      • getRepeatMode

        -
        public final int getRepeatMode()
        +
        @RepeatMode
        +public final @com.google.android.exoplayer2.Player.RepeatMode int getRepeatMode()
        Description copied from interface: Player
        Returns the current Player.RepeatMode used for playback.
        @@ -1204,7 +1405,9 @@

        getRepeatMode

        setShuffleModeEnabled

        public final void setShuffleModeEnabled​(boolean shuffleModeEnabled)
        Description copied from interface: Player
        -
        Sets whether shuffling of media items is enabled.
        +
        Sets whether shuffling of media items is enabled. + +

        This method must only be called if Player.COMMAND_SET_SHUFFLE_MODE is available.

        Parameters:
        shuffleModeEnabled - Whether shuffling is enabled.
        @@ -1243,21 +1446,28 @@

        isLoading

      - +
      • seekTo

        public final void seekTo​(int mediaItemIndex,
        -                         long positionMs)
        -
        Description copied from interface: Player
        -
        Seeks to a position specified in milliseconds in the specified MediaItem.
        + long positionMs, + @Command + @com.google.android.exoplayer2.Player.Command int seekCommand, + boolean isRepeatingCurrentItem) +
        Description copied from class: BasePlayer
        +
        Seeks to a position in the specified MediaItem.
        +
        Specified by:
        +
        seekTo in class BasePlayer
        Parameters:
        mediaItemIndex - The index of the MediaItem.
        -
        positionMs - The seek position in the specified MediaItem, or C.TIME_UNSET - to seek to the media item's default position.
        +
        positionMs - The seek position in the specified MediaItem in milliseconds, or + C.TIME_UNSET to seek to the media item's default position.
        +
        seekCommand - The Player.Command used to trigger the seek.
        +
        isRepeatingCurrentItem - Whether this seeks repeats the current item.
      @@ -1324,7 +1534,9 @@

      setPlaybackParameters

      player to the default, which means there is no speed or pitch adjustment.

      Playback parameters changes may cause the player to buffer. Player.Listener.onPlaybackParametersChanged(PlaybackParameters) will be called whenever the currently - active playback parameters change. + active playback parameters change. + +

      This method must only be called if Player.COMMAND_SET_SPEED_AND_PITCH is available.

      Parameters:
      playbackParameters - The playback parameters.
      @@ -1363,7 +1575,9 @@

      stop

      still be called on the player if it's no longer required.

      Calling this method does not clear the playlist, reset the playback position or the playback - error. + error. + +

      This method must only be called if Player.COMMAND_STOP is available.

    @@ -1395,7 +1609,9 @@

    release

    getCurrentTracks

    public final Tracks getCurrentTracks()
    Description copied from interface: Player
    -
    Returns the current tracks.
    +
    Returns the current tracks. + +

    This method must only be called if Player.COMMAND_GET_TRACKS is available.

    See Also:
    Player.Listener.onTracksChanged(Tracks)
    @@ -1439,7 +1655,10 @@

    setTrackSelectionParameters

    .buildUpon() .setMaxVideoSizeSd() .build()) - + + +

    This method must only be called if Player.COMMAND_SET_TRACK_SELECTION_PARAMETERS is + available. @@ -1456,7 +1675,9 @@

    getMediaMetadata

    This MediaMetadata is a combination of the MediaItem metadata, the static metadata in the media's Format, and any timed metadata that has been parsed from the media and output via Player.Listener.onMetadata(Metadata). If a field is populated in the MediaItem.mediaMetadata, - it will be prioritised above the same field coming from static or timed metadata. + it will be prioritised above the same field coming from static or timed metadata. + +

    This method must only be called if Player.COMMAND_GET_MEDIA_ITEMS_METADATA is available. @@ -1467,7 +1688,9 @@

    getMediaMetadata

    getPlaylistMetadata

    public final MediaMetadata getPlaylistMetadata()
    Description copied from interface: Player
    -
    Returns the playlist MediaMetadata, as set by Player.setPlaylistMetadata(MediaMetadata), or MediaMetadata.EMPTY if not supported.
    +
    Returns the playlist MediaMetadata, as set by Player.setPlaylistMetadata(MediaMetadata), or MediaMetadata.EMPTY if not supported. + +

    This method must only be called if Player.COMMAND_GET_MEDIA_ITEMS_METADATA is available.

    @@ -1478,7 +1701,9 @@

    getPlaylistMetadata

    setPlaylistMetadata

    public final void setPlaylistMetadata​(MediaMetadata mediaMetadata)
    Description copied from interface: Player
    -
    Sets the playlist MediaMetadata.
    +
    Sets the playlist MediaMetadata. + +

    This method must only be called if Player.COMMAND_SET_MEDIA_ITEMS_METADATA is available.

    @@ -1489,7 +1714,9 @@

    setPlaylistMetadata

    getCurrentTimeline

    public final Timeline getCurrentTimeline()
    Description copied from interface: Player
    -
    Returns the current Timeline. Never null, but may be empty.
    +
    Returns the current Timeline. Never null, but may be empty. + +

    This method must only be called if Player.COMMAND_GET_TIMELINE is available.

    See Also:
    Player.Listener.onTimelineChanged(Timeline, int)
    @@ -1504,7 +1731,9 @@

    getCurrentTimeline

    getCurrentPeriodIndex

    public final int getCurrentPeriodIndex()
    Description copied from interface: Player
    -
    Returns the index of the period currently being played.
    +
    Returns the index of the period currently being played. + +

    This method must only be called if Player.COMMAND_GET_TIMELINE is available.

    @@ -1516,7 +1745,9 @@

    getCurrentMediaItemIndex

    public final int getCurrentMediaItemIndex()
    Returns the index of the current MediaItem in the timeline, or the prospective index if the current timeline is - empty.
    + empty. + +

    This method must only be called if Player.COMMAND_GET_TIMELINE is available. @@ -1528,7 +1759,9 @@

    getDuration

    public final long getDuration()
    Returns the duration of the current content or ad in milliseconds, or C.TIME_UNSET if - the duration is not known.
    + the duration is not known. + +

    This method must only be called if Player.COMMAND_GET_CURRENT_MEDIA_ITEM is available. @@ -1540,7 +1773,9 @@

    getCurrentPosition

    public final long getCurrentPosition()
    Returns the playback position in the current content or ad, in milliseconds, or the prospective - position in milliseconds if the current timeline is empty.
    + position in milliseconds if the current timeline is empty. + +

    This method must only be called if Player.COMMAND_GET_CURRENT_MEDIA_ITEM is available. @@ -1552,7 +1787,9 @@

    getBufferedPosition

    public final long getBufferedPosition()
    Returns an estimate of the position in the current content or ad up to which data is buffered, - in milliseconds.
    + in milliseconds. + +

    This method must only be called if Player.COMMAND_GET_CURRENT_MEDIA_ITEM is available. @@ -1564,7 +1801,9 @@

    getTotalBufferedDuration

    public final long getTotalBufferedDuration()
    Returns an estimate of the total buffered duration from the current position, in milliseconds. - This includes pre-buffered data for subsequent ads and media items.
    + This includes pre-buffered data for subsequent ads and media items. + +

    This method must only be called if Player.COMMAND_GET_CURRENT_MEDIA_ITEM is available. @@ -1575,7 +1814,9 @@

    getTotalBufferedDuration

    isPlayingAd

    public final boolean isPlayingAd()
    -
    Returns whether the player is currently playing an ad.
    +
    Returns whether the player is currently playing an ad. + +

    This method must only be called if Player.COMMAND_GET_CURRENT_MEDIA_ITEM is available.

    @@ -1587,7 +1828,9 @@

    getCurrentAdGroupIndex

    public final int getCurrentAdGroupIndex()
    If Player.isPlayingAd() returns true, returns the index of the ad group in the period - currently being played. Returns C.INDEX_UNSET otherwise.
    + currently being played. Returns C.INDEX_UNSET otherwise. + +

    This method must only be called if Player.COMMAND_GET_CURRENT_MEDIA_ITEM is available. @@ -1599,7 +1842,9 @@

    getCurrentAdIndexInAdGroup

    public final int getCurrentAdIndexInAdGroup()
    If Player.isPlayingAd() returns true, returns the index of the ad in its ad group. Returns - C.INDEX_UNSET otherwise.
    + C.INDEX_UNSET otherwise. + +

    This method must only be called if Player.COMMAND_GET_CURRENT_MEDIA_ITEM is available. @@ -1612,7 +1857,9 @@

    getContentPosition

    If Player.isPlayingAd() returns true, returns the content position that will be played once all ads in the ad group have finished playing, in milliseconds. If there is no ad - playing, the returned position is the same as that returned by Player.getCurrentPosition().
    + playing, the returned position is the same as that returned by Player.getCurrentPosition(). + +

    This method must only be called if Player.COMMAND_GET_CURRENT_MEDIA_ITEM is available. @@ -1625,7 +1872,9 @@

    getContentBufferedPosition

    If Player.isPlayingAd() returns true, returns an estimate of the content position in the current content up to which data is buffered, in milliseconds. If there is no ad playing, - the returned position is the same as that returned by Player.getBufferedPosition().
    + the returned position is the same as that returned by Player.getBufferedPosition(). + +

    This method must only be called if Player.COMMAND_GET_CURRENT_MEDIA_ITEM is available. @@ -1636,7 +1885,9 @@

    getContentBufferedPosition

    getAudioAttributes

    public final AudioAttributes getAudioAttributes()
    Description copied from interface: Player
    -
    Returns the attributes for audio playback.
    +
    Returns the attributes for audio playback. + +

    This method must only be called if Player.COMMAND_GET_AUDIO_ATTRIBUTES is available.

    @@ -1648,7 +1899,9 @@

    setVolume

    public final void setVolume​(float volume)
    Sets the audio volume, valid values are between 0 (silence) and 1 (unity gain, signal - unchanged), inclusive.
    + unchanged), inclusive. + +

    This method must only be called if Player.COMMAND_SET_VOLUME is available.

    Parameters:
    volume - Linear output gain to apply to all audio channels.
    @@ -1663,43 +1916,16 @@

    setVolume

    getVolume

    public final float getVolume()
    Description copied from interface: Player
    -
    Returns the audio volume, with 0 being silence and 1 being unity gain (signal unchanged).
    +
    Returns the audio volume, with 0 being silence and 1 being unity gain (signal unchanged). + +

    This method must only be called if Player.COMMAND_GET_VOLUME is available.

    Returns:
    The linear gain applied to all audio channels.
    - - - - - - - -
      -
    • -

      clearVideoSurface

      -
      public final void clearVideoSurface​(@Nullable
      -                                    Surface surface)
      -
      Description copied from interface: Player
      -
      Clears the Surface onto which video is being rendered if it matches the one passed. - Else does nothing.
      -
      -
      Parameters:
      -
      surface - The surface to clear.
      -
      -
    • -
    - + - +
    • -

      clearVideoSurfaceHolder

      -
      public final void clearVideoSurfaceHolder​(@Nullable
      -                                          SurfaceHolder surfaceHolder)
      -
      Description copied from interface: Player
      -
      Clears the SurfaceHolder that holds the Surface onto which video is being - rendered if it matches the one passed. Else does nothing.
      +

      setVideoSurfaceView

      +
      public final void setVideoSurfaceView​(@Nullable
      +                                      SurfaceView surfaceView)
      +
      Description copied from interface: Player
      +
      Sets the SurfaceView onto which video will be rendered. The player will track the + lifecycle of the surface automatically. + +

      The thread that calls the SurfaceHolder.Callback methods must be the thread + associated with Player.getApplicationLooper(). + +

      This method must only be called if Player.COMMAND_SET_VIDEO_SURFACE is available.

      Parameters:
      -
      surfaceHolder - The surface holder to clear.
      +
      surfaceView - The surface view.
    - + - + + + + +
      +
    • +

      clearVideoSurface

      +
      public final void clearVideoSurface​(@Nullable
      +                                    Surface surface)
      +
      Description copied from interface: Player
      +
      Clears the Surface onto which video is being rendered if it matches the one passed. + Else does nothing. + +

      This method must only be called if Player.COMMAND_SET_VIDEO_SURFACE is available.

      Parameters:
      -
      surfaceView - The texture view to clear.
      +
      surface - The surface to clear.
    - +
    • -

      setVideoTextureView

      -
      public final void setVideoTextureView​(@Nullable
      -                                      TextureView textureView)
      -
      Description copied from interface: Player
      -
      Sets the TextureView onto which video will be rendered. The player will track the - lifecycle of the surface automatically. +

      clearVideoSurfaceHolder

      +
      public final void clearVideoSurfaceHolder​(@Nullable
      +                                          SurfaceHolder surfaceHolder)
      +
      Description copied from interface: Player
      +
      Clears the SurfaceHolder that holds the Surface onto which video is being + rendered if it matches the one passed. Else does nothing. -

      The thread that calls the TextureView.SurfaceTextureListener methods must be the - thread associated with Player.getApplicationLooper().

      +

      This method must only be called if Player.COMMAND_SET_VIDEO_SURFACE is available.

      Parameters:
      -
      textureView - The texture view.
      +
      surfaceHolder - The surface holder to clear.
      +
      +
    • +
    + + + +
      +
    • +

      clearVideoSurfaceView

      +
      public final void clearVideoSurfaceView​(@Nullable
      +                                        SurfaceView surfaceView)
      +
      Description copied from interface: Player
      +
      Clears the SurfaceView onto which video is being rendered if it matches the one passed. + Else does nothing. + +

      This method must only be called if Player.COMMAND_SET_VIDEO_SURFACE is available.

      +
      +
      Parameters:
      +
      surfaceView - The texture view to clear.
    @@ -1825,7 +2096,9 @@

    clearVideoTextureView

    TextureView textureView)
    Description copied from interface: Player
    Clears the TextureView onto which video is being rendered if it matches the one passed. - Else does nothing.
    + Else does nothing. + +

    This method must only be called if Player.COMMAND_SET_VIDEO_SURFACE is available.

    Parameters:
    textureView - The texture view to clear.
    @@ -1873,7 +2146,9 @@

    getSurfaceSize

    getCurrentCues

    public final CueGroup getCurrentCues()
    Description copied from interface: Player
    -
    Returns the current CueGroup.
    +
    Returns the current CueGroup. + +

    This method must only be called if Player.COMMAND_GET_TEXT is available.

    @@ -1903,7 +2178,9 @@

    getDeviceVolume

    Util.getStreamTypeForAudioUsage(int).

    For devices with remote playback, the volume of the - remote device is returned. + remote device is returned. + +

    This method must only be called if Player.COMMAND_GET_DEVICE_VOLUME is available. @@ -1914,7 +2191,9 @@

    getDeviceVolume

    isDeviceMuted

    public final boolean isDeviceMuted()
    -
    Gets whether the device is muted or not.
    +
    Gets whether the device is muted or not. + +

    This method must only be called if Player.COMMAND_GET_DEVICE_VOLUME is available.

    @@ -1925,7 +2204,9 @@

    isDeviceMuted

    setDeviceVolume

    public final void setDeviceVolume​(int volume)
    -
    Sets the volume of the device.
    +
    Sets the volume of the device. + +

    This method must only be called if Player.COMMAND_SET_DEVICE_VOLUME is available.

    Parameters:
    volume - The volume to set.
    @@ -1940,7 +2221,9 @@

    setDeviceVolume

    increaseDeviceVolume

    public final void increaseDeviceVolume()
    Description copied from interface: Player
    -
    Increases the volume of the device.
    +
    Increases the volume of the device. + +

    This method must only be called if Player.COMMAND_ADJUST_DEVICE_VOLUME is available.

    @@ -1951,7 +2234,9 @@

    increaseDeviceVolume

    decreaseDeviceVolume

    public final void decreaseDeviceVolume()
    -
    Decreases the volume of the device.
    +
    Decreases the volume of the device. + +

    This method must only be called if Player.COMMAND_ADJUST_DEVICE_VOLUME is available.

    @@ -1962,7 +2247,9 @@

    decreaseDeviceVolume

    setDeviceMuted

    public final void setDeviceMuted​(boolean muted)
    -
    Sets the mute state of the device.
    +
    Sets the mute state of the device. + +

    This method must only be called if Player.COMMAND_ADJUST_DEVICE_VOLUME is available.

    @@ -2024,15 +2311,37 @@

    getPlaceholderState

    + + + + - @@ -1766,7 +1768,9 @@

    clearVideoSurface

    Deprecated.
    Description copied from interface: Player
    Clears any Surface, SurfaceHolder, SurfaceView or TextureView - currently set on the player.
    + currently set on the player. + +

    This method must only be called if Player.COMMAND_SET_VIDEO_SURFACE is available.

    Specified by:
    clearVideoSurface in interface ExoPlayer.VideoComponent
    @@ -1786,7 +1790,9 @@

    clearVideoSurface

    Deprecated.
    Description copied from interface: Player
    Clears the Surface onto which video is being rendered if it matches the one passed. - Else does nothing.
    + Else does nothing. + +

    This method must only be called if Player.COMMAND_SET_VIDEO_SURFACE is available.

    Specified by:
    clearVideoSurface in interface ExoPlayer.VideoComponent
    @@ -1813,7 +1819,9 @@

    setVideoSurface

    If the surface is held by a SurfaceView, TextureView or SurfaceHolder then it's recommended to use Player.setVideoSurfaceView(SurfaceView), Player.setVideoTextureView(TextureView) or Player.setVideoSurfaceHolder(SurfaceHolder) rather than this method, since passing the holder allows the player to track the lifecycle of the surface - automatically. + automatically. + +

    This method must only be called if Player.COMMAND_SET_VIDEO_SURFACE is available.

    Specified by:
    setVideoSurface in interface ExoPlayer.VideoComponent
    @@ -1838,7 +1846,9 @@

    setVideoSurfaceHolder

    rendered. The player will track the lifecycle of the surface automatically.

    The thread that calls the SurfaceHolder.Callback methods must be the thread - associated with Player.getApplicationLooper(). + associated with Player.getApplicationLooper(). + +

    This method must only be called if Player.COMMAND_SET_VIDEO_SURFACE is available.

    Specified by:
    setVideoSurfaceHolder in interface ExoPlayer.VideoComponent
    @@ -1860,7 +1870,9 @@

    clearVideoSurfaceHolder

    Deprecated.
    Description copied from interface: Player
    Clears the SurfaceHolder that holds the Surface onto which video is being - rendered if it matches the one passed. Else does nothing.
    + rendered if it matches the one passed. Else does nothing. + +

    This method must only be called if Player.COMMAND_SET_VIDEO_SURFACE is available.

    Specified by:
    clearVideoSurfaceHolder in interface ExoPlayer.VideoComponent
    @@ -1885,7 +1897,9 @@

    setVideoSurfaceView

    lifecycle of the surface automatically.

    The thread that calls the SurfaceHolder.Callback methods must be the thread - associated with Player.getApplicationLooper(). + associated with Player.getApplicationLooper(). + +

    This method must only be called if Player.COMMAND_SET_VIDEO_SURFACE is available.

    Specified by:
    setVideoSurfaceView in interface ExoPlayer.VideoComponent
    @@ -1907,7 +1921,9 @@

    clearVideoSurfaceView

    Deprecated.
    Description copied from interface: Player
    Clears the SurfaceView onto which video is being rendered if it matches the one passed. - Else does nothing.
    + Else does nothing. + +

    This method must only be called if Player.COMMAND_SET_VIDEO_SURFACE is available.

    Specified by:
    clearVideoSurfaceView in interface ExoPlayer.VideoComponent
    @@ -1932,7 +1948,9 @@

    setVideoTextureView

    lifecycle of the surface automatically.

    The thread that calls the TextureView.SurfaceTextureListener methods must be the - thread associated with Player.getApplicationLooper(). + thread associated with Player.getApplicationLooper(). + +

    This method must only be called if Player.COMMAND_SET_VIDEO_SURFACE is available.

    Specified by:
    setVideoTextureView in interface ExoPlayer.VideoComponent
    @@ -1954,7 +1972,9 @@

    clearVideoTextureView

    Deprecated.
    Description copied from interface: Player
    Clears the TextureView onto which video is being rendered if it matches the one passed. - Else does nothing.
    + Else does nothing. + +

    This method must only be called if Player.COMMAND_SET_VIDEO_SURFACE is available.

    Specified by:
    clearVideoTextureView in interface ExoPlayer.VideoComponent
    @@ -1974,7 +1994,9 @@

    addAudioOffloadListener

    public void addAudioOffloadListener​(ExoPlayer.AudioOffloadListener listener)
    Deprecated.
    Description copied from interface: ExoPlayer
    -
    Adds a listener to receive audio offload events.
    +
    Adds a listener to receive audio offload events. + +

    This method can be called from any thread.

    Specified by:
    addAudioOffloadListener in interface ExoPlayer
    @@ -2045,7 +2067,9 @@

    getAudioAttributes

    public AudioAttributes getAudioAttributes()
    Deprecated.
    Description copied from interface: Player
    -
    Returns the attributes for audio playback.
    +
    Returns the attributes for audio playback. + +

    This method must only be called if Player.COMMAND_GET_AUDIO_ATTRIBUTES is available.

    Specified by:
    getAudioAttributes in interface ExoPlayer.AudioComponent
    @@ -2163,7 +2187,9 @@

    setVolume

    Deprecated.
    Description copied from interface: Player
    Sets the audio volume, valid values are between 0 (silence) and 1 (unity gain, signal - unchanged), inclusive.
    + unchanged), inclusive. + +

    This method must only be called if Player.COMMAND_SET_VOLUME is available.

    Specified by:
    setVolume in interface ExoPlayer.AudioComponent
    @@ -2183,7 +2209,9 @@

    getVolume

    public float getVolume()
    Deprecated.
    Description copied from interface: Player
    -
    Returns the audio volume, with 0 being silence and 1 being unity gain (signal unchanged).
    +
    Returns the audio volume, with 0 being silence and 1 being unity gain (signal unchanged). + +

    This method must only be called if Player.COMMAND_GET_VOLUME is available.

    Specified by:
    getVolume in interface ExoPlayer.AudioComponent
    @@ -2257,7 +2285,9 @@

    addAnalyticsListener

    public void addAnalyticsListener​(AnalyticsListener listener)
    Deprecated.
    Description copied from interface: ExoPlayer
    -
    Adds an AnalyticsListener to receive analytics events.
    +
    Adds an AnalyticsListener to receive analytics events. + +

    This method can be called from any thread.

    Specified by:
    addAnalyticsListener in interface ExoPlayer
    @@ -2490,7 +2520,9 @@

    getCurrentCues

    public CueGroup getCurrentCues()
    Deprecated.
    Description copied from interface: Player
    -
    Returns the current CueGroup.
    +
    Returns the current CueGroup. + +

    This method must only be called if Player.COMMAND_GET_TEXT is available.

    Specified by:
    getCurrentCues in interface ExoPlayer.TextComponent
    @@ -2508,7 +2540,9 @@

    getPlaybackLooper

    public Looper getPlaybackLooper()
    Deprecated.
    Description copied from interface: ExoPlayer
    -
    Returns the Looper associated with the playback thread.
    +
    Returns the Looper associated with the playback thread. + +

    This method may be called from any thread.

    Specified by:
    getPlaybackLooper in interface ExoPlayer
    @@ -2525,7 +2559,9 @@

    getApplicationLooper

    Deprecated.
    Description copied from interface: Player
    Returns the Looper associated with the application thread that's used to access the - player and on which player events are received.
    + player and on which player events are received. + +

    This method can be called from any thread.

    Specified by:
    getApplicationLooper in interface Player
    @@ -2541,7 +2577,9 @@

    getClock

    public Clock getClock()
    Deprecated.
    Description copied from interface: ExoPlayer
    -
    Returns the Clock used for playback.
    +
    Returns the Clock used for playback. + +

    This method can be called from any thread.

    Specified by:
    getClock in interface ExoPlayer
    @@ -2559,7 +2597,9 @@

    addListener

    Description copied from interface: Player
    Registers a listener to receive all events from the player. -

    The listener's methods will be called on the thread associated with Player.getApplicationLooper().

    +

    The listener's methods will be called on the thread associated with Player.getApplicationLooper(). + +

    This method can be called from any thread.

    Specified by:
    addListener in interface Player
    @@ -2597,12 +2637,12 @@

    getPlaybackState

    public @com.google.android.exoplayer2.Player.State int getPlaybackState()
    Deprecated.
    Description copied from interface: Player
    -
    Returns the current playback state of the player.
    +
    Returns the current playback state of the player.
    Specified by:
    getPlaybackState in interface Player
    Returns:
    -
    The current playback state.
    +
    The current playback state.
    See Also:
    Player.Listener.onPlaybackStateChanged(int)
    @@ -2624,7 +2664,7 @@

    getPlaybackSuppressionReason

    Specified by:
    getPlaybackSuppressionReason in interface Player
    Returns:
    -
    The current playback suppression reason.
    +
    The current Player.PlaybackSuppressionReason.
    See Also:
    Player.Listener.onPlaybackSuppressionReasonChanged(int)
    @@ -2683,13 +2723,7 @@

    getAvailableCommands

    Returns the player's currently available Player.Commands.

    The returned Player.Commands are not updated when available commands change. Use Player.Listener.onAvailableCommandsChanged(Commands) to get an update when the available commands - change. - -

    Executing a command that is not available (for example, calling Player.seekToNextMediaItem() if Player.COMMAND_SEEK_TO_NEXT_MEDIA_ITEM is unavailable) will - neither throw an exception nor generate a Player.getPlayerError() player error}. - -

    Player.COMMAND_SEEK_TO_PREVIOUS_MEDIA_ITEM and Player.COMMAND_SEEK_TO_NEXT_MEDIA_ITEM - are unavailable if there is no such MediaItem.

    + change.
    Specified by:
    getAvailableCommands in interface Player
    @@ -2711,6 +2745,8 @@

    prepare

    Description copied from interface: Player
    Prepares the player. +

    This method must only be called if Player.COMMAND_PREPARE is available. +

    This will move the player out of idle state and the player will start loading media and acquire resources needed for playback.

    @@ -2766,12 +2802,14 @@

    setMediaItems

    boolean resetPosition)
    Deprecated.
    Description copied from interface: Player
    -
    Clears the playlist and adds the specified MediaItems.
    +
    Clears the playlist and adds the specified media items. + +

    This method must only be called if Player.COMMAND_CHANGE_MEDIA_ITEMS is available.

    Specified by:
    setMediaItems in interface Player
    Parameters:
    -
    mediaItems - The new MediaItems.
    +
    mediaItems - The new media items.
    resetPosition - Whether the playback position should be reset to the default position in the first Timeline.Window. If false, playback will start from the position defined by Player.getCurrentMediaItemIndex() and Player.getCurrentPosition().
    @@ -2789,12 +2827,14 @@

    setMediaItems

    long startPositionMs)
    Deprecated.
    Description copied from interface: Player
    -
    Clears the playlist and adds the specified MediaItems.
    +
    Clears the playlist and adds the specified media items. + +

    This method must only be called if Player.COMMAND_CHANGE_MEDIA_ITEMS is available.

    Specified by:
    setMediaItems in interface Player
    Parameters:
    -
    mediaItems - The new MediaItems.
    +
    mediaItems - The new media items.
    startIndex - The MediaItem index to start playback from. If C.INDEX_UNSET is passed, the current position is not reset.
    startPositionMs - The position in milliseconds to start playback from. If C.TIME_UNSET is passed, the default position of the given MediaItem is used. In @@ -2939,14 +2979,16 @@

    addMediaItems

    List<MediaItem> mediaItems)
    Deprecated.
    Description copied from interface: Player
    -
    Adds a list of media items at the given index of the playlist.
    +
    Adds a list of media items at the given index of the playlist. + +

    This method must only be called if Player.COMMAND_CHANGE_MEDIA_ITEMS is available.

    Specified by:
    addMediaItems in interface Player
    Parameters:
    index - The index at which to add the media items. If the index is larger than the size of the playlist, the media items are added to the end of the playlist.
    -
    mediaItems - The MediaItems to add.
    +
    mediaItems - The media items to add.
    @@ -3037,13 +3079,17 @@

    moveMediaItems

    int newIndex)
    Deprecated.
    Description copied from interface: Player
    -
    Moves the media item range to the new index.
    +
    Moves the media item range to the new index. + +

    This method must only be called if Player.COMMAND_CHANGE_MEDIA_ITEMS is available.

    Specified by:
    moveMediaItems in interface Player
    Parameters:
    -
    fromIndex - The start of the range to move.
    -
    toIndex - The first item not to be included in the range (exclusive).
    +
    fromIndex - The start of the range to move. If the index is larger than the size of the + playlist, the request is ignored.
    +
    toIndex - The first item not to be included in the range (exclusive). If the index is + larger than the size of the playlist, items up to the end of the playlist are moved.
    newIndex - The new index of the first media item of the range. If the new index is larger than the size of the remaining playlist after removing the range, the range is moved to the end of the playlist.
    @@ -3060,14 +3106,17 @@

    removeMediaItems

    int toIndex)
    Deprecated.
    Description copied from interface: Player
    -
    Removes a range of media items from the playlist.
    +
    Removes a range of media items from the playlist. + +

    This method must only be called if Player.COMMAND_CHANGE_MEDIA_ITEMS is available.

    Specified by:
    removeMediaItems in interface Player
    Parameters:
    -
    fromIndex - The index at which to start removing media items.
    +
    fromIndex - The index at which to start removing media items. If the index is larger than + the size of the playlist, the request is ignored.
    toIndex - The index of the first item to be kept (exclusive). If the index is larger than - the size of the playlist, media items to the end of the playlist are removed.
    + the size of the playlist, media items up to the end of the playlist are removed.
    @@ -3100,7 +3149,9 @@

    setPlayWhenReady

    Description copied from interface: Player
    Sets whether playback should proceed when Player.getPlaybackState() == Player.STATE_READY. -

    If the player is already in the ready state then this method pauses and resumes playback.

    +

    If the player is already in the ready state then this method pauses and resumes playback. + +

    This method must only be called if Player.COMMAND_PLAY_PAUSE is available.

    Specified by:
    setPlayWhenReady in interface Player
    @@ -3198,7 +3249,9 @@

    setRepeatMode

    @com.google.android.exoplayer2.Player.RepeatMode int repeatMode)
    Deprecated.
    Description copied from interface: Player
    -
    Sets the Player.RepeatMode to be used for playback.
    +
    Sets the Player.RepeatMode to be used for playback. + +

    This method must only be called if Player.COMMAND_SET_REPEAT_MODE is available.

    Specified by:
    setRepeatMode in interface Player
    @@ -3216,7 +3269,9 @@

    setShuffleModeEnabled

    public void setShuffleModeEnabled​(boolean shuffleModeEnabled)
    Deprecated.
    Description copied from interface: Player
    -
    Sets whether shuffling of media items is enabled.
    +
    Sets whether shuffling of media items is enabled. + +

    This method must only be called if Player.COMMAND_SET_SHUFFLE_MODE is available.

    Specified by:
    setShuffleModeEnabled in interface Player
    @@ -3263,24 +3318,29 @@

    isLoading

    - +
    • seekTo

      public void seekTo​(int mediaItemIndex,
      -                   long positionMs)
      + long positionMs, + @Command + @com.google.android.exoplayer2.Player.Command int seekCommand, + boolean isRepeatingCurrentItem)
      Deprecated.
      -
      Description copied from interface: Player
      -
      Seeks to a position specified in milliseconds in the specified MediaItem.
      +
      Description copied from class: BasePlayer
      +
      Seeks to a position in the specified MediaItem.
      Specified by:
      -
      seekTo in interface Player
      +
      seekTo in class BasePlayer
      Parameters:
      mediaItemIndex - The index of the MediaItem.
      -
      positionMs - The seek position in the specified MediaItem, or C.TIME_UNSET - to seek to the media item's default position.
      +
      positionMs - The seek position in the specified MediaItem in milliseconds, or + C.TIME_UNSET to seek to the media item's default position.
      +
      seekCommand - The Player.Command used to trigger the seek.
      +
      isRepeatingCurrentItem - Whether this seeks repeats the current item.
    @@ -3357,7 +3417,9 @@

    setPlaybackParameters

    player to the default, which means there is no speed or pitch adjustment.

    Playback parameters changes may cause the player to buffer. Player.Listener.onPlaybackParametersChanged(PlaybackParameters) will be called whenever the currently - active playback parameters change. + active playback parameters change. + +

    This method must only be called if Player.COMMAND_SET_SPEED_AND_PITCH is available.

    Specified by:
    setPlaybackParameters in interface Player
    @@ -3478,7 +3540,9 @@

    stop

    still be called on the player if it's no longer required.

    Calling this method does not clear the playlist, reset the playback position or the playback - error. + error. + +

    This method must only be called if Player.COMMAND_STOP is available.

    Specified by:
    stop in interface Player
    @@ -3668,7 +3732,9 @@

    getCurrentTracks

    public Tracks getCurrentTracks()
    Deprecated.
    Description copied from interface: Player
    -
    Returns the current tracks.
    +
    Returns the current tracks. + +

    This method must only be called if Player.COMMAND_GET_TRACKS is available.

    Specified by:
    getCurrentTracks in interface Player
    @@ -3718,7 +3784,10 @@

    setTrackSelectionParameters

    .buildUpon() .setMaxVideoSizeSd() .build()) - + + +

    This method must only be called if Player.COMMAND_SET_TRACK_SELECTION_PARAMETERS is + available.

    Specified by:
    setTrackSelectionParameters in interface Player
    @@ -3740,7 +3809,9 @@

    getMediaMetadata

    This MediaMetadata is a combination of the MediaItem metadata, the static metadata in the media's Format, and any timed metadata that has been parsed from the media and output via Player.Listener.onMetadata(Metadata). If a field is populated in the MediaItem.mediaMetadata, - it will be prioritised above the same field coming from static or timed metadata. + it will be prioritised above the same field coming from static or timed metadata. + +

    This method must only be called if Player.COMMAND_GET_MEDIA_ITEMS_METADATA is available.

    Specified by:
    getMediaMetadata in interface Player
    @@ -3756,7 +3827,9 @@

    getPlaylistMetadata

    public MediaMetadata getPlaylistMetadata()
    Deprecated.
    Description copied from interface: Player
    -
    Returns the playlist MediaMetadata, as set by Player.setPlaylistMetadata(MediaMetadata), or MediaMetadata.EMPTY if not supported.
    +
    Returns the playlist MediaMetadata, as set by Player.setPlaylistMetadata(MediaMetadata), or MediaMetadata.EMPTY if not supported. + +

    This method must only be called if Player.COMMAND_GET_MEDIA_ITEMS_METADATA is available.

    Specified by:
    getPlaylistMetadata in interface Player
    @@ -3772,7 +3845,9 @@

    setPlaylistMetadata

    public void setPlaylistMetadata​(MediaMetadata mediaMetadata)
    Deprecated.
    Description copied from interface: Player
    -
    Sets the playlist MediaMetadata.
    +
    Sets the playlist MediaMetadata. + +

    This method must only be called if Player.COMMAND_SET_MEDIA_ITEMS_METADATA is available.

    Specified by:
    setPlaylistMetadata in interface Player
    @@ -3788,7 +3863,9 @@

    getCurrentTimeline

    public Timeline getCurrentTimeline()
    Deprecated.
    Description copied from interface: Player
    -
    Returns the current Timeline. Never null, but may be empty.
    +
    Returns the current Timeline. Never null, but may be empty. + +

    This method must only be called if Player.COMMAND_GET_TIMELINE is available.

    Specified by:
    getCurrentTimeline in interface Player
    @@ -3806,7 +3883,9 @@

    getCurrentPeriodIndex

    public int getCurrentPeriodIndex()
    Deprecated.
    Description copied from interface: Player
    -
    Returns the index of the period currently being played.
    +
    Returns the index of the period currently being played. + +

    This method must only be called if Player.COMMAND_GET_TIMELINE is available.

    Specified by:
    getCurrentPeriodIndex in interface Player
    @@ -3823,7 +3902,9 @@

    getCurrentMediaItemIndex

    Deprecated.
    Description copied from interface: Player
    Returns the index of the current MediaItem in the timeline, or the prospective index if the current timeline is - empty.
    + empty. + +

    This method must only be called if Player.COMMAND_GET_TIMELINE is available.

    Specified by:
    getCurrentMediaItemIndex in interface Player
    @@ -3840,7 +3921,9 @@

    getDuration

    Deprecated.
    Description copied from interface: Player
    Returns the duration of the current content or ad in milliseconds, or C.TIME_UNSET if - the duration is not known.
    + the duration is not known. + +

    This method must only be called if Player.COMMAND_GET_CURRENT_MEDIA_ITEM is available.

    Specified by:
    getDuration in interface Player
    @@ -3857,7 +3940,9 @@

    getCurrentPosition

    Deprecated.
    Description copied from interface: Player
    Returns the playback position in the current content or ad, in milliseconds, or the prospective - position in milliseconds if the current timeline is empty.
    + position in milliseconds if the current timeline is empty. + +

    This method must only be called if Player.COMMAND_GET_CURRENT_MEDIA_ITEM is available.

    Specified by:
    getCurrentPosition in interface Player
    @@ -3874,7 +3959,9 @@

    getBufferedPosition

    Deprecated.
    Description copied from interface: Player
    Returns an estimate of the position in the current content or ad up to which data is buffered, - in milliseconds.
    + in milliseconds. + +

    This method must only be called if Player.COMMAND_GET_CURRENT_MEDIA_ITEM is available.

    Specified by:
    getBufferedPosition in interface Player
    @@ -3891,7 +3978,9 @@

    getTotalBufferedDuration

    Deprecated.
    Description copied from interface: Player
    Returns an estimate of the total buffered duration from the current position, in milliseconds. - This includes pre-buffered data for subsequent ads and media items.
    + This includes pre-buffered data for subsequent ads and media items. + +

    This method must only be called if Player.COMMAND_GET_CURRENT_MEDIA_ITEM is available.

    Specified by:
    getTotalBufferedDuration in interface Player
    @@ -3907,7 +3996,9 @@

    isPlayingAd

    public boolean isPlayingAd()
    Deprecated.
    Description copied from interface: Player
    -
    Returns whether the player is currently playing an ad.
    +
    Returns whether the player is currently playing an ad. + +

    This method must only be called if Player.COMMAND_GET_CURRENT_MEDIA_ITEM is available.

    Specified by:
    isPlayingAd in interface Player
    @@ -3924,7 +4015,9 @@

    getCurrentAdGroupIndex

    Deprecated.
    Description copied from interface: Player
    If Player.isPlayingAd() returns true, returns the index of the ad group in the period - currently being played. Returns C.INDEX_UNSET otherwise.
    + currently being played. Returns C.INDEX_UNSET otherwise. + +

    This method must only be called if Player.COMMAND_GET_CURRENT_MEDIA_ITEM is available.

    Specified by:
    getCurrentAdGroupIndex in interface Player
    @@ -3941,7 +4034,9 @@

    getCurrentAdIndexInAdGroup

    Deprecated.
    Description copied from interface: Player
    If Player.isPlayingAd() returns true, returns the index of the ad in its ad group. Returns - C.INDEX_UNSET otherwise.
    + C.INDEX_UNSET otherwise. + +

    This method must only be called if Player.COMMAND_GET_CURRENT_MEDIA_ITEM is available.

    Specified by:
    getCurrentAdIndexInAdGroup in interface Player
    @@ -3959,7 +4054,9 @@

    getContentPosition

    Description copied from interface: Player
    If Player.isPlayingAd() returns true, returns the content position that will be played once all ads in the ad group have finished playing, in milliseconds. If there is no ad - playing, the returned position is the same as that returned by Player.getCurrentPosition().
    + playing, the returned position is the same as that returned by Player.getCurrentPosition(). + +

    This method must only be called if Player.COMMAND_GET_CURRENT_MEDIA_ITEM is available.

    Specified by:
    getContentPosition in interface Player
    @@ -3977,7 +4074,9 @@

    getContentBufferedPosition

    Description copied from interface: Player
    If Player.isPlayingAd() returns true, returns an estimate of the content position in the current content up to which data is buffered, in milliseconds. If there is no ad playing, - the returned position is the same as that returned by Player.getBufferedPosition().
    + the returned position is the same as that returned by Player.getBufferedPosition(). + +

    This method must only be called if Player.COMMAND_GET_CURRENT_MEDIA_ITEM is available.

    Specified by:
    getContentBufferedPosition in interface Player
    @@ -4063,7 +4162,9 @@

    getDeviceVolume

    Util.getStreamTypeForAudioUsage(int).

    For devices with remote playback, the volume of the - remote device is returned. + remote device is returned. + +

    This method must only be called if Player.COMMAND_GET_DEVICE_VOLUME is available.

    Specified by:
    getDeviceVolume in interface ExoPlayer.DeviceComponent
    @@ -4081,7 +4182,9 @@

    isDeviceMuted

    public boolean isDeviceMuted()
    Deprecated.
    Description copied from interface: Player
    -
    Gets whether the device is muted or not.
    +
    Gets whether the device is muted or not. + +

    This method must only be called if Player.COMMAND_GET_DEVICE_VOLUME is available.

    Specified by:
    isDeviceMuted in interface ExoPlayer.DeviceComponent
    @@ -4099,7 +4202,9 @@

    setDeviceVolume

    public void setDeviceVolume​(int volume)
    Deprecated.
    Description copied from interface: Player
    -
    Sets the volume of the device.
    +
    Sets the volume of the device. + +

    This method must only be called if Player.COMMAND_SET_DEVICE_VOLUME is available.

    Specified by:
    setDeviceVolume in interface ExoPlayer.DeviceComponent
    @@ -4119,7 +4224,9 @@

    increaseDeviceVolume

    public void increaseDeviceVolume()
    Deprecated.
    Description copied from interface: Player
    -
    Increases the volume of the device.
    +
    Increases the volume of the device. + +

    This method must only be called if Player.COMMAND_ADJUST_DEVICE_VOLUME is available.

    Specified by:
    increaseDeviceVolume in interface ExoPlayer.DeviceComponent
    @@ -4137,7 +4244,9 @@

    decreaseDeviceVolume

    public void decreaseDeviceVolume()
    Deprecated.
    Description copied from interface: Player
    -
    Decreases the volume of the device.
    +
    Decreases the volume of the device. + +

    This method must only be called if Player.COMMAND_ADJUST_DEVICE_VOLUME is available.

    Specified by:
    decreaseDeviceVolume in interface ExoPlayer.DeviceComponent
    @@ -4155,7 +4264,9 @@

    setDeviceMuted

    public void setDeviceMuted​(boolean muted)
    Deprecated.
    Description copied from interface: Player
    -
    Sets the mute state of the device.
    +
    Sets the mute state of the device. + +

    This method must only be called if Player.COMMAND_ADJUST_DEVICE_VOLUME is available.

    Specified by:
    setDeviceMuted in interface ExoPlayer.DeviceComponent
    diff --git a/docs/doc/reference/com/google/android/exoplayer2/Timeline.RemotableTimeline.html b/docs/doc/reference/com/google/android/exoplayer2/Timeline.RemotableTimeline.html index ec5f5723dec..c256d1f57b2 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/Timeline.RemotableTimeline.html +++ b/docs/doc/reference/com/google/android/exoplayer2/Timeline.RemotableTimeline.html @@ -317,7 +317,7 @@

    Method Summary

    Methods inherited from class com.google.android.exoplayer2.Timeline

    -equals, getNextPeriodIndex, getPeriod, getPeriodByUid, getPeriodPosition, getPeriodPosition, getPeriodPositionUs, getPeriodPositionUs, getWindow, hashCode, isEmpty, isLastPeriod, toBundle, toBundle +equals, getNextPeriodIndex, getPeriod, getPeriodByUid, getPeriodPosition, getPeriodPosition, getPeriodPositionUs, getPeriodPositionUs, getWindow, hashCode, isEmpty, isLastPeriod, toBundle, toBundleWithOneWindowOnly
    - + - + diff --git a/docs/doc/reference/com/google/android/exoplayer2/analytics/DefaultAnalyticsCollector.html b/docs/doc/reference/com/google/android/exoplayer2/analytics/DefaultAnalyticsCollector.html index 47d4af2cf70..a7baa51ec0a 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/analytics/DefaultAnalyticsCollector.html +++ b/docs/doc/reference/com/google/android/exoplayer2/analytics/DefaultAnalyticsCollector.html @@ -25,8 +25,8 @@ catch(err) { } //--> -var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10,"i33":10,"i34":10,"i35":10,"i36":10,"i37":10,"i38":10,"i39":10,"i40":10,"i41":10,"i42":10,"i43":10,"i44":10,"i45":10,"i46":10,"i47":10,"i48":10,"i49":10,"i50":10,"i51":10,"i52":10,"i53":10,"i54":10,"i55":10,"i56":10,"i57":10,"i58":10,"i59":10,"i60":10,"i61":10,"i62":10,"i63":10,"i64":10,"i65":10,"i66":10,"i67":10,"i68":10,"i69":10,"i70":10,"i71":10,"i72":10,"i73":10,"i74":10,"i75":10,"i76":10,"i77":10}; -var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; +var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10,"i33":10,"i34":10,"i35":10,"i36":10,"i37":10,"i38":10,"i39":10,"i40":10,"i41":10,"i42":10,"i43":10,"i44":10,"i45":10,"i46":10,"i47":10,"i48":10,"i49":10,"i50":10,"i51":10,"i52":10,"i53":10,"i54":10,"i55":10,"i56":10,"i57":10,"i58":10,"i59":10,"i60":10,"i61":10,"i62":10,"i63":10,"i64":10,"i65":10,"i66":10,"i67":10,"i68":10,"i69":10,"i70":10,"i71":10,"i72":10,"i73":10,"i74":10,"i75":10,"i76":10,"i77":42,"i78":10}; +var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; var tableTab = "tableTab"; @@ -205,7 +205,7 @@

    Constructor Summary

    Method Summary

    - + @@ -245,7 +245,7 @@

    Method Summary

    @@ -346,14 +346,14 @@

    Method Summary

    @@ -368,7 +368,7 @@

    Method Summary

    @@ -527,7 +527,7 @@

    Method Summary

    @@ -541,7 +541,7 @@

    Method Summary

    @@ -582,7 +582,7 @@

    Method Summary

    @@ -678,14 +678,14 @@

    Method Summary

    @@ -769,7 +769,7 @@

    Method Summary

    @@ -805,6 +805,15 @@

    Method Summary

    + + + + + + + + + + - + - + - + - + - + - + - + - + - + - - + int sampleRate, + int bitrate) - - + @@ -446,7 +449,7 @@

    DefaultAudioTrackBufferSizeProvider

    Method Detail

    - + - +
      @@ -491,7 +496,8 @@

      get1xBufferSizeInBytes

      int encoding, int outputMode, int pcmFrameSize, - int sampleRate) + int sampleRate, + int bitrate)
      Returns the buffer size for playback at 1x speed.
    @@ -507,13 +513,14 @@

    getPcmBufferSizeInBytes

    Returns the buffer size for PCM playback.
    - +
    • getPassthroughBufferSizeInBytes

      -
      protected int getPassthroughBufferSizeInBytes​(@com.google.android.exoplayer2.C.Encoding int encoding)
      +
      protected int getPassthroughBufferSizeInBytes​(@com.google.android.exoplayer2.C.Encoding int encoding,
      +                                              int bitrate)
      Returns the buffer size for passthrough playback.
    diff --git a/docs/doc/reference/com/google/android/exoplayer2/audio/OpusUtil.html b/docs/doc/reference/com/google/android/exoplayer2/audio/OpusUtil.html index a194e043305..39a0292b8c4 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/audio/OpusUtil.html +++ b/docs/doc/reference/com/google/android/exoplayer2/audio/OpusUtil.html @@ -25,7 +25,7 @@ catch(err) { } //--> -var data = {"i0":9,"i1":9}; +var data = {"i0":9,"i1":9,"i2":9,"i3":9}; var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; @@ -154,6 +154,13 @@

    Field Summary

    + + + + + + + + + + + + + + +
    All Methods Instance Methods Concrete Methods All Methods Instance Methods Concrete Methods Deprecated Methods 
    Modifier and Type Method void onAudioAttributesChanged​(AudioAttributes audioAttributes) -
    Called when the audio attributes change.
    +
    Called when the value of Player.getAudioAttributes() changes.
    void onCues​(CueGroup cueGroup) -
    Called when there is a change in the CueGroup.
    +
    Called when the value of Player.getCurrentCues() changes.
    void onCues​(List<Cue> cues) -
    Called when there is a change in the Cues.
    +
    Called when the value of Player.getCurrentCues() changes.
    onDeviceVolumeChanged​(int volume, boolean muted) -
    Called when the device volume or mute state changes.
    +
    Called when the value of Player.getDeviceVolume() or Player.isDeviceMuted() changes.
    void onMediaMetadataChanged​(MediaMetadata mediaMetadata) -
    Called when the combined MediaMetadata changes.
    +
    Called when the value of Player.getMediaMetadata() changes.
    void onPlaybackParametersChanged​(PlaybackParameters playbackParameters) -
    Called when the current playback parameters change.
    +
    Called when the value of Player.getPlaybackParameters() changes.
    void onPlaylistMetadataChanged​(MediaMetadata playlistMetadata) -
    Called when the playlist MediaMetadata changes.
    +
    Called when the value of Player.getPlaylistMetadata() changes.
    onTimelineChanged​(Timeline timeline, @com.google.android.exoplayer2.Player.TimelineChangeReason int reason) -
    Called when the timeline has been refreshed.
    +
    Called when the value of Player.getCurrentTimeline() changes.
    void onTracksChanged​(Tracks tracks) -
    Called when the tracks change.
    +
    Called when the value of Player.getCurrentTracks() changes.
    void onVolumeChanged​(float volume) -
    Called when the volume changes.
    +
    Called when the value of Player.getVolume() changes.
    voidsetThrowsWhenUsingWrongThread​(boolean throwsWhenUsingWrongThread) +
    Deprecated. +
    Do not use this method and ensure all calls are made from the correct thread.
    +
    +
    void updateMediaPeriodQueueInfo​(List<MediaSource.MediaPeriodId> queue, MediaSource.MediaPeriodId readingPeriod) @@ -866,6 +875,26 @@

    DefaultAnalyticsCollector

    Method Detail

    + + + +
      +
    • +

      setThrowsWhenUsingWrongThread

      +
      @Deprecated
      +public void setThrowsWhenUsingWrongThread​(boolean throwsWhenUsingWrongThread)
      +
      Deprecated. +
      Do not use this method and ensure all calls are made from the correct thread.
      +
      +
      Sets whether methods throw when using the wrong thread. + +

      Do not use this method unless to support legacy use cases.

      +
      +
      Parameters:
      +
      throwsWhenUsingWrongThread - Whether to throw when using the wrong thread.
      +
      +
    • +
    @@ -1161,7 +1190,7 @@

    onAudioCodecError

    onVolumeChanged

    public final void onVolumeChanged​(float volume)
    Description copied from interface: Player.Listener
    -
    Called when the volume changes. +
    Called when the value of Player.getVolume() changes.

    Player.Listener.onEvents(Player, Events) will also be called to report this event along with other events that happen in the same Looper message queue iteration.

    @@ -1571,7 +1600,7 @@

    onTimelineChanged

    @TimelineChangeReason @com.google.android.exoplayer2.Player.TimelineChangeReason int reason)
    Description copied from interface: Player.Listener
    -
    Called when the timeline has been refreshed. +
    Called when the value of Player.getCurrentTimeline() changes.

    Note that the current MediaItem or playback position may change as a result of a timeline change. If playback can't continue smoothly because of this timeline change, a @@ -1603,8 +1632,8 @@

    onMediaItemTransition

    Called when playback transitions to a media item or starts repeating a media item according to the current repeat mode. -

    Note that this callback is also called when the playlist becomes non-empty or empty as a - consequence of a playlist change. +

    Note that this callback is also called when the value of Player.getCurrentTimeline() + becomes non-empty or empty.

    Player.Listener.onEvents(Player, Events) will also be called to report this event along with other events that happen in the same Looper message queue iteration.

    @@ -1625,7 +1654,7 @@

    onMediaItemTransition

    onTracksChanged

    public void onTracksChanged​(Tracks tracks)
    Description copied from interface: Player.Listener
    -
    Called when the tracks change. +
    Called when the value of Player.getCurrentTracks() changes.

    Player.Listener.onEvents(Player, Events) will also be called to report this event along with other events that happen in the same Looper message queue iteration.

    @@ -1723,7 +1752,7 @@

    onPlaybackStateChanged

    Specified by:
    onPlaybackStateChanged in interface Player.Listener
    Parameters:
    -
    playbackState - The new playback state.
    +
    playbackState - The new playback Player.State.
    @@ -1746,7 +1775,7 @@

    onPlayWhenReadyChanged

    onPlayWhenReadyChanged in interface Player.Listener
    Parameters:
    playWhenReady - Whether playback will proceed when ready.
    -
    reason - The reason for the change.
    +
    reason - The Player.PlayWhenReadyChangeReason for the change.
    @@ -1828,7 +1857,7 @@

    onShuffleModeEnabledChanged

    Specified by:
    onShuffleModeEnabledChanged in interface Player.Listener
    Parameters:
    -
    shuffleModeEnabled - Whether shuffling of media items is enabled.
    +
    shuffleModeEnabled - Whether shuffling of media items is enabled.
    @@ -1931,10 +1960,10 @@

    onPositionDiscontinuity

    onPlaybackParametersChanged

    public final void onPlaybackParametersChanged​(PlaybackParameters playbackParameters)
    Description copied from interface: Player.Listener
    -
    Called when the current playback parameters change. The playback parameters may change due to - a call to Player.setPlaybackParameters(PlaybackParameters), or the player itself may change - them (for example, if audio playback switches to passthrough or offload mode, where speed - adjustment is no longer possible). +
    Called when the value of Player.getPlaybackParameters() changes. The playback parameters + may change due to a call to Player.setPlaybackParameters(PlaybackParameters), or the player + itself may change them (for example, if audio playback switches to passthrough or offload + mode, where speed adjustment is no longer possible).

    Player.Listener.onEvents(Player, Events) will also be called to report this event along with other events that happen in the same Looper message queue iteration.

    @@ -2015,11 +2044,7 @@

    onMaxSeekToPreviousPositionChanged

    onMediaMetadataChanged

    public void onMediaMetadataChanged​(MediaMetadata mediaMetadata)
    Description copied from interface: Player.Listener
    -
    Called when the combined MediaMetadata changes. - -

    The provided MediaMetadata is a combination of the MediaItem metadata, the static metadata in the media's Format, and - any timed metadata that has been parsed from the media and output via Player.Listener.onMetadata(Metadata). If a field is populated in the MediaItem.mediaMetadata, it will be prioritised above the same field coming from static or - timed metadata. +

    Called when the value of Player.getMediaMetadata() changes.

    This method may be called multiple times in quick succession. @@ -2041,7 +2066,7 @@

    onMediaMetadataChanged

    onPlaylistMetadataChanged

    public void onPlaylistMetadataChanged​(MediaMetadata playlistMetadata)
    Description copied from interface: Player.Listener
    -
    Called when the playlist MediaMetadata changes. +
    Called when the value of Player.getPlaylistMetadata() changes.

    Player.Listener.onEvents(Player, Events) will also be called to report this event along with other events that happen in the same Looper message queue iteration.

    @@ -2079,10 +2104,10 @@

    onMetadata

    onCues

    public void onCues​(List<Cue> cues)
    Description copied from interface: Player.Listener
    -
    Called when there is a change in the Cues. +
    Called when the value of Player.getCurrentCues() changes. -

    Both Player.Listener.onCues(List) and Player.Listener.onCues(CueGroup) are called when there is a change - in the cues. You should only implement one or the other. +

    Both this method and Player.Listener.onCues(CueGroup) are called when there is a change in the + cues. You should only implement one or the other.

    Player.Listener.onEvents(Player, Events) will also be called to report this event along with other events that happen in the same Looper message queue iteration.

    @@ -2100,10 +2125,10 @@

    onCues

    onCues

    public void onCues​(CueGroup cueGroup)
    Description copied from interface: Player.Listener
    -
    Called when there is a change in the CueGroup. +
    Called when the value of Player.getCurrentCues() changes. -

    Both Player.Listener.onCues(List) and Player.Listener.onCues(CueGroup) are called when there is a change - in the cues. You should only implement one or the other. +

    Both this method and Player.Listener.onCues(List) are called when there is a change in the cues. + You should only implement one or the other.

    Player.Listener.onEvents(Player, Events) will also be called to report this event along with other events that happen in the same Looper message queue iteration.

    @@ -2174,7 +2199,7 @@

    onAudioSessionIdChanged

    onAudioAttributesChanged

    public final void onAudioAttributesChanged​(AudioAttributes audioAttributes)
    Description copied from interface: Player.Listener
    -
    Called when the audio attributes change. +
    Called when the value of Player.getAudioAttributes() changes.

    Player.Listener.onEvents(Player, Events) will also be called to report this event along with other events that happen in the same Looper message queue iteration.

    @@ -2255,7 +2280,7 @@

    onDeviceVolumeChanged

    public void onDeviceVolumeChanged​(int volume,
                                       boolean muted)
    Description copied from interface: Player.Listener
    -
    Called when the device volume or mute state changes. +
    Called when the value of Player.getDeviceVolume() or Player.isDeviceMuted() changes.

    Player.Listener.onEvents(Player, Events) will also be called to report this event along with other events that happen in the same Looper message queue iteration.

    @@ -2301,8 +2326,6 @@

    onEvents

    State changes and events that happen within one Looper message queue iteration are reported together and only after all individual callbacks were triggered. -

    Only state changes represented by events are reported through this method. -

    Listeners should prefer this method over individual callbacks in the following cases:

      diff --git a/docs/doc/reference/com/google/android/exoplayer2/audio/Ac3Util.SyncFrameInfo.html b/docs/doc/reference/com/google/android/exoplayer2/audio/Ac3Util.SyncFrameInfo.html index d5e74d67f67..bbdfa5b2278 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/audio/Ac3Util.SyncFrameInfo.html +++ b/docs/doc/reference/com/google/android/exoplayer2/audio/Ac3Util.SyncFrameInfo.html @@ -177,68 +177,75 @@

      Field Summary

    intbitrate +
    The bitrate of audio samples.
    +
    int channelCount
    The number of audio channels
    int frameSize
    The size of the frame.
    String mimeType
    The sample mime type of the bitstream.
    int sampleCount
    Number of audio samples in the frame.
    int sampleRate
    The audio sampling rate in Hz.
    static int STREAM_TYPE_TYPE0
    Type 0 AC3 stream type.
    static int STREAM_TYPE_TYPE1
    Type 1 AC3 stream type.
    static int STREAM_TYPE_TYPE2
    Type 2 AC3 stream type.
    static int STREAM_TYPE_UNDEFINED
    Undefined AC3 stream type.
    @com.google.android.exoplayer2.audio.Ac3Util.SyncFrameInfo.StreamType int streamType @@ -389,13 +396,23 @@

    frameSize

    -
      +
      • sampleCount

        public final int sampleCount
        Number of audio samples in the frame.
      + + + +
        +
      • +

        bitrate

        +
        public final int bitrate
        +
        The bitrate of audio samples.
        +
      • +
    diff --git a/docs/doc/reference/com/google/android/exoplayer2/audio/DefaultAudioSink.AudioTrackBufferSizeProvider.html b/docs/doc/reference/com/google/android/exoplayer2/audio/DefaultAudioSink.AudioTrackBufferSizeProvider.html index 72387deb5de..89c8cc4c936 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/audio/DefaultAudioSink.AudioTrackBufferSizeProvider.html +++ b/docs/doc/reference/com/google/android/exoplayer2/audio/DefaultAudioSink.AudioTrackBufferSizeProvider.html @@ -178,11 +178,12 @@

    Method Summary

    intgetBufferSizeInBytes​(int minBufferSizeInBytes, +getBufferSizeInBytes​(int minBufferSizeInBytes, @com.google.android.exoplayer2.C.Encoding int encoding, @com.google.android.exoplayer2.audio.DefaultAudioSink.OutputMode int outputMode, int pcmFrameSize, int sampleRate, + int bitrate, double maxAudioTrackPlaybackSpeed)
    Returns the buffer size to use when creating an AudioTrack for a specific format and @@ -226,7 +227,7 @@

    DEFAULT

    Method Detail

    - +
      @@ -237,6 +238,7 @@

      getBufferSizeInBytes

      @com.google.android.exoplayer2.audio.DefaultAudioSink.OutputMode int outputMode, int pcmFrameSize, int sampleRate, + int bitrate, double maxAudioTrackPlaybackSpeed)
      Returns the buffer size to use when creating an AudioTrack for a specific format and output mode.
      @@ -249,6 +251,7 @@

      getBufferSizeInBytes

      pcmFrameSize - The size of the PCM frames if the encoding is PCM, 1 otherwise, in bytes.
      sampleRate - The sample rate of the format, in Hz.
      +
      bitrate - The bitrate of the audio stream if the stream is compressed, or Format.NO_VALUE if encoding is PCM or the bitrate is not known.
      maxAudioTrackPlaybackSpeed - The maximum speed the content will be played using AudioTrack.setPlaybackParams(android.media.PlaybackParams). 0.5 is 2x slow motion, 1 is real time, 2 is 2x fast forward, etc. This will be 1 unless DefaultAudioSink.Builder.setEnableAudioTrackPlaybackParams(boolean) is enabled.
      Returns:
      diff --git a/docs/doc/reference/com/google/android/exoplayer2/audio/DefaultAudioTrackBufferSizeProvider.html b/docs/doc/reference/com/google/android/exoplayer2/audio/DefaultAudioTrackBufferSizeProvider.html index d176d159ba0..821b89a59fa 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/audio/DefaultAudioTrackBufferSizeProvider.html +++ b/docs/doc/reference/com/google/android/exoplayer2/audio/DefaultAudioTrackBufferSizeProvider.html @@ -282,22 +282,24 @@

      Method Summary

    protected intget1xBufferSizeInBytes​(int minBufferSizeInBytes, +get1xBufferSizeInBytes​(int minBufferSizeInBytes, int encoding, int outputMode, int pcmFrameSize, - int sampleRate)
    Returns the buffer size for playback at 1x speed.
    intgetBufferSizeInBytes​(int minBufferSizeInBytes, +getBufferSizeInBytes​(int minBufferSizeInBytes, @com.google.android.exoplayer2.C.Encoding int encoding, @com.google.android.exoplayer2.audio.DefaultAudioSink.OutputMode int outputMode, int pcmFrameSize, int sampleRate, + int bitrate, double maxAudioTrackPlaybackSpeed)
    Returns the buffer size to use when creating an AudioTrack for a specific format and @@ -318,7 +320,8 @@

    Method Summary

    protected intgetPassthroughBufferSizeInBytes​(@com.google.android.exoplayer2.C.Encoding int encoding)getPassthroughBufferSizeInBytes​(@com.google.android.exoplayer2.C.Encoding int encoding, + int bitrate)
    Returns the buffer size for passthrough playback.
    static intMAX_BYTES_PER_SECOND +
    Maximum achievable Opus bitrate.
    +
    static int SAMPLE_RATE
    Opus streams are always 48000 Hz.
    @@ -191,6 +198,20 @@

    Method Summary

    Parses the channel count from an Opus Identification Header.
    static longgetPacketDurationUs​(byte[] buffer) +
    Returns the duration of the given audio packet.
    +
    static intparsePacketAudioSampleCount​(ByteBuffer buffer) +
    Returns the number of audio samples in the given audio packet.
    +
    + + + +
      +
    • +

      MAX_BYTES_PER_SECOND

      +
      public static final int MAX_BYTES_PER_SECOND
      +
      Maximum achievable Opus bitrate.
      +
      +
      See Also:
      +
      Constant Field Values
      +
      +
    • +
    @@ -258,7 +293,7 @@

    getChannelCount

    -
      +
      • buildInitializationData

        public static List<byte[]> buildInitializationData​(byte[] header)
        @@ -271,6 +306,40 @@

        buildInitializationData

    + + + +
      +
    • +

      parsePacketAudioSampleCount

      +
      public static int parsePacketAudioSampleCount​(ByteBuffer buffer)
      +
      Returns the number of audio samples in the given audio packet. + +

      The buffer's position is not modified.

      +
      +
      Parameters:
      +
      buffer - The audio packet.
      +
      Returns:
      +
      Returns the number of audio samples in the packet.
      +
      +
    • +
    + + + +
      +
    • +

      getPacketDurationUs

      +
      public static long getPacketDurationUs​(byte[] buffer)
      +
      Returns the duration of the given audio packet.
      +
      +
      Parameters:
      +
      buffer - The audio packet.
      +
      Returns:
      +
      Returns the duration of the given audio packet, in microseconds.
      +
      +
    • +
    diff --git a/docs/doc/reference/com/google/android/exoplayer2/ext/cast/CastPlayer.html b/docs/doc/reference/com/google/android/exoplayer2/ext/cast/CastPlayer.html index 9ca08382b48..86cdc1a7661 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/ext/cast/CastPlayer.html +++ b/docs/doc/reference/com/google/android/exoplayer2/ext/cast/CastPlayer.html @@ -499,7 +499,7 @@

    Method Summary

    @com.google.android.exoplayer2.Player.State int getPlaybackState() -
    Returns the current playback state of the player.
    +
    Returns the current playback state of the player.
    @@ -669,10 +669,12 @@

    Method Summary

    void -seekTo​(int mediaItemIndex, - long positionMs) +seekTo​(int mediaItemIndex, + long positionMs, + @com.google.android.exoplayer2.Player.Command int seekCommand, + boolean isRepeatingCurrentItem) -
    Seeks to a position specified in milliseconds in the specified MediaItem.
    +
    Seeks to a position in the specified MediaItem.
    @@ -694,7 +696,7 @@

    Method Summary

    setMediaItems​(List<MediaItem> mediaItems, boolean resetPosition) -
    Clears the playlist and adds the specified MediaItems.
    +
    Clears the playlist and adds the specified media items.
    @@ -703,7 +705,7 @@

    Method Summary

    int startIndex, long startPositionMs) -
    Clears the playlist and adds the specified MediaItems.
    +
    Clears the playlist and adds the specified media items.
    @@ -813,7 +815,7 @@

    Method Summary

    Methods inherited from class com.google.android.exoplayer2.BasePlayer

    -addMediaItem, addMediaItem, addMediaItems, canAdvertiseSession, clearMediaItems, getBufferedPercentage, getContentDuration, getCurrentLiveOffset, getCurrentManifest, getCurrentMediaItem, getCurrentWindowIndex, getMediaItemAt, getMediaItemCount, getNextMediaItemIndex, getNextWindowIndex, getPreviousMediaItemIndex, getPreviousWindowIndex, hasNext, hasNextMediaItem, hasNextWindow, hasPrevious, hasPreviousMediaItem, hasPreviousWindow, isCommandAvailable, isCurrentMediaItemDynamic, isCurrentMediaItemLive, isCurrentMediaItemSeekable, isCurrentWindowDynamic, isCurrentWindowLive, isCurrentWindowSeekable, isPlaying, moveMediaItem, next, pause, play, previous, removeMediaItem, repeatCurrentMediaItem, seekBack, seekForward, seekTo, seekToDefaultPosition, seekToDefaultPosition, seekToNext, seekToNextMediaItem, seekToNextWindow, seekToPrevious, seekToPreviousMediaItem, seekToPreviousWindow, setMediaItem, setMediaItem, setMediaItem, setMediaItems, setPlaybackSpeed +addMediaItem, addMediaItem, addMediaItems, canAdvertiseSession, clearMediaItems, getBufferedPercentage, getContentDuration, getCurrentLiveOffset, getCurrentManifest, getCurrentMediaItem, getCurrentWindowIndex, getMediaItemAt, getMediaItemCount, getNextMediaItemIndex, getNextWindowIndex, getPreviousMediaItemIndex, getPreviousWindowIndex, hasNext, hasNextMediaItem, hasNextWindow, hasPrevious, hasPreviousMediaItem, hasPreviousWindow, isCommandAvailable, isCurrentMediaItemDynamic, isCurrentMediaItemLive, isCurrentMediaItemSeekable, isCurrentWindowDynamic, isCurrentWindowLive, isCurrentWindowSeekable, isPlaying, moveMediaItem, next, pause, play, previous, removeMediaItem, seekBack, seekForward, seekTo, seekTo, seekToDefaultPosition, seekToDefaultPosition, seekToNext, seekToNextMediaItem, seekToNextWindow, seekToPrevious, seekToPreviousMediaItem, seekToPreviousWindow, setMediaItem, setMediaItem, setMediaItem, setMediaItems, setPlaybackSpeed
    • @@ -1012,7 +1014,9 @@

      getApplicationLooper

      public Looper getApplicationLooper()
      Description copied from interface: Player
      Returns the Looper associated with the application thread that's used to access the - player and on which player events are received.
      + player and on which player events are received. + +

      This method can be called from any thread.

    @@ -1025,7 +1029,9 @@

    addListener

    Registers a listener to receive all events from the player. -

    The listener's methods will be called on the thread associated with Player.getApplicationLooper().

    +

    The listener's methods will be called on the thread associated with Player.getApplicationLooper(). + +

    This method can be called from any thread.

    Parameters:
    listener - The listener to register.
    @@ -1057,10 +1063,12 @@

    setMediaItems

    public void setMediaItems​(List<MediaItem> mediaItems,
                               boolean resetPosition)
    Description copied from interface: Player
    -
    Clears the playlist and adds the specified MediaItems.
    +
    Clears the playlist and adds the specified media items. + +

    This method must only be called if Player.COMMAND_CHANGE_MEDIA_ITEMS is available.

    Parameters:
    -
    mediaItems - The new MediaItems.
    +
    mediaItems - The new media items.
    resetPosition - Whether the playback position should be reset to the default position in the first Timeline.Window. If false, playback will start from the position defined by Player.getCurrentMediaItemIndex() and Player.getCurrentPosition().
    @@ -1077,10 +1085,12 @@

    setMediaItems

    int startIndex, long startPositionMs)
    Description copied from interface: Player
    -
    Clears the playlist and adds the specified MediaItems.
    +
    Clears the playlist and adds the specified media items. + +

    This method must only be called if Player.COMMAND_CHANGE_MEDIA_ITEMS is available.

    Parameters:
    -
    mediaItems - The new MediaItems.
    +
    mediaItems - The new media items.
    startIndex - The MediaItem index to start playback from. If C.INDEX_UNSET is passed, the current position is not reset.
    startPositionMs - The position in milliseconds to start playback from. If C.TIME_UNSET is passed, the default position of the given MediaItem is used. In @@ -1098,12 +1108,14 @@

    addMediaItems

    public void addMediaItems​(int index,
                               List<MediaItem> mediaItems)
    Description copied from interface: Player
    -
    Adds a list of media items at the given index of the playlist.
    +
    Adds a list of media items at the given index of the playlist. + +

    This method must only be called if Player.COMMAND_CHANGE_MEDIA_ITEMS is available.

    Parameters:
    index - The index at which to add the media items. If the index is larger than the size of the playlist, the media items are added to the end of the playlist.
    -
    mediaItems - The MediaItems to add.
    +
    mediaItems - The media items to add.
    @@ -1117,11 +1129,15 @@

    moveMediaItems

    int toIndex, int newIndex)
    Description copied from interface: Player
    -
    Moves the media item range to the new index.
    +
    Moves the media item range to the new index. + +

    This method must only be called if Player.COMMAND_CHANGE_MEDIA_ITEMS is available.

    Parameters:
    -
    fromIndex - The start of the range to move.
    -
    toIndex - The first item not to be included in the range (exclusive).
    +
    fromIndex - The start of the range to move. If the index is larger than the size of the + playlist, the request is ignored.
    +
    toIndex - The first item not to be included in the range (exclusive). If the index is + larger than the size of the playlist, items up to the end of the playlist are moved.
    newIndex - The new index of the first media item of the range. If the new index is larger than the size of the remaining playlist after removing the range, the range is moved to the end of the playlist.
    @@ -1137,12 +1153,15 @@

    removeMediaItems

    public void removeMediaItems​(int fromIndex,
                                  int toIndex)
    Description copied from interface: Player
    -
    Removes a range of media items from the playlist.
    +
    Removes a range of media items from the playlist. + +

    This method must only be called if Player.COMMAND_CHANGE_MEDIA_ITEMS is available.

    Parameters:
    -
    fromIndex - The index at which to start removing media items.
    +
    fromIndex - The index at which to start removing media items. If the index is larger than + the size of the playlist, the request is ignored.
    toIndex - The index of the first item to be kept (exclusive). If the index is larger than - the size of the playlist, media items to the end of the playlist are removed.
    + the size of the playlist, media items up to the end of the playlist are removed.
    @@ -1157,13 +1176,7 @@

    getAvailableCommands

    Returns the player's currently available Player.Commands.

    The returned Player.Commands are not updated when available commands change. Use Player.Listener.onAvailableCommandsChanged(Commands) to get an update when the available commands - change. - -

    Executing a command that is not available (for example, calling Player.seekToNextMediaItem() if Player.COMMAND_SEEK_TO_NEXT_MEDIA_ITEM is unavailable) will - neither throw an exception nor generate a Player.getPlayerError() player error}. - -

    Player.COMMAND_SEEK_TO_PREVIOUS_MEDIA_ITEM and Player.COMMAND_SEEK_TO_NEXT_MEDIA_ITEM - are unavailable if there is no such MediaItem.

    + change.
    Returns:
    The currently available Player.Commands.
    @@ -1182,6 +1195,8 @@

    prepare

    Description copied from interface: Player
    Prepares the player. +

    This method must only be called if Player.COMMAND_PREPARE is available. +

    This will move the player out of idle state and the player will start loading media and acquire resources needed for playback.

    @@ -1195,10 +1210,10 @@

    getPlaybackState

    @State
     public @com.google.android.exoplayer2.Player.State int getPlaybackState()
    Description copied from interface: Player
    -
    Returns the current playback state of the player.
    +
    Returns the current playback state of the player.
    Returns:
    -
    The current playback state.
    +
    The current playback state.
    See Also:
    Player.Listener.onPlaybackStateChanged(int)
    @@ -1217,7 +1232,7 @@

    getPlaybackSuppressionReason

    true, or Player.PLAYBACK_SUPPRESSION_REASON_NONE if playback is not suppressed.
    Returns:
    -
    The current playback suppression reason.
    +
    The current Player.PlaybackSuppressionReason.
    See Also:
    Player.Listener.onPlaybackSuppressionReasonChanged(int)
    @@ -1256,7 +1271,9 @@

    setPlayWhenReady

    Description copied from interface: Player
    Sets whether playback should proceed when Player.getPlaybackState() == Player.STATE_READY. -

    If the player is already in the ready state then this method pauses and resumes playback.

    +

    If the player is already in the ready state then this method pauses and resumes playback. + +

    This method must only be called if Player.COMMAND_PLAY_PAUSE is available.

    Parameters:
    playWhenReady - Whether playback should proceed when ready.
    @@ -1280,21 +1297,28 @@

    getPlayWhenReady

    - +
    • seekTo

      public void seekTo​(int mediaItemIndex,
      -                   long positionMs)
      -
      Description copied from interface: Player
      -
      Seeks to a position specified in milliseconds in the specified MediaItem.
      + long positionMs, + @Command + @com.google.android.exoplayer2.Player.Command int seekCommand, + boolean isRepeatingCurrentItem) +
      Description copied from class: BasePlayer
      +
      Seeks to a position in the specified MediaItem.
      +
      Specified by:
      +
      seekTo in class BasePlayer
      Parameters:
      mediaItemIndex - The index of the MediaItem.
      -
      positionMs - The seek position in the specified MediaItem, or C.TIME_UNSET - to seek to the media item's default position.
      +
      positionMs - The seek position in the specified MediaItem in milliseconds, or + C.TIME_UNSET to seek to the media item's default position.
      +
      seekCommand - The Player.Command used to trigger the seek.
      +
      isRepeatingCurrentItem - Whether this seeks repeats the current item.
    @@ -1381,7 +1405,9 @@

    stop

    still be called on the player if it's no longer required.

    Calling this method does not clear the playlist, reset the playback position or the playback - error. + error. + +

    This method must only be called if Player.COMMAND_STOP is available. @@ -1423,7 +1449,9 @@

    setPlaybackParameters

    player to the default, which means there is no speed or pitch adjustment.

    Playback parameters changes may cause the player to buffer. Player.Listener.onPlaybackParametersChanged(PlaybackParameters) will be called whenever the currently - active playback parameters change. + active playback parameters change. + +

    This method must only be called if Player.COMMAND_SET_SPEED_AND_PITCH is available.

    Parameters:
    playbackParameters - The playback parameters.
    @@ -1439,7 +1467,9 @@

    setRepeatMode

    public void setRepeatMode​(@RepeatMode
                               @com.google.android.exoplayer2.Player.RepeatMode int repeatMode)
    Description copied from interface: Player
    -
    Sets the Player.RepeatMode to be used for playback.
    +
    Sets the Player.RepeatMode to be used for playback. + +

    This method must only be called if Player.COMMAND_SET_REPEAT_MODE is available.

    Parameters:
    repeatMode - The repeat mode.
    @@ -1472,7 +1502,9 @@

    getRepeatMode

    setShuffleModeEnabled

    public void setShuffleModeEnabled​(boolean shuffleModeEnabled)
    Description copied from interface: Player
    -
    Sets whether shuffling of media items is enabled.
    +
    Sets whether shuffling of media items is enabled. + +

    This method must only be called if Player.COMMAND_SET_SHUFFLE_MODE is available.

    Parameters:
    shuffleModeEnabled - Whether shuffling is enabled.
    @@ -1502,7 +1534,9 @@

    getShuffleModeEnabled

    getCurrentTracks

    public Tracks getCurrentTracks()
    Description copied from interface: Player
    -
    Returns the current tracks.
    +
    Returns the current tracks. + +

    This method must only be called if Player.COMMAND_GET_TRACKS is available.

    See Also:
    Player.Listener.onTracksChanged(Tracks)
    @@ -1546,7 +1580,10 @@

    setTrackSelectionParameters

    .buildUpon() .setMaxVideoSizeSd() .build()) - + + +

    This method must only be called if Player.COMMAND_SET_TRACK_SELECTION_PARAMETERS is + available. @@ -1563,7 +1600,9 @@

    getMediaMetadata

    This MediaMetadata is a combination of the MediaItem metadata, the static metadata in the media's Format, and any timed metadata that has been parsed from the media and output via Player.Listener.onMetadata(Metadata). If a field is populated in the MediaItem.mediaMetadata, - it will be prioritised above the same field coming from static or timed metadata. + it will be prioritised above the same field coming from static or timed metadata. + +

    This method must only be called if Player.COMMAND_GET_MEDIA_ITEMS_METADATA is available. @@ -1583,7 +1622,9 @@

    getMediaMetadataInternal

    getPlaylistMetadata

    public MediaMetadata getPlaylistMetadata()
    Description copied from interface: Player
    -
    Returns the playlist MediaMetadata, as set by Player.setPlaylistMetadata(MediaMetadata), or MediaMetadata.EMPTY if not supported.
    +
    Returns the playlist MediaMetadata, as set by Player.setPlaylistMetadata(MediaMetadata), or MediaMetadata.EMPTY if not supported. + +

    This method must only be called if Player.COMMAND_GET_MEDIA_ITEMS_METADATA is available.

    @@ -1604,7 +1645,9 @@

    setPlaylistMetadata

    getCurrentTimeline

    public Timeline getCurrentTimeline()
    Description copied from interface: Player
    -
    Returns the current Timeline. Never null, but may be empty.
    +
    Returns the current Timeline. Never null, but may be empty. + +

    This method must only be called if Player.COMMAND_GET_TIMELINE is available.

    See Also:
    Player.Listener.onTimelineChanged(Timeline, int)
    @@ -1619,7 +1662,9 @@

    getCurrentTimeline

    getCurrentPeriodIndex

    public int getCurrentPeriodIndex()
    Description copied from interface: Player
    -
    Returns the index of the period currently being played.
    +
    Returns the index of the period currently being played. + +

    This method must only be called if Player.COMMAND_GET_TIMELINE is available.

    @@ -1631,7 +1676,9 @@

    getCurrentMediaItemIndex

    public int getCurrentMediaItemIndex()
    Returns the index of the current MediaItem in the timeline, or the prospective index if the current timeline is - empty.
    + empty. + +

    This method must only be called if Player.COMMAND_GET_TIMELINE is available. @@ -1643,7 +1690,9 @@

    getDuration

    public long getDuration()
    Returns the duration of the current content or ad in milliseconds, or C.TIME_UNSET if - the duration is not known.
    + the duration is not known. + +

    This method must only be called if Player.COMMAND_GET_CURRENT_MEDIA_ITEM is available. @@ -1655,7 +1704,9 @@

    getCurrentPosition

    public long getCurrentPosition()
    Returns the playback position in the current content or ad, in milliseconds, or the prospective - position in milliseconds if the current timeline is empty.
    + position in milliseconds if the current timeline is empty. + +

    This method must only be called if Player.COMMAND_GET_CURRENT_MEDIA_ITEM is available. @@ -1667,7 +1718,9 @@

    getBufferedPosition

    public long getBufferedPosition()
    Returns an estimate of the position in the current content or ad up to which data is buffered, - in milliseconds.
    + in milliseconds. + +

    This method must only be called if Player.COMMAND_GET_CURRENT_MEDIA_ITEM is available. @@ -1679,7 +1732,9 @@

    getTotalBufferedDuration

    public long getTotalBufferedDuration()
    Returns an estimate of the total buffered duration from the current position, in milliseconds. - This includes pre-buffered data for subsequent ads and media items.
    + This includes pre-buffered data for subsequent ads and media items. + +

    This method must only be called if Player.COMMAND_GET_CURRENT_MEDIA_ITEM is available. @@ -1690,7 +1745,9 @@

    getTotalBufferedDuration

    isPlayingAd

    public boolean isPlayingAd()
    -
    Returns whether the player is currently playing an ad.
    +
    Returns whether the player is currently playing an ad. + +

    This method must only be called if Player.COMMAND_GET_CURRENT_MEDIA_ITEM is available.

    @@ -1702,7 +1759,9 @@

    getCurrentAdGroupIndex

    public int getCurrentAdGroupIndex()
    If Player.isPlayingAd() returns true, returns the index of the ad group in the period - currently being played. Returns C.INDEX_UNSET otherwise.
    + currently being played. Returns C.INDEX_UNSET otherwise. + +

    This method must only be called if Player.COMMAND_GET_CURRENT_MEDIA_ITEM is available. @@ -1714,7 +1773,9 @@

    getCurrentAdIndexInAdGroup

    public int getCurrentAdIndexInAdGroup()
    If Player.isPlayingAd() returns true, returns the index of the ad in its ad group. Returns - C.INDEX_UNSET otherwise.
    + C.INDEX_UNSET otherwise. + +

    This method must only be called if Player.COMMAND_GET_CURRENT_MEDIA_ITEM is available. @@ -1744,7 +1805,9 @@

    getContentPosition

    If Player.isPlayingAd() returns true, returns the content position that will be played once all ads in the ad group have finished playing, in milliseconds. If there is no ad - playing, the returned position is the same as that returned by Player.getCurrentPosition().
    + playing, the returned position is the same as that returned by Player.getCurrentPosition(). + +

    This method must only be called if Player.COMMAND_GET_CURRENT_MEDIA_ITEM is available. @@ -1757,7 +1820,9 @@

    getContentBufferedPosition

    If Player.isPlayingAd() returns true, returns an estimate of the content position in the current content up to which data is buffered, in milliseconds. If there is no ad playing, - the returned position is the same as that returned by Player.getBufferedPosition().
    + the returned position is the same as that returned by Player.getBufferedPosition(). + +

    This method must only be called if Player.COMMAND_GET_CURRENT_MEDIA_ITEM is available. diff --git a/docs/doc/reference/com/google/android/exoplayer2/ext/ima/ImaServerSideAdInsertionMediaSource.AdsLoader.Builder.html b/docs/doc/reference/com/google/android/exoplayer2/ext/ima/ImaServerSideAdInsertionMediaSource.AdsLoader.Builder.html index 2f89d4eebef..4bf95e92793 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/ext/ima/ImaServerSideAdInsertionMediaSource.AdsLoader.Builder.html +++ b/docs/doc/reference/com/google/android/exoplayer2/ext/ima/ImaServerSideAdInsertionMediaSource.AdsLoader.Builder.html @@ -25,7 +25,7 @@ catch(err) { } //--> -var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10}; +var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10}; var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; @@ -217,6 +217,13 @@

    Method Summary

    ImaServerSideAdInsertionMediaSource.AdsLoader.Builder +setFocusSkipButtonWhenAvailable​(boolean focusSkipButtonWhenAvailable) + +
    Sets whether to focus the skip button (when available) on Android TV devices.
    + + + +ImaServerSideAdInsertionMediaSource.AdsLoader.Builder setImaSdkSettings​(com.google.ads.interactivemedia.v3.api.ImaSdkSettings imaSdkSettings)
    Sets the IMA SDK settings.
    @@ -282,7 +289,7 @@

    setImaSdkSettings

    public ImaServerSideAdInsertionMediaSource.AdsLoader.Builder setImaSdkSettings​(com.google.ads.interactivemedia.v3.api.ImaSdkSettings imaSdkSettings)
    Sets the IMA SDK settings. -

    If this method is not called the default settings will be used.

    +

    If this method is not called, the default settings will be used with the language set to the preferred system language.

    Parameters:
    imaSdkSettings - The ImaSdkSettings.
    @@ -363,6 +370,27 @@

    setAdsLoaderState

    + + + +
      +
    • +

      setFocusSkipButtonWhenAvailable

      +
      @CanIgnoreReturnValue
      +public ImaServerSideAdInsertionMediaSource.AdsLoader.Builder setFocusSkipButtonWhenAvailable​(boolean focusSkipButtonWhenAvailable)
      +
      Sets whether to focus the skip button (when available) on Android TV devices. The default + setting is true.
      +
      +
      Parameters:
      +
      focusSkipButtonWhenAvailable - Whether to focus the skip button (when available) on + Android TV devices.
      +
      Returns:
      +
      This builder, for convenience.
      +
      See Also:
      +
      AdsRenderingSettings.setFocusSkipButtonWhenAvailable(boolean)
      +
      +
    • +
    diff --git a/docs/doc/reference/com/google/android/exoplayer2/ext/ima/ImaServerSideAdInsertionMediaSource.AdsLoader.html b/docs/doc/reference/com/google/android/exoplayer2/ext/ima/ImaServerSideAdInsertionMediaSource.AdsLoader.html index f9b4798b6f0..c8618578df1 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/ext/ima/ImaServerSideAdInsertionMediaSource.AdsLoader.html +++ b/docs/doc/reference/com/google/android/exoplayer2/ext/ima/ImaServerSideAdInsertionMediaSource.AdsLoader.html @@ -25,7 +25,7 @@ catch(err) { } //--> -var data = {"i0":10,"i1":10}; +var data = {"i0":10,"i1":10,"i2":10}; var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; @@ -189,13 +189,20 @@

    Method Summary

    Description +void +focusSkipButton() + +
    Puts the focus on the skip button, if a skip button is present and an ad is playing.
    + + + ImaServerSideAdInsertionMediaSource.AdsLoader.State release()
    Releases resources.
    - + void setPlayer​(Player player) @@ -239,6 +246,20 @@

    setPlayer

    player. + + + +
      +
    • +

      focusSkipButton

      +
      public void focusSkipButton()
      +
      Puts the focus on the skip button, if a skip button is present and an ad is playing.
      +
      +
      See Also:
      +
      BaseManager.focus()
      +
      +
    • +
    diff --git a/docs/doc/reference/com/google/android/exoplayer2/ext/leanback/LeanbackPlayerAdapter.html b/docs/doc/reference/com/google/android/exoplayer2/ext/leanback/LeanbackPlayerAdapter.html index f2bbfacf97c..1b9de850288 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/ext/leanback/LeanbackPlayerAdapter.html +++ b/docs/doc/reference/com/google/android/exoplayer2/ext/leanback/LeanbackPlayerAdapter.html @@ -256,7 +256,7 @@

    Method Summary

    void -seekTo​(long positionMs) +seekTo​(long positionInMs)   @@ -268,7 +268,7 @@

    Method Summary

    void -setProgressUpdatingEnabled​(boolean enabled) +setProgressUpdatingEnabled​(boolean enable)   @@ -379,7 +379,7 @@

    onDetachedFromHost

    • setProgressUpdatingEnabled

      -
      public void setProgressUpdatingEnabled​(boolean enabled)
      +
      public void setProgressUpdatingEnabled​(boolean enable)
      Overrides:
      setProgressUpdatingEnabled in class androidx.leanback.media.PlayerAdapter
      @@ -457,7 +457,7 @@

      pause

      • seekTo

        -
        public void seekTo​(long positionMs)
        +
        public void seekTo​(long positionInMs)
        Overrides:
        seekTo in class androidx.leanback.media.PlayerAdapter
        diff --git a/docs/doc/reference/com/google/android/exoplayer2/extractor/DefaultExtractorsFactory.html b/docs/doc/reference/com/google/android/exoplayer2/extractor/DefaultExtractorsFactory.html index f8ba2d6d9e9..df95e64bedc 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/extractor/DefaultExtractorsFactory.html +++ b/docs/doc/reference/com/google/android/exoplayer2/extractor/DefaultExtractorsFactory.html @@ -25,7 +25,7 @@ catch(err) { } //--> -var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10}; +var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10}; var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; @@ -326,6 +326,14 @@

        Method Summary

        by the factory. + +DefaultExtractorsFactory +setTsSubtitleFormats​(List<Format> subtitleFormats) + +
        Sets a list of subtitle formats to pass to the DefaultTsPayloadReaderFactory used by + TsExtractor instances created by the factory.
        + +
      + + + + diff --git a/docs/doc/reference/com/google/android/exoplayer2/extractor/FlacStreamMetadata.html b/docs/doc/reference/com/google/android/exoplayer2/extractor/FlacStreamMetadata.html index db7ab948494..43194b5c2d7 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/extractor/FlacStreamMetadata.html +++ b/docs/doc/reference/com/google/android/exoplayer2/extractor/FlacStreamMetadata.html @@ -131,18 +131,20 @@

      Class FlacStreamMetadata


      public final class FlacStreamMetadata
       extends Object
      -
      Holder for FLAC metadata.
      -
      -
      See Also:
      -
      FLAC format - METADATA_BLOCK_STREAMINFO, -FLAC format - METADATA_BLOCK_SEEKTABLE, -FLAC format - METADATA_BLOCK_VORBIS_COMMENT, -FLAC format - METADATA_BLOCK_PICTURE
      -
      +
    diff --git a/docs/doc/reference/com/google/android/exoplayer2/extractor/VorbisBitArray.html b/docs/doc/reference/com/google/android/exoplayer2/extractor/VorbisBitArray.html index 77c6f040126..9343d9d0c8f 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/extractor/VorbisBitArray.html +++ b/docs/doc/reference/com/google/android/exoplayer2/extractor/VorbisBitArray.html @@ -131,12 +131,10 @@

    Class VorbisBitArray


    public final class VorbisBitArray
     extends Object
    -
    Wraps a byte array, providing methods that allow it to be read as a Vorbis bitstream.
    -
    -
    See Also:
    -
    Vorbis bitpacking - specification
    -
    +
    Wraps a byte array, providing methods that allow it to be read as a Vorbis bitstream. + +

    See the Vorbis + bitpacking specification

    diff --git a/docs/doc/reference/com/google/android/exoplayer2/extractor/VorbisUtil.VorbisIdHeader.html b/docs/doc/reference/com/google/android/exoplayer2/extractor/VorbisUtil.VorbisIdHeader.html index 2bbaae7817b..20750a19ee3 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/extractor/VorbisUtil.VorbisIdHeader.html +++ b/docs/doc/reference/com/google/android/exoplayer2/extractor/VorbisUtil.VorbisIdHeader.html @@ -129,12 +129,10 @@

    Class VorbisUtil.Vorbi
    public static final class VorbisUtil.VorbisIdHeader
     extends Object
    -
    Vorbis identification header.
    -
    -
    See Also:
    -
    Vorbis - spec/Identification header
    -
    +
    Vorbis identification header. + +

    See the Vorbis + spec/Identification header

    diff --git a/docs/doc/reference/com/google/android/exoplayer2/extractor/VorbisUtil.html b/docs/doc/reference/com/google/android/exoplayer2/extractor/VorbisUtil.html index 2804081c9d1..98d45069f9f 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/extractor/VorbisUtil.html +++ b/docs/doc/reference/com/google/android/exoplayer2/extractor/VorbisUtil.html @@ -277,15 +277,15 @@

    Method Detail

  • iLog

    public static int iLog​(int x)
    -
    Returns ilog(x), which is the index of the highest set bit in x.
    +
    Returns ilog(x), which is the index of the highest set bit in x. + +

    See the Vorbis + spec

    Parameters:
    x - the value of which the ilog should be calculated.
    Returns:
    ilog(x)
    -
    See Also:
    -
    Vorbis - spec
  • @@ -297,7 +297,10 @@

    iLog

    readVorbisIdentificationHeader

    public static VorbisUtil.VorbisIdHeader readVorbisIdentificationHeader​(ParsableByteArray headerData)
                                                                     throws ParserException
    -
    Reads a Vorbis identification header from headerData.
    +
    Reads a Vorbis identification header from headerData. + +

    See the Vorbis + spec/Identification header

    Parameters:
    headerData - a ParsableByteArray wrapping the header data.
    @@ -305,9 +308,6 @@

    readVorbisIdentificationHeader

    a VorbisUtil.VorbisIdHeader with meta data.
    Throws:
    ParserException - thrown if invalid capture pattern is detected.
    -
    See Also:
    -
    Vorbis - spec/Identification header
    @@ -319,7 +319,10 @@

    readVorbisIdentificationHeader

    readVorbisCommentHeader

    public static VorbisUtil.CommentHeader readVorbisCommentHeader​(ParsableByteArray headerData)
                                                             throws ParserException
    -
    Reads a Vorbis comment header.
    +
    Reads a Vorbis comment header. + +

    See the Vorbis + spec/Comment header

    Parameters:
    headerData - A ParsableByteArray wrapping the header data.
    @@ -327,9 +330,6 @@

    readVorbisCommentHeader

    A VorbisUtil.CommentHeader with all the comments.
    Throws:
    ParserException - If an error occurs parsing the comment header.
    -
    See Also:
    -
    Vorbis - spec/Comment header
    @@ -345,7 +345,10 @@

    readVorbisCommentHeader

    throws ParserException
    Reads a Vorbis comment header. -

    The data provided may not contain the Vorbis metadata common header and the framing bit.

    +

    The data provided may not contain the Vorbis metadata common header and the framing bit. + +

    See the Vorbis + spec/Comment header

    Parameters:
    headerData - A ParsableByteArray wrapping the header data.
    @@ -356,9 +359,6 @@

    readVorbisCommentHeader

    A VorbisUtil.CommentHeader with all the comments.
    Throws:
    ParserException - If an error occurs parsing the comment header.
    -
    See Also:
    -
    Vorbis - spec/Comment header
    @@ -417,7 +417,10 @@

    readVorbisModes

    throws ParserException
    This method reads the modes which are located at the very end of the Vorbis setup header. That's why we need to partially decode or at least read the entire setup header to know where - to start reading the modes.
    + to start reading the modes. + +

    See the Vorbis + spec/Setup header

    Parameters:
    headerData - a ParsableByteArray containing setup header data.
    @@ -426,9 +429,6 @@

    readVorbisModes

    an array of VorbisUtil.Modes.
    Throws:
    ParserException - thrown if bit stream is invalid.
    -
    See Also:
    -
    Vorbis - spec/Setup header
    diff --git a/docs/doc/reference/com/google/android/exoplayer2/mediacodec/MediaCodecInfo.html b/docs/doc/reference/com/google/android/exoplayer2/mediacodec/MediaCodecInfo.html index a374c74e8f8..b503cd1e933 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/mediacodec/MediaCodecInfo.html +++ b/docs/doc/reference/com/google/android/exoplayer2/mediacodec/MediaCodecInfo.html @@ -25,7 +25,7 @@ catch(err) { } //--> -var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":42,"i10":10,"i11":9,"i12":10}; +var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":42,"i11":10,"i12":9,"i13":10}; var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; @@ -302,19 +302,27 @@

    Method Summary

    boolean -isFormatSupported​(Format format) +isFormatFunctionallySupported​(Format format) -
    Returns whether the decoder may support decoding the given format.
    +
    Returns whether the decoder may functionally support decoding the given format.
    boolean +isFormatSupported​(Format format) + +
    Returns whether the decoder may support decoding the given format both functionally and + performantly.
    + + + +boolean isHdr10PlusOutOfBandMetadataSupported()
    Whether the codec handles HDR10+ out-of-band metadata.
    - + boolean isSeamlessAdaptationSupported​(Format format) @@ -322,7 +330,7 @@

    Method Summary

    format when the codec is configured to play media in the specified format. - + boolean isSeamlessAdaptationSupported​(Format oldFormat, Format newFormat, @@ -333,7 +341,7 @@

    Method Summary

    - + boolean isVideoSizeAndRateSupportedV21​(int width, int height, @@ -342,7 +350,7 @@

    Method Summary

    Whether the decoder supports video with a given width, height and frame rate.
    - + static MediaCodecInfo newInstance​(String name, String mimeType, @@ -357,7 +365,7 @@

    Method Summary

    Creates an instance.
    - + String toString()   @@ -647,7 +655,8 @@

    getMaxSupportedInstances

    isFormatSupported

    public boolean isFormatSupported​(Format format)
                               throws MediaCodecUtil.DecoderQueryException
    -
    Returns whether the decoder may support decoding the given format.
    +
    Returns whether the decoder may support decoding the given format both functionally and + performantly.
    Parameters:
    format - The input media format.
    @@ -658,6 +667,22 @@

    isFormatSupported

    + + + +
      +
    • +

      isFormatFunctionallySupported

      +
      public boolean isFormatFunctionallySupported​(Format format)
      +
      Returns whether the decoder may functionally support decoding the given format.
      +
      +
      Parameters:
      +
      format - The input media format.
      +
      Returns:
      +
      Whether the decoder may functionally support decoding the given format.
      +
      +
    • +
    diff --git a/docs/doc/reference/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.html b/docs/doc/reference/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.html index e3a63d8a21c..3f5cc43057a 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.html +++ b/docs/doc/reference/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.html @@ -221,8 +221,8 @@

    Method Summary

    getDecoderInfosSortedByFormatSupport​(List<MediaCodecInfo> decoderInfos, Format format) -
    Returns a copy of the provided decoder list sorted such that decoders with format support are - listed first.
    +
    Returns a copy of the provided decoder list sorted such that decoders with functional format + support are listed first.
    @@ -383,8 +383,8 @@

    getDecoderInfosSortedByFormatSupport

    @CheckResult
     public static List<MediaCodecInfo> getDecoderInfosSortedByFormatSupport​(List<MediaCodecInfo> decoderInfos,
                                                                             Format format)
    -
    Returns a copy of the provided decoder list sorted such that decoders with format support are - listed first. The returned list is modifiable for convenience.
    +
    Returns a copy of the provided decoder list sorted such that decoders with functional format + support are listed first. The returned list is modifiable for convenience.
    diff --git a/docs/doc/reference/com/google/android/exoplayer2/metadata/Metadata.Entry.html b/docs/doc/reference/com/google/android/exoplayer2/metadata/Metadata.Entry.html index 2ede7c4667a..4dab1233640 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/metadata/Metadata.Entry.html +++ b/docs/doc/reference/com/google/android/exoplayer2/metadata/Metadata.Entry.html @@ -209,7 +209,8 @@

    Method Summary

    default void
    populateMediaMetadata​(MediaMetadata.Builder builder) -
    Updates the MediaMetadata.Builder with the type specific values stored in this Entry.
    +
    Updates the MediaMetadata.Builder with the type-specific values stored in this + Entry.
    @@ -266,10 +267,8 @@

    getWrappedMetadataBytes

  • populateMediaMetadata

    default void populateMediaMetadata​(MediaMetadata.Builder builder)
    -
    Updates the MediaMetadata.Builder with the type specific values stored in this Entry. - -

    The order of the Metadata.Entry objects in the Metadata matters. If two Metadata.Entry entries attempt to populate the same MediaMetadata field, then the last one in - the list is used.

    +
    Updates the MediaMetadata.Builder with the type-specific values stored in this + Entry.
    Parameters:
    builder - The builder to be updated.
    diff --git a/docs/doc/reference/com/google/android/exoplayer2/metadata/flac/PictureFrame.html b/docs/doc/reference/com/google/android/exoplayer2/metadata/flac/PictureFrame.html index bcd47cffc61..749def51f2f 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/metadata/flac/PictureFrame.html +++ b/docs/doc/reference/com/google/android/exoplayer2/metadata/flac/PictureFrame.html @@ -314,7 +314,8 @@

    Method Summary

    void populateMediaMetadata​(MediaMetadata.Builder builder) -
    Updates the MediaMetadata.Builder with the type specific values stored in this Entry.
    +
    Updates the MediaMetadata.Builder with the type-specific values stored in this + Entry.
    @@ -492,10 +493,8 @@

    Method Detail

    populateMediaMetadata

    public void populateMediaMetadata​(MediaMetadata.Builder builder)
    Description copied from interface: Metadata.Entry
    -
    Updates the MediaMetadata.Builder with the type specific values stored in this Entry. - -

    The order of the Metadata.Entry objects in the Metadata matters. If two Metadata.Entry entries attempt to populate the same MediaMetadata field, then the last one in - the list is used.

    +
    Updates the MediaMetadata.Builder with the type-specific values stored in this + Entry.
    Specified by:
    populateMediaMetadata in interface Metadata.Entry
    diff --git a/docs/doc/reference/com/google/android/exoplayer2/metadata/flac/VorbisComment.html b/docs/doc/reference/com/google/android/exoplayer2/metadata/flac/VorbisComment.html index a1c7e1bb863..d61f46d9266 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/metadata/flac/VorbisComment.html +++ b/docs/doc/reference/com/google/android/exoplayer2/metadata/flac/VorbisComment.html @@ -288,7 +288,8 @@

    Method Summary

    populateMediaMetadata​(MediaMetadata.Builder builder)
    Deprecated.
    -
    Updates the MediaMetadata.Builder with the type specific values stored in this Entry.
    +
    Updates the MediaMetadata.Builder with the type-specific values stored in this + Entry.
    @@ -424,10 +425,8 @@

    populateMediaMetadata

    public void populateMediaMetadata​(MediaMetadata.Builder builder)
    Deprecated.
    Description copied from interface: Metadata.Entry
    -
    Updates the MediaMetadata.Builder with the type specific values stored in this Entry. - -

    The order of the Metadata.Entry objects in the Metadata matters. If two Metadata.Entry entries attempt to populate the same MediaMetadata field, then the last one in - the list is used.

    +
    Updates the MediaMetadata.Builder with the type-specific values stored in this + Entry.
    Specified by:
    populateMediaMetadata in interface Metadata.Entry
    diff --git a/docs/doc/reference/com/google/android/exoplayer2/metadata/icy/IcyHeaders.html b/docs/doc/reference/com/google/android/exoplayer2/metadata/icy/IcyHeaders.html index 23186110710..6a379855f45 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/metadata/icy/IcyHeaders.html +++ b/docs/doc/reference/com/google/android/exoplayer2/metadata/icy/IcyHeaders.html @@ -311,7 +311,8 @@

    Method Summary

    void populateMediaMetadata​(MediaMetadata.Builder builder) -
    Updates the MediaMetadata.Builder with the type specific values stored in this Entry.
    +
    Updates the MediaMetadata.Builder with the type-specific values stored in this + Entry.
    @@ -528,10 +529,8 @@

    parse

    populateMediaMetadata

    public void populateMediaMetadata​(MediaMetadata.Builder builder)
    Description copied from interface: Metadata.Entry
    -
    Updates the MediaMetadata.Builder with the type specific values stored in this Entry. - -

    The order of the Metadata.Entry objects in the Metadata matters. If two Metadata.Entry entries attempt to populate the same MediaMetadata field, then the last one in - the list is used.

    +
    Updates the MediaMetadata.Builder with the type-specific values stored in this + Entry.
    Specified by:
    populateMediaMetadata in interface Metadata.Entry
    diff --git a/docs/doc/reference/com/google/android/exoplayer2/metadata/icy/IcyInfo.html b/docs/doc/reference/com/google/android/exoplayer2/metadata/icy/IcyInfo.html index 1ed9c27b0d0..51bc7e8928d 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/metadata/icy/IcyInfo.html +++ b/docs/doc/reference/com/google/android/exoplayer2/metadata/icy/IcyInfo.html @@ -270,7 +270,8 @@

    Method Summary

    void populateMediaMetadata​(MediaMetadata.Builder builder) -
    Updates the MediaMetadata.Builder with the type specific values stored in this Entry.
    +
    Updates the MediaMetadata.Builder with the type-specific values stored in this + Entry.
    @@ -405,10 +406,8 @@

    Method Detail

    populateMediaMetadata

    public void populateMediaMetadata​(MediaMetadata.Builder builder)
    Description copied from interface: Metadata.Entry
    -
    Updates the MediaMetadata.Builder with the type specific values stored in this Entry. - -

    The order of the Metadata.Entry objects in the Metadata matters. If two Metadata.Entry entries attempt to populate the same MediaMetadata field, then the last one in - the list is used.

    +
    Updates the MediaMetadata.Builder with the type-specific values stored in this + Entry.
    Specified by:
    populateMediaMetadata in interface Metadata.Entry
    diff --git a/docs/doc/reference/com/google/android/exoplayer2/metadata/id3/ApicFrame.html b/docs/doc/reference/com/google/android/exoplayer2/metadata/id3/ApicFrame.html index 2edfa165fea..7d14e3d8a0e 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/metadata/id3/ApicFrame.html +++ b/docs/doc/reference/com/google/android/exoplayer2/metadata/id3/ApicFrame.html @@ -278,7 +278,8 @@

    Method Summary

    void populateMediaMetadata​(MediaMetadata.Builder builder) -
    Updates the MediaMetadata.Builder with the type specific values stored in this Entry.
    +
    Updates the MediaMetadata.Builder with the type-specific values stored in this + Entry.
    @@ -430,10 +431,8 @@

    Method Detail

    populateMediaMetadata

    public void populateMediaMetadata​(MediaMetadata.Builder builder)
    Description copied from interface: Metadata.Entry
    -
    Updates the MediaMetadata.Builder with the type specific values stored in this Entry. - -

    The order of the Metadata.Entry objects in the Metadata matters. If two Metadata.Entry entries attempt to populate the same MediaMetadata field, then the last one in - the list is used.

    +
    Updates the MediaMetadata.Builder with the type-specific values stored in this + Entry.
    Parameters:
    builder - The builder to be updated.
    diff --git a/docs/doc/reference/com/google/android/exoplayer2/metadata/id3/TextInformationFrame.html b/docs/doc/reference/com/google/android/exoplayer2/metadata/id3/TextInformationFrame.html index 8976cbe5e8e..6fcc9f1adf7 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/metadata/id3/TextInformationFrame.html +++ b/docs/doc/reference/com/google/android/exoplayer2/metadata/id3/TextInformationFrame.html @@ -191,7 +191,18 @@

    Field Summary

    String value -  + +
    Deprecated. +
    Use the first element of values instead.
    +
    + + + +ImmutableList<String> +values + +
    The text values of this frame.
    +
      @@ -228,6 +239,17 @@

      Constructor Summary

      TextInformationFrame​(String id, String description, String value) + +
      Deprecated. +
      Use TextInformationFrame(String id, String description, String[] values + instead
      +
      + + + +TextInformationFrame​(String id, + String description, + List<String> values)   @@ -262,7 +284,8 @@

      Method Summary

      void populateMediaMetadata​(MediaMetadata.Builder builder) -
      Updates the MediaMetadata.Builder with the type specific values stored in this Entry.
      +
      Uses the first element in values to set the relevant field in MediaMetadata + (as determined by Id3Frame.id).
      @@ -330,7 +353,21 @@

      description

      + + + +
        +
      • +

        values

        +
        public final ImmutableList<String> values
        +
        The text values of this frame. Will always have at least one element.
      @@ -352,16 +389,35 @@

      CREATOR

      Constructor Detail

      + + + +
        +
      • +

        TextInformationFrame

        +
        public TextInformationFrame​(String id,
        +                            @Nullable
        +                            String description,
        +                            List<String> values)
        +
      • +
      • TextInformationFrame

        -
        public TextInformationFrame​(String id,
        +
        @Deprecated
        +@InlineMe(replacement="this(id, description, ImmutableList.of(value))",
        +          imports="com.google.common.collect.ImmutableList")
        +public TextInformationFrame​(String id,
                                     @Nullable
                                     String description,
                                     String value)
        +
        Deprecated. +
        Use TextInformationFrame(String id, String description, String[] values + instead
        +
      @@ -381,11 +437,8 @@

      Method Detail

    • populateMediaMetadata

      public void populateMediaMetadata​(MediaMetadata.Builder builder)
      -
      Description copied from interface: Metadata.Entry
      -
      Updates the MediaMetadata.Builder with the type specific values stored in this Entry. - -

      The order of the Metadata.Entry objects in the Metadata matters. If two Metadata.Entry entries attempt to populate the same MediaMetadata field, then the last one in - the list is used.

      +
      Uses the first element in values to set the relevant field in MediaMetadata + (as determined by Id3Frame.id).
      Parameters:
      builder - The builder to be updated.
      diff --git a/docs/doc/reference/com/google/android/exoplayer2/offline/DownloadService.html b/docs/doc/reference/com/google/android/exoplayer2/offline/DownloadService.html index 9ee6559c24a..49bbe372ccc 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/offline/DownloadService.html +++ b/docs/doc/reference/com/google/android/exoplayer2/offline/DownloadService.html @@ -25,7 +25,7 @@ catch(err) { } //--> -var data = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":6,"i9":6,"i10":6,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":9,"i18":9,"i19":9,"i20":9,"i21":9,"i22":9,"i23":9,"i24":9,"i25":9,"i26":9}; +var data = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":6,"i10":6,"i11":6,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":9,"i19":9,"i20":9,"i21":9,"i22":9,"i23":9,"i24":9,"i25":9,"i26":9,"i27":9}; var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],8:["t4","Concrete Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; @@ -150,7 +150,13 @@

      Class DownloadService


      public abstract class DownloadService
       extends Service
      -
      A Service for downloading media.
      +
      A Service for downloading media. + +

      Apps with target SDK 33 and greater need to add the + android.permission.POST_NOTIFICATIONS permission to the manifest and request the permission at + runtime before starting downloads. Without that permission granted by the user, notifications + posted by this service are not displayed. See the + official UI guide for more detailed information.

    @@ -453,13 +459,21 @@

    Method Summary

    +static void +clearDownloadManagerHelpers() + +
    Clear all download manager helpers before restarting the + service.
    + + + protected abstract DownloadManager getDownloadManager()
    Returns a DownloadManager to be used to downloaded content.
    - + protected abstract Notification getForegroundNotification​(List<Download> downloads, @com.google.android.exoplayer2.scheduler.Requirements.RequirementFlags int notMetRequirements) @@ -467,7 +481,7 @@

    Method Summary

    Returns a notification to be displayed when this service running in the foreground.
    - + protected abstract Scheduler getScheduler() @@ -475,43 +489,43 @@

    Method Summary

    are met. - + protected void invalidateForegroundNotification()
    Invalidates the current foreground notification and causes getForegroundNotification(List, int) to be invoked again if the service isn't stopped.
    - + IBinder onBind​(Intent intent)
    Throws UnsupportedOperationException because this service is not designed to be bound.
    - + void onCreate()   - + void onDestroy()   - + int onStartCommand​(Intent intent, int flags, int startId)   - + void onTaskRemoved​(Intent rootIntent)   - + static void sendAddDownload​(Context context, Class<? extends DownloadService> clazz, @@ -521,7 +535,7 @@

    Method Summary

    Starts the service if not started already and adds a new download.
    - + static void sendAddDownload​(Context context, Class<? extends DownloadService> clazz, @@ -532,7 +546,7 @@

    Method Summary

    Starts the service if not started already and adds a new download.
    - + static void sendPauseDownloads​(Context context, Class<? extends DownloadService> clazz, @@ -541,7 +555,7 @@

    Method Summary

    Starts the service if not started already and pauses all downloads.
    - + static void sendRemoveAllDownloads​(Context context, Class<? extends DownloadService> clazz, @@ -550,7 +564,7 @@

    Method Summary

    Starts the service if not started already and removes all downloads.
    - + static void sendRemoveDownload​(Context context, Class<? extends DownloadService> clazz, @@ -560,7 +574,7 @@

    Method Summary

    Starts the service if not started already and removes a download.
    - + static void sendResumeDownloads​(Context context, Class<? extends DownloadService> clazz, @@ -569,7 +583,7 @@

    Method Summary

    Starts the service if not started already and resumes all downloads.
    - + static void sendSetRequirements​(Context context, Class<? extends DownloadService> clazz, @@ -580,7 +594,7 @@

    Method Summary

    downloads to progress. - + static void sendSetStopReason​(Context context, Class<? extends DownloadService> clazz, @@ -591,7 +605,7 @@

    Method Summary

    Starts the service if not started already and sets the stop reason for one or all downloads.
    - + static void start​(Context context, Class<? extends DownloadService> clazz) @@ -599,7 +613,7 @@

    Method Summary

    Starts a download service to resume any ongoing downloads.
    - + static void startForeground​(Context context, Class<? extends DownloadService> clazz) @@ -1395,6 +1409,20 @@

    startForeground

  • + + + +
      +
    • +

      clearDownloadManagerHelpers

      +
      public static void clearDownloadManagerHelpers()
      +
      Clear all download manager helpers before restarting the + service. + +

      Calling this method is normally only required if an app supports downloading content for + multiple users for which different download directories should be used.

      +
    • +
    diff --git a/docs/doc/reference/com/google/android/exoplayer2/offline/SegmentDownloader.html b/docs/doc/reference/com/google/android/exoplayer2/offline/SegmentDownloader.html index 287450f0361..d3743056dcb 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/offline/SegmentDownloader.html +++ b/docs/doc/reference/com/google/android/exoplayer2/offline/SegmentDownloader.html @@ -87,13 +87,13 @@ @@ -183,6 +183,29 @@

    Nested classes/interfaces inherited from interface com.google.android.e + +
    + +

    + + + + diff --git a/docs/doc/reference/com/google/android/exoplayer2/source/CompositeMediaSource.html b/docs/doc/reference/com/google/android/exoplayer2/source/CompositeMediaSource.html index d01ceed6904..b4141f8f50b 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/source/CompositeMediaSource.html +++ b/docs/doc/reference/com/google/android/exoplayer2/source/CompositeMediaSource.html @@ -143,7 +143,7 @@

    Class CompositeMediaSource&

    Direct Known Subclasses:
    -
    AdsMediaSource, ConcatenatingMediaSource, ImaServerSideAdInsertionMediaSource, MergingMediaSource, WrappingMediaSource
    +
    AdsMediaSource, ConcatenatingMediaSource, ConcatenatingMediaSource2, ImaServerSideAdInsertionMediaSource, MergingMediaSource, WrappingMediaSource

    public abstract class CompositeMediaSource<T>
    diff --git a/docs/doc/reference/com/google/android/exoplayer2/source/ConcatenatingMediaSource2.Builder.html b/docs/doc/reference/com/google/android/exoplayer2/source/ConcatenatingMediaSource2.Builder.html
    new file mode 100644
    index 00000000000..4b97bab3a23
    --- /dev/null
    +++ b/docs/doc/reference/com/google/android/exoplayer2/source/ConcatenatingMediaSource2.Builder.html
    @@ -0,0 +1,522 @@
    +
    +
    +
    +
    +ConcatenatingMediaSource2.Builder (ExoPlayer library)
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    + +
    +
    + +

    Class ConcatenatingMediaSource2.Builder

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.google.android.exoplayer2.source.ConcatenatingMediaSource2.Builder
      • +
      +
    • +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    + + + + diff --git a/docs/doc/reference/com/google/android/exoplayer2/source/ConcatenatingMediaSource2.html b/docs/doc/reference/com/google/android/exoplayer2/source/ConcatenatingMediaSource2.html new file mode 100644 index 00000000000..00ed6a03b40 --- /dev/null +++ b/docs/doc/reference/com/google/android/exoplayer2/source/ConcatenatingMediaSource2.html @@ -0,0 +1,597 @@ + + + + +ConcatenatingMediaSource2 (ExoPlayer library) + + + + + + + + + + + + + +
    + +
    + +
    +
    + +

    Class ConcatenatingMediaSource2

    +
    +
    + +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      MediaSource
      +
      +
      +
      public final class ConcatenatingMediaSource2
      +extends CompositeMediaSource<Integer>
      +
      Concatenates multiple MediaSources, combining everything in one single Timeline.Window. + +

      This class can only be used under the following conditions: + +

        +
      • All sources must be non-empty. +
      • All Windows defined by the sources, except the first, must have an + period offset of zero. This excludes, + for example, live streams or ClippingMediaSource with a non-zero start position. +
      +
    • +
    +
    +
    + +
    +
    + +
    +
    +
    + +
    + +
    + + diff --git a/docs/doc/reference/com/google/android/exoplayer2/source/ForwardingTimeline.html b/docs/doc/reference/com/google/android/exoplayer2/source/ForwardingTimeline.html index fb9ee7976c6..43d998e574a 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/source/ForwardingTimeline.html +++ b/docs/doc/reference/com/google/android/exoplayer2/source/ForwardingTimeline.html @@ -328,7 +328,7 @@

    Method Summary

    Methods inherited from class com.google.android.exoplayer2.Timeline

    -equals, getNextPeriodIndex, getPeriod, getPeriodByUid, getPeriodPosition, getPeriodPosition, getPeriodPositionUs, getPeriodPositionUs, getWindow, hashCode, isEmpty, isLastPeriod, toBundle, toBundle +equals, getNextPeriodIndex, getPeriod, getPeriodByUid, getPeriodPosition, getPeriodPosition, getPeriodPositionUs, getPeriodPositionUs, getWindow, hashCode, isEmpty, isLastPeriod, toBundle, toBundleWithOneWindowOnly
    + + + +
      +
    • +

      parseTileCountFromProperties

      +
      @Nullable
      +protected Pair<Integer,​Integer> parseTileCountFromProperties​(List<Descriptor> essentialProperties)
      +
      Parses given descriptors for thumbnail tile information.
      +
      +
      Parameters:
      +
      essentialProperties - List of descriptors that contain thumbnail tile information.
      +
      Returns:
      +
      A pair of Integer values, where the first is the count of horizontal tiles and the + second is the count of vertical tiles, or null if no thumbnail tile information is found.
      +
      +
    • +
    diff --git a/docs/doc/reference/com/google/android/exoplayer2/source/dash/offline/DashDownloader.html b/docs/doc/reference/com/google/android/exoplayer2/source/dash/offline/DashDownloader.html index da11d4a0cf0..b79436c07ed 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/source/dash/offline/DashDownloader.html +++ b/docs/doc/reference/com/google/android/exoplayer2/source/dash/offline/DashDownloader.html @@ -87,7 +87,7 @@ @@ -195,6 +195,23 @@

    Nested classes/interfaces inherited from interface com.google.android.e + +
    + +
    + +
    + +
    + +
    + +

    diff --git a/docs/doc/reference/com/google/android/exoplayer2/testutil/FakeAudioRenderer.html b/docs/doc/reference/com/google/android/exoplayer2/testutil/FakeAudioRenderer.html index 7c91fb39570..23129f6cc8f 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/testutil/FakeAudioRenderer.html +++ b/docs/doc/reference/com/google/android/exoplayer2/testutil/FakeAudioRenderer.html @@ -221,7 +221,7 @@

    Constructor Summary

    Description -FakeAudioRenderer​(Handler handler, +FakeAudioRenderer​(HandlerWrapper handler, AudioRendererEventListener eventListener)   @@ -318,13 +318,13 @@

    Methods inherited from interface com.google.android.exoplayer2.

    Constructor Detail

    - + diff --git a/docs/doc/reference/com/google/android/exoplayer2/testutil/FakeMediaSource.InitialTimeline.html b/docs/doc/reference/com/google/android/exoplayer2/testutil/FakeMediaSource.InitialTimeline.html index af516be7955..d120d7663f5 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/testutil/FakeMediaSource.InitialTimeline.html +++ b/docs/doc/reference/com/google/android/exoplayer2/testutil/FakeMediaSource.InitialTimeline.html @@ -261,7 +261,7 @@

    Methods inherited from class com.google.android.exoplayer2.source.

    Methods inherited from class com.google.android.exoplayer2.Timeline

    -equals, getNextPeriodIndex, getPeriod, getPeriodByUid, getPeriodPosition, getPeriodPosition, getPeriodPositionUs, getPeriodPositionUs, getWindow, hashCode, isEmpty, isLastPeriod, toBundle, toBundle +equals, getNextPeriodIndex, getPeriod, getPeriodByUid, getPeriodPosition, getPeriodPosition, getPeriodPositionUs, getPeriodPositionUs, getWindow, hashCode, isEmpty, isLastPeriod, toBundle, toBundleWithOneWindowOnly
    • @@ -795,7 +797,9 @@

      getApplicationLooper

      public Looper getApplicationLooper()
      Description copied from interface: Player
      Returns the Looper associated with the application thread that's used to access the - player and on which player events are received.
      + player and on which player events are received. + +

      This method can be called from any thread.

    @@ -808,7 +812,9 @@

    addListener

    Registers a listener to receive all events from the player. -

    The listener's methods will be called on the thread associated with Player.getApplicationLooper().

    +

    The listener's methods will be called on the thread associated with Player.getApplicationLooper(). + +

    This method can be called from any thread.

    Parameters:
    listener - The listener to register.
    @@ -840,10 +846,10 @@

    getPlaybackState

    @State
     public @com.google.android.exoplayer2.Player.State int getPlaybackState()
    Description copied from interface: Player
    -
    Returns the current playback state of the player.
    +
    Returns the current playback state of the player.
    Returns:
    -
    The current playback state.
    +
    The current playback state.
    See Also:
    Player.Listener.onPlaybackStateChanged(int)
    @@ -862,7 +868,7 @@

    getPlaybackSuppressionReason

    true
    , or Player.PLAYBACK_SUPPRESSION_REASON_NONE if playback is not suppressed.
    Returns:
    -
    The current playback suppression reason.
    +
    The current Player.PlaybackSuppressionReason.
    See Also:
    Player.Listener.onPlaybackSuppressionReasonChanged(int)
    @@ -901,6 +907,8 @@

    prepare

    Description copied from interface: Player
    Prepares the player. +

    This method must only be called if Player.COMMAND_PREPARE is available. +

    This will move the player out of idle state and the player will start loading media and acquire resources needed for playback.

    @@ -914,10 +922,12 @@

    setMediaItems

    public void setMediaItems​(List<MediaItem> mediaItems,
                               boolean resetPosition)
    Description copied from interface: Player
    -
    Clears the playlist and adds the specified MediaItems.
    +
    Clears the playlist and adds the specified media items. + +

    This method must only be called if Player.COMMAND_CHANGE_MEDIA_ITEMS is available.

    Parameters:
    -
    mediaItems - The new MediaItems.
    +
    mediaItems - The new media items.
    resetPosition - Whether the playback position should be reset to the default position in the first Timeline.Window. If false, playback will start from the position defined by Player.getCurrentMediaItemIndex() and Player.getCurrentPosition().
    @@ -934,10 +944,12 @@

    setMediaItems

    int startIndex, long startPositionMs)
    Description copied from interface: Player
    -
    Clears the playlist and adds the specified MediaItems.
    +
    Clears the playlist and adds the specified media items. + +

    This method must only be called if Player.COMMAND_CHANGE_MEDIA_ITEMS is available.

    Parameters:
    -
    mediaItems - The new MediaItems.
    +
    mediaItems - The new media items.
    startIndex - The MediaItem index to start playback from. If C.INDEX_UNSET is passed, the current position is not reset.
    startPositionMs - The position in milliseconds to start playback from. If C.TIME_UNSET is passed, the default position of the given MediaItem is used. In @@ -955,12 +967,14 @@

    addMediaItems

    public void addMediaItems​(int index,
                               List<MediaItem> mediaItems)
    Description copied from interface: Player
    -
    Adds a list of media items at the given index of the playlist.
    +
    Adds a list of media items at the given index of the playlist. + +

    This method must only be called if Player.COMMAND_CHANGE_MEDIA_ITEMS is available.

    Parameters:
    index - The index at which to add the media items. If the index is larger than the size of the playlist, the media items are added to the end of the playlist.
    -
    mediaItems - The MediaItems to add.
    +
    mediaItems - The media items to add.
    @@ -974,11 +988,15 @@

    moveMediaItems

    int toIndex, int newIndex)
    Description copied from interface: Player
    -
    Moves the media item range to the new index.
    +
    Moves the media item range to the new index. + +

    This method must only be called if Player.COMMAND_CHANGE_MEDIA_ITEMS is available.

    Parameters:
    -
    fromIndex - The start of the range to move.
    -
    toIndex - The first item not to be included in the range (exclusive).
    +
    fromIndex - The start of the range to move. If the index is larger than the size of the + playlist, the request is ignored.
    +
    toIndex - The first item not to be included in the range (exclusive). If the index is + larger than the size of the playlist, items up to the end of the playlist are moved.
    newIndex - The new index of the first media item of the range. If the new index is larger than the size of the remaining playlist after removing the range, the range is moved to the end of the playlist.
    @@ -994,12 +1012,15 @@

    removeMediaItems

    public void removeMediaItems​(int fromIndex,
                                  int toIndex)
    Description copied from interface: Player
    -
    Removes a range of media items from the playlist.
    +
    Removes a range of media items from the playlist. + +

    This method must only be called if Player.COMMAND_CHANGE_MEDIA_ITEMS is available.

    Parameters:
    -
    fromIndex - The index at which to start removing media items.
    +
    fromIndex - The index at which to start removing media items. If the index is larger than + the size of the playlist, the request is ignored.
    toIndex - The index of the first item to be kept (exclusive). If the index is larger than - the size of the playlist, media items to the end of the playlist are removed.
    + the size of the playlist, media items up to the end of the playlist are removed.
    @@ -1014,13 +1035,7 @@

    getAvailableCommands

    Returns the player's currently available Player.Commands.

    The returned Player.Commands are not updated when available commands change. Use Player.Listener.onAvailableCommandsChanged(Commands) to get an update when the available commands - change. - -

    Executing a command that is not available (for example, calling Player.seekToNextMediaItem() if Player.COMMAND_SEEK_TO_NEXT_MEDIA_ITEM is unavailable) will - neither throw an exception nor generate a Player.getPlayerError() player error}. - -

    Player.COMMAND_SEEK_TO_PREVIOUS_MEDIA_ITEM and Player.COMMAND_SEEK_TO_NEXT_MEDIA_ITEM - are unavailable if there is no such MediaItem.

    + change.
    Returns:
    The currently available Player.Commands.
    @@ -1039,7 +1054,9 @@

    setPlayWhenReady

    Description copied from interface: Player
    Sets whether playback should proceed when Player.getPlaybackState() == Player.STATE_READY. -

    If the player is already in the ready state then this method pauses and resumes playback.

    +

    If the player is already in the ready state then this method pauses and resumes playback. + +

    This method must only be called if Player.COMMAND_PLAY_PAUSE is available.

    Parameters:
    playWhenReady - Whether playback should proceed when ready.
    @@ -1072,7 +1089,9 @@

    setRepeatMode

    public void setRepeatMode​(@RepeatMode
                               @com.google.android.exoplayer2.Player.RepeatMode int repeatMode)
    Description copied from interface: Player
    -
    Sets the Player.RepeatMode to be used for playback.
    +
    Sets the Player.RepeatMode to be used for playback. + +

    This method must only be called if Player.COMMAND_SET_REPEAT_MODE is available.

    Parameters:
    repeatMode - The repeat mode.
    @@ -1104,7 +1123,9 @@

    getRepeatMode

    setShuffleModeEnabled

    public void setShuffleModeEnabled​(boolean shuffleModeEnabled)
    Description copied from interface: Player
    -
    Sets whether shuffling of media items is enabled.
    +
    Sets whether shuffling of media items is enabled. + +

    This method must only be called if Player.COMMAND_SET_SHUFFLE_MODE is available.

    Parameters:
    shuffleModeEnabled - Whether shuffling is enabled.
    @@ -1143,21 +1164,28 @@

    isLoading

    - +
    • seekTo

      public void seekTo​(int mediaItemIndex,
      -                   long positionMs)
      -
      Description copied from interface: Player
      -
      Seeks to a position specified in milliseconds in the specified MediaItem.
      + long positionMs, + @Command + @com.google.android.exoplayer2.Player.Command int seekCommand, + boolean isRepeatingCurrentItem) +
      Description copied from class: BasePlayer
      +
      Seeks to a position in the specified MediaItem.
      +
      Specified by:
      +
      seekTo in class BasePlayer
      Parameters:
      mediaItemIndex - The index of the MediaItem.
      -
      positionMs - The seek position in the specified MediaItem, or C.TIME_UNSET - to seek to the media item's default position.
      +
      positionMs - The seek position in the specified MediaItem in milliseconds, or + C.TIME_UNSET to seek to the media item's default position.
      +
      seekCommand - The Player.Command used to trigger the seek.
      +
      isRepeatingCurrentItem - Whether this seeks repeats the current item.
    @@ -1224,7 +1252,9 @@

    setPlaybackParameters

    player to the default, which means there is no speed or pitch adjustment.

    Playback parameters changes may cause the player to buffer. Player.Listener.onPlaybackParametersChanged(PlaybackParameters) will be called whenever the currently - active playback parameters change. + active playback parameters change. + +

    This method must only be called if Player.COMMAND_SET_SPEED_AND_PITCH is available.

    Parameters:
    playbackParameters - The playback parameters.
    @@ -1263,7 +1293,9 @@

    stop

    still be called on the player if it's no longer required.

    Calling this method does not clear the playlist, reset the playback position or the playback - error. + error. + +

    This method must only be called if Player.COMMAND_STOP is available. @@ -1301,7 +1333,9 @@

    release

    getCurrentTracks

    public Tracks getCurrentTracks()
    Description copied from interface: Player
    -
    Returns the current tracks.
    +
    Returns the current tracks. + +

    This method must only be called if Player.COMMAND_GET_TRACKS is available.

    See Also:
    Player.Listener.onTracksChanged(Tracks)
    @@ -1345,7 +1379,10 @@

    setTrackSelectionParameters

    .buildUpon() .setMaxVideoSizeSd() .build()) - + + +

    This method must only be called if Player.COMMAND_SET_TRACK_SELECTION_PARAMETERS is + available. @@ -1362,7 +1399,9 @@

    getMediaMetadata

    This MediaMetadata is a combination of the MediaItem metadata, the static metadata in the media's Format, and any timed metadata that has been parsed from the media and output via Player.Listener.onMetadata(Metadata). If a field is populated in the MediaItem.mediaMetadata, - it will be prioritised above the same field coming from static or timed metadata. + it will be prioritised above the same field coming from static or timed metadata. + +

    This method must only be called if Player.COMMAND_GET_MEDIA_ITEMS_METADATA is available. @@ -1373,7 +1412,9 @@

    getMediaMetadata

    getPlaylistMetadata

    public MediaMetadata getPlaylistMetadata()
    Description copied from interface: Player
    -
    Returns the playlist MediaMetadata, as set by Player.setPlaylistMetadata(MediaMetadata), or MediaMetadata.EMPTY if not supported.
    +
    Returns the playlist MediaMetadata, as set by Player.setPlaylistMetadata(MediaMetadata), or MediaMetadata.EMPTY if not supported. + +

    This method must only be called if Player.COMMAND_GET_MEDIA_ITEMS_METADATA is available.

    @@ -1384,7 +1425,9 @@

    getPlaylistMetadata

    setPlaylistMetadata

    public void setPlaylistMetadata​(MediaMetadata mediaMetadata)
    Description copied from interface: Player
    -
    Sets the playlist MediaMetadata.
    +
    Sets the playlist MediaMetadata. + +

    This method must only be called if Player.COMMAND_SET_MEDIA_ITEMS_METADATA is available.

    @@ -1395,7 +1438,9 @@

    setPlaylistMetadata

    getCurrentTimeline

    public Timeline getCurrentTimeline()
    Description copied from interface: Player
    -
    Returns the current Timeline. Never null, but may be empty.
    +
    Returns the current Timeline. Never null, but may be empty. + +

    This method must only be called if Player.COMMAND_GET_TIMELINE is available.

    See Also:
    Player.Listener.onTimelineChanged(Timeline, int)
    @@ -1410,7 +1455,9 @@

    getCurrentTimeline

    getCurrentPeriodIndex

    public int getCurrentPeriodIndex()
    Description copied from interface: Player
    -
    Returns the index of the period currently being played.
    +
    Returns the index of the period currently being played. + +

    This method must only be called if Player.COMMAND_GET_TIMELINE is available.

    @@ -1422,7 +1469,9 @@

    getCurrentMediaItemIndex

    public int getCurrentMediaItemIndex()
    Returns the index of the current MediaItem in the timeline, or the prospective index if the current timeline is - empty.
    + empty. + +

    This method must only be called if Player.COMMAND_GET_TIMELINE is available. @@ -1434,7 +1483,9 @@

    getDuration

    public long getDuration()
    Returns the duration of the current content or ad in milliseconds, or C.TIME_UNSET if - the duration is not known.
    + the duration is not known. + +

    This method must only be called if Player.COMMAND_GET_CURRENT_MEDIA_ITEM is available. @@ -1446,7 +1497,9 @@

    getCurrentPosition

    public long getCurrentPosition()
    Returns the playback position in the current content or ad, in milliseconds, or the prospective - position in milliseconds if the current timeline is empty.
    + position in milliseconds if the current timeline is empty. + +

    This method must only be called if Player.COMMAND_GET_CURRENT_MEDIA_ITEM is available. @@ -1458,7 +1511,9 @@

    getBufferedPosition

    public long getBufferedPosition()
    Returns an estimate of the position in the current content or ad up to which data is buffered, - in milliseconds.
    + in milliseconds. + +

    This method must only be called if Player.COMMAND_GET_CURRENT_MEDIA_ITEM is available. @@ -1470,7 +1525,9 @@

    getTotalBufferedDuration

    public long getTotalBufferedDuration()
    Returns an estimate of the total buffered duration from the current position, in milliseconds. - This includes pre-buffered data for subsequent ads and media items.
    + This includes pre-buffered data for subsequent ads and media items. + +

    This method must only be called if Player.COMMAND_GET_CURRENT_MEDIA_ITEM is available. @@ -1481,7 +1538,9 @@

    getTotalBufferedDuration

    isPlayingAd

    public boolean isPlayingAd()
    -
    Returns whether the player is currently playing an ad.
    +
    Returns whether the player is currently playing an ad. + +

    This method must only be called if Player.COMMAND_GET_CURRENT_MEDIA_ITEM is available.

    @@ -1493,7 +1552,9 @@

    getCurrentAdGroupIndex

    public int getCurrentAdGroupIndex()
    If Player.isPlayingAd() returns true, returns the index of the ad group in the period - currently being played. Returns C.INDEX_UNSET otherwise.
    + currently being played. Returns C.INDEX_UNSET otherwise. + +

    This method must only be called if Player.COMMAND_GET_CURRENT_MEDIA_ITEM is available. @@ -1505,7 +1566,9 @@

    getCurrentAdIndexInAdGroup

    public int getCurrentAdIndexInAdGroup()
    If Player.isPlayingAd() returns true, returns the index of the ad in its ad group. Returns - C.INDEX_UNSET otherwise.
    + C.INDEX_UNSET otherwise. + +

    This method must only be called if Player.COMMAND_GET_CURRENT_MEDIA_ITEM is available. @@ -1518,7 +1581,9 @@

    getContentPosition

    If Player.isPlayingAd() returns true, returns the content position that will be played once all ads in the ad group have finished playing, in milliseconds. If there is no ad - playing, the returned position is the same as that returned by Player.getCurrentPosition().
    + playing, the returned position is the same as that returned by Player.getCurrentPosition(). + +

    This method must only be called if Player.COMMAND_GET_CURRENT_MEDIA_ITEM is available. @@ -1531,7 +1596,9 @@

    getContentBufferedPosition

    If Player.isPlayingAd() returns true, returns an estimate of the content position in the current content up to which data is buffered, in milliseconds. If there is no ad playing, - the returned position is the same as that returned by Player.getBufferedPosition().
    + the returned position is the same as that returned by Player.getBufferedPosition(). + +

    This method must only be called if Player.COMMAND_GET_CURRENT_MEDIA_ITEM is available. @@ -1542,7 +1609,9 @@

    getContentBufferedPosition

    getAudioAttributes

    public AudioAttributes getAudioAttributes()
    Description copied from interface: Player
    -
    Returns the attributes for audio playback.
    +
    Returns the attributes for audio playback. + +

    This method must only be called if Player.COMMAND_GET_AUDIO_ATTRIBUTES is available.

    @@ -1554,7 +1623,9 @@

    setVolume

    public void setVolume​(float volume)
    Sets the audio volume, valid values are between 0 (silence) and 1 (unity gain, signal - unchanged), inclusive.
    + unchanged), inclusive. + +

    This method must only be called if Player.COMMAND_SET_VOLUME is available.

    Parameters:
    volume - Linear output gain to apply to all audio channels.
    @@ -1569,7 +1640,9 @@

    setVolume

    getVolume

    public float getVolume()
    Description copied from interface: Player
    -
    Returns the audio volume, with 0 being silence and 1 being unity gain (signal unchanged).
    +
    Returns the audio volume, with 0 being silence and 1 being unity gain (signal unchanged). + +

    This method must only be called if Player.COMMAND_GET_VOLUME is available.

    Returns:
    The linear gain applied to all audio channels.
    @@ -1585,7 +1658,9 @@

    clearVideoSurface

    public void clearVideoSurface()
    Description copied from interface: Player
    Clears any Surface, SurfaceHolder, SurfaceView or TextureView - currently set on the player.
    + currently set on the player. + +

    This method must only be called if Player.COMMAND_SET_VIDEO_SURFACE is available. @@ -1598,7 +1673,9 @@

    clearVideoSurface

    Surface surface)
    Description copied from interface: Player
    Clears the Surface onto which video is being rendered if it matches the one passed. - Else does nothing.
    + Else does nothing. + +

    This method must only be called if Player.COMMAND_SET_VIDEO_SURFACE is available.

    Parameters:
    surface - The surface to clear.
    @@ -1620,7 +1697,9 @@

    setVideoSurface

    If the surface is held by a SurfaceView, TextureView or SurfaceHolder then it's recommended to use Player.setVideoSurfaceView(SurfaceView), Player.setVideoTextureView(TextureView) or Player.setVideoSurfaceHolder(SurfaceHolder) rather than this method, since passing the holder allows the player to track the lifecycle of the surface - automatically. + automatically. + +

    This method must only be called if Player.COMMAND_SET_VIDEO_SURFACE is available.

    Parameters:
    surface - The Surface.
    @@ -1640,7 +1719,9 @@

    setVideoSurfaceHolder

    rendered. The player will track the lifecycle of the surface automatically.

    The thread that calls the SurfaceHolder.Callback methods must be the thread - associated with Player.getApplicationLooper(). + associated with Player.getApplicationLooper(). + +

    This method must only be called if Player.COMMAND_SET_VIDEO_SURFACE is available.

    Parameters:
    surfaceHolder - The surface holder.
    @@ -1657,7 +1738,9 @@

    clearVideoSurfaceHolder

    SurfaceHolder surfaceHolder)
    Description copied from interface: Player
    Clears the SurfaceHolder that holds the Surface onto which video is being - rendered if it matches the one passed. Else does nothing.
    + rendered if it matches the one passed. Else does nothing. + +

    This method must only be called if Player.COMMAND_SET_VIDEO_SURFACE is available.

    Parameters:
    surfaceHolder - The surface holder to clear.
    @@ -1677,7 +1760,9 @@

    setVideoSurfaceView

    lifecycle of the surface automatically.

    The thread that calls the SurfaceHolder.Callback methods must be the thread - associated with Player.getApplicationLooper(). + associated with Player.getApplicationLooper(). + +

    This method must only be called if Player.COMMAND_SET_VIDEO_SURFACE is available.

    Parameters:
    surfaceView - The surface view.
    @@ -1694,7 +1779,9 @@

    clearVideoSurfaceView

    SurfaceView surfaceView)
    Description copied from interface: Player
    Clears the SurfaceView onto which video is being rendered if it matches the one passed. - Else does nothing.
    + Else does nothing. + +

    This method must only be called if Player.COMMAND_SET_VIDEO_SURFACE is available.

    Parameters:
    surfaceView - The texture view to clear.
    @@ -1714,7 +1801,9 @@

    setVideoTextureView

    lifecycle of the surface automatically.

    The thread that calls the TextureView.SurfaceTextureListener methods must be the - thread associated with Player.getApplicationLooper(). + thread associated with Player.getApplicationLooper(). + +

    This method must only be called if Player.COMMAND_SET_VIDEO_SURFACE is available.

    Parameters:
    textureView - The texture view.
    @@ -1731,7 +1820,9 @@

    clearVideoTextureView

    TextureView textureView)
    Description copied from interface: Player
    Clears the TextureView onto which video is being rendered if it matches the one passed. - Else does nothing.
    + Else does nothing. + +

    This method must only be called if Player.COMMAND_SET_VIDEO_SURFACE is available.

    Parameters:
    textureView - The texture view to clear.
    @@ -1779,7 +1870,9 @@

    getSurfaceSize

    getCurrentCues

    public CueGroup getCurrentCues()
    Description copied from interface: Player
    -
    Returns the current CueGroup.
    +
    Returns the current CueGroup. + +

    This method must only be called if Player.COMMAND_GET_TEXT is available.

    @@ -1809,7 +1902,9 @@

    getDeviceVolume

    Util.getStreamTypeForAudioUsage(int).

    For devices with remote playback, the volume of the - remote device is returned. + remote device is returned. + +

    This method must only be called if Player.COMMAND_GET_DEVICE_VOLUME is available. @@ -1820,7 +1915,9 @@

    getDeviceVolume

    isDeviceMuted

    public boolean isDeviceMuted()
    -
    Gets whether the device is muted or not.
    +
    Gets whether the device is muted or not. + +

    This method must only be called if Player.COMMAND_GET_DEVICE_VOLUME is available.

    @@ -1831,7 +1928,9 @@

    isDeviceMuted

    setDeviceVolume

    public void setDeviceVolume​(int volume)
    -
    Sets the volume of the device.
    +
    Sets the volume of the device. + +

    This method must only be called if Player.COMMAND_SET_DEVICE_VOLUME is available.

    Parameters:
    volume - The volume to set.
    @@ -1846,7 +1945,9 @@

    setDeviceVolume

    increaseDeviceVolume

    public void increaseDeviceVolume()
    Description copied from interface: Player
    -
    Increases the volume of the device.
    +
    Increases the volume of the device. + +

    This method must only be called if Player.COMMAND_ADJUST_DEVICE_VOLUME is available.

    @@ -1857,7 +1958,9 @@

    increaseDeviceVolume

    decreaseDeviceVolume

    public void decreaseDeviceVolume()
    -
    Decreases the volume of the device.
    +
    Decreases the volume of the device. + +

    This method must only be called if Player.COMMAND_ADJUST_DEVICE_VOLUME is available.

    @@ -1868,7 +1971,9 @@

    decreaseDeviceVolume

    setDeviceMuted

    public void setDeviceMuted​(boolean muted)
    -
    Sets the mute state of the device.
    +
    Sets the mute state of the device. + +

    This method must only be called if Player.COMMAND_ADJUST_DEVICE_VOLUME is available.

    diff --git a/docs/doc/reference/com/google/android/exoplayer2/text/ttml/TtmlDecoder.html b/docs/doc/reference/com/google/android/exoplayer2/text/ttml/TtmlDecoder.html index fbb2aa61cab..0cce288c01b 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/text/ttml/TtmlDecoder.html +++ b/docs/doc/reference/com/google/android/exoplayer2/text/ttml/TtmlDecoder.html @@ -162,11 +162,9 @@

    Class TtmlDecoder

  • time-offset-with-frames
  • time-offset-with-ticks
  • cell-resolution - -
    -
    See Also:
    -
    TTML specification
    -
    + + +

    See the TTML specification

  • diff --git a/docs/doc/reference/com/google/android/exoplayer2/text/webvtt/WebvttCssStyle.html b/docs/doc/reference/com/google/android/exoplayer2/text/webvtt/WebvttCssStyle.html index 3b807b0ca51..a50ee86742b 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/text/webvtt/WebvttCssStyle.html +++ b/docs/doc/reference/com/google/android/exoplayer2/text/webvtt/WebvttCssStyle.html @@ -131,12 +131,10 @@

    Class WebvttCssStyle


    public final class WebvttCssStyle
     extends Object
    -
    Style object of a Css style block in a Webvtt file.
    -
    -
    See Also:
    -
    W3C specification - Apply - CSS properties
    -
    +
    Style object of a CSS style block in a WebVTT file. + +

    See the Apply CSS properties + section of the W3C specification

    diff --git a/docs/doc/reference/com/google/android/exoplayer2/text/webvtt/WebvttDecoder.html b/docs/doc/reference/com/google/android/exoplayer2/text/webvtt/WebvttDecoder.html index 989f40ae75b..e22280569d9 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/text/webvtt/WebvttDecoder.html +++ b/docs/doc/reference/com/google/android/exoplayer2/text/webvtt/WebvttDecoder.html @@ -145,11 +145,9 @@

    Class WebvttDecoder


    public final class WebvttDecoder
     extends SimpleSubtitleDecoder
    -
    A SimpleSubtitleDecoder for WebVTT.
    -
    -
    See Also:
    -
    WebVTT specification
    -
    +
    A SimpleSubtitleDecoder for WebVTT. + +

    See the WebVTT specification.

    diff --git a/docs/doc/reference/com/google/android/exoplayer2/text/webvtt/package-summary.html b/docs/doc/reference/com/google/android/exoplayer2/text/webvtt/package-summary.html index 955fbad9f23..6e2b26b2a21 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/text/webvtt/package-summary.html +++ b/docs/doc/reference/com/google/android/exoplayer2/text/webvtt/package-summary.html @@ -112,7 +112,7 @@

    Package com.google.android.exoplayer2.tex WebvttCssStyle -
    Style object of a Css style block in a Webvtt file.
    +
    Style object of a CSS style block in a WebVTT file.
    diff --git a/docs/doc/reference/com/google/android/exoplayer2/trackselection/DefaultTrackSelector.Parameters.html b/docs/doc/reference/com/google/android/exoplayer2/trackselection/DefaultTrackSelector.Parameters.html index 51beacedb29..f5919cb2382 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/trackselection/DefaultTrackSelector.Parameters.html +++ b/docs/doc/reference/com/google/android/exoplayer2/trackselection/DefaultTrackSelector.Parameters.html @@ -403,7 +403,7 @@

    Method Summary

    Methods inherited from class com.google.android.exoplayer2.trackselection.TrackSelectionParameters

    -fromBundle, keyForField +fromBundle diff --git a/docs/doc/reference/com/google/android/exoplayer2/upstream/SlidingPercentile.html b/docs/doc/reference/com/google/android/exoplayer2/upstream/SlidingPercentile.html index 0520a747180..62e72b3b697 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/upstream/SlidingPercentile.html +++ b/docs/doc/reference/com/google/android/exoplayer2/upstream/SlidingPercentile.html @@ -138,12 +138,14 @@

    Class SlidingPercentile

    This class can be used for bandwidth estimation based on a sliding window of past transfer rate observations. This is an alternative to sliding mean and exponential averaging which suffer - from susceptibility to outliers and slow adaptation to step functions. -

    -
    See Also:
    -
    Wiki: Moving average, -Wiki: Selection algorithm
    -
    + from susceptibility to outliers and slow adaptation to step functions. + +

    See the following Wikipedia articles: + +

    diff --git a/docs/doc/reference/com/google/android/exoplayer2/util/ColorParser.html b/docs/doc/reference/com/google/android/exoplayer2/util/ColorParser.html index 4d6bcbb7ee0..30894f5bcb7 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/util/ColorParser.html +++ b/docs/doc/reference/com/google/android/exoplayer2/util/ColorParser.html @@ -131,12 +131,14 @@

    Class ColorParser


    public final class ColorParser
     extends Object
    -
    Parser for color expressions found in styling formats, e.g. TTML and CSS.
    -
    -
    See Also:
    -
    WebVTT CSS Styling, -Timed Text Markup Language 2 (TTML2) - 10.3.5
    -
    +
    Parser for color expressions found in styling formats, e.g. TTML and CSS. + +

    See also: + +

    diff --git a/docs/doc/reference/com/google/android/exoplayer2/util/ListenerSet.html b/docs/doc/reference/com/google/android/exoplayer2/util/ListenerSet.html index 687a3faa3ff..3a24a49f917 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/util/ListenerSet.html +++ b/docs/doc/reference/com/google/android/exoplayer2/util/ListenerSet.html @@ -25,8 +25,8 @@ catch(err) { } //--> -var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10}; -var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; +var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":42,"i10":10}; +var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; var tableTab = "tableTab"; @@ -141,7 +141,10 @@

    Class ListenerSet<T extends @NonN triggered recursively from another listener.

    Events are also guaranteed to be only sent to the listeners registered at the time the event - was enqueued and haven't been removed since. + was enqueued and haven't been removed since. + +

    All methods must be called on the Looper passed to the constructor unless indicated + otherwise. @@ -214,7 +217,7 @@

    Constructor Summary

    Method Summary

    - + @@ -289,6 +292,15 @@

    Method Summary

    + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -419,70 +426,77 @@

    Method Summary

    Reads the next length bytes as characters in the specified Charset.
    - + - + - + - + - + - + - + - + - + - + + + + + + - + @@ -498,28 +512,28 @@

    Method Summary

    Updates the instance to wrap data, and resets the position to zero.
    - + - + - + - + + + + + +
    All Methods Instance Methods Concrete Methods All Methods Instance Methods Concrete Methods Deprecated Methods 
    Modifier and Type Method
    voidsetThrowsWhenUsingWrongThread​(boolean throwsWhenUsingWrongThread) +
    Deprecated. +
    Do not use this method and ensure all calls are made from the correct thread.
    +
    +
    int size() @@ -332,7 +344,7 @@

    ListenerSet

    Parameters:
    looper - A Looper used to call listeners on. The same Looper must be used - to call all other methods of this class.
    + to call all other methods of this class unless indicated otherwise.
    clock - A Clock.
    iterationFinishedEvent - An ListenerSet.IterationFinishedEvent sent when all other events sent during one Looper message queue iteration were handled by the listeners.
    @@ -358,7 +370,9 @@

    copy

    @CheckResult
     public ListenerSet<T> copy​(Looper looper,
                                ListenerSet.IterationFinishedEvent<T> iterationFinishedEvent)
    -
    Copies the listener set.
    +
    Copies the listener set. + +

    This method can be called from any thread.

    Parameters:
    looper - The new Looper for the copied listener set.
    @@ -379,7 +393,9 @@

    copy

    public ListenerSet<T> copy​(Looper looper, Clock clock, ListenerSet.IterationFinishedEvent<T> iterationFinishedEvent) -
    Copies the listener set.
    +
    Copies the listener set. + +

    This method can be called from any thread.

    Parameters:
    looper - The new Looper for the copied listener set.
    @@ -402,7 +418,9 @@

    add

    public void add​(T listener)
    Adds a listener to the set. -

    If a listener is already present, it will not be added again.

    +

    If a listener is already present, it will not be added again. + +

    This method can be called from any thread.

    Parameters:
    listener - The listener to be added.
    @@ -494,7 +512,7 @@

    sendEvent

    -
      +
      • release

        public void release()
        @@ -503,6 +521,26 @@

        release

        This will ensure no events are sent to any listener after this method has been called.

      + + + +
        +
      • +

        setThrowsWhenUsingWrongThread

        +
        @Deprecated
        +public void setThrowsWhenUsingWrongThread​(boolean throwsWhenUsingWrongThread)
        +
        Deprecated. +
        Do not use this method and ensure all calls are made from the correct thread.
        +
        +
        Sets whether methods throw when using the wrong thread. + +

        Do not use this method unless to support legacy use cases.

        +
        +
        Parameters:
        +
        throwsWhenUsingWrongThread - Whether to throw when using the wrong thread.
        +
        +
      • +
    diff --git a/docs/doc/reference/com/google/android/exoplayer2/util/ParsableByteArray.html b/docs/doc/reference/com/google/android/exoplayer2/util/ParsableByteArray.html index 175bce0496f..f7e9c391fe7 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/util/ParsableByteArray.html +++ b/docs/doc/reference/com/google/android/exoplayer2/util/ParsableByteArray.html @@ -25,7 +25,7 @@ catch(err) { } //--> -var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10,"i33":10,"i34":10,"i35":10,"i36":10,"i37":10,"i38":10,"i39":10,"i40":10,"i41":10,"i42":10,"i43":10,"i44":10,"i45":10}; +var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10,"i33":10,"i34":10,"i35":10,"i36":10,"i37":10,"i38":10,"i39":10,"i40":10,"i41":10,"i42":10,"i43":10,"i44":10,"i45":10,"i46":10,"i47":10}; var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; @@ -316,52 +316,59 @@

    Method Summary

    String readLine() -
    Reads a line of text.
    +
    Reads a line of text in UTF-8.
    StringreadLine​(Charset charset) +
    Reads a line of text in charset.
    +
    int readLittleEndianInt()
    Reads the next four bytes as a signed value in little endian order.
    int readLittleEndianInt24()
    Reads the next three bytes as a signed value in little endian order.
    long readLittleEndianLong()
    Reads the next eight bytes as a signed value in little endian order.
    short readLittleEndianShort()
    Reads the next two bytes as a signed value.
    long readLittleEndianUnsignedInt()
    Reads the next four bytes as an unsigned value in little endian order.
    int readLittleEndianUnsignedInt24()
    Reads the next three bytes as an unsigned value in little endian order.
    int readLittleEndianUnsignedIntToInt() @@ -369,49 +376,49 @@

    Method Summary

    is a zero.
    int readLittleEndianUnsignedShort()
    Reads the next two bytes as an unsigned value.
    long readLong()
    Reads the next eight bytes as a signed value.
    String readNullTerminatedString()
    Reads up to the next NUL byte (or the limit) as UTF-8 characters.
    String readNullTerminatedString​(int length)
    Reads the next length bytes as UTF-8 characters.
    short readShort()
    Reads the next two bytes as a signed value.
    String readString​(int length)
    Reads the next length bytes as UTF-8 characters.
    String readString​(int length, Charset charset)
    int readSynchSafeInt()
    Reads a Synchsafe integer.
    int readUnsignedByte()
    Reads the next byte as an unsigned value.
    int readUnsignedFixedPoint1616()
    Reads the next four bytes, returning the integer portion of the fixed point 16.16 integer.
    long readUnsignedInt()
    Reads the next four bytes as an unsigned value.
    int readUnsignedInt24()
    Reads the next three bytes as an unsigned value.
    int readUnsignedIntToInt()
    Reads the next four bytes as an unsigned integer into an integer, if the top bit is a zero.
    long readUnsignedLongToLong()
    Reads the next eight bytes as an unsigned long into a long, if the top bit is a zero.
    int readUnsignedShort()
    Reads the next two bytes as an unsigned value.
    long readUtf8EncodedLong()
    Reads a long value encoded by UTF-8 encoding
    CharsetreadUtfCharsetFromBom() +
    Reads a UTF byte order mark (BOM) and returns the UTF Charset it represents.
    +
    void reset​(byte[] data) @@ -490,7 +504,7 @@

    Method Summary

    data.length.
    void reset​(byte[] data, int limit)
    void reset​(int limit)
    Resets the position to zero and the limit to the specified value.
    void setLimit​(int limit)
    Sets the limit.
    void setPosition​(int position)
    Sets the reading offset in the array.
    void skipBytes​(int bytes) @@ -1184,22 +1198,43 @@

    readDelimiterTerminatedString

    readLine

    @Nullable
     public String readLine()
    -
    Reads a line of text. +
    Reads a line of text in UTF-8. + +

    Equivalent to passing Charsets.UTF_8 to readLine(Charset).

    + + + + + +
      +
    • +

      readLine

      +
      @Nullable
      +public String readLine​(Charset charset)
      +
      Reads a line of text in charset.

      A line is considered to be terminated by any one of a carriage return ('\r'), a line feed - ('\n'), or a carriage return followed immediately by a line feed ('\r\n'). The UTF-8 charset is - used. This method discards leading UTF-8 byte order marks, if present.

      + ('\n'), or a carriage return followed immediately by a line feed ('\r\n'). This method discards + leading UTF byte order marks (BOM), if present. + +

      The position is advanced to start of the next line (i.e. any + line terminators are skipped).

    +
    Parameters:
    +
    charset - The charset used to interpret the bytes as a String.
    Returns:
    The line not including any line-termination characters, or null if the end of the data has already been reached.
    +
    Throws:
    +
    IllegalArgumentException - if charset is not supported. Only US_ASCII, UTF-8, UTF-16, + UTF-16BE, and UTF-16LE are supported.
    -
      +
      • readUtf8EncodedLong

        public long readUtf8EncodedLong()
        @@ -1212,6 +1247,18 @@

        readUtf8EncodedLong

      + + + +
        +
      • +

        readUtfCharsetFromBom

        +
        @Nullable
        +public Charset readUtfCharsetFromBom()
        +
        Reads a UTF byte order mark (BOM) and returns the UTF Charset it represents. Returns + null without advancing position if no BOM is found.
        +
      • +
    diff --git a/docs/doc/reference/com/google/android/exoplayer2/util/Size.html b/docs/doc/reference/com/google/android/exoplayer2/util/Size.html index ba739bbd556..e6033bd2373 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/util/Size.html +++ b/docs/doc/reference/com/google/android/exoplayer2/util/Size.html @@ -159,6 +159,11 @@

    Field Summary

    A static instance to represent an unknown size value.
    static SizeZERO 
    @@ -257,13 +262,22 @@

    Field Detail

    -
      +
      • UNKNOWN

        public static final Size UNKNOWN
        A static instance to represent an unknown size value.
      + + + +
        +
      • +

        ZERO

        +
        public static final Size ZERO
        +
      • +
    diff --git a/docs/doc/reference/com/google/android/exoplayer2/util/Util.html b/docs/doc/reference/com/google/android/exoplayer2/util/Util.html index 923701ff1de..9d9a658c669 100644 --- a/docs/doc/reference/com/google/android/exoplayer2/util/Util.html +++ b/docs/doc/reference/com/google/android/exoplayer2/util/Util.html @@ -25,7 +25,7 @@ catch(err) { } //--> -var data = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9,"i13":9,"i14":9,"i15":9,"i16":9,"i17":9,"i18":9,"i19":9,"i20":9,"i21":9,"i22":9,"i23":9,"i24":9,"i25":9,"i26":9,"i27":9,"i28":9,"i29":9,"i30":9,"i31":9,"i32":9,"i33":9,"i34":9,"i35":9,"i36":9,"i37":9,"i38":9,"i39":9,"i40":9,"i41":9,"i42":9,"i43":9,"i44":9,"i45":9,"i46":9,"i47":9,"i48":9,"i49":9,"i50":9,"i51":9,"i52":9,"i53":9,"i54":9,"i55":9,"i56":9,"i57":9,"i58":9,"i59":9,"i60":9,"i61":9,"i62":9,"i63":9,"i64":9,"i65":9,"i66":9,"i67":9,"i68":9,"i69":9,"i70":9,"i71":41,"i72":41,"i73":9,"i74":9,"i75":9,"i76":9,"i77":9,"i78":9,"i79":9,"i80":9,"i81":9,"i82":9,"i83":9,"i84":9,"i85":9,"i86":9,"i87":9,"i88":9,"i89":9,"i90":9,"i91":9,"i92":9,"i93":9,"i94":9,"i95":9,"i96":9,"i97":9,"i98":9,"i99":9,"i100":9,"i101":9,"i102":9,"i103":9,"i104":9,"i105":9,"i106":9,"i107":9,"i108":9,"i109":9,"i110":9,"i111":9,"i112":9,"i113":9,"i114":9,"i115":9,"i116":9,"i117":9,"i118":9,"i119":9,"i120":9,"i121":9,"i122":9,"i123":9,"i124":9,"i125":9}; +var data = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9,"i13":9,"i14":9,"i15":9,"i16":9,"i17":9,"i18":9,"i19":9,"i20":9,"i21":9,"i22":9,"i23":9,"i24":9,"i25":9,"i26":9,"i27":9,"i28":9,"i29":9,"i30":9,"i31":9,"i32":9,"i33":9,"i34":9,"i35":9,"i36":9,"i37":9,"i38":9,"i39":9,"i40":9,"i41":9,"i42":9,"i43":9,"i44":9,"i45":9,"i46":9,"i47":9,"i48":9,"i49":9,"i50":9,"i51":9,"i52":9,"i53":9,"i54":9,"i55":9,"i56":9,"i57":9,"i58":9,"i59":9,"i60":9,"i61":9,"i62":9,"i63":9,"i64":9,"i65":9,"i66":9,"i67":9,"i68":9,"i69":9,"i70":9,"i71":9,"i72":41,"i73":41,"i74":9,"i75":9,"i76":9,"i77":9,"i78":9,"i79":9,"i80":9,"i81":9,"i82":9,"i83":9,"i84":9,"i85":9,"i86":9,"i87":9,"i88":9,"i89":9,"i90":9,"i91":9,"i92":9,"i93":9,"i94":9,"i95":9,"i96":9,"i97":9,"i98":9,"i99":9,"i100":9,"i101":9,"i102":9,"i103":9,"i104":9,"i105":9,"i106":9,"i107":9,"i108":9,"i109":9,"i110":9,"i111":9,"i112":9,"i113":9,"i114":9,"i115":9,"i116":9,"i117":9,"i118":9,"i119":9,"i120":9,"i121":9,"i122":9,"i123":9,"i124":9,"i125":9,"i126":9}; var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; @@ -645,34 +645,43 @@

    Method Summary

    +static Drawable +getDrawable​(Context context, + Resources resources, + int drawableRes) + +
    Returns a Drawable for the given resource or throws a Resources.NotFoundException if not found.
    + + + static UUID getDrmUuid​(String drmScheme)
    Derives a DRM UUID from drmScheme.
    - + static @com.google.android.exoplayer2.PlaybackException.ErrorCode int getErrorCodeForMediaDrmErrorCode​(int mediaDrmErrorCode)
    Returns a PlaybackException.ErrorCode value that corresponds to the provided MediaDrm.ErrorCodes value.
    - + static int getErrorCodeFromPlatformDiagnosticsInfo​(String diagnosticsInfo)
    Attempts to parse an error code from a diagnostic string found in framework media exceptions.
    - + static String getFormatSupportString​(@com.google.android.exoplayer2.C.FormatSupport int formatSupport)
    Returns string representation of a C.FormatSupport flag.
    - + static int getIntegerCodeForString​(String string) @@ -680,14 +689,14 @@

    Method Summary

    as bytes. - + static String getLocaleLanguageTag​(Locale locale)
    Returns the language tag for a Locale.
    - + static long getMediaDurationForPlayoutDuration​(long playoutDuration, float speed) @@ -695,21 +704,21 @@

    Method Summary

    Returns the duration of media that will elapse in playoutDuration.
    - + static long getNowUnixTimeMs​(long elapsedRealtimeEpochOffsetMs)
    Returns the current time in milliseconds since the epoch.
    - + static @com.google.android.exoplayer2.C.PcmEncoding int getPcmEncoding​(int bitDepth)
    Converts a sample bit depth to a corresponding PCM encoding constant.
    - + static Format getPcmFormat​(@com.google.android.exoplayer2.C.PcmEncoding int pcmEncoding, int channels, @@ -718,7 +727,7 @@

    Method Summary

    Gets a PCM Format with the specified parameters.
    - + static int getPcmFrameSize​(@com.google.android.exoplayer2.C.PcmEncoding int pcmEncoding, int channelCount) @@ -726,7 +735,7 @@

    Method Summary

    Returns the frame size for audio with channelCount channels in the specified encoding.
    - + static long getPlayoutDurationForMediaDuration​(long mediaDuration, float speed) @@ -734,14 +743,14 @@

    Method Summary

    Returns the playout duration of mediaDuration of media.
    - + static @com.google.android.exoplayer2.C.StreamType int getStreamTypeForAudioUsage​(@com.google.android.exoplayer2.C.AudioUsage int usage)
    Returns the C.StreamType corresponding to the specified C.AudioUsage.
    - + static String getStringForTime​(StringBuilder builder, Formatter formatter, @@ -750,7 +759,7 @@

    Method Summary

    Returns the specified millisecond time formatted as a string.
    - + static String[] getSystemLanguageCodes() @@ -758,14 +767,14 @@

    Method Summary

    ordered by preference. - + static String getTrackTypeString​(@com.google.android.exoplayer2.C.TrackType int trackType)
    Returns a string representation of a C.TrackType.
    - + static String getUserAgent​(Context context, String applicationName) @@ -773,28 +782,28 @@

    Method Summary

    Returns a user agent string based on the given application name and the library version.
    - + static byte[] getUtf8Bytes​(String value)
    Returns a new byte array containing the code points of a String encoded using UTF-8.
    - + static byte[] gzip​(byte[] input)
    Compresses input using gzip and returns the result in a newly allocated byte array.
    - + static @com.google.android.exoplayer2.C.ContentType int inferContentType​(Uri uri)
    Makes a best guess to infer the C.ContentType from a Uri.
    - + static @com.google.android.exoplayer2.C.ContentType int inferContentType​(Uri uri, String overrideExtension) @@ -805,7 +814,7 @@

    Method Summary

    - + static @com.google.android.exoplayer2.C.ContentType int inferContentType​(String fileName) @@ -815,14 +824,14 @@

    Method Summary

    - + static @com.google.android.exoplayer2.C.ContentType int inferContentTypeForExtension​(String fileExtension)
    Makes a best guess to infer the C.ContentType from a file extension.
    - + static @com.google.android.exoplayer2.C.ContentType int inferContentTypeForUriAndMimeType​(Uri uri, String mimeType) @@ -830,7 +839,7 @@

    Method Summary

    Makes a best guess to infer the C.ContentType from a Uri and optional MIME type.
    - + static boolean inflate​(ParsableByteArray input, ParsableByteArray output, @@ -839,49 +848,56 @@

    Method Summary

    Uncompresses the data in input.
    - + +static String +intToStringMaxRadix​(int i) + +
    Returns a string representation of the integer using radix value Character.MAX_RADIX.
    + + + static boolean isAutomotive​(Context context)
    Returns whether the app is running on an automotive device.
    - + static boolean isEncodingHighResolutionPcm​(@com.google.android.exoplayer2.C.PcmEncoding int encoding)
    Returns whether encoding is high resolution (> 16-bit) PCM.
    - + static boolean isEncodingLinearPcm​(@com.google.android.exoplayer2.C.Encoding int encoding)
    Returns whether encoding is one of the linear PCM encodings.
    - + static boolean isLinebreak​(int c)
    Returns whether the given character is a carriage return ('\r') or a line feed ('\n').
    - + static boolean isLocalFileUri​(Uri uri)
    Returns true if the URI is a path to a local file or a reference to a local file.
    - + static boolean isTv​(Context context)
    Returns whether the app is running on a TV device.
    - + static int linearSearch​(int[] array, int value) @@ -889,7 +905,7 @@

    Method Summary

    Returns the index of the first occurrence of value in array, or C.INDEX_UNSET if value is not contained in array.
    - + static int linearSearch​(long[] array, long value) @@ -897,14 +913,14 @@

    Method Summary

    Returns the index of the first occurrence of value in array, or C.INDEX_UNSET if value is not contained in array.
    - + static long maxValue​(SparseLongArray sparseLongArray)
    Returns the maximum value in the given SparseLongArray.
    - + static boolean maybeRequestReadExternalStoragePermission​(Activity activity, Uri... uris) @@ -913,7 +929,7 @@

    Method Summary

    permission read the specified Uris, requesting the permission if necessary. - + static boolean maybeRequestReadExternalStoragePermission​(Activity activity, MediaItem... mediaItems) @@ -923,14 +939,14 @@

    Method Summary

    necessary. - + static long minValue​(SparseLongArray sparseLongArray)
    Returns the minimum value in the given SparseLongArray.
    - + static <T> void moveItems​(List<T> items, int fromIndex, @@ -940,28 +956,28 @@

    Method Summary

    Moves the elements starting at fromIndex to newFromIndex.
    - + static long msToUs​(long timeMs)
    Converts a time in milliseconds to the corresponding time in microseconds, preserving C.TIME_UNSET values and C.TIME_END_OF_SOURCE values.
    - + static ExecutorService newSingleThreadExecutor​(String threadName)
    Instantiates a new single threaded executor whose thread has the specified name.
    - + static @PolyNull String normalizeLanguageCode​(@PolyNull String language)
    Returns a normalized IETF BCP 47 language tag for language.
    - + static <T> T[] nullSafeArrayAppend​(T[] original, T newElement) @@ -969,7 +985,7 @@

    Method Summary

    Creates a new array containing original with newElement appended.
    - + static <T> T[] nullSafeArrayConcatenation​(T[] first, T[] second) @@ -977,7 +993,7 @@

    Method Summary

    Creates a new array containing the concatenation of two non-null type arrays.
    - + static <T> T[] nullSafeArrayCopy​(T[] input, int length) @@ -985,7 +1001,7 @@

    Method Summary

    Copies and optionally truncates an array.
    - + static <T> T[] nullSafeArrayCopyOfRange​(T[] input, int from, @@ -994,7 +1010,7 @@

    Method Summary

    Copies a subset of an array.
    - + static <T> void nullSafeListToArray​(List<T> list, T[] array) @@ -1002,7 +1018,7 @@

    Method Summary

    Copies the contents of list into array.
    - + static long parseXsDateTime​(String value) @@ -1010,14 +1026,14 @@

    Method Summary

    epoch. - + static long parseXsDuration​(String value)
    Parses an xs:duration attribute value, returning the parsed duration in milliseconds.
    - + static boolean postOrRun​(Handler handler, Runnable runnable) @@ -1025,7 +1041,7 @@

    Method Summary

    Posts the Runnable if the calling thread differs with the Looper of the Handler.
    - + static <T> ListenableFuture<T> postOrRunWithCompletion​(Handler handler, Runnable runnable, @@ -1034,7 +1050,7 @@

    Method Summary

    Posts the Runnable if the calling thread differs with the Looper of the Handler.
    - + static boolean readBoolean​(Parcel parcel) @@ -1042,14 +1058,14 @@

    Method Summary

    and all other values mapping to true. - + static void recursiveDelete​(File fileOrDirectory)
    Recursively deletes a directory and its content.
    - + static Intent registerReceiverNotExported​(Context context, BroadcastReceiver receiver, @@ -1059,18 +1075,7 @@

    Method Summary

    apps. - -static Intent -registerReceiverNotExported​(Context context, - BroadcastReceiver receiver, - IntentFilter filter, - Handler handler) - -
    Registers a BroadcastReceiver that's not intended to receive broadcasts from other - apps.
    - - - + static <T> void removeRange​(List<T> list, int fromIndex, @@ -1079,7 +1084,7 @@

    Method Summary

    Removes an indexed range from a List.
    - + static long scaleLargeTimestamp​(long timestamp, long multiplier, @@ -1088,7 +1093,7 @@

    Method Summary

    Scales a large timestamp.
    - + static long[] scaleLargeTimestamps​(List<Long> timestamps, long multiplier, @@ -1097,7 +1102,7 @@

    Method Summary

    Applies scaleLargeTimestamp(long, long, long) to a list of unscaled timestamps.
    - + static void scaleLargeTimestampsInPlace​(long[] timestamps, long multiplier, @@ -1106,7 +1111,7 @@

    Method Summary

    Applies scaleLargeTimestamp(long, long, long) to an array of unscaled timestamps.
    - + static void sneakyThrow​(Throwable t) @@ -1114,7 +1119,7 @@

    Method Summary

    not declared to be thrown. - + static String[] split​(String value, String regex) @@ -1122,7 +1127,7 @@

    Method Summary

    Splits a string using value.split(regex, -1).
    - + static String[] splitAtFirst​(String value, String regex) @@ -1130,14 +1135,14 @@

    Method Summary

    Splits the string at the first occurrence of the delimiter regex.
    - + static String[] splitCodecs​(String codecs)
    Splits a codecs sequence string, as defined in RFC 6381, into individual codec strings.
    - + static ComponentName startForegroundService​(Context context, Intent intent) @@ -1146,7 +1151,7 @@

    Method Summary

    Context.startService(Intent) otherwise. - + static long subtractWithOverflowDefault​(long x, long y, @@ -1155,14 +1160,14 @@

    Method Summary

    Returns the difference between two arguments, or a third argument if the result overflows.
    - + static long sum​(long... summands)
    Returns the sum of all summands of the given array.
    - + static boolean tableExists​(SQLiteDatabase database, String tableName) @@ -1170,21 +1175,21 @@

    Method Summary

    Returns whether the table exists in the database.
    - + static byte[] toByteArray​(InputStream inputStream)
    Converts the entirety of an InputStream to a byte array.
    - + static String toHexString​(byte[] bytes)
    Returns a string containing a lower-case hex representation of the bytes provided.
    - + static long toLong​(int mostSignificantBits, int leastSignificantBits) @@ -1192,14 +1197,14 @@

    Method Summary

    Returns the long that is composed of the bits of the 2 specified integers.
    - + static long toUnsignedLong​(int x)
    Converts an integer to a long by unsigned conversion.
    - + static <T,​U>
    ListenableFuture<T>
    transformFutureAsync​(ListenableFuture<U> future, AsyncFunction<U,​T> transformFunction) @@ -1207,7 +1212,7 @@

    Method Summary

    Asynchronously transforms the result of a ListenableFuture.
    - + static CharSequence truncateAscii​(CharSequence sequence, int maxLength) @@ -1215,21 +1220,21 @@

    Method Summary

    Truncates a sequence of ASCII characters to a maximum length.
    - + static String unescapeFileName​(String fileName)
    Unescapes an escaped file or directory name back to its original value.
    - + static long usToMs​(long timeUs)
    Converts a time in microseconds to the corresponding time in milliseconds, preserving C.TIME_UNSET and C.TIME_END_OF_SOURCE values.
    - + static void writeBoolean​(Parcel parcel, boolean value) @@ -1367,36 +1372,15 @@

    registerReceiverNotExported

    BroadcastReceiver receiver, IntentFilter filter)
    Registers a BroadcastReceiver that's not intended to receive broadcasts from other - apps. This will be enforced by specifying Context.RECEIVER_NOT_EXPORTED if SDK_INT is 33 or above.
    -
    -
    Parameters:
    -
    context - The context on which Context.registerReceiver(android.content.BroadcastReceiver, android.content.IntentFilter) will be called.
    -
    receiver - The BroadcastReceiver to register. This value may be null.
    -
    filter - Selects the Intent broadcasts to be received.
    -
    Returns:
    -
    The first sticky intent found that matches filter, or null if there are none.
    -
    - - - - - -
    + + + +
      +
    • +

      getDrawable

      +
      public static Drawable getDrawable​(Context context,
      +                                   Resources resources,
      +                                   @DrawableRes
      +                                   int drawableRes)
      +
      Returns a Drawable for the given resource or throws a Resources.NotFoundException if not found.
      +
      +
      Parameters:
      +
      context - The context to get the theme from starting with API 21.
      +
      resources - The resources to load the drawable from.
      +
      drawableRes - The drawable resource int.
      +
      Returns:
      +
      The loaded Drawable.
      +
      +
    • +
    + + + +
      +
    • +

      intToStringMaxRadix

      +
      public static String intToStringMaxRadix​(int i)
      +
      Returns a string representation of the integer using radix value Character.MAX_RADIX.
      +
      +
      Parameters:
      +
      i - An integer to be converted to String.
      +
      +
    • +
    diff --git a/docs/doc/reference/constant-values.html b/docs/doc/reference/constant-values.html index 719deb87037..ba13db6f7d6 100644 --- a/docs/doc/reference/constant-values.html +++ b/docs/doc/reference/constant-values.html @@ -647,930 +647,937 @@

    com.google.*

    9 + + +public static final int +ENCODING_OPUS +20 + + public static final int ENCODING_PCM_16BIT 2 - + public static final int ENCODING_PCM_16BIT_BIG_ENDIAN 268435456 - + public static final int ENCODING_PCM_24BIT 536870912 - + public static final int ENCODING_PCM_32BIT 805306368 - + public static final int ENCODING_PCM_8BIT 3 - + public static final int ENCODING_PCM_FLOAT 4 - + public static final int FLAG_AUDIBILITY_ENFORCED 1 - + public static final int FORMAT_EXCEEDS_CAPABILITIES 3 - + public static final int FORMAT_HANDLED 4 - + public static final int FORMAT_UNSUPPORTED_DRM 2 - + public static final int FORMAT_UNSUPPORTED_SUBTYPE 1 - + public static final int FORMAT_UNSUPPORTED_TYPE 0 - + public static final int INDEX_UNSET -1 - + public static final String ISO88591_NAME "ISO-8859-1" - + public static final String LANGUAGE_UNDETERMINED "und" - + public static final int LENGTH_UNSET -1 - + public static final long MICROS_PER_SECOND 1000000L - + public static final long MILLIS_PER_SECOND 1000L - + public static final long NANOS_PER_SECOND 1000000000L - + public static final int NETWORK_TYPE_2G 3 - + public static final int NETWORK_TYPE_3G 4 - + public static final int NETWORK_TYPE_4G 5 - + public static final int NETWORK_TYPE_5G_NSA 10 - + public static final int NETWORK_TYPE_5G_SA 9 - + public static final int NETWORK_TYPE_CELLULAR_UNKNOWN 6 - + public static final int NETWORK_TYPE_ETHERNET 7 - + public static final int NETWORK_TYPE_OFFLINE 1 - + public static final int NETWORK_TYPE_OTHER 8 - + public static final int NETWORK_TYPE_UNKNOWN 0 - + public static final int NETWORK_TYPE_WIFI 2 - + public static final int PERCENTAGE_UNSET -1 - + public static final int POSITION_UNSET -1 - + public static final int PRIORITY_DOWNLOAD -1000 - + public static final int PRIORITY_PLAYBACK 0 - + public static final int PROJECTION_CUBEMAP 2 - + public static final int PROJECTION_EQUIRECTANGULAR 1 - + public static final int PROJECTION_MESH 3 - + public static final int PROJECTION_RECTANGULAR 0 - + public static final float RATE_UNSET -3.4028234663852886E38f - + public static final int RATE_UNSET_INT -2147483647 - + public static final int RESULT_BUFFER_READ -4 - + public static final int RESULT_END_OF_INPUT -1 - + public static final int RESULT_FORMAT_READ -5 - + public static final int RESULT_MAX_LENGTH_EXCEEDED -2 - + public static final int RESULT_NOTHING_READ -3 - + public static final int ROLE_FLAG_ALTERNATE 2 - + public static final int ROLE_FLAG_CAPTION 64 - + public static final int ROLE_FLAG_COMMENTARY 8 - + public static final int ROLE_FLAG_DESCRIBES_MUSIC_AND_SOUND 1024 - + public static final int ROLE_FLAG_DESCRIBES_VIDEO 512 - + public static final int ROLE_FLAG_DUB 16 - + public static final int ROLE_FLAG_EASY_TO_READ 8192 - + public static final int ROLE_FLAG_EMERGENCY 32 - + public static final int ROLE_FLAG_ENHANCED_DIALOG_INTELLIGIBILITY 2048 - + public static final int ROLE_FLAG_MAIN 1 - + public static final int ROLE_FLAG_SIGN 256 - + public static final int ROLE_FLAG_SUBTITLE 128 - + public static final int ROLE_FLAG_SUPPLEMENTARY 4 - + public static final int ROLE_FLAG_TRANSCRIBES_DIALOG 4096 - + public static final int ROLE_FLAG_TRICK_PLAY 16384 - + public static final String SANS_SERIF_NAME "sans-serif" - + public static final int SELECTION_FLAG_AUTOSELECT 4 - + public static final int SELECTION_FLAG_DEFAULT 1 - + public static final int SELECTION_FLAG_FORCED 2 - + public static final int SELECTION_REASON_ADAPTIVE 3 - + public static final int SELECTION_REASON_CUSTOM_BASE 10000 - + public static final int SELECTION_REASON_INITIAL 1 - + public static final int SELECTION_REASON_MANUAL 2 - + public static final int SELECTION_REASON_TRICK_PLAY 4 - + public static final int SELECTION_REASON_UNKNOWN 0 - + public static final String SERIF_NAME "serif" - + public static final int SPATIALIZATION_BEHAVIOR_AUTO 0 - + public static final int SPATIALIZATION_BEHAVIOR_NEVER 1 - + public static final String SSAI_SCHEME "ssai" - + public static final int STEREO_MODE_LEFT_RIGHT 2 - + public static final int STEREO_MODE_MONO 0 - + public static final int STEREO_MODE_STEREO_MESH 3 - + public static final int STEREO_MODE_TOP_BOTTOM 1 - + public static final int STREAM_TYPE_ALARM 4 - + public static final int STREAM_TYPE_DEFAULT 3 - + public static final int STREAM_TYPE_DTMF 8 - + public static final int STREAM_TYPE_MUSIC 3 - + public static final int STREAM_TYPE_NOTIFICATION 5 - + public static final int STREAM_TYPE_RING 2 - + public static final int STREAM_TYPE_SYSTEM 1 - + public static final int STREAM_TYPE_VOICE_CALL 0 - + public static final long TIME_END_OF_SOURCE -9223372036854775808L - + public static final long TIME_UNSET -9223372036854775807L - + public static final int TRACK_TYPE_AUDIO 1 - + public static final int TRACK_TYPE_CAMERA_MOTION 6 - + public static final int TRACK_TYPE_CUSTOM_BASE 10000 - + public static final int TRACK_TYPE_DEFAULT 0 - + public static final int TRACK_TYPE_IMAGE 4 - + public static final int TRACK_TYPE_METADATA 5 - + public static final int TRACK_TYPE_NONE -2 - + public static final int TRACK_TYPE_TEXT 3 - + public static final int TRACK_TYPE_UNKNOWN -1 - + public static final int TRACK_TYPE_VIDEO 2 - + public static final int TYPE_DASH 0 - + public static final int TYPE_HLS 2 - + public static final int TYPE_OTHER 4 - + public static final int TYPE_RTSP 3 - + public static final int TYPE_SS 1 - + public static final int USAGE_ALARM 4 - + public static final int USAGE_ASSISTANCE_ACCESSIBILITY 11 - + public static final int USAGE_ASSISTANCE_NAVIGATION_GUIDANCE 12 - + public static final int USAGE_ASSISTANCE_SONIFICATION 13 - + public static final int USAGE_ASSISTANT 16 - + public static final int USAGE_GAME 14 - + public static final int USAGE_MEDIA 1 - + public static final int USAGE_NOTIFICATION 5 - + public static final int USAGE_NOTIFICATION_COMMUNICATION_DELAYED 9 - + public static final int USAGE_NOTIFICATION_COMMUNICATION_INSTANT 8 - + public static final int USAGE_NOTIFICATION_COMMUNICATION_REQUEST 7 - + public static final int USAGE_NOTIFICATION_EVENT 10 - + public static final int USAGE_NOTIFICATION_RINGTONE 6 - + public static final int USAGE_UNKNOWN 0 - + public static final int USAGE_VOICE_COMMUNICATION 2 - + public static final int USAGE_VOICE_COMMUNICATION_SIGNALLING 3 - + public static final String UTF16_NAME "UTF-16" - + public static final String UTF16LE_NAME "UTF-16LE" - + public static final String UTF8_NAME "UTF-8" - + public static final int VIDEO_CHANGE_FRAME_RATE_STRATEGY_OFF -2147483648 - + public static final int VIDEO_CHANGE_FRAME_RATE_STRATEGY_ONLY_IF_SEAMLESS 0 - + public static final int VIDEO_OUTPUT_MODE_NONE -1 - + public static final int VIDEO_OUTPUT_MODE_SURFACE_YUV 1 - + public static final int VIDEO_OUTPUT_MODE_YUV 0 - + public static final int VIDEO_SCALING_MODE_DEFAULT 1 - + public static final int VIDEO_SCALING_MODE_SCALE_TO_FIT 1 - + public static final int VIDEO_SCALING_MODE_SCALE_TO_FIT_WITH_CROPPING 2 - + public static final int WAKE_MODE_LOCAL 1 - + public static final int WAKE_MODE_NETWORK 2 - + public static final int @@ -1939,21 +1946,21 @@

    com.google.*

    public static final String VERSION -"2.18.2" +"2.18.4" public static final int VERSION_INT -2018002 +2018004 public static final String VERSION_SLASHY -"ExoPlayerLib/2.18.2" +"ExoPlayerLib/2.18.4" @@ -2109,6 +2116,258 @@

    com.google.*

    6 + + +public static final int +MEDIA_TYPE_ALBUM +10 + + + + +public static final int +MEDIA_TYPE_ARTIST +11 + + + + +public static final int +MEDIA_TYPE_AUDIO_BOOK +15 + + + + +public static final int +MEDIA_TYPE_AUDIO_BOOK_CHAPTER +2 + + + + +public static final int +MEDIA_TYPE_FOLDER_ALBUMS +21 + + + + +public static final int +MEDIA_TYPE_FOLDER_ARTISTS +22 + + + + +public static final int +MEDIA_TYPE_FOLDER_AUDIO_BOOKS +26 + + + + +public static final int +MEDIA_TYPE_FOLDER_GENRES +23 + + + + +public static final int +MEDIA_TYPE_FOLDER_MIXED +20 + + + + +public static final int +MEDIA_TYPE_FOLDER_MOVIES +35 + + + + +public static final int +MEDIA_TYPE_FOLDER_NEWS +32 + + + + +public static final int +MEDIA_TYPE_FOLDER_PLAYLISTS +24 + + + + +public static final int +MEDIA_TYPE_FOLDER_PODCASTS +27 + + + + +public static final int +MEDIA_TYPE_FOLDER_RADIO_STATIONS +31 + + + + +public static final int +MEDIA_TYPE_FOLDER_TRAILERS +34 + + + + +public static final int +MEDIA_TYPE_FOLDER_TV_CHANNELS +28 + + + + +public static final int +MEDIA_TYPE_FOLDER_TV_SERIES +29 + + + + +public static final int +MEDIA_TYPE_FOLDER_TV_SHOWS +30 + + + + +public static final int +MEDIA_TYPE_FOLDER_VIDEOS +33 + + + + +public static final int +MEDIA_TYPE_FOLDER_YEARS +25 + + + + +public static final int +MEDIA_TYPE_GENRE +12 + + + + +public static final int +MEDIA_TYPE_MIXED +0 + + + + +public static final int +MEDIA_TYPE_MOVIE +8 + + + + +public static final int +MEDIA_TYPE_MUSIC +1 + + + + +public static final int +MEDIA_TYPE_NEWS +5 + + + + +public static final int +MEDIA_TYPE_PLAYLIST +13 + + + + +public static final int +MEDIA_TYPE_PODCAST +16 + + + + +public static final int +MEDIA_TYPE_PODCAST_EPISODE +3 + + + + +public static final int +MEDIA_TYPE_RADIO_STATION +4 + + + + +public static final int +MEDIA_TYPE_TRAILER +7 + + + + +public static final int +MEDIA_TYPE_TV_CHANNEL +17 + + + + +public static final int +MEDIA_TYPE_TV_SEASON +19 + + + + +public static final int +MEDIA_TYPE_TV_SERIES +18 + + + + +public static final int +MEDIA_TYPE_TV_SHOW +9 + + + + +public static final int +MEDIA_TYPE_VIDEO +6 + + + + +public static final int +MEDIA_TYPE_YEAR +14 + + public static final int @@ -4496,6 +4755,13 @@

    com.google.*

    + + +public static final int +MAX_BYTES_PER_SECOND +63750 + + public static final int @@ -7187,6 +7453,25 @@

    com.google.*

    +
  • + + + + + + + + + + + + + + +
    com.google.android.exoplayer2.offline.SegmentDownloader<M extends FilterableManifest<M>> 
    Modifier and TypeConstant FieldValue
    + +public static final longDEFAULT_MAX_MERGED_SEGMENT_START_TIME_DIFF_MS20000L
    +
  • -A B C D E F G H I J K L M N O P Q R S T U V W X Y 
    All Classes All Packages + + + +

    Z

    +
    +
    ZERO - Static variable in interface com.google.android.exoplayer2.SimpleBasePlayer.PositionSupplier
    +
    +
    An instance returning a constant position of zero.
    +
    +
    ZERO - Static variable in class com.google.android.exoplayer2.util.Size
    +
     
    +
    +A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 
    All Classes All Packages