Welcome to TalkGraphics.com
Results 1 to 10 of 31

Hybrid View

  1. #1

    Default Re: Make Video Stretch to Width of Webpage

    Quote Originally Posted by Initiostar View Post
    Your original video I suspect was not 1920 x 1080, but a custom export subsequently re-exported to a standard HD 1920 x 1080 video. Cropping just gets it back to where it probably started and smaller in size.

    Correct > changing "fixed" to "absolute" will have the video scroll up and back in line with the page content; I have added a comment on my demo about using an opaque or transparent page cover when using "fixed" > for some designs you can use this approach to create a parallax effect with a fixed position video.

    Updated: > https://initiostar.co.uk/demo/banner-vid/
    Sorry for the late answer.
    Everything is working great with your model, it's exactly what I wanted.
    If I may, I have another question. As your code is in the header of the page, I would like to know if it can conflict with the Analytics code, which should be in the header of the page too, if I'm not mistaken.
    I used your code in the placeholder and it worked, but the mobile variant doesn't behave as it should.
    Ultimately I'll make a still photo for the variant or use another placeholder, but since I got here with all the help I'm tempted to go a little further.

  2. #2
    Join Date
    Apr 2018
    Location
    Barnes, London
    Posts
    953

    Default Re: Make Video Stretch to Width of Webpage

    Quote Originally Posted by Verissimo View Post
    Sorry for the late answer.
    Everything is working great with your model, it's exactly what I wanted.
    [1] If I may, I have another question. As your code is in the header of the page, I would like to know if it can conflict with the Analytics code, which should be in the header of the page too, if I'm not mistaken.
    [2] I used your code in the placeholder and it worked, but the mobile variant doesn't behave as it should.

    Ultimately I'll make a still photo for the variant or use another placeholder, but since I got here with all the help I'm tempted to go a little further.
    [1] This should be OK, but best to test.

    [2] There should only be a placeholder in the mobile variant, not the desktop variant. This is my test site: https://initiostar.co.uk/demo/banner-vid/ (different video using fixed not absolute, but absolute would invoke a scroll). The mobile code can be seen when you squeeze the browser; it uses a simple video tag which should be in a mobile variant placeholder. You can as you suggest just use an image, but the video should work too.

    I'm sure we can get it to work.
    Gary
    www.initiostar.co.uk


    Xara Designer Pro+ and Xara Designer Pro X 19.0.1.65946 DL x64 Feb 7 2023

  3. #3

    Default Re: Make Video Stretch to Width of Webpage

    Quote Originally Posted by Initiostar View Post
    [1] This should be OK, but best to test.

    [2] There should only be a placeholder in the mobile variant, not the desktop variant. This is my test site: https://initiostar.co.uk/demo/banner-vid/ (different video using fixed not absolute, but absolute would invoke a scroll). The mobile code can be seen when you squeeze the browser; it uses a simple video tag which should be in a mobile variant placeholder. You can as you suggest just use an image, but the video should work too.

    I'm sure we can get it to work.
    In fact, your solution works greatl, the reason I used the code in the placeholder is so as not to interfere with the Analytics code, and this is the case where the behavior is not as expected because I changed it without knowing what I'm doing, Sorry if I explained myself badly before, but like you said, I'll try.

    Thank you again

 

 

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •