Changeset 35502


Ignore:
Timestamp:
2021-09-28T10:12:26+13:00 (3 years ago)
Author:
cstephen
Message:

Use requestAnimationFrame to update audio time

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/model-interfaces-dev/atea/korero-maori-asr/src/js/AudioPlaybackModule.js

    r35451 r35502  
    2525 * @param {*} store The vuex store to update.
    2626 */
    27 // Adapted from https://davidwalsh.name/javascript-polling
    2827function pollAudioTime(audioElement, store) {
    2928    var lastTime = 0;
     
    3534        }
    3635
    37         setTimeout(poll, 33); // Slightly more than 30hz
     36        // setTimeout(poll, 33); // Slightly more than 30hz
     37        requestAnimationFrame(poll);
    3838    })();
    3939}
Note: See TracChangeset for help on using the changeset viewer.