1. 17 Jun, 2020 13 commits
    • Workaround unexpected discard of preloaded ad · 49951d4f
      After an ad pod coming up has preloaded, if the user seeks before it
      plays we get pauseAd/stopAd called for that ad pod. Also, the ad will
      not load again. Work around this unexpected behavior by handling
      pauseAd/stopAd and discarding the ad.
      
      In future, it's likely that the IMA SDK will stop calling those
      methods, and will loadAd again for the preloaded ad that was
      unexpectedly discarded. This change should be compatible with that,
      because the ad won't be discarded any more due to not calling stopAd.
      
      Issue: #7492
      PiperOrigin-RevId: 316873699
      andrewlewis committed
    • Remove some ad playback state change requirements · fc76dbfa
      Ads can appear due to asynchronous ad tag requests completing after
      earlier ads in a pod have loaded, so remove the requirement that the
      ad count can't change. The MediaPeriodQueue should handling discarding
      buffered content if an ad appears before already buffered content, so
      I think this case is actually handled correctly by the core player
      already.
      
      Also remove the requirement that an ad URI can't change. This is a
      defensive measure for now, but it's likely that a later fix in the IMA
      SDK for an issue where loadAd is not called after preloading then
      seeking before a preloaded ad plays will result in loadAd being called
      more than once, and I think it's possible that the second call to
      loadAd may have a different URI. Because the ad URI should only change
      after an intermediate seek to another MediaPeriod, there shouldn't be
      any problems with buffered data not getting discarded.
      
      Issue: #7477
      PiperOrigin-RevId: 316871371
      andrewlewis committed
    • Move IMA SDK callbacks into inner class · 5fd287b3
      The release() method was added in the recent IMA API changes for
      preloading and now 'collides' with the ExoPlayer AdsLoader release
      method. This led to all ads completing being treated as a call to
      completely release the ads loader, which meant that the ad playback
      state was not updated on resuming after all ads had completed, which
      in turn led to playback getting stuck buffering on returning from the
      background after all ads played.
      
      Move the IMA callbacks into an inner class to avoid this.
      
      Issue: #7508
      PiperOrigin-RevId: 316834561
      andrewlewis committed
    • Add MIME types for which every sample is known to be a sync sample. · 6e1c1973
      - Leaving the TODO, since there are still MIME types we're unsure about.
      - Removing AAC because xHE-AAC does not have this property. We may re-add
        it with an additional profile check to exclude xHE-AAC in the future.
      
      PiperOrigin-RevId: 316715147
      olly committed
    • Pull IMA cuePoints -> adGroupTimesUs logic into a helper class · a0e90ce1
      We're then able to use this same helper class from tests, to avoid
      running into spurious failures caused by long microseconds being
      round-tripped through float seconds.
      
      PiperOrigin-RevId: 316435084
      ibaker committed
    • Add AdPlaybackState toString · 1ce04000
      This is useful for debugging both in tests and via logging.
      
      PiperOrigin-RevId: 316102968
      andrewlewis committed
    • Handle errors in all VideoAdPlayer callbacks · f1197d8a
      Some but not all VideoAdPlayer callbacks from the IMA SDK included
      defensive handling of unexpected cases. Add the remaining ones.
      
      Issue: #7492
      PiperOrigin-RevId: 316082651
      andrewlewis committed
    • Fix catch type in ImaAdsLoader defensive checks · 8ab3fab4
      PiperOrigin-RevId: 316079131
      andrewlewis committed
    • Allow skipping the ad before the start position · e261b8d0
      PiperOrigin-RevId: 315867160
      andrewlewis committed
    • Prevent shutter closing for within-window seeks to unprepared periods · e5ec8e6b
      Issue: #5507
      PiperOrigin-RevId: 315512207
      olly committed
    • Separate ads rendering and AdsManager init · 80f4197e
      In a later change it will be necessary to be able to destroy the ads
      manager if all ads are skipped while creating ads rendering settings.
      This change prepares for doing that by not having the ads manager
      passed into the method (so the caller can null or initialize it).
      
      PiperOrigin-RevId: 315488830
      andrewlewis committed
    • Add tests for resuming ad playbacks · 5d74fced
      This is in preparation for refactoring the logic to support not
      playing an ad before the resume position (optionally).
      
      PiperOrigin-RevId: 315431483
      andrewlewis committed
    • Improve ImaAdsLoaderTest ad duration handling · 28c5fa66
      Previously the fake ads loader listener would always pass the same ad
      durations to the fake player, but actually the known ad durations can
      change during playback.
      
      Make the fake behavior more realistic by only exposing durations for
      ads that have loaded.
      
      PiperOrigin-RevId: 314956223
      andrewlewis committed
  2. 09 Jun, 2020 1 commit
  3. 05 Jun, 2020 4 commits
  4. 04 Jun, 2020 1 commit
  5. 03 Jun, 2020 3 commits
  6. 01 Jun, 2020 7 commits
  7. 29 May, 2020 11 commits