+29
-4
lines changedFilter options
+29
-4
lines changed Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@ describe('H5AudioControls', () => {
8
8
window.HTMLMediaElement.prototype.load = () => {
9
9
/* do nothing */
10
10
};
11
+
// eslint-disable-next-line func-names
11
12
window.HTMLMediaElement.prototype.play = function() {
12
13
Object.defineProperty(this, 'paused', {
13
14
configurable: true,
@@ -16,6 +17,7 @@ describe('H5AudioControls', () => {
16
17
}
17
18
});
18
19
};
20
+
// eslint-disable-next-line func-names
19
21
window.HTMLMediaElement.prototype.pause = function() {
20
22
Object.defineProperty(this, 'paused', {
21
23
configurable: true,
@@ -52,4 +54,18 @@ describe('H5AudioControls', () => {
52
54
vm.pause();
53
55
expect(vm.isPlaying()).toBe(false);
54
56
});
57
+
58
+
it('h5AudioControls watch test', (done) => {
59
+
wrapper.setProps({
60
+
src: 'https://www.xxx.com/bar.mp3',
61
+
position: 'left-top',
62
+
buttonSize: '16vw',
63
+
iconSize: '10vw',
64
+
playIcon: 'https://www.xxx.com/playIcon.svg',
65
+
pauseIcon: 'https://www.xxx.com/pauseIcon.svg',
66
+
autoPlay: false
67
+
});
68
+
69
+
setTimeout(done, 500);
70
+
});
55
71
});
Original file line number Diff line number Diff line change
@@ -40,7 +40,7 @@
40
40
"access": "public"
41
41
},
42
42
"dependencies": {
43
-
"@cycjimmy/h5-audio-controls": "^3.2.1"
43
+
"@cycjimmy/h5-audio-controls": "^3.3.0"
44
44
},
45
45
"devDependencies": {
46
46
"@babel/core": "^7.7.2",
Original file line number Diff line number Diff line change
@@ -48,6 +48,15 @@ export default {
48
48
},
49
49
iconSize(val) {
50
50
this.h5AudioControls.changeIconSize(val);
51
+
},
52
+
playIcon(val) {
53
+
this.h5AudioControls.change('playIcon', val);
54
+
},
55
+
pauseIcon(val) {
56
+
this.h5AudioControls.change('pauseIcon', val);
57
+
},
58
+
autoPlay(val) {
59
+
this.h5AudioControls.change('autoPlay', val);
51
60
}
52
61
},
53
62
mounted() {
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4