Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Senior Coder
    Join Date
    May 2005
    Posts
    2,137
    Thanks
    96
    Thanked 72 Times in 72 Posts

    Embedded a auto play midi

    Anyone have a clue how I could embed a MIDI song to my login page on my website? It would play probably 30 seconds and will Not repeat. I don't want anyone to click to play it, just when the page is viewed it starts.

  • #2
    Regular Coder Iszak's Avatar
    Join Date
    Jun 2007
    Location
    Perth, Western Australia
    Posts
    332
    Thanks
    2
    Thanked 58 Times in 57 Posts
    Well firstly I don't believe you can do it in PHP! You'll more and likely either have to use a flash one or one of those ones that look like windows media player. More and likely but I'm not sure that WMP doesn't support Midi it's either MIDI or MID anyhow so if it doesn't you'll need a specialized one, and most of them come with a property that is autoplay and you just select it. Also I've heard it's possible with javascript but I'm sure a quick search to google would help so don't be lazy and do so!

  • #3
    Regular Coder dniwebdesign's Avatar
    Join Date
    Dec 2003
    Location
    Carrot River, Saskatchewan
    Posts
    841
    Thanks
    15
    Thanked 9 Times in 9 Posts
    Midi, MIDI, MID... all the same... just he didn't capitilize this. Yea, this isn't done via PHP and should be situated in the HTML area of these forums.

    However if you GOOGLE embed a midi you should be able to find what you are looking for. Very rough cut version would be:
    Code:
    <embed src='pathto/midifile/midi.mid' width='150' height='10' autoplay='true'>
    Don't count on it as I did it from the top of my head and I don't embed midi's anymore.
    Dawson Irvine
    CEO - DNI Web Design
    http://www.dniwebdesign.com

  • #4
    Senior Coder
    Join Date
    May 2005
    Posts
    2,137
    Thanks
    96
    Thanked 72 Times in 72 Posts
    Ah I see, it's php files I am messing with, and I am still a beginner so didn't know. Thanks for the help.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •