Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Re: Get nasty security message using EMBED in html

Reply
Thread Tools

Re: Get nasty security message using EMBED in html

 
 
Mike Duffy
Guest
Posts: n/a
 
      03-31-2009
Angus <(E-Mail Removed)> wrote in news:1887bbaa-ae22-403c-971a-
http://www.velocityreviews.com/forums/(E-Mail Removed):

> Hello
>
> I want users to my web site to start and stop an audio track. I tried
> this sort of approach:
>
> <EMBED SRC="audiotrack.mp3" WIDTH="300" HEIGHT="45"
> AUTOSTART="FALSE"></EMBED>
>
> but on Windows Vista with IE7 I get one of those ... to protect your
> computer... security messages.



1) This is actually a question about HTML, not javascript. That is why I am
cross-posting to "alt.html" as well as requesting follow-ups there instead.

2) Go to the link below for a sample of the code that works for me. Let us
know if it works with standard IE7 security settings. (I cannot remember if
I have changed mine.)

The code I have provided is a "hodgepodge" of code supported by the two
leading browsers (IE7 & FF3). They are the only ones I have tested it
against. Also, a lot of people will add something to give the user a chance
to force it to play if the code in my link does not work, such as:


<p>Song should play automatically. If it does not, click <a
href="http://pages.videotron.com/duffym/audio/haveyoueverseentherain.mid"
type="audio/x-midi">here</a> to hear it.</p>


--

http://pages.videotron.com/duffym/test.htm
 
Reply With Quote
 
 
 
 
cwdjrxyz
Guest
Posts: n/a
 
      04-01-2009
On Mar 30, 7:59*pm, Mike Duffy <(E-Mail Removed)> wrote:
> Angus <(E-Mail Removed)> wrote in news:1887bbaa-ae22-403c-971a-
> (E-Mail Removed):
>
> > Hello

>
> > I want users to my web site to start and stop an audio track. *I tried
> > this sort of approach:

>
> > <EMBED SRC="audiotrack.mp3" WIDTH="300" HEIGHT="45"
> > AUTOSTART="FALSE"></EMBED>

>
> > but on Windows Vista with IE7 I get one of those ... to protect your
> > computer... security messages.

>
> 1) This is actually a question about HTML, not javascript. That is why I am
> cross-posting to "alt.html" as well as requesting follow-ups there instead.


IE7 often will give security messages when you view a page locally on
your computer, but not if you view the same code from a web page. This
often happens when you use scripts. You might want to see if that is
the case here.

> 2) Go to the link below for a sample of the code that works for me. Let us
> know if it works with standard IE7 security settings. (I cannot remember if
> I have changed mine.)


> The code I have provided is a "hodgepodge" of code supported by the two
> leading browsers (IE7 & FF3). They are the only ones I have tested it
> against. Also, a lot of people will add something to give the user a chance
> to force it to play if the code in my link does not work, such as:
>
> <p>Song should play automatically. If it does not, click <a
> href="http://pages.videotron.com/duffym/audio/haveyoueverseentherain.mid"
> type="audio/x-midi">here</a> to hear it.</p>


This works OK for a midi, but you may need other code for another
audio file type.

Angus apparently wants to embed the audio on the page. The embed tag
never has been an official W3C tag and came from Netscape in the
browser wars days, although IE soon supported it, at least sometimes,
soon after. Since html 4 you are supposed to embed something in a page
using an object tag, although using the unofficial embed tag still
works for some things if you do not mind several W3C validator errors.
Unfortunately IE will not support an ordinary object tag for some
media file types, and other times it will. When it will not, you
usually can use an ActiveX object to play on an IE browser. In that
case Microsoft conditional comments can be used to route to the
ActiveX object for IE and to an ordinary object for other browsers,
and the code can be written to validate all the way up to xhtml 1.1
served properly as application/xhtml+xml, if desired. Actually the
code used to embed media can include html, javascript, php script on
the server, etc - it need not be just a html matter.

The most simple way to play much media often is to just give a text
link to it. However this may take you away from the page with the
link, bring up a large player etc. If you want to embed in such a way
that you can adjust the size of the embedded material, include
controls, and stay on the same page, you have to jump through many
hoops.

The media is played by a media player and not a browser. Often one has
several media players. Often several players will play the same media
file type - nearly all will play mp3, for example. For a web page, you
usually do not know what players a viewing computer will have, what
browser it may use, and to which player a certain media file type is
made primary. To overcome most of these problems, I now usually first
rip the audio as a high resolution .wav that meets the PCM standard
for a CD, for example. I then convert this to wma, a Real format, a
flash format, and a mp3 format of suitable size for use on the web.
For wma I also make a short .wax playlist/redirector file, a .rpm
playlist/redirector file for Real formats, and sometimes , but not
always, a m3u redirector file for mp3. For the mp3, what player you
get depends on what player you make primary for mp3 on a computer. It
could be the WMP, Real, or Winamp player, for example. One thing to
keep in mind is that some non-IE browsers included perhaps ability to
play certain media from often rather limited versions of some players,
often QT. So do not be surprised if QT is used to play some media file
on a Mozilla or Opera based browser even if you never downloaded the
QT player from Apple. Using redirector files to link to the media
files rather than linking directly often will allow the media to start
playing only after a short buffering time while the media file is
still downloading to the temporary cache. This is called progressive
download streaming by some.

