Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Audio restarts when paused in WebGL

Discussion in 'Timeline' started by Tarodev, Dec 3, 2019.

  1. Tarodev

    Tarodev

    Joined:
    Jul 30, 2015
    Posts:
    190
    This only happens in a WebGL build.

    I'll have timeline with multiple voiceovers. If I pause mid-way through a clip and then play it again, the timeline progresses as normal but the audio clip starts from the beginning.
     
    Last edited: Dec 3, 2019
  2. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    Please file a bug, we'll pass it on to the WebGL team. It appears seeking isn't occurring on the WebGL audio backend.
     
  3. Tarodev

    Tarodev

    Joined:
    Jul 30, 2015
    Posts:
    190
  4. Tarodev

    Tarodev

    Joined:
    Jul 30, 2015
    Posts:
    190
    Temp workaround:
    For anybody experiencing this in the future (before an official fix), if you're handling long clips like subtitle/voiceover, create a custom timeline-track (or edit the default playables subtitle track) to trigger audio files and play directly from a source. On pause just take note of the audio source time and reset it on resume.
     
  5. Travelbug

    Travelbug

    Joined:
    Sep 9, 2020
    Posts:
    1
    Another workaround:
    As there is a problem with seeking, the issue also occures when you have one audio track with multiple clips cut together from the same audio file.
    Workaround for this seems to be to put every clip on its own timeline track instead of having them in the same track after one another.