View Full Version : Embed .WMV Video w/o Controls


mark4man
03-21-2007, 03:43 AM
OK...

I want to embed a 320 X 240 .wmv movie in my band's myspace music page Bio. I used a code entry I found in a tutorial at myspace, which went to the tune of:

<embed name="RAOCXplayer" src="URL Goes Here" type="application/x-mplayer2" width="320" height="302"
ShowStatusBar="1" AutoSize="true" DisplaySize="0"
pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/
Products/MediaPlayer/"></embed>

But the play controls display at the bottom of the Windows Media Player, which flattens the height of the aspect ratio. I removed the height & width attributes from the code (also as suggested)...but that expands the movie to a larger size than 320 X 240; & the height is still a bit flat.

All I want to do is loop my .wmv movie on the page, w/o the stupid controls on the movie player; & have it display at the size I created it at (320 X 240)...much in the same way as a flash movie displays.

Can this be accomplished?

Thanks,

mark4man

Ges
03-21-2007, 05:39 PM
Hi mark4man,
Yes, the <embed...> tag can be a nuisance due to it's poor support across browsers, but it generally works in most cases. I have not tried your code but I notice that you are missing;

CONTROLS=FALSE

Try that.
For some good info about the <embed....> tag take a look at;

http://www.htmlcodetutorial.com/embeddedobjects/_EMBED_WIDTH.html

especially the line where it states;


For movies, try setting HEIGHT to 30 pixels greater than the height of the movie, the WIDTH to just six greater

And remember that you can use percentages ( % ), instead of pixels.
Failing that, have you thought about using a pop-up to display only the parts you need?

Sorry I couldn't have been more helpful but other members may have some better ideas.

Regards,
Ges.

mark4man
03-22-2007, 06:00 PM
Ges...

Thanks...I went w/ 270 on the width; & it's just a little fat (& I'll probably take it down another 4 or 5 pixels.

Anyway, I managed to place the code & the player loads & the movie works & all is well...except for two things.

1) Is there a way to center the player in the table (side to side)? Right now, it's justified full left.

2) I noticed that when the page is scrolled, the player/movie is unstable...bouncing up & down eradically. Is there any way to smooth that out?

