推送器通知声音在 Chrome 浏览器中不起作用

The pusher notification sound is not working in the Chrome browser

推送器通知声音在 Chrome 浏览器中不起作用。 我知道 order play() 策略已经改变了。但是如何绕过它并使用通知声音?? 我正在使用 Laravel 7 Pictures of chrome browser error

Here is my Vue js code

<script>
export default {
  props: ["dataAuthUser"],
  data() {
    return {
      unreadNotifications: "",
      //   readNotifications: "",
      user: JSON.parse(this.dataAuthUser),
      alart: new Audio("/alert/alert.mp3"),
    };
  },
  created() {
    axios
      .get("/admin/vue-notify")
      .then((res) => {
        // console.log(res);
        this.unreadNotifications = res.data.unreadNotifications;
        // this.readNotifications = res.data.readNotifications;
        // this.playSound();
      })
      .catch((err) => {});
    console.error(err);
  },
  mounted() {
    Echo.private("App.User." + this.user.id).notification((notification) => {
      this.unreadNotifications.unshift(notification);
      return this.alart.play();
    });
  },
  methods: {},
  watch: {},
};
</script>


    

我觉得这个方法对你有帮助。First of all click the site information tab of your specific site

then go to the site settings and allow the Sound of that site