Details of <object> tags for embedding Video and Audio

T

Trevor L.

Hi all,
I don't know whether this is strictly an FP question but I have read advice
from Nicholas Savalas which indicates he may be able to help

I have been able to embed a video file with this code:
<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
width="320" height="250"
codebase="http://www.apple.com/qtactivex/qtplugin.cab">
<param name="src" value="images/carole-and-tammy.mov"/>
<param name="autoplay" value="true"/>
<param name="controller" value="false"/>
</object>
This works O.K. when used on my local disk-based web (i.e. on my own PC). On
the web, it prompts for a download and then halts, so it is not successful.
The good thing is that it validates as valid XHTML1.0.

My first question, one I have asked many times without success, is:
How do I stream the video so that it part downloads, then plays as the rest
is downloading.
(My guess is that this probably can't happen on my server)

But of more importance, what do I use for audio?
I currently have this code:
<span id="sound"></span>
<input type="button" value="Play/Stop
Music" onclick="playSound()"/>
function playSound()
{ var x = document.getElementById("sound")
x.innerHTML = (!x.innerHTML ) ? '<embed src="minuet.wav" loop=false
autostart=true hidden>' : '' }

This works O.K. but <embed> is not valid XHTML, so what parameters do I use
in the object statement?
(Of course the <embed> statement is hidden from the validator, so maybe it
doesn't matter all that much.
 
T

Trevor L.

Trevor said:
Hi all,
I don't know whether this is strictly an FP question but I have read
advice from Nicholas Savalas which indicates he may be able to help

I have been able to embed a video file with this code:
<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
width="320" height="250"
codebase="http://www.apple.com/qtactivex/qtplugin.cab">
<param name="src" value="images/carole-and-tammy.mov"/>
<param name="autoplay" value="true"/>
<param name="controller" value="false"/>
</object>
This works O.K. when used on my local disk-based web (i.e. on my own
PC). On the web, it prompts for a download and then halts, so it is
not successful. The good thing is that it validates as valid XHTML1.0.

My first question, one I have asked many times without success, is:
How do I stream the video so that it part downloads, then plays as
the rest is downloading.
(My guess is that this probably can't happen on my server)

But of more importance, what do I use for audio?
I currently have this code:
<span id="sound"></span>
<input type="button" value="Play/Stop
Music"
onclick="playSound()"/> function playSound()
{ var x = document.getElementById("sound")
x.innerHTML = (!x.innerHTML ) ? '<embed src="minuet.wav" loop=false
autostart=true hidden>' : '' }

This works O.K. but <embed> is not valid XHTML, so what parameters do
I use in the object statement?
(Of course the <embed> statement is hidden from the validator, so
maybe it doesn't matter all that much.

P.S. The audio doesn't play on the web either
 
S

Shelle

I used an FTP program & uploaded my audio file to my site folder & then
hyperlinked to this file from within one of my pages in Front Page - the
audio opens in windows media player (or the users default player) and plays
fine on the web.

This may not be the correct way but it works for me :)

Shelle
 
T

Trevor L.

Shelle,

I found that my code which calls JS to open the file actually works after a
minute or so delay.

This is very annoying . Does anyone know why? The audiio file (.wav) is
6MB - maybe this has something to do with it ;-))
 
B

BoatPerson

Trevor

I'm new to FP, but I have fooled around a bit with audio/video files -- the
key here is to keep the size as small as possible, so users won't bail out
prematurely on you.

Most times with audio files you can barely tell the difference between the
smallest and the largest, i.e., those with the most and the least compression
-- here are three examples ranging from 1.2mb to 8.5mb in size... see if you
can tell which one is the least compressed:

http://home.comcast.net/~celticcladdagh/onlinestorage/Click wav.wav
http://home.comcast.net/~celticcladdagh/onlinestorage/Click mp3.mp3
http://home.comcast.net/~celticcladdagh/onlinestorage/Click wma.wma

Hope this helps.

Harry
 
B

BoatPerson

Trevor

fyi: This seems to work OK for me... just right-click to view source code
(btw: sorry for the blanks in my previous links, just scoop and paste each
whole string):

http://home.comcast.net/~brittani_morgan/test_video.htm

Size is even more of an issue with video stuff than with audio stuff... with
a subtle and somewhat nasty twist. That is, apart from it "just" potentially
consuming huge amounts of storage space, it can do so with DECLINING
quality... in exchange for LOTS of wasted hours of time -- trust me on this.

The message here is that the quality of your output will never exceed that
of your input, so, in otherwords, while I did INPUT the above 30sec of
TV/VCR/VHS video as an "avi" file (just to preserve the little quality there
was while getting it into my PC), I would be a fool -- storage-space-wise --
to OUTPUT/render it as anything but the lowest quality available -- else,
GIGO; lipstick on a pig; etc.

Sorry for lecturing -- good luck.

Harry
 
T

Trevor L.

Harry,

This is great in that it comes through as a video, although very slowly and
with no sound that I can hear (on full volume with my speakers). But at
least it comes through :))

What about audio?
What are the parmaters for the <object> statement?
 
B

BoatPerson

Trevor

Try this again:

http://home.comcast.net/~brittani_morgan/test_video.htm

I modified it to show the controls and on my end it looks like the volume is
set at about 50%) -- try adjusting it to the max and see what happens.
Meanwhile I'll scratch around and see if I can come up with a parm for the
audiolevel setting in this code.

btw: at the moment I'm using Comcast's Cable Modem for internet access -- we
get pretty snappy response times both down and up (2+mbps), so I don't notice
much of a delay... part of your problem might be your access speed -- I'm
guessing that you use somekind of DSL. If you want to send me a link of
something you've got up on your server, I'll let you know how it performs via
my access method.

Harry
 
T

Trevor L.

Harry,

Thanks for taking the trouble to investigate

I am using ADSL at 256Kbps. It is a low cost option from a local provider. I
am thinking of upgrading. Their next is 400kbps which only costs another
$AUS5-00 per mo. They do have up to 2mbps, but I am not a commercial user,
just a home hobbyist.

I have a movie on my website
Go to:
About Us
Carole
Click here for a movie ...
This plays fine locally, but doesn't do much at all on the web. It requests
a download but after that nothing happens.

As for audio, the main page has a button
Play/Stop Music
It executes this JS:
function playSound()
{
var x = document.getElementById("sound")
x.innerHTML = (!x.innerHTML )
? '<embed src="minuet.wav" loop=false autostart=true hidden>'
: ''
}
where "sound' is:
<span id="sound"></span>

This plays fine locally, but seems to take about a minute or so berfore
anything happens on the web.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top