1. 16 Apr, 2019 2 commits
    • Remove duplications from handleSourceInfoRefreshed. · 75238e5e
      handleSourceInfoRefreshed checks for various conditions which may trigger a
      change in position. In all cases, we need to resolve the new position for ads,
      and if the corresponding MediaPeriods already exist, perform the seek to the new
      position.
      
      This change simplified the code by
       1. Moving all conditions in a single if-else structure which just determines
          the new playback position. This makes it easier to read and to follow.
       2. Doing the subsequent seek and position update in one final step to remove
          duplicated code.
      
      As a side effect, it also improves some edge cases. For example when skipping
      an ad to an already prebuffered period, we now properly update the existing
      prebuffered period.
      
      PiperOrigin-RevId: 243588014
      tonihei committed
  2. 13 Apr, 2019 38 commits