Free2Code
 
Time: 2008-12-04, 09:59pm
Playingback MP3 file, using default player
Subject: Playingback MP3 file, using default player  ·  Posted: 2007-08-17, 01:51am
Rank: ? (4280)
Member #: 5260
How do you determine what sort of media player, like Microsoft MediaPlayer or QuickTime is the default player?

I want my PHP pages to determine which is people's default player and use the appropriate player to playback MP3 file.

I know how to make it play either one, but I don't know how to make the browser know which is default player.

Dreams are stories, but my life is just one bad dream. :P
 
  Reply to this ·  Post link ·  Top
Subject: Re: Playingback MP3 file, using default player  ·  Posted: 2007-08-17, 04:14am
Rank: ? (767)
Member #: 11085
That is definitely impossible via php, and I suspect impossible using only php and javascript. Maybe with Java. I don't really understand your question, however, as I would think things would automatically play in the default player.

- relpats_eht
 
  Reply to this ·  Post link ·  Top
Subject: Re: Playingback MP3 file, using default player  ·  Posted: 2007-08-19, 11:10am
Rank: ? (4280)
Member #: 5260
Well, I want to display the appropriate player, which are default on the end users' end.

At the moment, I can display the player's plug-in in QuickTime, (see UNITED, Our Songs) but what if they only have MS MediaPlayer plug-in installed. If that's the case, then they can't playback the song.

I was hoping to make my site "intuitive" enough to find out what kind of player plug-in are installed on the user's browser, and actually display the QuickTime or MediaPlayer plug-in on that page.


Dreams are stories, but my life is just one bad dream. :P
 
  Reply to this ·  Post link ·  Top
Subject: Re: Playingback MP3 file, using default player  ·  Posted: 2007-08-19, 02:46pm
Rank: ? (856)
Member #: 2
Apple has some instructions on Detecting QuickTime with Javascript. One way to do it is to stick the Windows Media Player object/embed code in the "You do not seem to have quicktime" part, instead of the message.
Code:
  1. ...
  2.     else
  3.     {document.write(’<OBJECT width="320" ...’);}
  4. ...


This all has to be done client-side with Javascript because PHP isn't sent information about plugins by the browser.

» Post edited 2007-08-19, 02:47pm by Terminal.

-Terminal
 
  Reply to this ·  Post link ·  Top
Subject: Re: Playingback MP3 file, using default player  ·  Posted: 2007-08-19, 06:43pm
Rank: ? (4280)
Member #: 5260
Thanks, Terminal. smile The link should prove useful.

» Post edited 2007-08-19, 06:43pm by storyteller.

Dreams are stories, but my life is just one bad dream. :P
 
  Reply to this ·  Post link ·  Top
Subject: Re: Playingback MP3 file, using default player  ·  Posted: 2007-10-29, 11:42am
Rank: ? (4280)
Member #: 5260
I have done as much as I can on the website. It is located at Young Ossies Unite (YOU).

What do you think of it?

Can you playback or download any of the song?

Is the Guest Book working? I have added a filter (using PHP), because the Guest Book was getting spams (eg. links to viagra, calis, porns).


Dreams are stories, but my life is just one bad dream. :P
 
  Reply to this ·  Post link ·  Top

Pages: 1

Please login or register to post a reply.

icons