diff --git a/plugins/af_zz_vidmute/init.js b/plugins/af_zz_vidmute/init.js new file mode 100644 index 000000000..8968792a0 --- /dev/null +++ b/plugins/af_zz_vidmute/init.js @@ -0,0 +1,25 @@ +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 diff --git a/plugins/af_zz_vidmute/init.php b/plugins/af_zz_vidmute/init.php new file mode 100644 index 000000000..e1da850de --- /dev/null +++ b/plugins/af_zz_vidmute/init.php @@ -0,0 +1,24 @@ +host = $host; + } + + function get_js() { + return file_get_contents(__DIR__ . "/init.js"); + } + + function api_version() { + return 2; + } + +} +?>