Jump to content
Sign in to follow this  
Exit

How to mute flash player ?

Recommended Posts

Exit

I'm using IP-Phone over the soundcard of my PC (PhonerLite) . To do foreign calls with no cost, I use a connecting application ("www.PeterZahlt.de", very handy!).

Sometimes this application plays noisy flashplayer files. This disturbs my conversation. I know freeware tools to mute flashplayer, but I'm looking for a method to mute it in my wrapper application without external programs.

Here is a small code to produce system sound and flash sound concurrently. It is ready to run. Leave it by pressing ESC.

#include <IE.au3>
HotKeySet("{ESC}", "_ESC")
$oIE = _IECreate("http://www.peterzahlt.de/media/as/vp/pzVideo896_504_TV1.swf?contentPath=2009/090428_GELBESEITEN_23SEK_halfpal_F8_512K")
$i = 0
While 1
    SoundPlay(@WindowsDir & "\media\notify.wav", 0)
    $i += 1
    If $i > 7 Then $i = _IEAction($oIE, "refresh") ; restart video, reset $i
    _FlashSound(0) ; mute flash player
    Sleep(2800) ; wait SoundPlay to terminate
WEnd

Func _ESC()
    _FlashSound(1) ;enable flashsound
    _IEQuit($oIE)
    Exit
EndFunc   ;==>_ESC

Func _FlashSound($Sound = 1) ;  0="off" / 1="on"
    If $Sound Then
        ; here the code to enable flashsound. Second priority.
    Else
        ; here the code to mute flashsound. First priority.
    EndIf
EndFunc   ;==>_FlashSound

Can you give me a hint how to code the _FlashSound(0) function ?

Thanks in advance, forumer100. :)

Edited by forumer100

My UDFs, Abbrevs and Snippets
If you like my post, just click the like button :) 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.