File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11var Class = require ( '../../utils/Class' ) ;
22var BaseSound = require ( '../BaseSound' ) ;
3+ var SoundValueEvent = require ( '../SoundValueEvent' ) ;
34var HTML5AudioSound = new Class ( {
45 Extends : BaseSound ,
56 initialize : function HTML5AudioSound ( manager , key , config ) {
@@ -87,4 +88,20 @@ var HTML5AudioSound = new Class({
8788 }
8889 }
8990} ) ;
91+ /**
92+ * Mute setting.
93+ *
94+ * @name Phaser.Sound.HTML5AudioSound#mute
95+ * @property {boolean } mute
96+ */
97+ Object . defineProperty ( HTML5AudioSound . prototype , 'mute' , {
98+ get : function ( ) {
99+ return this . currentConfig . mute ;
100+ } ,
101+ set : function ( value ) {
102+ this . currentConfig . mute = value ;
103+ this . setMute ( ) ;
104+ this . events . dispatch ( new SoundValueEvent ( this , 'SOUND_MUTE' , value ) ) ;
105+ }
106+ } ) ;
90107module . exports = HTML5AudioSound ;
You can’t perform that action at this time.
0 commit comments