diff --git a/MMM-EmbedYoutube.js b/MMM-EmbedYoutube.js index 0870d2a..93e5d9f 100644 --- a/MMM-EmbedYoutube.js +++ b/MMM-EmbedYoutube.js @@ -10,6 +10,7 @@ Module.register("MMM-EmbedYoutube", { defaults: { autoplay: false, + mute: false, cc_load_policy: false, color: "red", controls : true, @@ -41,6 +42,7 @@ Module.register("MMM-EmbedYoutube", { } } params += (this.config.autoplay) ? "autoplay=1" : "autoplay=0"; + params += (this.config.mute) ? "&mute=1" : "&mute=0"; params += (this.config.cc_load_policy) ? "&cc_load_policy=1" : "&cc_load_policy=0"; params += (typeof this.config.color !== "undefined" && this.config.color != "red")? "&color=" + this.config.color:""; params += (this.config.controls)? "&controls=1":"&controls=0"; diff --git a/README.md b/README.md index 7874f40..5e5016d 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,7 @@ The following properties can be configured: | Option | Description | Default Value | Type Data | | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | --------- | | `autoplay` | Autoplay video when it loaded | `false` | Boolean | +| `mute` | Mute video | `false` | Boolean | | `cc_load_policy` | Subtitles/Closed captions enabled automatically | `false` | Boolean | | `color` | Player's video progress bar to highlight the amount of the video that the viewer has already seen but color can be only `red` or `white` | `"red"` | String | | `controls` | Show youtube video controls bar | `true` | Boolean |