--- /dev/null
+require(['dojo/_base/kernel', 'dojo/ready'], function (dojo, ready) {
+ ready(function () {
+ PluginHost.register(PluginHost.HOOK_ARTICLE_RENDERED_CDM, function (row) {
+ if (row) {
+
+ row.select("video").each(function (v) {
+ v.setAttribute("muted", true);
+ });
+ }
+
+ return true;
+ });
+
+ PluginHost.register(PluginHost.HOOK_ARTICLE_RENDERED, function (row) {
+ if (row) {
+
+ row.select("video").each(function (v) {
+ v.setAttribute("muted", true);
+ });
+ }
+
+ return true;
+ });
+ });
+});
\ No newline at end of file
--- /dev/null
+<?php
+class Af_Zz_VidMute extends Plugin {
+ private $host;
+
+ function about() {
+ return array(1.0,
+ "Mute audio in HTML5 videos",
+ "fox");
+ }
+
+ function init($host) {
+ $this->host = $host;
+ }
+
+ function get_js() {
+ return file_get_contents(__DIR__ . "/init.js");
+ }
+
+ function api_version() {
+ return 2;
+ }
+
+}
+?>