danoniplus 41.4.14 → 41.4.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/js/danoni_main.js +15 -9
  2. package/package.json +1 -1
package/js/danoni_main.js CHANGED
@@ -4,12 +4,12 @@
4
4
  *
5
5
  * Source by tickle
6
6
  * Created : 2018/10/08
7
- * Revised : 2026/01/25
7
+ * Revised : 2026/01/26
8
8
  *
9
9
  * https://github.com/cwtickle/danoniplus
10
10
  */
11
- const g_version = `Ver 41.4.14`;
12
- const g_revisedDate = `2026/01/25`;
11
+ const g_version = `Ver 41.4.15`;
12
+ const g_revisedDate = `2026/01/26`;
13
13
 
14
14
  // カスタム用バージョン (danoni_custom.js 等で指定可)
15
15
  let g_localVersion = ``;
@@ -223,7 +223,7 @@ const g_wordObj = {
223
223
 
224
224
  // オーディオ設定・タイマー管理
225
225
  let g_audio = new Audio();
226
- let g_audioForMS = new Audio();
226
+ let g_audioForMS = null;
227
227
  let g_timeoutEvtId = 0;
228
228
  let g_timeoutEvtTitleId = 0;
229
229
  let g_timeoutEvtResultId = 0;
@@ -5060,7 +5060,9 @@ const titleInit = (_initFlg = false) => {
5060
5060
  const setBGMVolume = (_num = 1) => {
5061
5061
  g_settings.bgmVolumeNum = nextPos(g_settings.bgmVolumeNum, _num, g_settings.volumes.length);
5062
5062
  g_stateObj.bgmVolume = g_settings.volumes[g_settings.bgmVolumeNum];
5063
- g_audioForMS.volume = g_stateObj.bgmVolume / 100;
5063
+ if (g_audioForMS) {
5064
+ g_audioForMS.volume = g_stateObj.bgmVolume / 100;
5065
+ }
5064
5066
  btnBgmVolume.textContent = `${g_stateObj.bgmVolume}${g_lblNameObj.percent}`;
5065
5067
  };
5066
5068
 
@@ -5076,7 +5078,6 @@ const titleInit = (_initFlg = false) => {
5076
5078
  createCss2Button(`btnStart`,
5077
5079
  `>`, () => {
5078
5080
  clearTimeout(g_timeoutEvtTitleId);
5079
- pauseBGM();
5080
5081
  g_handler.removeListener(wheelHandler);
5081
5082
  g_keyObj.prevKey = `Dummy${g_settings.musicIdxNum}`;
5082
5083
  g_langStorage.bgmVolume = g_stateObj.bgmVolume;
@@ -5137,7 +5138,9 @@ const titleInit = (_initFlg = false) => {
5137
5138
 
5138
5139
  // 初期表示用 (2秒後に選曲画面を表示)
5139
5140
  if (_initFlg && !g_headerObj.customTitleUse) {
5140
- g_audioForMS.muted = true;
5141
+ if (g_audioForMS) {
5142
+ g_audioForMS.muted = true;
5143
+ }
5141
5144
  const mSelectTitleSprite = createEmptySprite(divRoot, `mSelectTitleSprite`,
5142
5145
  g_windowObj.mSelectTitleSprite, g_cssObj.settings_DifSelector);
5143
5146
  multiAppend(mSelectTitleSprite,
@@ -5156,7 +5159,7 @@ const titleInit = (_initFlg = false) => {
5156
5159
  if (_opacity <= 0) {
5157
5160
  clearTimeout(fadeOpacity);
5158
5161
  mSelectTitleSprite.style.display = C_DIS_NONE;
5159
- if (!g_stateObj.bgmMuteFlg) {
5162
+ if (!g_stateObj.bgmMuteFlg && g_audioForMS) {
5160
5163
  g_audioForMS.muted = false;
5161
5164
  g_audioForMS.currentTime = g_headerObj.musicStarts[g_headerObj.musicIdxList[g_settings.musicIdxNum]] ?? 0;
5162
5165
  if (g_audioForMS instanceof AudioPlayer) {
@@ -5923,6 +5926,7 @@ const setWindowStyle = (_text, _bkColor, _textColor, _align = C_ALIGN_LEFT, { _x
5923
5926
 
5924
5927
  const dataMgtInit = () => {
5925
5928
  clearWindow(true);
5929
+ pauseBGM();
5926
5930
  const prevPage = g_currentPage;
5927
5931
  g_currentPage = `dataMgt`;
5928
5932
  let selectedKey = g_keyObj.currentKey;
@@ -6154,6 +6158,7 @@ const dataMgtInit = () => {
6154
6158
 
6155
6159
  const preconditionInit = () => {
6156
6160
  clearWindow(true);
6161
+ pauseBGM();
6157
6162
  const prevPage = g_currentPage;
6158
6163
  g_currentPage = `precondition`;
6159
6164
 
@@ -6321,6 +6326,7 @@ const makePlayButton = _func => createCss2Button(`btnPlay`, g_lblNameObj.b_play,
6321
6326
  const optionInit = () => {
6322
6327
 
6323
6328
  clearWindow(true);
6329
+ pauseBGM();
6324
6330
  const divRoot = document.getElementById(`divRoot`);
6325
6331
  g_currentPage = `option`;
6326
6332
  g_stateObj.filterKeys = ``;
@@ -9341,7 +9347,7 @@ const changeShuffleConfigColor = (_keyCtrlPtn, _vals, _j = -1) => {
9341
9347
  const loadMusic = () => {
9342
9348
 
9343
9349
  clearWindow(true);
9344
- g_audioForMS.pause();
9350
+ pauseBGM();
9345
9351
  g_currentPage = `loading`;
9346
9352
 
9347
9353
  const musicUrl = getMusicUrl(g_stateObj.scoreId);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "danoniplus",
3
- "version": "41.4.14",
3
+ "version": "41.4.15",
4
4
  "description": "Dancing☆Onigiri (CW Edition) - Web-based Rhythm Game",
5
5
  "main": "./js/danoni_main.js",
6
6
  "scripts": {