Search Unity

  1. Dismiss Notice
  2. All Pro and Enterprise subscribers: find helpful & inspiring creative, tech, and business know-how in the new Unity Success Hub. Sign in to stay up to date.
    Dismiss Notice

WebGL AudioSource.time inconsitent

Discussion in 'WebGL' started by Picky-Salamander, Jan 24, 2017.

  1. Picky-Salamander

    Picky-Salamander

    Joined:
    Apr 26, 2013
    Posts:
    27
    When playing audio in our application AudioSource.time seems to return almost random results. Some times it will be accurate about the current time in the clip and others it will be seemingly outputting random numbers. Some things to note:
    • The audio clip is fully loaded
    • The clip is loaded as part of an asset bundle
    • More often then not the time is consistent when a clip is played the first time, but seems to break down once the audio repeats.
    • This isn't reproducible in any other platform including the editor.
    Is there something I can do to better keep track of the current time of a clip being played in WebGL?
     
  2. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    Is this Unity 5.5? We fixed a bug recently, related to AudioSource.time: see bug tracker here.
     
  3. kmedved

    kmedved

    Joined:
    Aug 18, 2016
    Posts:
    122
    Reproduced in Unity 5.5.2.
     
  4. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    looks like we need a new bug report then.
     
unityunity