Insert Audio into a Website Using HTML5

Поделиться
HTML-код
  • Опубликовано: 12 сен 2024

Комментарии • 387

  • @nicholasmiller1437
    @nicholasmiller1437 2 года назад +7

    You're amazing! I'm genuinely so impressed that I was able to do that so easily, I was expecting it to take hours. The link in description to code in your browser was very helpful as well :)
    (the only thing that stumped me that I needed to figure out myself was that I had to get a downloadable link of the mp3 so I could put that after source src= )

  • @codingwithkenny6492
    @codingwithkenny6492 3 года назад +7

    Thank you so much sir, This is what I was looking for for my next coding project. I planned on building a javascript music player witout using the HTML control keyword, but didn't know how to embed audio into my server :)

  • @danwithjesus
    @danwithjesus 5 лет назад +42

    This worked for me

  • @yashwanth8269
    @yashwanth8269 6 лет назад +19

    Hey it's your teaching is too good man it's very simple to understand I like it man

  • @shoninki5881
    @shoninki5881 2 года назад +2

    I sincerely appreciate you making this video! This helped my research project

  • @heathercareyvlogs5748
    @heathercareyvlogs5748 3 года назад +3

    Thank you so much! This really helped me! You explain everything very well and make it easy!

  • @rover908
    @rover908 3 года назад +3

    Hi, I have little issue.
    So I followed your steps, my .mp3 file is in the same folder as my .html file and I checked did I wrote type/mpeg and I did.
    The audio controls show up in the web browser but there is no audio.
    Any help?

  • @troybrookes1220
    @troybrookes1220 4 года назад +9

    Thanks for this, really easy to understand. I've just subscribed.

  • @ishikabhaduri959
    @ishikabhaduri959 3 года назад

    Please continue more of these!! It's really helpful!

  • @unknownuser4645
    @unknownuser4645 3 года назад +3

    dude i literally love you

    • @GeekTutorials1
      @GeekTutorials1  3 года назад

      Does this mean we're RUclips official now?

  • @josephsuste1394
    @josephsuste1394 3 года назад +1

    Excellent. Exactly what I needed. No unnecessary overhead. Thank you.

  • @karlduckett
    @karlduckett 5 лет назад +5

    Cool! Thanks for this. Didn't realize it was this simple! Can you apply some css to that default player?

    • @GeekTutorials1
      @GeekTutorials1  5 лет назад +1

      You can change how it looks - but it is a lot of mucking around.

  • @charmainelee5085
    @charmainelee5085 5 лет назад +8

    Thank you sir! That's a really great help! Stay blessed !

  • @fakefrenchboy
    @fakefrenchboy 3 года назад +2

    Thanks man! You've sorted out a huge headache for me. I used to use flash now HTML is just as easy. Cheers!

  • @muskrat1910
    @muskrat1910 3 года назад +1

    how do you make it auto play and hidden

  • @lennypike
    @lennypike 4 года назад +1

    Wow! Thank you! I have been using MP3 SoundStream which works okay but nobody has flash enabled anymore... I found your video and SHAZAMMMM! I'm like some kinda HTML5 Guru or something. It worked the 1st time. Thank you, Sir!

  • @SridharanSrinivasan
    @SridharanSrinivasan 4 года назад +1

    How do we display lyrics embedded as a tag in the mp3 file

  • @ley90
    @ley90 7 лет назад +4

    can u make it looped?

    • @VIKTOR69
      @VIKTOR69 7 лет назад +3

      Ley Lah Yes mayby type : audio loop good luck or use google to find it

    • @thomasramirez6571
      @thomasramirez6571 6 лет назад +2

      Use

  • @rmcellig
    @rmcellig Год назад

    Like your video! How can a visitor download the audio file and how do you set the height and width of the player?

  • @sabaldheerendragautam2776
    @sabaldheerendragautam2776 3 года назад +1

    Thank You So Much For The Very Nice And Easy Explaination

  • @Turk1881
    @Turk1881 Год назад

    damn dude i didn't know about this at all. great information. thanks a lot!!!

  • @hastiparmar1718
    @hastiparmar1718 3 года назад +2

    Thank you so so so so so so so so so so so so so much, it's really helpful to me in my project... At the last night of submission 😂

    • @Sepehr07-07
      @Sepehr07-07 2 года назад

      bruh what was the need to put so 100 times

  • @jdsguam
    @jdsguam 3 года назад

    Thank you. I knew it was far easier than all the other instructions provided out here on youtube.

  • @OVXX666
    @OVXX666 2 года назад

    is working fine but isnt working for me? :(

  • @sirArminFazeli
    @sirArminFazeli 2 года назад +1

    Thank you so much, it worked!!

  • @dihenthilakarathna1901
    @dihenthilakarathna1901 2 года назад

    thanks man. you helped me alot. i was stuck because of the audio code

  • @bandanashukla5952
    @bandanashukla5952 2 года назад +1

    In full video I like song which you have putted through html code

  • @yummymami1
    @yummymami1 2 года назад

    Not sure if you're still willing to respond (since this was posted years ago) but my issue is that for some reason when I apply the code to the page I want the player on, the song will not play.. I followed all the steps, and when I checked with "live preview", it worked.. but it doesn't work anywhere else... I'm using the latest version of Chrome, if that matters.. TIA!

  • @dougfredricks2017
    @dougfredricks2017 Год назад

    Hello, 👍 post. Btw are you source linking the audio via your Google Drive folder? Unsure if file uploads to root. Dir.

    • @GeekTutorials1
      @GeekTutorials1  Год назад

      I just had the file on my computer, for the purpose of this video.

  • @255duran
    @255duran 6 лет назад

    I have been trying for 3 days to add an audio file to my html project then you said something that no one else did. You said that if it doesn't work then the mp3 file is no good. Then I thought to myself what a dummy I am. Thanks for assist and info.

  • @cheesecakeliker7545
    @cheesecakeliker7545 2 года назад

    Im making a website with neocities, the problem is that neocities doesnt allows you to upload audio files if you are using it for free. Is there other option so i can have audio playing on the background in my website? I tried uploading my audio files to mp3 hosting sites, but i dont find any good hosting sites

  • @VID.VYATKA
    @VID.VYATKA 2 года назад

    Hey man!Help me plese ,i did correct code ,and he is found path to the track,but when i open the link i can't see the player and no songs.

  • @thomasgate416
    @thomasgate416 3 года назад +4

    Great video!
    no bullshit just easy and quick presentation of the know how.

  • @RayoBeatz
    @RayoBeatz 8 месяцев назад

    where is the actual audio file? i don't understand how i can grab and audio and source it from thin air.

    • @GeekTutorials1
      @GeekTutorials1  8 месяцев назад

      You need to use your own audio file.

  • @seba3151
    @seba3151 4 года назад

    Super helpful, thanks man!!!

  • @lenni-builder
    @lenni-builder 2 года назад

    My first idea was a with the wav file in it, i will try both out

  • @motovlogsipanca4832
    @motovlogsipanca4832 Год назад

    is this work on phone with local files?

  • @santoshkumargupta2425
    @santoshkumargupta2425 6 лет назад +1

    Which application you are using?

    • @GeekTutorials1
      @GeekTutorials1  6 лет назад +1

      Hi mate - I'm using a free program called Brackets. Check it out - brackets.io

  • @AgGh-c5s
    @AgGh-c5s Год назад +1

    How can I add download button?

    • @GeekTutorials1
      @GeekTutorials1  Год назад

      You could make a little image and link it to your audio file. Or, make a button and use a little JavaScript.

  • @traducoesdemusicascomvozse5214
    @traducoesdemusicascomvozse5214 4 года назад

    Is streaming Shoutcast aac supported today? Good tips.

    • @GeekTutorials1
      @GeekTutorials1  4 года назад

      I couldn't tell ya, sorry. I'll look into it for you

  • @erikadee8668
    @erikadee8668 4 года назад +2

    Where did you download the track and how do you make sure that it's ogg, mp3, or WAV?

    • @GeekTutorials1
      @GeekTutorials1  4 года назад

      This was a file that was given to me by a friend. You can download audio tracks from RUclips - search Google for a "RUclips to mp3 convertor" - there are plenty of websites that do this for you.

  • @griffithstone8527
    @griffithstone8527 5 лет назад +1

    i tried many of my audio files none seem to work for me all i get it is the audio player but no music and i cant click on anything.. i dont know what to do had this problem for days

    • @GeekTutorials1
      @GeekTutorials1  5 лет назад

      Sounds like your code is correct, but the path to your audio file isn't quite right. What file type are you using? I find MP3 the most reliable.

    • @griffithstone8527
      @griffithstone8527 5 лет назад

      @@GeekTutorials1 i think i have mp3 i was just going through music i've downloaded in the past, im very confused about that part, im taking a web deign course through udemy, and the audio coding part is where im stuck on i found your turotial but sitll stuck with the same problem i have an audio folder in my html folder then im making with other parts for my site but each time i try to pick a different audio file it never plays, how do i know which is mp3 i go under properties right? and if its mp3 do i have to rename the file .mp3 at the end? ty for helping me

    • @griffithstone8527
      @griffithstone8527 5 лет назад

      @@GeekTutorials1 so i downloaded a mp3 music file of taylor swift- shake it, tried using the mp3 for the audio file, and still nothing have the controls but no music not even an option to click to play it just the control panel of it

    • @GeekTutorials1
      @GeekTutorials1  5 лет назад

      @@griffithstone8527 You shouldn't have to rename with mp3 on the end if it's already an mp3 file. Sorry mate - I'm a bit stumped as to what the problem is!

    • @griffithstone8527
      @griffithstone8527 5 лет назад

      @@GeekTutorials1 could you private message me send me a code that i could try out and see if it works, i use chrome as well

  • @swvsnick
    @swvsnick 2 года назад

    Ah, While following all the steps in your video, I found out the website I'm using to code on, neocities, doesn't allow the uploading of mp3s. So if anyone's coming from Neocities, it this is helpful but it won't work.

  • @user-nj3lg7wi5r
    @user-nj3lg7wi5r 3 года назад +1

    Thank you for your help.

  • @kevperkinsvoicebox664
    @kevperkinsvoicebox664 3 года назад

    Hi there - I tried to use this code to add an audio file but it just doesn't work. I get the player bar and the controls but it's non-responsive to any clicks and won't play anything.
    Can you tell me if this code is browser dependent? I use Chrome as my main browser - do you think this could be my problem?

    • @GeekTutorials1
      @GeekTutorials1  3 года назад

      Chrome isn't your problem. It's what I use.
      I think if the player shows up, your code is correct. The thing that needs changing is the file path that points to your audio file - it must be wrong.

  • @Ja-vf2kc
    @Ja-vf2kc 3 года назад

    What if u want more than 1 audio file

  • @dragonscratchesstorytellin1126
    @dragonscratchesstorytellin1126 4 года назад

    I understand how to insert the audio(you explained it very well), but is there a way to move the location of the controls? the most i know how to move it is using the tag

  • @DhinchakDharwadianz
    @DhinchakDharwadianz 6 лет назад

    it should be played automatically when open our website how to do that?

  • @luisastar100
    @luisastar100 4 года назад

    In my case the audio works perfectly but needs the controls... if there is not the controls the audios does not work, even with the autoplay. AND I NEED THE AUDIO JUST WITH AUTOPLAY, NO CONTROLS FOR MY PROJECT

  • @gourabathunirohitha6315
    @gourabathunirohitha6315 4 года назад +1

    autoplay is not working

  • @HarrisonBorbarrison
    @HarrisonBorbarrison 3 года назад +2

    How dare you use Windows 8.

  • @sangam7672
    @sangam7672 4 года назад +1

    All work but audio show 0.00/0.00

    • @GeekTutorials1
      @GeekTutorials1  4 года назад

      You might want to pick a longer audio track!

  • @ahmetcekinmez718
    @ahmetcekinmez718 5 лет назад +1

    Hi, My question is that my pages are over, and then I want to open another music and the previous one goes on until I close it. What kind of way do you think I should follow? Thank you

  • @gospel2kids715
    @gospel2kids715 3 года назад

    Thank you. It worked!!!!

  • @Munaam1989
    @Munaam1989 7 лет назад +1

    which editor are you using?
    i like it

  • @SheharyarN
    @SheharyarN 6 лет назад

    How do you you move that audio bar for example to the center? when you insert it, its always on the left

    • @GeekTutorials1
      @GeekTutorials1  6 лет назад

      Sheharyar Nadeem Hi mate - I show you in this video - ruclips.net/video/OXO2YzSN-3Q/видео.html

  • @umututkualtn3601
    @umututkualtn3601 3 года назад +1

    thank you

  • @He_sairaj
    @He_sairaj 3 года назад

    I love you bro 💓❣️
    Your video helped me lotttttttttttt🙏

  • @viral_tadkavdo3517
    @viral_tadkavdo3517 Год назад

    Thank u so much bro

  • @amsolutions9719
    @amsolutions9719 4 года назад +2

    thanks for that :) where do I actually keep my mp3 file? in a Word Press library? I have no clue how to go about that bit. Thanks :)

    • @GeekTutorials1
      @GeekTutorials1  4 года назад +1

      I haven't used WordPress before - so not exactly sure how their folder structure works online. Hopefully someone will see this comment and can help you out. I'm sure Google will have a tutorial out there to help you.

    • @honeylove3256
      @honeylove3256 3 года назад

      I was wondering the same thing

  • @alb005h
    @alb005h 4 года назад

    can i change the color?

  • @bluebrazentechllc290
    @bluebrazentechllc290 5 лет назад +2

    Thanks! Great tutorial!

  • @roastedpizza7679
    @roastedpizza7679 4 года назад

    Bless you!!!! Thx so much!!! I really sucks at making websites but your videos give me hope! Thx again

  • @batterymehta1151
    @batterymehta1151 3 года назад

    thank you aa lot it work i tried a lot of time

  • @black_baron_net
    @black_baron_net 4 года назад +1

    Mr Geek. How can I add very simple a desired width and height of the super efficient, super fully customizable html5 controller? The controller looks different in every browser which is annoying for web designers.

  • @raychrash5139
    @raychrash5139 4 года назад +1

    Just want to ask a quick question currently i am working on a website for one of my buddies to sell his beats, if i publish my website will people be able to download the beats?(because i want them to just listen to them nothing more)

    • @GeekTutorials1
      @GeekTutorials1  4 года назад +2

      You should be fine. This just shows a media player - people can't download the audio from this.

    • @raychrash5139
      @raychrash5139 4 года назад

      @@GeekTutorials1 ok thank you

  • @BL3XPrime
    @BL3XPrime 3 года назад

    can i control the volume ?

  • @T-GAMES-INDIA
    @T-GAMES-INDIA Год назад

    i want onload to play the music i dint want that controls

  • @YashSharma-le3fx
    @YashSharma-le3fx 3 года назад

    Hey bro its running successfully on my page where i have created but when i open this page with different device it wont open

    • @GeekTutorials1
      @GeekTutorials1  3 года назад

      The audio file must be on the other computer as well. The computer needs to know where to find the audio file, so make sure it's saved in the same place on both machines so it can find it

  • @amaangigani9372
    @amaangigani9372 3 года назад

    this does not work when you have a django website

  • @HarryPirsch007
    @HarryPirsch007 3 года назад

    thank you , this video was just what i needed!

  • @markaman1980
    @markaman1980 6 лет назад +1

    Great, simple solution... Thanks!

  • @sigma_theta
    @sigma_theta 2 месяца назад

    can you do it on mobile?😅

  • @starsphere3179
    @starsphere3179 2 года назад

    hello guys
    can i ask,
    how to add audio more than one music in the web?so the web can play more than one song

    • @GeekTutorials1
      @GeekTutorials1  2 года назад

      JavaScript

    • @starsphere3179
      @starsphere3179 2 года назад

      @@GeekTutorials1 ok thanks bro,
      but i'm still learning html and css3,
      is it still possible to add more than one song only with html and css3?

    • @GeekTutorials1
      @GeekTutorials1  2 года назад

      @@starsphere3179 Not that I know of. It might be possible, but I haven't learnt a way yet.

    • @starsphere3179
      @starsphere3179 2 года назад

      @@GeekTutorials1 ok thank you bro

  • @jatinahlawat5030
    @jatinahlawat5030 6 лет назад

    How to decrease the sound level of autoplay in sound tag

  • @dorathedestroyer4081
    @dorathedestroyer4081 6 лет назад

    what about if the source of music you want is from the youtube, but it is still an mp3. i mean, a link source from youtube but the mp3 only

    • @GeekTutorials1
      @GeekTutorials1  6 лет назад

      singing song You cannot play an MP3 from RUclips using this code. RUclips videos, while they have audio, are not MP3 files.

    • @GeekTutorials1
      @GeekTutorials1  6 лет назад

      William Watts Correct. I thought he wanted to link to RUclips. But downloading the audio is fine and will work.

  • @AllInOne_9062
    @AllInOne_9062 4 года назад

    Hey how to add multiple songs at a time .
    How to make it auto play next songs

    • @GeekTutorials1
      @GeekTutorials1  4 года назад

      I haven't worked that one out yet - I'm thinking it'll be another language that we'll need to learn.

  • @miamiwax5504
    @miamiwax5504 4 года назад +3

    "Go into your account" means go into what account? I was told audio has to be uploaded to a public html folder? i'm beyond confused. I'm using blue host.

    • @GeekTutorials1
      @GeekTutorials1  4 года назад +3

      Sorry mate - I was referring to my students and their school accounts. Ignore. It usually just means your 'Documents' folder

    • @ZYRAXXXTHEDON3
      @ZYRAXXXTHEDON3 3 года назад

      Man this dude cant explain shit im.tellinnu man

    • @miamiwax5504
      @miamiwax5504 3 года назад +1

      I figured it out. It's easier using word press.

    • @ZYRAXXXTHEDON3
      @ZYRAXXXTHEDON3 3 года назад

      He a dumb ass he think we all know his ways of understanding

    • @ZYRAXXXTHEDON3
      @ZYRAXXXTHEDON3 3 года назад

      @@GeekTutorials1 - not document. Is your html folder they told u right

  • @womenwhorockwithsuccessmed2519
    @womenwhorockwithsuccessmed2519 4 года назад +1

    Good afternoon, I have everything completed, but tan error shows, "Live Preview Error." I am using Google Chrome.

  • @oviphoenix5996
    @oviphoenix5996 3 года назад

    How would you move the audio file do I use padding ?

    • @GeekTutorials1
      @GeekTutorials1  3 года назад

      Yeah mate. Or wrap it up in a div tag and align it

  • @tchippat7634
    @tchippat7634 Год назад

    Very well explained

  • @XTDS24
    @XTDS24 4 года назад

    is this can be applicable to notepad ++

  • @niveditapramanik4087
    @niveditapramanik4087 7 лет назад +2

    Thanks Bro !!!! It worked for me ! Yo

  • @TheLegendOfNiko
    @TheLegendOfNiko 4 года назад

    Can you add a title to it?

    • @GeekTutorials1
      @GeekTutorials1  4 года назад

      Mmmm, not sure! You probably could, but I only know this basic stuff.

  • @expytoll9105
    @expytoll9105 3 года назад

    works great tysm

  • @Anonymous-yr9he
    @Anonymous-yr9he 4 года назад

    cool but u lost ur ads from playing the song

    • @GeekTutorials1
      @GeekTutorials1  4 года назад

      Damn it - there goes some revenue. Oh well, you win some, you lose some.

  • @miamiwax5504
    @miamiwax5504 4 года назад

    How would this work if I was trying to do this for ebay?

    • @GeekTutorials1
      @GeekTutorials1  4 года назад

      Good question. I guess you'd have to link to a music file that already exists online. You couldn't use a track from just your computer.

    • @miamiwax5504
      @miamiwax5504 4 года назад

      @@GeekTutorials1 Yes i record audio from the old records i sell. I was told i need to host the files online and also they have to be https and not http to meet ebay requirements. Can I do this thru squarespace? I have no clue what I'm doing, it's so frustrating. If I was to try to find somebody to help locally do u think a regular computer shop would know? appreciate any advice.

  • @griffithstone8527
    @griffithstone8527 5 лет назад +1

    i am using google chrome though is that a problem? why it wont play the codec?

  • @jasopakisan1771
    @jasopakisan1771 3 года назад

    Thanks bro

  • @umeshkokate7811
    @umeshkokate7811 3 года назад

    Thanks man !

  • @sashaatree6535
    @sashaatree6535 6 лет назад

    is that player support playlist.m3u?

    • @GeekTutorials1
      @GeekTutorials1  6 лет назад

      нэйм ластнэйм No idea, sorry. Maybe Google search that one. I doubt it would support it.

  • @yuvrajbadu4739
    @yuvrajbadu4739 4 года назад

    What to write in type column if using WEBM

  • @anshuiscool613
    @anshuiscool613 4 года назад +1

    thank you so much, can you make a video on adding animations please!!

  • @souravkr529
    @souravkr529 3 года назад

    Autoplay not working 😭

  • @griffithstone8527
    @griffithstone8527 5 лет назад

    so i used brackets, and the audio turtorial worked, i used sublime text as my text editor before, when i tried using the html code on sublime text it wouldnt play the code, but when i used it in brackets it plays it perfect so i dont know whats wrong

    • @GeekTutorials1
      @GeekTutorials1  5 лет назад

      I knew you had your code correct! Not sure why Sublime is playing up. It usually works fine.

    • @griffithstone8527
      @griffithstone8527 5 лет назад

      @@GeekTutorials1 im with an unregistered subline editor but i still dont know why the code isnt working, i do have one question for brackets how do i set it so that brackets isnt the main open browseer for all my files

    • @GeekTutorials1
      @GeekTutorials1  5 лет назад

      @@griffithstone8527 you'll have to right click on any of your HTML files and choose 'Open With' and select Chrome. Make sure you check the box to always open that file type with Chrome.

    • @griffithstone8527
      @griffithstone8527 5 лет назад

      @@GeekTutorials1 how do i prevent them for opening, and why didnt that code work for sublime text? is it suppose to work for every html editor?

    • @GeekTutorials1
      @GeekTutorials1  5 лет назад

      @@griffithstone8527 it should have worked for Sublime. It will work in other editors.

  • @LaironXD
    @LaironXD 4 года назад

    It does not work for me...

    • @GeekTutorials1
      @GeekTutorials1  4 года назад

      I can't help you if you just say that. Give me a description of what's not working...

  • @tf2gamering
    @tf2gamering 3 года назад

    Thanks!

  • @tusharv69
    @tusharv69 5 лет назад +2

    Note pad or else program

  • @phanivarma2444
    @phanivarma2444 2 года назад

    thank you!

  • @williambailey542
    @williambailey542 6 лет назад

    doesn't seem to work in mobile devices. Any solutions?

    • @GeekTutorials1
      @GeekTutorials1  6 лет назад

      adfasdfas sdfasdfsadf it will work - you just need the audio tracked saved to your device. Alternatively, make the audio link go to an online sound file.

    • @williambailey542
      @williambailey542 6 лет назад

      sorry i put this on the wrong video comment. I am trying to make audio autoplay on mobile devices, which is what it's designed not to do
      here is my work now.
      codepen.io/Slimmwillis/pen/Rywvmb