plyr icon indicating copy to clipboard operation
plyr copied to clipboard

ProgressBar (seek range) not working

Open fouille opened this issue 1 year ago • 6 comments

Expected behaviour

when I play (on wav media audio file) I want to be able to use the progress bar to move forward or backward in the reading.

Actual behaviour

when I click on the progress bar, for example at 50%, the cursor and the media always return to the beginning

Steps to reproduce

Click Play Wait load media audio click pause or click on progress bar for next seconds

Environment

  • Browser: Opera and chrome
  • Version: last version
  • Operating System: MacOs Ventura
  • Version: 13.1

Console errors (if any)

No errors displayed

Link to where the bug is happening

https://user-images.githubusercontent.com/24554441/203805976-58348bc7-2e2f-4415-bf0f-11dd772ea77a.mov

fouille avatar Nov 24 '22 14:11 fouille

The same issue in my end but in html5 video.

danraniego avatar Dec 12 '22 08:12 danraniego

Same issue, but on main website (plyr.io) seem work normally, its weird

NotMarra avatar Dec 21 '22 18:12 NotMarra

I've got the same issue and one more thing that the first time i play the audio the progress bar wont fill till the duration of voice ended and the second time that voice is played the progress bar is filling

alireza2281 avatar Jan 08 '23 07:01 alireza2281

Any updates on this issue?

I'm facing the same problem, but only for small audios(10s).

frankgalindo-briteris avatar May 11 '23 17:05 frankgalindo-briteris

I'm also facing this issue. My files are stored in a CDN. All the files are MP4 format videos. Occasionally it works, other times it doesn't. It generally works fine in the front end of the site, but when you go to the admin section, there is a video preview using the exact same set up and here the progress bar generally doesn't load fully and you can't skip into the video. I'm at a loss on how to fix it.

JulianParge avatar Jun 20 '23 17:06 JulianParge

It may not be Plyr, but the format of the file. I've been working on creating my own music and converting it from 3ga/m4a to WAV to AAC using NAudio 2.2.1. I found that if the source is mono, the formatting of the file that could make it look twice as a large than it really is. This makes the progress bar jump to the beginning when you click over 50% because there is no content.

The following code fixed my MP3 issue by setting the format to 48000 and 2 channels.

NB: Not using Plyr, but just the default player, would cause the progress bar to be off on the length of the music.

using NAudio.MediaFoundation;
using NAudio.Utils;
using NAudio.Wave;

// Create the MP3 file
// https://www.markheath.net/post/naudio-mediafoundationencoder
using (var reader = new MediaFoundationReader(decompressedFile))
{
    var mediaType = MediaFoundationEncoder.SelectMediaType(
        AudioSubtypes.MFAudioFormat_MP3,
        WaveFormat.CreateIeeeFloatWaveFormat(48000, 2),
        0); // Creates as 96kbps, 0=Select lowest possible bitrate

    using (var enc = new MediaFoundationEncoder(mediaType))
    {
        enc.Encode(mp3File, reader);
    }
}

jmonds avatar Mar 28 '24 23:03 jmonds