I'm using the flash version of FlowPlayer and I need to allow users to toggle the sound of the player when they click on a button in the page.

I've read the documentation about the API and the function should be:

mute([flag])

But I can't understand how to call it within a jQuery on() function...

有帮助吗?

解决方案

The documentation link in your question is actually to the HTML5 player and not the Flash player. The ability to mute a video from a custom button is still available in the Flash version and the API docs can be found here - flowplayer JavaScript API

mute() is a method available on the player, and also unmute() and can be used like this:

Usage

$f('player').mute();
$f('player').unmute();
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top