Permalink
Browse files

Merge pull request #36 from jdavid/class

Set class in iframe, to allow override by css
  • Loading branch information...
tamasd committed Feb 11, 2018
2 parents b361421 + d1f49d6 commit fe3a5138d8cbb2915023884c7b110ca1009e8a6c
Showing with 4 additions and 1 deletion.
  1. +4 −1 js/client/embed.js
@@ -84,10 +84,11 @@ function reposition(iframe) {
function fixIFrameSize(iframe) {
iframe.attr("style", "");
const state = iframe.data("state") || "";
const type = iframe.data("type");
let width = "";
let height = "";
switch (iframe.data("type")) {
switch (type) {
case "play":
width = 55;
height = 35;
@@ -140,6 +141,7 @@ function fixIFrameSize(iframe) {
}
iframe
.attr("class", type)
.css("width", width ? width + "px" : "100%")
.css("height", height ? height + "px" : "100%")
.css("z-index", MAXIMUM_ZINDEX-1)
@@ -219,6 +221,7 @@ function onMessageEventHandler(event) {
switch (msg.type) {
case "start":
iframe.attr("class", "start");
iframe
.data("started", true)
.css("position", "fixed")

0 comments on commit fe3a513

Please sign in to comment.