Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Micorosoft Edge places video at the top left of the screen in vegas slideshow #96

Open
danb235 opened this issue Oct 14, 2015 · 7 comments

Comments

@danb235
Copy link

danb235 commented Oct 14, 2015

With Microsoft Edge photos load fine just as they do in other browsers.

Videos however appear to not resize with the window and instead load on the top left corner with their original dimensions. In other browsers the video fills the entire window. Here is an example (the vegas element has 100% width and height):

vegas_video_edge

@danb235
Copy link
Author

danb235 commented Oct 14, 2015

Here is a screenshot with Google Chrome on the same Windows 10 machine:

vegas_video_chrome

@danb235 danb235 changed the title Micorosft Edge places video at the top left of the screen in vegas slideshow Micorosoft Edge places video at the top left of the screen in vegas slideshow Oct 14, 2015
@jaysalvat
Copy link
Owner

Hello.

It seems IE Edge has a hard time with full-width / height video.

I'm on MAC, so I can't really work on it.
Help needed.

Some clues:

CSS:
https://github.com/jaysalvat/vegas/blob/master/src/vegas.css#L50-L55

JS:
https://github.com/jaysalvat/vegas/blob/master/src/vegas.js#L397-L407

Thanks!

@tcastelli
Copy link

+1, this only happens when you stick vegas inside other elements and not direcly to body(otherwise it works fine). Any luck trying to solve it @tkdan235 ?

btw just by checking the result of the video tag inserted i can see that no csss i attached at all (not even width:100% and height:100%)

<video class="vegas-video" style="background-color: rgb(255, 255, 255);" preload="true">
<source src="./assets/video/small.mp4">
<source src="./assets/video/small.webm">
<source src="./assets/video/small.ogv">
</video>

Update: I couldn't solve it no matter how, so for now this was the best approach

tjq.vegas.isVideoCompatible = function () {
    var devices = /(Android|webOS|Phone|iPad|iPod|BlackBerry|Windows Phone|Edge)/i;
    return !devices.test(navigator.userAgent);

@danb235
Copy link
Author

danb235 commented Oct 28, 2015

I played with it for a bit, but haven't had any luck. This is definitely something funny with Edge... I have bigger fish to fry at the moment but will come back to this.

I did the same thing btw, I detect if the browser is running edge then just disable video.

@jaysalvat
Copy link
Owner

@tkdan235 Thanks for your help.

FYI, Vegas has a method to check if the browser has to display video backgrounds or not on some devices. Overwrite it with the Edge information added somewhere.

$.vegas.isVideoCompatible = function () {
    var devices = /(Android|webOS|Phone|iPad|iPod|BlackBerry|Windows Phone|Edge)/i;
    return !devices.test(navigator.userAgent);
}

This way, your video backgrounds will be ignored by Vegas on Edge.

@shrmnk
Copy link

shrmnk commented Jan 29, 2016

Note sure if this will help, but there is a website (not on Vegas) that has fullscreen videos working on Edge. http://gentlebones.com

This block of CSS was what he uses:

.theatre {
    position:absolute;
    overflow:hidden;
    width:100%;
    height:100%;
    background:#000;
}

.theatre video {
    position:absolute;
    display:block;
    min-width:100%;
    min-height:100%;
    opacity:.8;
}

.dragslider.switch-min .theatre video {
    height:100%;
}

@jaysalvat
Copy link
Owner

Hey ! Thanks @shrmnk !

Does somebody can make some changes and tests in the vegas css and test the whole thing on Edge and check if nothing is broken for other browsers.
https://github.com/jaysalvat/vegas/blob/master/src/vegas.css#L50

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants