globals.js 658 B

12345678910111213141516171819202122232425262728293031
  1. //let playingData;
  2. // List of values indexed by 1/100 of milliseconds.
  3. // Faster to retreieve because array access is O(1).
  4. //let timedPlayingData = [];
  5. let globalState = new StateManager();
  6. globalState.init('clips', []);
  7. globalState.init('playingClip', null);
  8. globalState.init('playbackTime', 0);
  9. globalState.init('previewClip', null);
  10. globalState.init('playing', false);
  11. globalState.init('transcript', null);
  12. /*
  13. globalState.init('windowSize', {
  14. height: window.innerHeight,
  15. width: window.innerWidth
  16. })
  17. window.addEventListener('resize', evt => {
  18. globalState.set('windowSize', {
  19. height: window.innerHeight,
  20. width: window.innerWidth
  21. })
  22. });
  23. */