forked from I2P_Developers/i2p.i2p
i2psnark: Limit max size of embedded video
This commit is contained in:
@ -3439,14 +3439,14 @@ public class I2PSnarkServlet extends BasicServlet {
|
|||||||
if (isAudio)
|
if (isAudio)
|
||||||
buf.append("<audio");
|
buf.append("<audio");
|
||||||
else
|
else
|
||||||
buf.append("<video");
|
buf.append("<div class=\"video-wrapper\"><video class=\"video\"");
|
||||||
// strip trailing slash
|
// strip trailing slash
|
||||||
String path = base.substring(0, base.length() - 1);
|
String path = base.substring(0, base.length() - 1);
|
||||||
buf.append(" controls><source src=\"").append(path).append("\" type=\"").append(mime).append("\">");
|
buf.append(" controls><source src=\"").append(path).append("\" type=\"").append(mime).append("\">");
|
||||||
if (isAudio)
|
if (isAudio)
|
||||||
buf.append("</audio>");
|
buf.append("</audio>");
|
||||||
else
|
else
|
||||||
buf.append("</video>");
|
buf.append("</video></div>");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (er || ec)
|
if (er || ec)
|
||||||
@ -3659,7 +3659,7 @@ public class I2PSnarkServlet extends BasicServlet {
|
|||||||
if (isAudio)
|
if (isAudio)
|
||||||
buf.append("<audio");
|
buf.append("<audio");
|
||||||
else
|
else
|
||||||
buf.append("<video");
|
buf.append("<div class=\"video-wrapper\"><video class=\"video\"");
|
||||||
buf.append(" controls><source src=\"").append(ppath).append("\" type=\"").append(mime).append("\">");
|
buf.append(" controls><source src=\"").append(ppath).append("\" type=\"").append(mime).append("\">");
|
||||||
}
|
}
|
||||||
buf.append("<a href=\"").append(ppath).append("\">");
|
buf.append("<a href=\"").append(ppath).append("\">");
|
||||||
@ -3673,7 +3673,7 @@ public class I2PSnarkServlet extends BasicServlet {
|
|||||||
if (isAudio)
|
if (isAudio)
|
||||||
buf.append("</audio>");
|
buf.append("</audio>");
|
||||||
else if (isVideo)
|
else if (isVideo)
|
||||||
buf.append("</video>");
|
buf.append("</video></div>");
|
||||||
} else {
|
} else {
|
||||||
buf.append(toImg(icon));
|
buf.append(toImg(icon));
|
||||||
}
|
}
|
||||||
|
@ -3108,6 +3108,16 @@ th.snarkTorrentStatus a img, .snarkTorrentETA a img, .snarkTrackerDetails a img,
|
|||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.video-wrapper {
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.video {
|
||||||
|
max-height: 95vh;
|
||||||
|
max-width: 80vw;
|
||||||
|
}
|
||||||
|
|
||||||
th a img {
|
th a img {
|
||||||
max-height: 16px !important;
|
max-height: 16px !important;
|
||||||
}
|
}
|
||||||
|
@ -2671,6 +2671,16 @@ a, a:link, th, td, button, input, select, textarea {
|
|||||||
margin-right: 3px;
|
margin-right: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.video-wrapper {
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.video {
|
||||||
|
max-height: 95vh;
|
||||||
|
max-width: 80vw;
|
||||||
|
}
|
||||||
|
|
||||||
.info_tracker {
|
.info_tracker {
|
||||||
margin: 0 4px 0 2px;
|
margin: 0 4px 0 2px;
|
||||||
padding: 1px 6px 1px 18px;
|
padding: 1px 6px 1px 18px;
|
||||||
|
@ -818,6 +818,16 @@ _:-ms-lang(x), .snarkTorrents tbody tr:hover, .snarkDirInfo tbody tr:hover {
|
|||||||
margin-right: 3px;
|
margin-right: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.video-wrapper {
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.video {
|
||||||
|
max-height: 95vh;
|
||||||
|
max-width: 80vw;
|
||||||
|
}
|
||||||
|
|
||||||
#infohash {
|
#infohash {
|
||||||
-moz-user-select: all;
|
-moz-user-select: all;
|
||||||
-webkit-user-select: all;
|
-webkit-user-select: all;
|
||||||
|
@ -3153,6 +3153,16 @@ th.snarkTorrentStatus a img, .snarkTorrentETA a img, .snarkTrackerDetails a img
|
|||||||
padding-bottom: 8px;
|
padding-bottom: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.video-wrapper {
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.video {
|
||||||
|
max-height: 95vh;
|
||||||
|
max-width: 80vw;
|
||||||
|
}
|
||||||
|
|
||||||
.snarkFileStatus {
|
.snarkFileStatus {
|
||||||
font-size: 0;
|
font-size: 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
Reference in New Issue
Block a user