Re: Get nasty security message using EMBED in html

Discussion in 'HTML' started by Mike Duffy, Mar 31, 2009.

  1. Mike Duffy

    Mike Duffy Guest

    Angus <> wrote in news:1887bbaa-ae22-403c-971a-
    :

    > 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
     
    Mike Duffy, Mar 31, 2009
    #1
    1. Advertising

  2. Mike Duffy

    cwdjrxyz Guest

    On Mar 30, 7:59 pm, Mike Duffy <> wrote:
    > Angus <> wrote in news:1887bbaa-ae22-403c-971a-
    > :
    >
    > > 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.
     
    cwdjrxyz, Apr 1, 2009
    #2
    1. Advertising

  3. Mike Duffy

    dorayme Guest

    In article
    <>,
    cwdjrxyz <> 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
     
    dorayme, Apr 1, 2009
    #3
  4. Mike Duffy

    cwdjrxyz Guest

    On Apr 1, 2:40 am, dorayme <> wrote:
    > In article
    > <>,
    >
    >  cwdjrxyz <> 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.
     
    cwdjrxyz, Apr 1, 2009
    #4
  5. Mike Duffy

    Guest

    cwdjrxyz <> writes:

    > On Apr 1, 2:40 am, dorayme <> wrote:
    >> In article
    >> <>,
    >>
    >>  cwdjrxyz <> 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
     
    , Apr 12, 2009
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dejan Vesic
    Replies:
    1
    Views:
    678
    Chee Seong Ong
    Jul 3, 2003
  2. Larry Barowski
    Replies:
    2
    Views:
    719
    Tor Iver Wilhelmsen
    Sep 11, 2004
  3. PerlFAQ Server
    Replies:
    0
    Views:
    132
    PerlFAQ Server
    Jan 27, 2011
  4. PerlFAQ Server
    Replies:
    0
    Views:
    113
    PerlFAQ Server
    Feb 24, 2011
  5. Angus
    Replies:
    1
    Views:
    110
    Mike Duffy
    Mar 31, 2009
Loading...

Share This Page