summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/init.js b/init.js
index 4a31399..18733dc 100644
--- a/init.js
+++ b/init.js
@@ -1,14 +1,14 @@
require(['dojo/_base/kernel', 'dojo/ready'], function (dojo, ready) {
ready(function () {
- Event.observe(window, "focus", function() {
- $$("video").forEach((vid) => {
+ window.addEventListener("focus", function() {
+ App.findAll("video").forEach((vid) => {
if (vid.getAttribute("autoplay") == 1 && vid.paused)
vid.play();
})
});
- Event.observe(window, "blur", function() {
- $$("video").forEach((vid) => {
+ window.addEventListener("blur", function() {
+ App.findAll("video").forEach((vid) => {
if (vid.getAttribute("autoplay") == 1 && !vid.paused)
vid.pause();
})