(the page is located at: http://www.myspace.com/projectonejams)

Thanks,

mark4man


what's w/ this stupid "No Link" crap, Lissa?...why can't we post links?

Ges
03-22-2007, 09:38 PM
Hi mark4man,
Thanks for the link, I can see the source code now. I used Eric Clapton as a selection to view the content etc, and can see the problem. The tables etc are not aligned properly and therefor are spoiling what looks like a great site with tons of potential ( the music is right up my street!!! ).
However, there are many issues with the code. The editor I use ( HTML-Kit - FREE! ), filters out errors in code. This caused me lots of problems when using my local server etc. I'll refer to that later.
You are using a mixture of <div>'s and <table>'s which can cause problems if not implemented correctly. Here is some code that will poisition the FLASH player ( yes I did notice ), anywhere on the screen by wrapping it around a <div> which in turn uses some CSS <style> to position it. Try this example on it's own to see what I mean.


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
<title>Page title</title>

<style type="text/css">
<!--
.player_position
{
position:absolute;
top:100px;
left:30%;
}
-->
</style>

</head>
<body>

<div class="player_position">

<OBJECT id="mp3player" codeBase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab##version=8,0,0,0"
height="345" width="450" border="0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
VIEWASTEXT>
<PARAM NAME="_cx" VALUE="11906">
<PARAM NAME="_cy" VALUE="9128">
<PARAM NAME="FlashVars" VALUE="">
<PARAM NAME="Movie" VALUE="http://lads.myspace.com/music/musicplayer.swf?n=aHR0cDovL211c2ljLm15c3BhY2UuY29t&t=zrsEqlC3QkZy/wLDz6b87m6XjJkKSUj4KyoV7mRn8+7ffb8jSiKxrlcXwy+21MH +dLTl+M6CQ5kbbPiSoUU03A==&u=LTE=&a=0&d=ODY1NzA1MF4xMTc0NTY3NTU2">
<PARAM NAME="Src" VALUE="http://lads.myspace.com/music/musicplayer.swf?n=aHR0cDovL211c2ljLm15c3BhY2UuY29t&t=28h2hQNModyzwkxT60v2IWYH0auSGgTWH24QmSVHXCaD2CI6 pjKZNaryt9eDbp/crUfSLtzLte6b3ppEnJQEtg==&u=LTE=&a=0&d=ODY1NzA1MF4xMTc0NTY3NTU2">
<PARAM NAME="WMode" VALUE="Window">
<PARAM NAME="Play" VALUE="-1">
<PARAM NAME="Loop" VALUE="-1">
<PARAM NAME="Quality" VALUE="High">
<PARAM NAME="SAlign" VALUE="">
<PARAM NAME="Menu" VALUE="-1">
<PARAM NAME="Base" VALUE="">
<PARAM NAME="AllowScriptAccess" VALUE="always">
<PARAM NAME="Scale" VALUE="ShowAll">
<PARAM NAME="DeviceFont" VALUE="0">
<PARAM NAME="EmbedMovie" VALUE="0">
<PARAM NAME="BGColor" VALUE="FFFFFF">
<PARAM NAME="SWRemote" VALUE="">
<PARAM NAME="MovieData" VALUE="">
<PARAM NAME="SeamlessTabbing" VALUE="1">
<embed src="http://lads.myspace.com/music/musicplayer.swf?n=aHR0cDovL211c2ljLm15c3BhY2UuY29t&t=EHoDLbKpgjK5ynZtoxv193HSn6MrKjIz2ZdXbJfsv1HEIOFG dUS71kUtcHlKBXP1VVwFWVIfTCJJ6iOTyht1aA==&u=LTE=&a=0&d=ODY1NzA1MF4xMTc0NTY3NTU2" quality=high bgcolor=#FFFFFF
width="450" height="345" name="mp3player" align=""
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer"> </embed>
</OBJECT>

</div>

</body>
</html>


By changing the values of 'top' and 'left' in the <style> you can position the player wherever you like.
Addressing the overall code problems:
I put your site code through the w3schools validator and, as I expected, it returned many many errors. Things like unterminated tags ( </tables> missing etc ). This is making the code difficult to understand and change properly.
So, before you do anything else go to the validator and run your site through it;

http://www.w3schools.com/site/site_validate.asp

Next, enter the URL of the page ( where it says Validate your HTML files with W3C ), ie;

http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=8657050


and then you will see what I mean. Don't panic about the number of errors returned as w3c standards are extremely tight and most sites do not yet comply ( mainly because most would have to re-write!! ). Just go through the code step by step correcting the tags and putting the <style>'s in the <head> section etc. Then you can apply the positioning of your tables in an easier way - as you will have far more control over them.

Well. I'm sorry I could'nt have been more helpful at this stage but the site looks great and very user friendly. Let me know how you get on.

Regards,
Ges.

Ges
03-22-2007, 09:50 PM
Hi,
I was busy replying and missed that last post;
what's w/ this stupid "No Link" crap, Lissa?...why can't we post links?
Were you having a problem as I was able to use the link you provided?
Regards,
Ges.

Note from moderator:
Of course you can post links. "No link" is something that's displayed to users who aren't logged in with a member account — i.e., guests — in place of the actual links. You shouldn't see it if you are properly logged in. It's possible that your session timed out before trying to view a link.

Please try to address problems with the forums and their operation via PM or e-mail to the forum leaders (http://www.lissaexplains.com/forum/showgroups.php) instead of cluttering help threads. Also, please try to remember that this is primarily a kids forum, so tone down the language a little.

mark4man
03-23-2007, 12:36 AM
Mr. Moderator...

Will do...sorry...that was it, incidentally...I hadn't logged in.

Ges...

Thanks for everything...but please realize...myspace actually writes the code. What they do is permit musical acts to customize their page by placing code in the Bio section. They even re-write the customized code (when necessary, I guess)...for example...when I entered the following code in my Bio (for the Windows Media Player):

<embed name="RAOCXplayer" src="http://www.moonjams.com/P1.wmv" type="application/x-mplayer2" width="320" height="270"
ShowStatusBar="1" AutoSize="true" DisplaySize="0" showcontrols="0" controller="false" loop="true" pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/
Products/MediaPlayer/"></embed>

It was automatically revised to this, by myspace:

<object enableJSURL="false" enableHREF="false" saveEmbedTags="true" allowScriptAccess="never" allownetworking="internal" type="application/x-mplayer2" classid="6BF52A52-394A-11d3-B153-00C04F79FAA6" height="270" width="320">
<param name="fileName" value="http://www.moonjams.com/P1.wmv" />
<param name="URL" value="http://www.moonjams.com/P1.wmv" />
<param name="src" value="http://www.moonjams.com/P1.wmv" />
<param name="allownetworking" value="internal" />
<param name="allowScriptAccess" value="never" />
<param name="enableJSURL" value="false" />
<param name="enableHREF" value="false" />
<param name="saveEmbedTags" value="true" />
<param name="showstatusbar" value="1" />
<param name="autosize" value="true" />
<param name="showcontrols" value="0" />
</object>

So, having said this...how should I go about validating my code? Do you think I should maybe copy just my Bio section...place that on a test page on my test server; & validate that...would that work (& would that help?)

Thanks again,

mark4man

Ges
03-23-2007, 12:48 PM
Hi mark4man,
Thanks for that info as I am not really that familiar with MySpace. They provide - I gather - a good and useful service to lots of people so it's not my intention to be critical of them in any way whatsoever.
However, yes - go ahead and seperate out your code and place it into a file on the server and then validate it. It's a useful debugging tool ( naughty naughty but why not? ha ha ha! ), and helps especially when dealing with cross-browser problems, ie if it validates then it 'should' work on all browsers hmmmmm!

Anyway, there is a 'quick fix' to get the tables anywhere you like on the screen by treating each one as a totally seperate object. You simply wrap them in <div>'s with a bit of CSS style glued on! Messy but like I say it is only a quick fix. So, taking the above code you would simply do this;


<div style="position:absolute; top:100px; left:60%;">

<object enableJSURL="false" enableHREF="false" saveEmbedTags="true" allowScriptAccess="never" allownetworking="internal" type="application/x-mplayer2" classid="6BF52A52-394A-11d3-B153-00C04F79FAA6" height="270" width="320">
<param name="fileName" value="http://www.moonjams.com/P1.wmv" />
<param name="URL" value="http://www.moonjams.com/P1.wmv" />
<param name="src" value="http://www.moonjams.com/P1.wmv" />
<param name="allownetworking" value="internal" />
<param name="allowScriptAccess" value="never" />
<param name="enableJSURL" value="false" />
<param name="enableHREF" value="false" />
<param name="saveEmbedTags" value="true" />
<param name="showstatusbar" value="1" />
<param name="autosize" value="true" />
<param name="showcontrols" value="0" />
</object>

</div>



Try this on its own and play around with the positioning.
If you go down that route you will have fun/headaches getting them in the right place but at least you are in full control of them.

Let me know how the validation goes.

Regards,
Ges.

mark4man
03-23-2007, 09:17 PM
Ges...

I know this is getting complicated...& I know you've wasted far too much time on me already, which I'm beginning to feel guilty over...but I plugged in yer code; & once I got the player to a suitable location, it was still unstable.

So...to uncomplicated things...I went to the musical site of one of my friends, Gary Husband, who has a model myspace site. He also has a dynamic slide show happening; & his is extremely stable.

So...if you would please go take a look at his; & if we can figure out how he accomplished his movie stability, that's what I'll do (I believe it's a flash movie...an .swf...don't know if that's the key, but...):

http://profile.myspace.com/garyhusband

Anyway...also...thanks for the compliments a few posts back...forgot to thank you for those.

Thanks again,

mark4man

Ges
03-24-2007, 12:00 AM
Hi mark4man,
No you are not wasting any time - that's what the forum is for!! - so don't be feeling guilty!
Now, addressing the instability.
I can see this happening and have actually seen this problem before on various sites. At this stage I have isolated the player in order to eliminate all other code. I have then 'wrapped' some images around it in order to force some scrolling. Lo and behold it exhibits the same problem! I have been using a local Apache Server ( running under Windows ), so I decided to upload your whole site and some test code ( as my site runs under Apache LINUX ), but I still get the same problem. You can try them for yourself at;

http://www.flowersineden.co.uk/mark4/mark.html

and a simple test of the player at;

http://www.flowersineden.co.uk/mark4/mark_video.html

the latter one being the player surrounded by 2 large images ( to force scrolling ).
I'll leave them there for a few hours.

The coclusion at this time is that the player itself is causing the problem. Unfortunately I do not have enough in-depth knowledge of the player but all is not lost! I have emailed a few friends of mine who actually work in real-time embedded media ( iPods software etc ), to see what they think. As I'm in the UK the time is now 11pm at night so I don't expect an answer straight away but I will post here ASAP.

In the meantime maybe some of the members have experienced this 'dithering' problem when scrolling and it would be nice if they could share their thoughts etc.

Sorry I could'nt have been more helpfull right now but I will post my friends answers as soon as I get them.

Regards for now,
Ges.