How to play a notification sound on websites?

前端 未结 11 1505
生来不讨喜
生来不讨喜 2020-11-28 01:32

When a certain event occurs, I want my website to play a short notification sound to the user.

The sound should not auto-start (instantly) when the

11条回答
  •  一生所求
    2020-11-28 02:05

    Use the audio.js which is a polyfill for the tag with fallback to flash.

    In general, look at https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-Browser-Polyfills for polyfills to the HTML 5 APIs.. (it includes more polyfills)

提交回复
热议问题