Skip to content

Commit 62d08fe

Browse files
committed
📱
1 parent b637a78 commit 62d08fe

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/components/Player/index.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,15 @@ const ABCPlayer = (props: { ABCAccessor: Accessor<string> }) => {
3636
abcjs.synth.playEvent(e.midiPitches, undefined, 1000)
3737
e.midiPitches?.forEach?.(pitch => message(name(pitch)))
3838
},
39+
// oneSvgPerLine: true,
40+
viewportVertical: true,
41+
responsive: "resize",
3942
}
4043
)
4144

4245
try {
4346
const keySignature = visual?.[0]?.getKeySignature?.()
4447
console.info(key(keySignature), keySignature)
45-
// 创建缓存和缓冲要播放的音频的对象
4648
await synth.init({ visualObj: visual[0] })
4749
await synthControl.setTune(visual[0], false, {
4850
chordsOff: true,
@@ -61,7 +63,7 @@ const ABCPlayer = (props: { ABCAccessor: Accessor<string> }) => {
6163
<section class="na-layout overflow-x-hidden overflow-y-auto relative">
6264
<main
6365
ref={staff}
64-
class="na-layout-content flex justify-around overflow-unset!"
66+
class="na-layout-content overflow-unset! min-w-375px" /* 最小是 iPhone SE 寬度 */
6567
/>
6668
<footer ref={paper} class="na-layout-footer bottom-0 sticky" />
6769
</section>

0 commit comments

Comments
 (0)