473,320 Members | 2,112 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Embedding video files

KeredDrahcir
426 256MB
I would like to be able to embed video files into my webpage. The code I'm using at the present is this:
Expand|Select|Wrap|Line Numbers
  1. <p style="text-align: center;"><object width="325px" height="280px" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112" standby="Loading Windows Media Player components..." type="application/x-oleobject" classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95">
  2. <param name="FileName" value="http://www.mysite.co.uk/myvideo.wmv" />
  3. <param name="autostart" value="true" />
  4. <param name="ShowDisplay" value="false" />
  5. <param name="ShowControls" value="true" />
  6. <param name="ShowStatusBar" value="false" /><embed width="325px" height="280px" src="http://www.mysite.co.uk/myvideo.wmv" pluginspage="http://www.microsoft.com/windows/windowsmedia/download/" type="application/x-mplayer2"></embed></object></p>
Unfortunately, the code does not validate, and although it works on most of the browsers I've tested it on, even IE, it doesn't working on Safari for the iPhone.

Is there a way to get it to validate while working across multiple browsers and is there a way to get it to work on the iPhone (even if that stops it validating)?
Jul 25 '11 #1
13 2566
Dormilich
8,658 Expert Mod 8TB
can the iPhone play WMV files?
Jul 25 '11 #2
KeredDrahcir
426 256MB
Good point. Can you suggest a format? I know some website to play video files but I'm not sure how to find out what format the files are in.
Jul 25 '11 #3
Dormilich
8,658 Expert Mod 8TB
check the source code for the files.

if I remember right, iPhone can play H.264 encoded mpeg (see HTML5 <video> discussion and which platform supports what)
Jul 25 '11 #4
KeredDrahcir
426 256MB
Thanks. If there any way to embed videos and still get the code to validate accroting the W3Cs using XHTML and CSS2?
Jul 25 '11 #5
Dormilich
8,658 Expert Mod 8TB
only if you leave out IE.

btw. when your page displays in IE, you don’t have XHTML.
Jul 25 '11 #6
KeredDrahcir
426 256MB
I'm quite happy to leave out IE. I'd rather it validate in REAl browsers.
Are you sure about XHTML not working in IE. When I srarted to code my pages in XHTNML Version 1.0 rather than HTML Version 4.x I noticed a difference.
Jul 25 '11 #7
Dormilich
8,658 Expert Mod 8TB
Are you sure about XHTML not working in IE
absolutely. if you serve your document with the XHTML MIME type "application/xhtml+xml", IE will prompt for a download. if you serve your document with the MIME type "text/html" the browsers will use their HTML parser and not their XML parser (the check is simple, make an XML error (e.g. don’t quote an attribute value) if the page still displays, you have the HTML parser working).

besides that, there is a reason why XHTML 2.0 was cancelled.

side note: HTML5 also has its X(HT)ML version (XHTML5). the key difference is:
- no DTD (the HTML5 DTD can’t be used for validation, only for triggering standards mode)
- the MIME type "application/xhtml+xml"
Jul 25 '11 #8
KeredDrahcir
426 256MB
I'm don't know much about MINE types. I usually just specify XHTML in the DTD.

I only mentioned XHTML because I seem to remember that HTML 4 prefered empty <br> tags while XHTML requires you to close then (<br/>)
Jul 25 '11 #9
Dormilich
8,658 Expert Mod 8TB
the MIME type always overrides what is specified in the DTD. and "text/html" is the default MIME type on all web servers I know.

I only mentioned XHTML because I seem to remember that HTML 4 prefered empty <br> tags while XHTML requires you to close then (<br/>)
let me put it this way, if you really have XHTML, you’ll be prompted for every little error.
Jul 25 '11 #10
KeredDrahcir
426 256MB
Okay.

Is there anyway to get the video embed code to validate using and XHTML DTD?
Jul 25 '11 #11
KeredDrahcir
426 256MB
I changed the file format to mp4 and found it works on the iPhone or at least to a degree but it still doesn't work on an HGC phone because it doesn't seem to have Quick Time plugins.
It's been suggested the I try avi which I'll try. Am I right in thinking that avi files are quite large?
Is there any way I can validate this?
Jul 27 '11 #12
Dormilich
8,658 Expert Mod 8TB
Am I right in thinking that avi files are quite large?
no. the size of a file format is determined by a great many of factors (movie length, resolution, video & audio quality, etc.)

beside that AVI is only a container format (like MKV and OGG), it’s not an audio/video encoding.
Jul 27 '11 #13
KeredDrahcir
426 256MB
The validator doesn't seem to like height, width or src attributes in the embed. Is there any way to sor that oit?
Jul 27 '11 #14

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: JuLiE Dxer | last post by:
Is there a way to programmatically determine if MCE isn't saving the recorded tv video files in the default directory? It'd be nice to know if the saved files aren't in the C:\Documents and...
4
by: jaffar | last post by:
hi, i am developing a windows application, in my application i have to stor video files into database and play those video files from database , how to da this application, send me replay as...
1
by: AVL | last post by:
Hi, I want to play audio n video files in my web application... How can I do this? Are there any samples..
13
by: anil.rita | last post by:
When the user chooses an AV file to play, based upon the type of file, I want to use the default installed media player to play it. I am wondering if this is a good way - any alternatives,...
2
TLL
by: TLL | last post by:
Hi to all the progrogramming professionals, I've had a query regarding about how to load audio/video files from memory using C#.net. Cause currently, Im working on a digital rights management...
1
by: varun123 | last post by:
hi i am new to this.... i am working on website which is not compatible for audio/video files now. now i need to put it up some audio/video files.... i am working with c#.net and access as back...
1
by: ttamilvanan81 | last post by:
Hai everyone, I am working with a Image/Video Application. I need to display and play any video file in browser. Now i am using the following Embed Tag. <OBJECT ID="mediaPlayer" ...
2
by: santel | last post by:
Hi, I need to display the video file in C# forms with few buttons like pause, play and stop. Anyone please suggest how to start with to embed the video file and which method is the best one to...
3
by: santel | last post by:
Hi, I tried to display the video files in C# forms using vlc. By refering this link http://www.codeproject.com/useritems/LiquidVideo.asp, I displayed the video files. But it accepts only .mpg...
2
by: swethak | last post by:
Hi, I want to upload the video files after that disply that all uploaded video files.When click on that video file it will play in media player .(Same as You tube). I am doing all that...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.