chip-player-js icon indicating copy to clipboard operation
chip-player-js copied to clipboard

Repeat one not working for local files

Open whc2001 opened this issue 2 years ago • 2 comments

The repeate one function works fine for the built-in online library. However when I open a local file by drag-and-drop, the file is closed instead of rewinded after playing once. Is this designed behaviour?

whc2001 avatar Feb 27 '24 08:02 whc2001

It seems like repeat one function is based on the directory context:

https://github.com/mmontag/chip-player-js/blob/ca5ff5d0d835d8a428f5f2d08d8b842153f6ab20/src/Sequencer.js#L134-L137

https://github.com/mmontag/chip-player-js/blob/ca5ff5d0d835d8a428f5f2d08d8b842153f6ab20/src/Sequencer.js#L116-L118

However, when opening local file, there is no context to say:

https://github.com/mmontag/chip-player-js/blob/ca5ff5d0d835d8a428f5f2d08d8b842153f6ab20/src/Sequencer.js#L235-L238

I'd like to try to fix, but I can't figure out how to run this project locally.

whc2001 avatar Feb 27 '24 21:02 whc2001

the issue here is that with drag and drop files they literally vanish when they reach the end, and thus they can't repeat.

zaphod77 avatar Mar 15 '24 15:03 zaphod77