Muting a video using JavaScript and the CFMEDIAPLAYER tag in ColdFusion

Readability

Muting a video using JavaScript and the CFMEDIAPLAYER tag in ColdFusion

The fol­low­ing exam­ple shows how you can dynam­i­cally mute a video using the <CFME­DI­APLAYER> tag at run­time using JavaScript and Cold­Fu­sion by call­ing the ColdFusion.Mediaplayer.setMute() function.

And the out­put of the <CFME­DI­APLAYER> tag is as fol­lows:

The following example shows how you can dynamically mute a video using the <CFMEDIAPLAYER> tag at runtime using JavaScript and ColdFusion by calling the ColdFusion.Mediaplayer.setMute() function.

<div style="background-color:#EEEEEE; padding:5px;">
    <input type="button"
            value="setMute(true)"
            onclick="ColdFusion.Mediaplayer.setMute('flvPlayer', true);" />
    <input type="button"
            value="setMute(false)"
            onclick="ColdFusion.Mediaplayer.setMute('flvPlayer', false);" />
</div>
 
<cfmediaplayer name="flvPlayer"
        source="http://helpexamples.com/flash/video/caption_video.flv"
        autoPlay="false" />

And the output of the <CFMEDIAPLAYER> tag is as follows:

Leave a Reply

Your email address will not be published.