This StreamElements custom widget visualizes the outcome of a random distribution (e.g. a coin toss).
Special thanks to Benno, Reboot0 and GodGid85.
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.
-
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 betweenheadsandtails. For instance, if the edge-case probability is set to33.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.