Skip to content

Commit 676d787

Browse files
committed
disable test for audio-player
1 parent b4b76fb commit 676d787

9 files changed

Lines changed: 15 additions & 69 deletions

File tree

__html__/audio-player.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ <h1>Audio-player Component</h1>
2626
data-loop-icon="<span class='mif-loop2'></span>"
2727
data-play-icon="<span class='mif-play'></span>"
2828
data-stop-icon="<span class='mif-stop'></span>"
29-
data-src="song-1.mp3"
29+
data-src="./data/song-1.mp3"
3030
></audio>
3131
</div>
3232
<div class="dark-side mt-4">
3333
<audio data-role="audio-player"
3434
data-loop-icon="<span class='mif-loop2'></span>"
3535
data-play-icon="<span class='mif-play'></span>"
3636
data-stop-icon="<span class='mif-stop'></span>"
37-
data-src="song-1.mp3"
37+
data-src="./data/song-1.mp3"
3838
></audio>
3939
</div>
4040
</div>

__tests__/audio-player.test.js

Lines changed: 0 additions & 17 deletions
This file was deleted.

lib/metro.all.js

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝
99

1010
* Metro UI v5.1.3 Components Library (https://metroui.org.ua)
11-
* Build: 15.05.2025, 20:59:16
11+
* Build: 17.05.2025, 13:20:41
1212
* Copyright 2012-2025 by Serhii Pimenov
1313
* Licensed under MIT
1414
*/
@@ -11314,7 +11314,7 @@
1131411314
(($6) => {
1131511315
"use strict";
1131611316
globalThis["__version__"] = "5.1.3";
11317-
globalThis["__build_time__"] = "15.05.2025, 20:59:16";
11317+
globalThis["__build_time__"] = "17.05.2025, 13:20:41";
1131811318
const meta_init = $6.meta("metro:init").attr("content");
1131911319
const meta_cloak = $6.meta("metro:cloak").attr("content");
1132011320
const meta_cloak_duration = $6.meta("metro:cloak_duration").attr("content");
@@ -11515,7 +11515,7 @@
1151511515
const normalizeComponentName = (name2) => typeof name2 !== "string" ? void 0 : name2.replace(/-/g, "").toLowerCase();
1151611516
const Metro2 = {
1151711517
version: "5.1.3",
11518-
build_time: "15.05.2025, 20:59:16",
11518+
build_time: "17.05.2025, 13:20:41",
1151911519
buildNumber: 0,
1152011520
isTouchable: isTouch3,
1152111521
fullScreenEnabled: document.fullscreenEnabled,
@@ -16584,7 +16584,6 @@
1658416584
Metro2.Component("audio-player", {
1658516585
init: function(options, elem) {
1658616586
this._super(elem, options, AudioPlayerDefaultConfig, {
16587-
preloader: null,
1658816587
player: null,
1658916588
audio: elem,
1659016589
stream: null,
@@ -16644,19 +16643,12 @@
1664416643
const controls = $6("<div>").addClass("controls").addClass(o2.clsControls).insertAfter(element2);
1664516644
const stream = $6("<div>").addClass("stream").appendTo(controls);
1664616645
const streamSlider = $6("<input>").addClass("stream-slider ultra-thin cycle-marker").appendTo(stream);
16647-
const preloader = $6("<div>").addClass("load-audio").appendTo(stream);
1664816646
const volume = $6("<div>").addClass("volume").appendTo(controls);
1664916647
const volumeSlider = $6("<input>").addClass("volume-slider ultra-thin cycle-marker").appendTo(volume);
1665016648
const infoBox = $6("<div>").addClass("info-box").appendTo(controls);
1665116649
if (o2.showInfo !== true) {
1665216650
infoBox.hide();
1665316651
}
16654-
preloader.activity({
16655-
type: "metro",
16656-
style: "color"
16657-
});
16658-
preloader.hide(0);
16659-
this.preloader = preloader;
1666016652
Metro2.makePlugin(streamSlider, "slider", {
1666116653
clsMarker: "bg-dark-cyan",
1666216654
clsHint: "bg-cyan fg-white",
@@ -16723,7 +16715,6 @@
1672316715
const audio = this.elem;
1672416716
const player = this.player;
1672516717
element2.on("loadstart", () => {
16726-
this.preloader.fadeIn();
1672716718
});
1672816719
element2.on("loadedmetadata", () => {
1672916720
this.duration = audio.duration.toFixed(0);
@@ -16732,7 +16723,6 @@
1673216723
});
1673316724
element2.on("canplay", () => {
1673416725
this._setBuffer();
16735-
this.preloader.fadeOut();
1673616726
});
1673716727
element2.on("progress", () => {
1673816728
this._setBuffer();
@@ -16744,7 +16734,6 @@
1674416734
Metro2.utils.exec(o2.onTime, [audio.currentTime, this.duration, audio, player], element2[0]);
1674516735
});
1674616736
element2.on("waiting", () => {
16747-
this.preloader.fadeIn();
1674816737
});
1674916738
element2.on("loadeddata", () => {
1675016739
});

lib/metro.all.js.map

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/metro.js

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝
99

1010
* Metro UI v5.1.3 Components Library (https://metroui.org.ua)
11-
* Build: 15.05.2025, 20:59:16
11+
* Build: 17.05.2025, 13:20:41
1212
* Copyright 2012-2025 by Serhii Pimenov
1313
* Licensed under MIT
1414
*/
@@ -11314,7 +11314,7 @@
1131411314
(($6) => {
1131511315
"use strict";
1131611316
globalThis["__version__"] = "5.1.3";
11317-
globalThis["__build_time__"] = "15.05.2025, 20:59:16";
11317+
globalThis["__build_time__"] = "17.05.2025, 13:20:41";
1131811318
const meta_init = $6.meta("metro:init").attr("content");
1131911319
const meta_cloak = $6.meta("metro:cloak").attr("content");
1132011320
const meta_cloak_duration = $6.meta("metro:cloak_duration").attr("content");
@@ -11515,7 +11515,7 @@
1151511515
const normalizeComponentName = (name2) => typeof name2 !== "string" ? void 0 : name2.replace(/-/g, "").toLowerCase();
1151611516
const Metro2 = {
1151711517
version: "5.1.3",
11518-
build_time: "15.05.2025, 20:59:16",
11518+
build_time: "17.05.2025, 13:20:41",
1151911519
buildNumber: 0,
1152011520
isTouchable: isTouch3,
1152111521
fullScreenEnabled: document.fullscreenEnabled,
@@ -16584,7 +16584,6 @@
1658416584
Metro2.Component("audio-player", {
1658516585
init: function(options, elem) {
1658616586
this._super(elem, options, AudioPlayerDefaultConfig, {
16587-
preloader: null,
1658816587
player: null,
1658916588
audio: elem,
1659016589
stream: null,
@@ -16644,19 +16643,12 @@
1664416643
const controls = $6("<div>").addClass("controls").addClass(o2.clsControls).insertAfter(element2);
1664516644
const stream = $6("<div>").addClass("stream").appendTo(controls);
1664616645
const streamSlider = $6("<input>").addClass("stream-slider ultra-thin cycle-marker").appendTo(stream);
16647-
const preloader = $6("<div>").addClass("load-audio").appendTo(stream);
1664816646
const volume = $6("<div>").addClass("volume").appendTo(controls);
1664916647
const volumeSlider = $6("<input>").addClass("volume-slider ultra-thin cycle-marker").appendTo(volume);
1665016648
const infoBox = $6("<div>").addClass("info-box").appendTo(controls);
1665116649
if (o2.showInfo !== true) {
1665216650
infoBox.hide();
1665316651
}
16654-
preloader.activity({
16655-
type: "metro",
16656-
style: "color"
16657-
});
16658-
preloader.hide(0);
16659-
this.preloader = preloader;
1666016652
Metro2.makePlugin(streamSlider, "slider", {
1666116653
clsMarker: "bg-dark-cyan",
1666216654
clsHint: "bg-cyan fg-white",
@@ -16723,7 +16715,6 @@
1672316715
const audio = this.elem;
1672416716
const player = this.player;
1672516717
element2.on("loadstart", () => {
16726-
this.preloader.fadeIn();
1672716718
});
1672816719
element2.on("loadedmetadata", () => {
1672916720
this.duration = audio.duration.toFixed(0);
@@ -16732,7 +16723,6 @@
1673216723
});
1673316724
element2.on("canplay", () => {
1673416725
this._setBuffer();
16735-
this.preloader.fadeOut();
1673616726
});
1673716727
element2.on("progress", () => {
1673816728
this._setBuffer();
@@ -16744,7 +16734,6 @@
1674416734
Metro2.utils.exec(o2.onTime, [audio.currentTime, this.duration, audio, player], element2[0]);
1674516735
});
1674616736
element2.on("waiting", () => {
16747-
this.preloader.fadeIn();
1674816737
});
1674916738
element2.on("loadeddata", () => {
1675016739
});

lib/metro.js.map

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"dev": "npm run clean && cross-env NODE_NO_WARNINGS=1 MODE=development node build.js",
3636
"pub": "npm publish --access public",
3737
"test": "latte --dom --progress=dots",
38+
"test:trace": "latte --dom --progress=dots --show-stack --verbose",
3839
"check": "npx @biomejs/biome check --write ./source",
3940
"commit": "node -e \"const mssg = process.argv[1]; require('child_process').execSync('npm run build && git add . && git commit -m \\\"' + mssg + '\\\"', { stdio:[0, 1, 2] })\""
4041
},

source/components/audio-player/audio-player.js

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@
6868
Metro.Component("audio-player", {
6969
init: function (options, elem) {
7070
this._super(elem, options, AudioPlayerDefaultConfig, {
71-
preloader: null,
7271
player: null,
7372
audio: elem,
7473
stream: null,
@@ -150,7 +149,6 @@
150149

151150
const stream = $("<div>").addClass("stream").appendTo(controls);
152151
const streamSlider = $("<input>").addClass("stream-slider ultra-thin cycle-marker").appendTo(stream);
153-
const preloader = $("<div>").addClass("load-audio").appendTo(stream);
154152

155153
const volume = $("<div>").addClass("volume").appendTo(controls);
156154
const volumeSlider = $("<input>").addClass("volume-slider ultra-thin cycle-marker").appendTo(volume);
@@ -161,15 +159,6 @@
161159
infoBox.hide();
162160
}
163161

164-
preloader.activity({
165-
type: "metro",
166-
style: "color",
167-
});
168-
169-
preloader.hide(0);
170-
171-
this.preloader = preloader;
172-
173162
Metro.makePlugin(streamSlider, "slider", {
174163
clsMarker: "bg-dark-cyan",
175164
clsHint: "bg-cyan fg-white",
@@ -251,9 +240,7 @@
251240
const audio = this.elem;
252241
const player = this.player;
253242

254-
element.on("loadstart", () => {
255-
this.preloader.fadeIn();
256-
});
243+
element.on("loadstart", () => {});
257244

258245
element.on("loadedmetadata", () => {
259246
this.duration = audio.duration.toFixed(0);
@@ -263,7 +250,6 @@
263250

264251
element.on("canplay", () => {
265252
this._setBuffer();
266-
this.preloader.fadeOut();
267253
});
268254

269255
element.on("progress", () => {
@@ -277,9 +263,7 @@
277263
Metro.utils.exec(o.onTime, [audio.currentTime, this.duration, audio, player], element[0]);
278264
});
279265

280-
element.on("waiting", () => {
281-
this.preloader.fadeIn();
282-
});
266+
element.on("waiting", () => {});
283267

284268
element.on("loadeddata", () => {});
285269

0 commit comments

Comments
 (0)