danoniplus 43.6.2 → 43.6.3

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 43.6.2`;
12
- const g_revisedDate = `2026/01/25`;
11
+ const g_version = `Ver 43.6.3`;
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;
@@ -5177,7 +5177,9 @@ const titleInit = (_initFlg = false) => {
5177
5177
  const setBGMVolume = (_num = 1) => {
5178
5178
  g_settings.bgmVolumeNum = nextPos(g_settings.bgmVolumeNum, _num, g_settings.volumes.length);
5179
5179
  g_stateObj.bgmVolume = g_settings.volumes[g_settings.bgmVolumeNum];
5180
- g_audioForMS.volume = g_stateObj.bgmVolume / 100;
5180
+ if (g_audioForMS) {
5181
+ g_audioForMS.volume = g_stateObj.bgmVolume / 100;
5182
+ }
5181
5183
  btnBgmVolume.textContent = `${g_stateObj.bgmVolume}${g_lblNameObj.percent}`;
5182
5184
  };
5183
5185
 
@@ -5193,7 +5195,6 @@ const titleInit = (_initFlg = false) => {
5193
5195
  createCss2Button(`btnStart`,
5194
5196
  `>`, () => {
5195
5197
  clearTimeout(g_timeoutEvtTitleId);
5196
- pauseBGM();
5197
5198
  g_handler.removeListener(wheelHandler);
5198
5199
  g_keyObj.prevKey = `Dummy${g_settings.musicIdxNum}`;
5199
5200
  g_langStorage.bgmVolume = g_stateObj.bgmVolume;
@@ -5257,7 +5258,9 @@ const titleInit = (_initFlg = false) => {
5257
5258
 
5258
5259
  // 初期表示用 (2秒後に選曲画面を表示)
5259
5260
  if (_initFlg && !g_headerObj.customTitleUse) {
5260
- g_audioForMS.muted = true;
5261
+ if (g_audioForMS) {
5262
+ g_audioForMS.muted = true;
5263
+ }
5261
5264
  const mSelectTitleSprite = createEmptySprite(divRoot, `mSelectTitleSprite`,
5262
5265
  g_windowObj.mSelectTitleSprite, g_cssObj.settings_DifSelector);
5263
5266
  multiAppend(mSelectTitleSprite,
@@ -5276,7 +5279,7 @@ const titleInit = (_initFlg = false) => {
5276
5279
  if (_opacity <= 0) {
5277
5280
  clearTimeout(fadeOpacity);
5278
5281
  mSelectTitleSprite.style.display = C_DIS_NONE;
5279
- if (!g_stateObj.bgmMuteFlg) {
5282
+ if (!g_stateObj.bgmMuteFlg && g_audioForMS) {
5280
5283
  g_audioForMS.muted = false;
5281
5284
  g_audioForMS.currentTime = g_headerObj.musicStarts[g_headerObj.musicIdxList[g_settings.musicIdxNum]] ?? 0;
5282
5285
  if (g_audioForMS instanceof AudioPlayer) {
@@ -6047,6 +6050,7 @@ const setWindowStyle = (_text, _bkColor, _textColor, _align = C_ALIGN_LEFT, { _x
6047
6050
 
6048
6051
  const dataMgtInit = () => {
6049
6052
  clearWindow(true);
6053
+ pauseBGM();
6050
6054
  const prevPage = g_currentPage;
6051
6055
  g_currentPage = `dataMgt`;
6052
6056
  let selectedKey = g_keyObj.currentKey;
@@ -6278,6 +6282,7 @@ const dataMgtInit = () => {
6278
6282
 
6279
6283
  const preconditionInit = () => {
6280
6284
  clearWindow(true);
6285
+ pauseBGM();
6281
6286
  const prevPage = g_currentPage;
6282
6287
  g_currentPage = `precondition`;
6283
6288
 
@@ -6445,6 +6450,7 @@ const makePlayButton = _func => createCss2Button(`btnPlay`, g_lblNameObj.b_play,
6445
6450
  const optionInit = () => {
6446
6451
 
6447
6452
  clearWindow(true);
6453
+ pauseBGM();
6448
6454
  const divRoot = document.getElementById(`divRoot`);
6449
6455
  g_currentPage = `option`;
6450
6456
  g_stateObj.filterKeys = ``;
@@ -9594,7 +9600,7 @@ const changeShuffleConfigColor = (_keyCtrlPtn, _vals, _j = -1) => {
9594
9600
  const loadMusic = () => {
9595
9601
 
9596
9602
  clearWindow(true);
9597
- g_audioForMS.pause();
9603
+ pauseBGM();
9598
9604
  g_currentPage = `loading`;
9599
9605
 
9600
9606
  const musicUrl = getMusicUrl(g_stateObj.scoreId);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "danoniplus",
3
- "version": "43.6.2",
3
+ "version": "43.6.3",
4
4
  "description": "Dancing☆Onigiri (CW Edition) - Web-based Rhythm Game",
5
5
  "main": "./js/danoni_main.js",
6
6
  "scripts": {