lbryio / lbry-android

The LBRY Android app
MIT License
2.43k stars 113 forks source link

Allow media to be played automatically #1153

Closed kekkyojin closed 3 years ago

kekkyojin commented 3 years ago

PR Checklist

Please check all that apply to this PR using "x":

PR Type

What kind of change does this PR introduce?

Fixes

Issue Number: #844

What is the current behavior?

Video and audio content plays automatically when shown on the detail view

What is the new behavior?

By default, content will still play when opened, but user will be able to disable the autoplay of media.

Other information

This PR changes some methods which have been deprecated for ExoPlayer2 API.

A new string has been added for the setting string which is shown on Settings fragment. Translation will be needed. String was copied from LBRY.TV

Testing

I have been testing it this way:

  1. Open a file which hasn't been viewed yet and let it play for some time
  2. Open another file from the Related content list which wasn't opened yet
  3. Open a file which had already been consumed, preferably a different one from the ones used on previous steps
  4. Open a file which hasn't been consumed yet from the Following fragment

This was tested with default setting (=true) and then repeated, with different files or after clearing cache, with setting set to false.