Use plain Audio API, drop Howler dependency
This commit is contained in:
parent
f5fdb2aeb0
commit
aaa8998466
@ -16,7 +16,6 @@
|
|||||||
"@babel/polyfill": "^7.0.0",
|
"@babel/polyfill": "^7.0.0",
|
||||||
"file-saver": "^1.3.8",
|
"file-saver": "^1.3.8",
|
||||||
"gps-to-gpx": "git://github.com/phyks/gps-to-gpx.git#2c9da24ca98ecd520ee75276714d4df337696475",
|
"gps-to-gpx": "git://github.com/phyks/gps-to-gpx.git#2c9da24ca98ecd520ee75276714d4df337696475",
|
||||||
"howler": "^2.0.15",
|
|
||||||
"material-icons": "^0.2.3",
|
"material-icons": "^0.2.3",
|
||||||
"nosleep.js": "^0.7.0",
|
"nosleep.js": "^0.7.0",
|
||||||
"ol": "^5.1.3",
|
"ol": "^5.1.3",
|
||||||
|
@ -49,8 +49,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { Howl } from 'howler';
|
|
||||||
|
|
||||||
import { REPORT_TYPES, REPORT_ALARM_VIBRATION_SEQUENCE } from '@/constants';
|
import { REPORT_TYPES, REPORT_ALARM_VIBRATION_SEQUENCE } from '@/constants';
|
||||||
import { distanceInWordsToNow } from '@/tools/date';
|
import { distanceInWordsToNow } from '@/tools/date';
|
||||||
import beepSound from '@/assets/beep.mp3';
|
import beepSound from '@/assets/beep.mp3';
|
||||||
@ -77,12 +75,8 @@ export default {
|
|||||||
Object.keys(REPORT_TYPES).forEach((type) => {
|
Object.keys(REPORT_TYPES).forEach((type) => {
|
||||||
icons[type] = REPORT_TYPES[type].image;
|
icons[type] = REPORT_TYPES[type].image;
|
||||||
});
|
});
|
||||||
const onplayerror = () => this.beepAudio.once('unlock', () => this.beepAudio.play());
|
|
||||||
return {
|
return {
|
||||||
beepAudio: new Howl({
|
beepAudio: new Audio(beepSound),
|
||||||
src: [beepSound],
|
|
||||||
onplayerror,
|
|
||||||
}),
|
|
||||||
icons,
|
icons,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user