How to control audio by Clipstream Player API

You can mute or set the volume for a Clipstream video using the folllowing Javascript methods.

Mute

Mute the audio stream.

Syntax:

window.clipstream.players[0].setMute(true)

Example:

<a href=""#" onClick="window.clipstream.players[0].setMute(true);">turn off sound</a>

Turn mute off

If silent, turn audio stream on.

Syntax:

window.clipstream.players[0].setMute(false);

Example:

<a href=""#" onClick="window.clipstream.players[0].setMute(false);">turn on sound</a>

Report mute state

Return whether the player is mute or not.

Syntax:

window.clipstream.players[0].getMute()

Example:

<a href=""#" onClick="window.clipstream.players[0].getMute();">Return whether this video is in a muted state</a>

Set the volume (by percentage)

Syntax:

window.clipstream.players[0].setVolume('percentage')

Example:

<a href=""#" onClick="window.clipstream.players[0].setVolume("50%");">Turn down volume by half</a>

Report the volume state

Return the volume state in percentage.

Syntax:

window.clipstream.players[0].getVolume()

Example:

<a href=""#" onClick="window.clipstream.players[0].getVolume();">Return the volume of this video by percentage</a>

 

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk