Allow media to be played automatically #1153

Merged
kekkyojin merged 2 commits from autoplay-setting into master 2021-02-26 19:24:17 +01:00
kekkyojin commented 2021-02-25 17:57:48 +01:00 (Migrated from github.com)

PR Checklist

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

  • I have checked that this PR is not a duplicate of an existing PR (open, closed or merged)
  • I have checked that this PR does not introduce a breaking change

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting)
  • Refactoring (no functional changes)
  • Documentation changes
  • Other - Please describe:

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.

## PR Checklist <!-- For the checkbox formatting to work properly, make sure there are no spaces on either side of the "x" --> Please check all that apply to this PR using "x": - [x] I have checked that this PR is not a duplicate of an existing PR (open, closed or merged) - [x] I have checked that this PR does not introduce a breaking change ## PR Type What kind of change does this PR introduce? - [ ] Bugfix - [x] Feature - [ ] Code style update (formatting) - [ ] Refactoring (no functional changes) - [ ] Documentation changes - [ ] Other - Please describe: ## 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. <!-- If this PR contains a breaking change, please describe the impact and solution strategy for existing applications below. -->
akinwale (Migrated from github.com) approved these changes 2021-02-26 17:51:31 +01:00
akinwale (Migrated from github.com) left a comment

Looks good.

Looks good.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry-android#1153
No description provided.