質問編集履歴
3
cssコードの追記を記載した
title
CHANGED
File without changes
|
body
CHANGED
@@ -80,6 +80,7 @@
|
|
80
80
|
}
|
81
81
|
}
|
82
82
|
```
|
83
|
+
### 2021/4/12に追記したソースコード
|
83
84
|
```css
|
84
85
|
.canvas-wrapper {
|
85
86
|
position: relative;
|
2
サンプル音sample.mp3をダウンロードして使用するように変更。ソースコードcssを追記。
title
CHANGED
File without changes
|
body
CHANGED
@@ -62,7 +62,7 @@
|
|
62
62
|
img = createCapture(VIDEO);
|
63
63
|
img.hide();
|
64
64
|
img.size(windowWidth, windowHeight);
|
65
|
-
song = loadSound('
|
65
|
+
song = loadSound('button01a.mp3');
|
66
66
|
}
|
67
67
|
|
68
68
|
function draw() {
|
@@ -80,6 +80,16 @@
|
|
80
80
|
}
|
81
81
|
}
|
82
82
|
```
|
83
|
+
```css
|
84
|
+
.canvas-wrapper {
|
85
|
+
position: relative;
|
86
|
+
}
|
87
|
+
.canvas-wrapper canvas {
|
88
|
+
position: absolute;
|
89
|
+
bottom: 0;
|
90
|
+
left: 0;
|
91
|
+
}
|
92
|
+
```
|
83
93
|
|
84
94
|
### sample.mp3はこちらの無料効果音を借りています
|
85
95
|
|
1
cwi様からのアドバイスで試したことを追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -94,4 +94,8 @@
|
|
94
94
|
それでも音は連続しているため、重なって鳴っているのではないということを確認できました。
|
95
95
|
song.stop();をいろいろな箇所に入れて試しましたが、音がループがされます。
|
96
96
|
|
97
|
-
ご教授の程、宜しくお願い致します。
|
97
|
+
ご教授の程、宜しくお願い致します。
|
98
|
+
|
99
|
+
|
100
|
+
cwi様からのアドバイスで
|
101
|
+
.play();直下にconsole.log(Date.now());を入れましたが、ひっきりなしに音が再生されています。
|