samvera-labs / ramp

Interactive, IIIF powered audio/video media player React components library. Styleguidist Docs: https://samvera-labs.github.io/ramp/
https://ramp.avalonmediasystem.org/
30 stars 5 forks source link

[BUG] Can't scrub before beginning playback for media item (iPhone, Safari) #677

Closed elynema closed 3 weeks ago

elynema commented 1 month ago

Description

On the media item page, if you click in the progress bar / move the playhead to scrub before beginning playback, when you hit play, the item begins playing at the beginning. This may be an interaction between Ramp and native iOS player?

In addition, once the native player opens and playback begins, scrubbing does not work at all in the native player. You can adjust the progress, but the video just keeps playing from the beginning.

Note: If the user attempts to move the playhead before beginning playback, the player spins for a long time in Safari before the playback begins at the beginning of the media item in the native player. If the native player is subsequently closed, the media player is still spinning on the media item page.

Done Looks Like

joncameron commented 1 month ago

Setting the source to be offset has been a previous way to mark to the native player that playback should begin at a certain point. In Safari on iOS the event that sets this value isn't going through and playback always begins the start.

Native player scrubbing issues may be beyond the scope of this; could double-check on that broken functionality and create a new issue if needed.

elynema commented 3 weeks ago

@Dananji This is working some / most of the time on iPhone. Two issues I have run into:

  1. After the scrub, the thumbnail doesn't change in the media player. So if you've scrubbed to minute 4:00 of lunchroom manners, you're still seeing the initial thumbnail that shows the title slide. I don't think that's a blocking issue, but wanted to mention in case it is fixable. If you start and pause playback and then scrub, the thumbnail updates. The same thing happens if you select a section before beginning playback.

Thumbnail does not update:

Private Zenhub Video

  1. Sometimes the first time you click in the progress bar to scrub, the progress bar jumps forward and then back to the beginning. It generally works on the second click. I was not able to get this to replicate while making a video, so I don't have a recording. I'd be interested to see if you can get it to replicate. This is also maybe not a blocker as it's usually only a problem on the first click.
Dananji commented 3 weeks ago

After the scrub, the thumbnail doesn't change in the media player. So if you've scrubbed to minute 4:00 of lunchroom manners, you're still seeing the initial thumbnail that shows the title slide. I don't think that's a blocking issue, but wanted to mention in case it is fixable. If you start and pause playback and then scrub, the thumbnail updates.

Image in the media player doesn't update on initial scrubbing/seeking action unless playback has started/started and paused at some point before scrubbing/seeking. This is consistent across all browsers and platforms. I'm guessing this is the native VideoJS behavior. However by default VideoJS hides the controls and progress-bar until playback starts so there's no way to scrub/seek before playback starts.

Sometimes the first time you click in the progress bar to scrub, the progress bar jumps forward and then back to the beginning. It generally works on the second click. I was not able to get this to replicate while making a video, so I don't have a recording. I'd be interested to see if you can get it to replicate. This is also maybe not a blocker as it's usually only a problem on the first click.

I was not able to replicate this, however I was seeing the progress-bar disappearing while waiting for the progress-bar to update on scrub/seek action which was mentioned in standup today.

elynema commented 3 weeks ago

I will go ahead and close this since you aren't able to replicate the issue I was seeing. It's certainly better than it was before!