One of the concepts I discussed in my comment was using multiple backgrounds and gradients, which could even be a 1pixel image. Check out the DEMO for a visual representation.
<div class="cornersOff"><img src="http://lorempixel.com/640/480/cats/1"/></div>
This technique involves CSS styling:
.cornersOff {
position:relative;
display:inline-block; /* or table or float or width or whatever*/
}
.cornersOff img,
/* not an image ? */ .cornersOff > * {
display:block;/* or vertical-align:top for inline-block element*/
}
.cornersOff:before {
content:'';
height:100%;
width:100%;
position:absolute;
border:solid 10px transparent;/* size here tells how far from borders you want to see these new borders drawn */
box-sizing:border-box;/* include that border width */
background:
linear-gradient(to top, rgba(255,255,255,0.8), rgba(255,255,255,0.8)) top center no-repeat ,
linear-gradient(to top, rgba(255,255,255,0.8), rgba(255,255,255,0.8)) bottom no-repeat,
linear-gradient(to top, rgba(255,255,255,0.8), rgba(255,255,255,0.8)) left no-repeat,
linear-gradient(to top, rgba(255,255,255,0.8), rgba(255,255,255,0.8)) right no-repeat;
background-size: 580px 3px,580px 3px , 3px 420px, 3px 420px;
/* it catches the click event ? : uncomment this : *//* pointer-events:none*/
}
The image tag inside can be an iframe, a video tag, or just content.
If you encounter issues with clicking, you can add the rule pointer-events:none;
to .cornersOff:before
so it won't catch the click event.... especially useful if you are setting some opacity on the background-color
.