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

Playlist mode: Song selection not changing the PV, but updates the title #804

Closed
andreoda opened this issue Mar 9, 2021 · 18 comments
Closed
Labels
bug/error Bugs and errors (timeout) content: songs Song entries frontend Presentation layer (visible to user) media Media playback (embeds)

Comments

@andreoda
Copy link
Member

andreoda commented Mar 9, 2021

Website
VocaDB

Describe the bug

  1. When switching to another entry, only the title gets updated but not the media. It doesn't load the video.
    Exception: When clicking on an entry in the playlist that has ONLY an NND upload as media, it loads. After that it is possible to click on another entry and it will load that as well but ONLY if it has a YouTube upload as one of the media linked. After that, it is not possible to load another entry again, except for it being an "ONLY NND upload". -> Cycle case
  2. Autoplay doesn't work as well, even when on the site (not minimized or in the background)

Browser I am using: Firefox

2021-03-09.12-53-06.1.mp4

Related issues: #754 and #1335

@andreoda andreoda added media Media playback (embeds) content: songs Song entries bug/error Bugs and errors (timeout) labels Mar 9, 2021
@Shiroizu
Copy link
Member

Shiroizu commented Mar 9, 2021

The number of PV's seems to be related to this.

Entries with only one PV (piapro/nico/youtube) work fine when selected.

@ycanardeau ycanardeau added the frontend Presentation layer (visible to user) label Mar 15, 2021
@ycanardeau ycanardeau added this to the Any Time milestone Mar 15, 2021
@github-actions github-actions bot added Stale and removed Stale labels May 21, 2021
@github-actions github-actions bot removed the Stale label May 24, 2021
@ycanardeau
Copy link
Contributor

@andreoda Do you still experience this issue? I'm sure that this bug was present back then, but now I can't reproduce it for some reason. It could have been fixed by chance while refactoring.

@Shiroizu
Copy link
Member

@ycanardeau Still exists:
image (I hit "next in my playlist until it happened)

@ycanardeau
Copy link
Contributor

ycanardeau commented Jul 17, 2021

@Shiroizu What browser and extensions are you using? I tried Firefox and Edge with all extensions turned off (browse as guest).

@Shiroizu
Copy link
Member

Shiroizu commented Jul 17, 2021

I managed to reproduce it on edge, which means it's probably not browser-related.

(I use firefox)

@andreoda
Copy link
Member Author

andreoda commented Jul 18, 2021

It seems to be fixed (I couldn't reproduce it again) but I noticed something:
When the first track in the playlist is available on YouTube and NND, it will choose YouTube (probably from my preference I set on my profile settings) and when the next track is only available on NND, not YouTube, it will play that one with the NND player.
Now comes the weird part: From then on, all the following tracks will be played with the NND player, even if they are available on YouTube as well. Additionally, if I click back to the first track on the playlist, it will choose the NND video from it.

If wanted, I can share a video again to demonstrate it.

@ycanardeau
Copy link
Contributor

From then on, all the following tracks will be played with the NND player, even if they are available on YouTube as well.

I haven't looked into the source code yet, but I guess it's by design in order to reduce the number of switching PV players. See also #754 (comment).

@riipah
Copy link
Member

riipah commented Jul 18, 2021

That is correct, the code is designed to avoid switching players, because loading the player may take a while, especially the Nico player, so there would be unnecessary interruption. Maybe it's not as big of a problem now than it was when the Nico player was using Flash. And of course you could consider disabling this functionality to always use the user's preference if desired and it's not too intrusive switching the player constantly. But yeah, that part is by design, intended to improve the user experience. Is there a good reason you'd always want it to use your preferred service?

@Shiroizu
Copy link
Member

Shiroizu commented Jul 25, 2021

To reproduce:

  1. Go to https://vocadb.net/Profile/Shiroizu#Songs
  2. Toggle off "Group by rating"
  3. Click the playlist view
  4. Toggle on autoplay
  5. Click "next" 22 times

The title shows the entry https://vocadb.net/S/343598, but the song https://vocadb.net/S/324010 is played.

EDIT: seems to be work inconsistently. What would be the best way to debug this?

@ycanardeau
Copy link
Contributor

ycanardeau commented Jul 25, 2021

@Shiroizu Thanks for your investigation.

What would be the best way to debug this?

I've already tried to solve this issue several times, but in vain. To be honest, I haven't figured out what the cause is yet. It might be caused by several different reasons. I plan to work on this as part of #900.

@ycanardeau ycanardeau modified the milestones: Any Time, React conversion Jul 25, 2021
@riipah
Copy link
Member

riipah commented Jul 25, 2021

The multi-service video player is one of the most complicated and ambitious parts of VocaDB. Remember there is no other service doing this. I used to spend quite a lot of hours on it too, to get it working 95% of the time. But yes, it's annoying that sometimes it just stops. Most of the time the problems are related to unreliable detection of the player or connecting to its API. For example, loading the player dynamically using JavaScript is often not supported officially. It's also a moving target since the players keep changing, and their APIs too.

@ycanardeau
Copy link
Contributor

ycanardeau commented Aug 14, 2021

For reference, I found React-Player, whose functionality is similar to VocaDB's PV player. I wonder if we could make use of it, although we need to implement some additional players (e.g. Bilibili and Piapro).

@riipah
Copy link
Member

riipah commented Aug 14, 2021

The current VocaDB player doesn't support Piapro I think? But NicoNico is the one with the most issues. YouTube, Vimeo, those with a proper API are easy.

@ycanardeau
Copy link
Contributor

The current VocaDB player doesn't support Piapro I think?

It seems that the VocaDB player supports Piapro if meta != null && !string.IsNullOrEmpty(meta.Timestamp)?

@if (meta != null && !string.IsNullOrEmpty(meta.Timestamp))

@riipah
Copy link
Member

riipah commented Aug 14, 2021

I meant the frontend-based player, supporting autoplay and player switching without server embeds. Server embeds (using those Razor partials) are another matter. I think most of the playback issues are on the frontend, especially autoplay? And that doesn't support Piapro at the moment, because there is no API.

@riipah
Copy link
Member

riipah commented Aug 14, 2021

Well actually, Piapro is using HTML5 audio element, so it would probably be possible to support that.

@ycanardeau
Copy link
Contributor

What would be the best way to debug this?

@Shiroizu I've added logging everywhere in #1101 so that debugging becomes much easier (it's quite verbose though). Note that this feature is only available for the new bottom player.

Example:
image

@ycanardeau
Copy link
Contributor

The autoplay feature for the new bottom player has become quite stable now (some error handling is still missing though). Closing this issue for now.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 6, 2022
@VocaDB VocaDB deleted a comment from github-actions bot Apr 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug/error Bugs and errors (timeout) content: songs Song entries frontend Presentation layer (visible to user) media Media playback (embeds)
Projects
None yet
Development

No branches or pull requests

4 participants