Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    MPEG to load only if user wants (2002)

    Hi,

    I have a web page for a non-profit children's camp. The user wants a mpeg file on the page, however this makes the page site load slowly. Is there a way to have the mpeg load ONLY if the user clicks a button or link that states they wish to view the video?

    Thanks,
    Leesha

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: MPEG to load only if user wants (2002)

    Probably... How are you inserting the video currently? Do the dialogs give you the options to display controls for the user, and not to "autoplay" or "autostart" the video?

  3. #3
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: MPEG to load only if user wants (2002)

    Hi Leesha

    Code that I have used is like this:

    <object id="MediaPlayer1" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsm p2inf.cab#Version=5,1,52,701"

    standby="Loading Microsoft Windows
    Jerry

  4. #4
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: MPEG to load only if user wants (2002)

    Thank you! I will give this a shot. I've been up to my eyeballs reformatting a friends computer and haven't had a chance to try this out yet but can't wait to give it a shot. I'm sure to post back if I run into problems. :-)

    Leesha

  5. #5
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: MPEG to load only if user wants (2002)

    No probs

    Go here on my website and you can see how it works.
    Jerry

  6. #6
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: MPEG to load only if user wants (2002)

    Hi,

    I finally had a chance to look at your site and start some experimenting. I'm trying to get away from the video appearing as a black screen and am wondering how I would would write the code for the following. if I were to put the company logo over the actual video screen, when the user clicks the logo, its visibile property would be set to not visible and the video would play. I'm new to coding in frontpage, and have only coded in Excel and Access.

    Thanks!
    Leesha

  7. #7
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: MPEG to load only if user wants (2002)

    Hi Leesha

    Here is a starter for 10, I have used layers and it works well in Firefox and behaves slightly different in IE but working!

    I have used CSS, place this code within the head tags

    .film {
    position:relative;
    z-index:2;
    background-repeat: no-repeat;
    }
    .badge {
    position:relative;
    z-index:1;
    background-repeat: no-repeat;
    background-position: center center;
    background-image: url(graphics/logo.gif);
    }


    Then this above the code for the mpeg:

    <div class="film">
    <div class="badge">

    and this below the code for the mpeg

    </div>
    </div>


    There will almost certainly be a javascript/DOM control for this but I think it maybe a bit more difficult...I am sure there will be a few more suggestions around....enjoy
    Jerry

  8. #8
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: MPEG to load only if user wants (2002)

    Coincidentally, I developed an example of something like that. You can see the results here: http://sothai.com/videotest/.

    Caveats: The movies are large because they were distributed on a CD, not optimized for the web, but you can get the idea if you don't mind waiting a minute for the longer ones to buffer. Also, the first one's a bit loud.

  9. #9
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: MPEG to load only if user wants (2002)

    Great, I'll take a look and give the code a try. Question...................is there a recommended max mpeg file size to upload??

  10. #10
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: MPEG to load only if user wants (2002)

    I don't use media very often, so I have no idea what is a reasonable size. I suppose the time to download must not exceed the interest of the person trying to view it...

  11. #11
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: MPEG to load only if user wants (2002)

    In short, No, however think of the end user. We are fast moving to broadband and so size is not as important as it was but the danger of this is there are still people using 56 K modem and consideration should be given to them.

    You could create a shortened version and have a link, "click here for the full version"
    Jerry

  12. #12
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: MPEG to load only if user wants (2002)

    That is a nice piece of code....is there a copyright on it <img src=/S/grin.gif border=0 alt=grin width=15 height=15>.

    I was playing with this CSS:

    <pre><style type="text/css">
    a.hider .normal, a.hider:hover .revealed {
    display:inline;
    }
    a.hider:hover .normal, a.hider .revealed {
    display:none;
    }
    </style></pre>


    and this HTML:

    <pre><a href="#" class="hider">
    <span class="normal">PLACE CODE TO SHOW COMPANY LOGO IN HERE</span>
    <span class="revealed">CODE FOR WMV HERE </span>

    </a></pre>


    Yet untested fully with a WMV though
    Jerry

  13. #13
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: MPEG to load only if user wants (2002)

    Hi Jerry,

    Where in the code do I insert this?

    Thanks,
    Leesha

  14. #14
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: MPEG to load only if user wants (2002)

    Hi

    I copied the first part in between >head and >head and when I preview the text actually shows on the web. This is what I got when I pasted it. Do I edit it to look exactly like yours and then the text won't show?? I'm VERY new to this!

    <html>

    <head>

    <style type="text/css">
    a.hider .normal, a.hider:hover .revealed {
    display:inline;
    }
    a.hider:hover .normal, a.hider .revealed {
    display:none;
    }
    </style>

    </head>


    When I place the second piece into the body, the same thing happens, the text shows but nothing happens.

    Thanks,
    Leesha

  15. #15
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: MPEG to load only if user wants (2002)

    Sorry Leesha, I gave you the code to copy in <post:=635,735>post 635,735</post:>, I don't know how you are getting all these BR tags in there, they are certainly not mine.

    I have loaded this page on my website. View the code and see how it is put together, you will obviously have to change the path names to the image and the video...The answer is there I cannot help you further

    http://magicforest.co.uk/fun/movie.htm
    Jerry

Page 1 of 2 12 LastLast

Posting Permissions

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