See http://www.cwdjr.net/audio5/RoscoeSings.php for what I am now
doing for playing audio. You just click a button for the type of
player you wish to use. With 4 choices, including flash audio, most
people will be able to play the music unless they hate music on web
pages and have disabled players. In such a case. you would not want to
bother them anyway. When you click a button to choose a player, a
message goes to the server telling it what you wish to use. The server
then uses php script to write the code for the player you select and
downloads this to the viewing computer. This avoids a very large
amount of unneeded code clutter if you download everything to the
browser first and then use javascript on the browser to select just
the code you need for the selection you want. If you look at the page
code after making a selection, you will see the objects are different
for different media. In some cases, especially for mp3, you may be
offered the choice to download the media with or without a screen for
selection of player, depending on how you have configured your
computer to use certain players for certain media file types.

The situation for playing media on the web now is far more of a mess
than the browser format wars were. There are dozens of audio and video
formats still in use, and how you code for these can be rather
variable.

 
Reply With Quote
 
 
 
 
dorayme
Guest
Posts: n/a
 
      04-01-2009
In article
<(E-Mail Removed)>,
cwdjrxyz <(E-Mail Removed)> wrote:

> If you want to embed in such a way
> that you can adjust the size of the embedded material, include
> controls, and stay on the same page, you have to jump through many
> hoops.


Darned nuisance having to do this. There are only 17 people in the whole
world who are happy about this.

--
dorayme
 
Reply With Quote
 
cwdjrxyz
Guest
Posts: n/a
 
      04-01-2009
On Apr 1, 2:40*am, dorayme <(E-Mail Removed)> wrote:
> In article
> <(E-Mail Removed)>,
>
> *cwdjrxyz <(E-Mail Removed)> wrote:
> > If you want to embed in such a way
> > that you can adjust the size of the embedded material, include
> > controls, and stay on the same page, you have to jump through many
> > hoops.

>
> Darned nuisance having to do this. There are only 17 people in the whole
> world who are happy about this.


Yes, working with embedded media is likely to make you cuss in several
languages. I am not sure you could even find 17 people happy about
this situation. I think the main reason for the problem is that the
owners of several of the more popular players are glad to give you the
player free in the hope that you will buy some of their premium
services, using the special formats for their players of course. They
think there is a lot of money to be made selling music and video. And
a few services now seem to be making profit. Apple likely sells as
many downloads of music as anyone. Another factor is the glut of many
types of small portable devices, cell phones etc. What is the best
media format for a desktop on broadband is not always the best format
for the small portable devices.
 
Reply With Quote
 
julueh@amata.marubatsu.org
Guest
Posts: n/a
 
      04-12-2009
cwdjrxyz <(E-Mail Removed)> writes:

> On Apr 1, 2:40*am, dorayme <(E-Mail Removed)> wrote:
>> In article
>> <(E-Mail Removed)>,
>>
>> *cwdjrxyz <(E-Mail Removed)> wrote:
>> > If you want to embed in such a way
>> > that you can adjust the size of the embedded material, include
>> > controls, and stay on the same page, you have to jump through many
>> > hoops.

>>
>> Darned nuisance having to do this. There are only 17 people in the whole
>> world who are happy about this.

>
> Yes, working with embedded media is likely to make you cuss in several
> languages. I am not sure you could even find 17 people happy about
> this situation. I think the main reason for the problem is that the
> owners of several of the more popular players are glad to give you the
> player free in the hope that you will buy some of their premium
> services, using the special formats for their players of course. They
> think there is a lot of money to be made selling music and video. And
> a few services now seem to be making profit. Apple likely sells as
> many downloads of music as anyone. Another factor is the glut of many
> types of small portable devices, cell phones etc. What is the best
> media format for a desktop on broadband is not always the best format
> for the small portable devices.


Quite an illuminating discussion. Thanks!
-- Julio

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FAQ 6.4 How do I match XML, HTML, or other nasty, ugly things with a regex? PerlFAQ Server Perl Misc 0 02-24-2011 05:00 AM
FAQ 6.4 How do I match XML, HTML, or other nasty, ugly things with a regex? PerlFAQ Server Perl Misc 0 01-27-2011 11:00 PM
Get nasty security message using EMBED in html Angus Javascript 1 03-31-2009 12:59 AM
NAsty Message Quercus Robur Computer Security 20 03-25-2007 02:37 PM
Java 1.5 to be released with nasty JEditorPane/HTML bug Larry Barowski Java 2 09-11-2004 02:17 PM



Advertisments