diff --git a/dist/animated-background.js b/dist/animated-background.js index b56056d..f2dbcb7 100644 --- a/dist/animated-background.js +++ b/dist/animated-background.js @@ -427,6 +427,14 @@ function renderBackgroundHTML() { var html_to_render; if (state_url != "" && Hui) { var bg = Hui.shadowRoot.getElementById("background-iframe"); + var video_type = urlIsVideo(state_url); + var doc_body; + if(video_type){ + doc_body = `` + } + else{ + doc_body = `` + } var source_doc = `
@@ -451,12 +459,21 @@ function renderBackgroundHTML() { left: 50%; transform: translate(-50%, -50%); } + + img { + min-width: 100%; + min-height: 100%; + width: auto; + height: auto; + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + } - - + + ${doc_body} `; if (!bg) { @@ -485,7 +502,6 @@ function renderBackgroundHTML() { Previous_Url = state_url; } else { - html_to_render = `