OdyseeTeam / odysee-frontend

The code that runs odysee.com
https://odysee.com
MIT License
216 stars 68 forks source link

Rewatching a already watched video will make it end instantly #99

Closed Abwasserrohr closed 2 years ago

Abwasserrohr commented 3 years ago

Bug A clear and concise description of what the bug is. Rewatching already watched videos ends them instantly after the page has been reloaded, so the user has to click on "repeat" to watch it.

To Reproduce Steps to reproduce the behavior:

  1. Watch a video on a channel, for example on my channel the first video: https://odysee.com/@skyrift:2
  2. Watch it to the end, go back to my channel by clicking on the channel.
  3. Reload the page using F5.
  4. Click again on the same video on my channel, it should end instantly and to watch it again, it is required to click on "repeat".
  5. This then starts the auto-play functionality. So I would have to click on "repeat" by myself to watch it again. This can be also frustrating if a user ends watching a video in the last 30 seconds of a video and wants to rewatch it, they probably don't want to watch the last 30 seconds of it, but want to rewatch. This is also happening on the LBRY client for me.

Expected behavior The video should start from the beginning and not start at the end, which makes it stop instantly. It would be also great, if it doesn't start from the last viewed point if there are less than 30 seconds left on the video.

System Configuration

This happens on Odysee and LBRY Client for me.

When trying to execute curl http://localhost:5279 --data '{"method":"version"}' with LBRY Client, I get:

500 Internal Server Error

Server got itself in trouble
GlobalGamer2015 commented 3 years ago

I was unable to replicate it the way you described but I was able to replicate it in a different way by reloading the video page itself using Odysee.com and getting this error in console.

Uncaught (in promise) DOMException: play() failed because the user didn't interact with the document first. https://goo.gl/xX8pDD

From my knowledge, I don't believe there is a fix for this type of error I got due to autoplay issues with various browsers.

Abwasserrohr commented 3 years ago

Using Chrome 94.0.4606.81:

https://user-images.githubusercontent.com/44294954/138089684-b14e9985-4dce-4eed-84a6-10f43236cebf.mp4

tzarebczan commented 2 years ago

@Abwasserrohr can you see if this is fixed now? Reopen if not.

Abwasserrohr commented 2 years ago

It's fixed if the floating video player is enabled, but if the floating video player is disabled, it seems to reset to the end:

https://user-images.githubusercontent.com/44294954/154370552-649b8c27-2b18-4d0a-82f1-6a89ac64c937.mp4

tzarebczan commented 2 years ago

I think that was a bit different because it saved the position near the end, not at the end. I think this happens every time you skip forward, so we should consider that edge case.

tzarebczan commented 2 years ago

This should no longer happen.