Skip to content

AFoeee/coin-toss-se-widget

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coin Toss

This StreamElements custom widget visualizes the outcome of a random distribution (e.g. a coin toss).

Special thanks to Benno, Reboot0 and GodGid85.

Description of operation:

The widget comes with multiple video pools (one per possible outcome).
When the associated command has been detected in chat, a random pool is picked and from that a random video is played.

The number of videos in a pool does not affect the probability.

See also this demonstration video.

New features:

  • An optional third outcome has been added to account for the possibility that the coin lands on its edge.
    Its probability can be specified as a percentage, and the remaining probability is evenly split between heads and tails. For instance, if the edge-case probability is set to 33.33%, then all 3 outcomes are equally likely.

    This feature is disabled by default.

  • If an outcome doesn't have any associated videos, an error message is now shown.

  • Since a recent OBS update seems to enforce autoplay restrictions more strictly, videos with audio may fail to play automatically in a Browser Source if the user hasn’t interacted yet.
    In that case, the video will now play muted.

  • The instructions for adding additional outcomes were removed from the README as this became more difficult with this version.

    If you need more than 3 outcome options, I would suggest using the previous version.

Used libraries: