Skip to content

Loading…

video tag breaks textbox #369

Closed
zivelli opened this Issue · 4 comments

2 participants

@zivelli

Hi,

Currently when I place an image or video within a text box, the text box breaks.
Is there a workaround for this?

Thnxs

@odrobnik
@zivelli

Apologies for the cryptic bug report.

I am currently trying to include a video within a p block, where the block has a background style applied to it.

Like this

HTML_CODE

Unfortunately the background colour breaks when the video view is rendered. I hope this is clearer.

@odrobnik

Firstly: your way of specifying the padding is not correct. It's missing the px.

So my example looks like this:

<html>
    <head>
    <body>
        <p style="background-color:#aabbcc;padding:10px 10px 10px 10px;"> Some text here<br/>
        <video width="320" height="240" src="http://shapeshed.com/examples/HTML5-video-element/video/320x240.m4v" loop="loop" x-webkit-airplay="allow" controls="controls">
            Your browser doesn't support the video tag. You can <a href="http://shapeshed.com/examples/HTML5-video-element/video/320x240.m4v">download the video here.</a>
        </video>
        <br/>
        Some more text
        </p>
    </body>
</html>

This results in this display:

Screen Shot 2013-04-02 at 16 29 44

I take it that you see the same and your question really is, how you can get the video to stay inside the bounds of the box, including the padding.

There is no dynamic sizing yet. So you would have to specify the correct display size of the video DTTextAttachment.

Maybe some day, we can implement dynamic sizing of text attachment custom views based on the current available space. I'll leave this issue open as known issue since this is a great use case for when we will implement this.

@zivelli

Unfortunately no, I don't see the same.

video_break

I will do some more investigating to see if I can isolate the problem.

Thankyou for pointing out the correct way to specify padding, although that line was copied from the Demo App Snippets, Text Boxes example.

@odrobnik odrobnik closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.