www.webdeveloper.com
Results 1 to 13 of 13

Thread: WMP - Can I stop video from automatically downloading?

Hybrid View

  1. #1
    Join Date
    Apr 2008
    Posts
    11

    WMP - Can I stop video from automatically downloading?

    Good evening all,

    I'm using Windows Media Player to play video on my website. Each user's profile can have 25 mb worth of video. When their profile gets loaded, all of the videos are displayed and doing such, downloads them all. As you can see, this could seriously degrade the performance by causing heavy traffic.

    I'm using the class for v7+. I couldn't find a list for the available parameters for that version. I found an earlier one http://www.w3schools.com/media/media_playerref.asp but didn't see anything I'm looking for.

    Am I better off creating a link that opens each video in a separate browser window so they're dowloaded one at a time? I would really like if I could have it download the video only when the user clicks on it exactly like YouTube.

    Kind regards,
    John

  2. #2
    Join Date
    Feb 2008
    Location
    NW Washington State
    Posts
    1,856
    I’m not exactly sure of the layout of your page but do you mean that you have several Media Players going on the same page at the same time? And are they all set to:
    <param name="autostart" value="true" />
    That is, start to play as soon as the page loads?
    If that is the case, there are a couple things I would suggest. First:
    <param name="autostart" value="false" />
    Have the user click the play button for the video they want to watch.
    Second, put each viewer on a separate page to avoid have several players going at the same time.
    Third, consider using a playlist which allows the user to choose one video out of a list. Then when a second one is selected, the first one stops. This can be done with an xml file in Flash players and I’m pretty sure the same can be accomplished with the Windows Media Player.
    Here’s an example of using a playlist:
    http://www.lynnjohnson.citradingcard...eo_player.html
    Here’s an example of separate pages used to hold each persons interview:
    http://www.citradingcards.com/w_ski/.../team_usa.html
    The pages do not open in a separate browser window, but open in the parent window (_blank or _parent). That is if you want people to stay on your site.
    If you wanted a small pop-up to display their profile, you could use a small window something like this:
    http://www.olymarine.com/
    Then scroll down to the Hydroplane races. When clicked, a small pop-up window will display the video while the main site is still visible in the background. That way viewers are not taken away from your site. This was done using a small snippet of JavaScript.

    Good luck,
    Eye for Video
    www.cidigitalmedia.com

  3. #3
    Join Date
    Apr 2008
    Posts
    11
    Hi mate,

    Sorry for the delay. Been very hectic around here lately.

    The layout of the page will basically have a table that displays:
    video1
    video2
    video3

    All are Windows Media players. My <param name="autostart" value="true" /> value is set to false. Which works fine, they don't automatically play but they still download.

    Thanks greatly for the links! Going to have a browse through them and see what my best option is. I'm leaning towards the JS one, sounds well smart

    Kind regards,
    J

  4. #4
    Join Date
    Feb 2008
    Location
    NW Washington State
    Posts
    1,856
    If you “turn off” autostart, your files should not be downloading. If they are…there is a problem. Be sure that you also change the <embed> parameters.
    Here’s an example of the code used for a typical Windows Media Player. It includes both an <object> tag for Internet Explorer and an <embed> tag for Firefox. Both need to be set to “false”.

    <object classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer/" name="win_media_player" width="320" height="310" hspace="0" vspace="0" title="movie">
    <param name="fileName" value="videos/06_SSM_Lighter_Side.wmv" />
    <param name="autostart" value="false" />
    <param name="showstatusbar" value="true" />
    <param name="PlayCount" value="5" />
    <embed src="../../../web development/videos/06_SSM_Lighter_Side.wmv" width="320" height="310" hspace="0" vspace="0" autostart="false" filename="videos/06_SSM_Lighter_Side.wmv" name="win_media_player" playcount="5"></embed>
    </object>

    The file "videos/06_SSM_Lighter_Side.wmv" does not start to download until you click the play button.
    Best wishes,
    Eye for Video
    www.cidigitalmedia.com

  5. #5
    Join Date
    Apr 2008
    Posts
    11
    Quote Originally Posted by Eye for Video
    If you “turn off” autostart, your files should not be downloading. If they are…there is a problem. Be sure that you also change the <embed> parameters.
    Here’s an example of the code used for a typical Windows Media Player. It includes both an <object> tag for Internet Explorer and an <embed> tag for Firefox. Both need to be set to “false”.

    <object classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer/" name="win_media_player" width="320" height="310" hspace="0" vspace="0" title="movie">
    <param name="fileName" value="videos/06_SSM_Lighter_Side.wmv" />
    <param name="autostart" value="false" />
    <param name="showstatusbar" value="true" />
    <param name="PlayCount" value="5" />
    <embed src="../../../web development/videos/06_SSM_Lighter_Side.wmv" width="320" height="310" hspace="0" vspace="0" autostart="false" filename="videos/06_SSM_Lighter_Side.wmv" name="win_media_player" playcount="5"></embed>
    </object>

    The file "videos/06_SSM_Lighter_Side.wmv" does not start to download until you click the play button.
    Best wishes,
    Eye for Video
    www.cidigitalmedia.com
    Hi mate,

    Cheers for that! One question, in your initial reference to the video file within the Embed tag, you've got '../../../web development/videos/06_SSM_Lighter_Side.wmv' but other references to the file have got /videos/06_SSM_Lighter_Side.wmv. Just curious

    Cheers,
    J

  6. #6
    Join Date
    Feb 2008
    Location
    NW Washington State
    Posts
    1,856
    Sorry for the confusion. I had a number of videos set up at "videos/06_SSM_Lighter_Side.wmv, and then pulled one for some testing to see if they download even if the autostart is set to false. I did this at "../../../web development/videos/06_SSM_Lighter_Side.wmv" And then a gremlin snuck in and put them together in the same code.....ahhhh..or somethin' like that.
    Thanks for pointing that out. The correct address would be just one or the other, not two different addresses.
    Thanks for noticing,
    Eye for Video
    www.cidigitalmedia.com

  7. #7
    Join Date
    Apr 2008
    Posts
    11
    Hi mate,

    No worries. Heh, I hear ya. I seem to have a lot of gremlins within my code

    Thanks again for all of your input.

    Kind regards,
    John

  8. #8
    Join Date
    Feb 2008
    Location
    NW Washington State
    Posts
    1,856
    Hi mate,
    Sounds like you just might be from "Down Under"?? Or am I from "Down Under" to you??
    I'd love to travel and visit around the world sometime... especially..."Down Under".
    Well, lets see, there must be some technical reason for this ... I guess. After all, our coding is not just for the sake of coding but rather to be the invisible bridge to another end, right?
    Ok, here is a few videos I created for a few profiles... I guess you could say.
    http://www.citradingcards.com/w_ski/...australia.html
    In '06 the World Championships were here in Washington state. In '09, they will be in New Zealand... that's sort of close isn't it?
    Eye for Video
    www.cidigitalmedia.com

  9. #9
    Join Date
    Feb 2006
    Posts
    90
    Down Under also been called the Lucky Country !

  10. #10
    Join Date
    Apr 2008
    Posts
    11
    Quote Originally Posted by Eye for Video
    Hi mate,
    Sounds like you just might be from "Down Under"?? Or am I from "Down Under" to you??
    I'd love to travel and visit around the world sometime... especially..."Down Under".
    Well, lets see, there must be some technical reason for this ... I guess. After all, our coding is not just for the sake of coding but rather to be the invisible bridge to another end, right?
    Ok, here is a few videos I created for a few profiles... I guess you could say.
    http://www.citradingcards.com/w_ski/...australia.html
    In '06 the World Championships were here in Washington state. In '09, they will be in New Zealand... that's sort of close isn't it?
    Eye for Video
    www.cidigitalmedia.com
    Hi mate,

    Heh, I'm from London. We've addopted 'no worries' into our dialect the past few years. It's perhaps due to the influx of Aussies we've got living over here. Do visit the place. It's absolutely brilliant! I've been a few times and Melbourne is by far the funkiest city I've ever been to (aside from New York of course). There's a really good vibe there.

    Can I pick your brains mate? I'm looking at some other code I've stumbled upon and it's basically down to the FF v IE. The embeded scr tag works a treat. But, I've got:

    <OBJECT id="VIDEO" width="400" height="225"
    style="position:absolute; center:50px;top:51px;"
    CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
    type="application/x-oleobject">

    <PARAM NAME="URL" VALUE="6728-10_EngTraining2.wmv">
    <PARAM NAME="SendPlayStateChangeEvents" VALUE="True">
    <PARAM NAME="AutoStart" VALUE="True">
    <PARAM name="uiMode" value="none">
    <PARAM name="PlayCount" value="1">
    </OBJECT>

    Based on the above, there's no reference to windows media player. Is it using windows media player to display the video?

    Kind regards,
    John

  11. #11
    Join Date
    Apr 2008
    Posts
    11
    Hi mate,

    Sorry but need to adjust my question slightly. I added the embed scr tag and for some reason, it's not playing within the telly as is if I leave it out. My website is grassroots.bosman.co.uk so....

    print '<OBJECT id="VIDEO" width="400" height="225" ';
    print 'style="position:absolute; center:50px;top:51px;"';
    print 'CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"';
    print 'type="application/x-oleobject">';

    print '<PARAM NAME="URL" VALUE="6728-10_EngTraining2.wmv"> ';
    print '<PARAM NAME="SendPlayStateChangeEvents" VALUE="True">';
    print '<PARAM NAME="AutoStart" VALUE="True">';
    print '<PARAM name="uiMode" value="none">';
    print '<PARAM name="PlayCount" value="1">';
    print '</OBJECT>';

    The above works fine. But as per my inital problem, it won't play under firefox.

    But if i ad:
    print '<OBJECT id="VIDEO" width="400" height="225" ';
    print 'style="position:absolute; center:50px;top:51px;"';
    print 'CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"';
    print 'type="application/x-oleobject">';

    print '<PARAM NAME="URL" VALUE="6728-10_EngTraining2.wmv"> ';
    print '<PARAM NAME="SendPlayStateChangeEvents" VALUE="True">';
    print '<PARAM NAME="AutoStart" VALUE="True">';
    print '<PARAM name="uiMode" value="none">';
    print '<PARAM name="PlayCount" value="1">';
    print '<embed src="6728-10_EngTraining2.wmv" width="320" height="310" hspace="0" vspace="0" autostart="false" filename="6728-10_EngTraining2.wmv" playcount="5"></embed>';
    print '</OBJECT>';

    The embed src brings a window up exactly like a windows media player which I don't want. Do you know how I can make it appear within the player as the code currently is (without the embed src).

    Kind regards,
    John

  12. #12
    Join Date
    Feb 2008
    Location
    NW Washington State
    Posts
    1,856
    The line that sets the type of player comes from the classid:
    'CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6
    Here's a little info on that:
    http://www.w3schools.com/media/media_playerref.asp
    The w3schools list both the <object> and <embed> as supported by IE and Netscape but as far as I know, the <embed> is always required for Firefox.
    http://www.w3schools.com/media/media_browservideos.asp
    The classid number for the Flash Player is:
    clsid27CDB6E-AE6D-11cf-96B8-444553540000
    More info at:
    http://www.wimpyplayer.com/support/f...ompliance.html
    Lookin' forward to some travel,
    Eye for Video
    www.cidigitalmedia.com

  13. #13
    Join Date
    Feb 2008
    Location
    NW Washington State
    Posts
    1,856
    OOppps, a smiley face shows up where there should be
    D27CDB6E-AE6D-11cf-96B8-444553540000

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles