Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle non playable items in playlists. #7578

Merged
merged 3 commits into from
May 21, 2022

Conversation

Ruk33
Copy link
Collaborator

@Ruk33 Ruk33 commented May 6, 2022

Fixes

Issue Number: #7575

What is the current behavior?

Only videos and audio can be added to playlists.

What is the new behavior?

All types of claims can be included in the playlists.

When played:

  • If the first claim of the playlist is not a video/audio, the claim URL will be loaded.
  • If the first claim of the playlist is video/audio, it will play, and when finished, it will jump to the next playable item.

image

When played, all the items will be displayed in the claim list. The reason for this is to show the user the content of the list and not confuse the user as to what the list contains.

Other information

PR Checklist

Toggle...

What kind of change does this PR introduce?

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

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 added a line describing my change to CHANGELOG.md
  • I have checked that this PR does not introduce a breaking change
  • This PR introduces breaking changes and I have provided a detailed explanation below

@@ -34,12 +34,38 @@ const select = (state, props) => {
const playingUri = selectPlayingUri(state);
const collectionId = urlParams.get(COLLECTIONS_CONSTS.COLLECTION_ID) || (playingUri && playingUri.collectionId);
const isMarkdownOrComment = playingUri && (playingUri.source === 'markdown' || playingUri.source === 'comment');
const isClaimPlayable = (uri) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think if we've gotten to videoViewer, we've should already know if it's playable.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some logic may also go in page/show/view.jsx which selects the first collection item and redirects there.


let nextRecommendedUri;
let previousListUri;
if (collectionId) {
nextRecommendedUri = makeSelectNextUrlForCollectionAndUrl(collectionId, uri)(state);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should do a makeSelectNextPlayableUrl.. etc. Keep the logic in the same place. What do you think?

@jessopb
Copy link
Member

jessopb commented May 21, 2022

This is good. Will file a ticket for view progress being falsely 100% when file starts playing.

@jessopb jessopb merged commit 3c36359 into master May 21, 2022
@jessopb jessopb deleted the 7575-handle-non-playable-playlists branch May 21, 2022 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants