no message

This commit is contained in:
Ilya Laktyushin
2018-08-31 00:42:24 +03:00
parent 07fc80ef3a
commit a1b592611d
55 changed files with 2477 additions and 189 deletions

View File

@@ -0,0 +1,26 @@
function initialize() {
var video = document.getElementsByTagName("video")[0];
if (video != null) {
video.setAttribute("webkit-playsinline", "");
video.setAttribute("playsinline", "");
video.webkitExitFullscreen = undefined;
video.play();
}
}
function receiveMessage(evt) {
if ((typeof evt.data) != "string")
return;
try {
var obj = JSON.parse(evt.data);
if (!obj.event || obj.event != "inject")
return;
if (obj.command == "initialize")
initialize();
} catch (ex) { }
}
window.addEventListener("message", receiveMessage, false);