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