Giter Club home page Giter Club logo

Comments (12)

liluxdev avatar liluxdev commented on June 29, 2024

+1. How can i set the destination div?

from bigvideo.js.

johnpolacek avatar johnpolacek commented on June 29, 2024

Currently you can’t. Might add that at some point, but for now I recommend you guys use VideoBG: http://syddev.com/jquery.videoBG/

from bigvideo.js.

liluxdev avatar liluxdev commented on June 29, 2024

Oh. Thanks! That's perfect.

PS. bu then i ask what's the default DOM element in wich BigVideo.js tries to put the video bg? The body? Because i was not able to use it in a yootheme joomla template that with some css rules uses another div as the background, not the body.

from bigvideo.js.

catherineomega avatar catherineomega commented on June 29, 2024

VideoBG isn't quite as fully-featured as I needed, so for anyone who wants to quickly hack this in:

I just replaced $('body') and $(window) with the ID of the div I wanted filled--in my case, $('#block-block-11'). (Thanks Drupal, that's some super semantic block naming.)

To be clear: that's not exactly best practice, and if you want BigVideo to be in any way reusable elsewhere on your site, don't do that, but deadlines are deadlines, right? :)

from bigvideo.js.

thejae avatar thejae commented on June 29, 2024

Seems like it's now possible, there is a container option added by @johnpolacek
https://github.com/dfcb/BigVideo.js/blob/master/lib/bigvideo.js#L-35

Usage example

$(function() {
    BV = new $.BigVideo({useFlashForFirefox:false, container:$('.slider.home')});
    BV.init();
    BV.show('test.mp4', {altSource:'test.ogv', ambient:true});
});

from bigvideo.js.

rickanthony avatar rickanthony commented on June 29, 2024

Has anyone gotten this working successfully? Have an example? The usage example above from @thejae doesn't seem to work for me.

from bigvideo.js.

zillionsk8 avatar zillionsk8 commented on June 29, 2024

It did work for me, using this container:
< div class="video-wrapper" >< /div >
and then:

jQuery(function($) {
    var BV = new $.BigVideo({useFlashForFirefox:false, container:$('.video-wrapper')});
    BV.init();
        if (Modernizr.touch) {
        BV.show('image.jpg');
    } else {
        BV.show('video.mp4',{ambient:true});
    }
});

from bigvideo.js.

rickanthony avatar rickanthony commented on June 29, 2024

@zillionsk8 thanks. Did that allow you to actually contain bigvideo inside your wrapper div, or did it still take up the entire browser window?

Ideally, I want to be able to have a bigvideo.js video at the top of a page as a header but also be able to scroll down and have more content below it, and I haven't yet found a way to accomplish that.

from bigvideo.js.

zillionsk8 avatar zillionsk8 commented on June 29, 2024

Yes, it populated the BigVideo generated content inside that wrapper div but then it takes over the height settings and eats whatever is under, you could control it using something like:

$('#big-video-vid_html5_api').css('height','100px');

or percentage:

$('#big-video-vid_html5_api').css('height','50%');

from bigvideo.js.

rossthedevigner avatar rossthedevigner commented on June 29, 2024

In case anyone has issues using the container option, the negative left margin on #big-video-vid causes an overflow issue during resizing. Placing an overflow:hidden on big-video-wrap solves it.

from bigvideo.js.

 avatar commented on June 29, 2024

This method ( $('#big-video-vid_html5_api').css('height','100px'); ) did not works for me, I used iframe with height: 777px; width: 100% and border:0; and static page with player, attached to body...

from bigvideo.js.

skyyip avatar skyyip commented on June 29, 2024

You need to specify the container of the BigVideo object:
BV = new $.BigVideo({container: $('.video-wrap')});

from bigvideo.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.