PlaySoundUtils.ts 470 B

1234567891011121314
  1. // import { Audio } from 'expo-av';
  2. // useMount(async () => {
  3. // const soundObject = new Audio.Sound();
  4. // try {
  5. // await soundObject.loadAsync({
  6. // uri:
  7. // 'https://idingdong.oss-cn-hangzhou.aliyuncs.com/audio/2020-05-29-10-36-10XNheaqCd.mp3'
  8. // });
  9. // await soundObject.playAsync();
  10. // // Your sound is playing!
  11. // } catch (error) {
  12. // // An error occurred!
  13. // }
  14. // });