uCoz Community » uCoz Modules » Additional Features » Music on the Site (How to add music .mp3, playlist so on...)
Music on the Site
Sunny
Posts: 9296
Reputation: 456

Message # 1 | 12:28 PM
You can insert mp3 player into any page or message. It may serve to let visitors listen to various compositions. It may be a background for you site (do not abuse this capability, don’t forget that mp3 files weight quite a lot, and not all users have broadband Internet access. They won’t be able to load your site in case of automatic playback)

It is used in the following way:
By means of the BB-code:

Code
[audio] [/audio]

Having entered the following
Code
[audio]http://forum.ucoz.com/i_love_ucoz.mp3[/audio]

we'll get

You can also insert a player with the help of JS-code.
To get it use Multimedia - > Insert audio (mp3)
or Multimedia - > Upload audio (mp3) [after uploading press JS-code near necessary file]
As a result, for the mp3 file at http://forum.ucoz.com/i_love_ucoz.mp3
we'll get the following code

Code
<script src="http://forum.ucoz.com/media/?auto=0;small=0;color=0055e9;textoff=0;t=audio;f=http%3A%2F%2Fforum.ucoz.com%2Fi_love_ucoz.mp3" type="text/javascript"></script>

You can also insert it into any place of your site. Besides, it has controlled parameters (settings), which we’ll describe below.

Quote
auto=0;small=0;color=0055e9;loop=0;textoff=0

Values in bold type may be changed from 0 to 1. In this way, you’ll enable them. By means of "color" specify code color.
So, if we change in the code
auto=0 for auto=1 - a song will be played automatically (be careful with this feature, think of those who have slow Internet and paid traffic).

small=1 – will display a small player of two buttons. Here it is:

loop=1 – a file will be played back non-stop (till you press stop)

textoff=1 – will remove text (e.g. "i_love_ucoz.mp3" in the example above)

color=0055e9 (player color management) –instead of 0055e9 write the code of a desired color. Codes can be found out from tables or in Photoshop by clicking on a color.
Example. Let’s take the code of the black color - 000000

Code
<script src="http://forum.ucoz.com/media/?auto=0;small=0;color=000000;textoff=0;t=audio;f=http%3A%2F%2Fforum.ucoz.com%2Fi_love_ucoz.mp3" type="text/javascript"></script>

we'll get:



Music as a background

Code
<bgsound src="URL" loop=5 volume=0 balance=0>

where
URL – file name
loop – number of repeats, if loop="infinite" - unlimited
format - .wav .mid

EMBED tag

It is used to insert into pages multimedia content and other files.

Code
<EMBED attributes> </EMBED>

  • height sets vertical size of embedded object

  • width sets horizontal size of embedded object

  • autostart sets possibility to start while loading, takes on the values "true" or "false"

  • loop sets number of repeats, takes on the values "true" or "false"

  • hidden allows to hide active module, takes on the values "true" or "false"

  • src specifies URL of a multimedia file

  • pluginspage specifies URL of the plug-in for playing back a multimedia file

  • bgcolor sets background of the object

  • type specifies multimedia file type

  • quality specifies multimedia file quality

  • alt sets alternative content

    Code
    <EMBED src="file.swf" menu="true" quality="high" bgcolor="#000066" width="760" height="410" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave"></EMBED>

    As you can see from the example you can insert Flash files, as well as video and audio.

    You can write a code with minimal number of attributes

    Code
    <embed src="video.avi" width="760" height="410">

    Music in a pop-up (new) window

    There is nothing difficult, use JavaScript

    On the page where you want to place the button "Play music" insert the following code between the < head> tags

    Code
    <script>
    function openWindow()
    {
    muzWindow = open("http://www.ucoz.com/music.html", "newWindow", "width=300,height=300, status=no, toolbar=no, menubar=no");
    }
    </script>

  • width=300 height=300 – width, height
  • http://www.ucoz.com/music.html – link to the page with your music

    Then put in any place of the page either the link

    Code

    <a href="#" onClick="openWindow()">Press to play music</a>

    or the button

    Code
    <button onClick="openWindow()">Press to play music</button>

    I'm not active on the forum anymore. Please contact other forum staff.
  • Valmont
    Posts: 17
    Reputation: 0

    Message # 136 | 1:13 PM
    Quote (Sunny)
    Add the music code to the page content.

    Thank you!!
    clever
    Posts: 1
    Reputation: 0

    Message # 137 | 5:18 PM
    mr/mis/misses/mister imadeasite

    1 first login
    2 go to main page
    3 click add new entry
    4 and at the short description choose bb code biggrin :D biggrin

    Added (2010-07-16, 11:18 Am)


    muthu
    Post edited by clever - Friday, 2010-07-16, 5:20 PM
    bobs913
    Posts: 2
    Reputation: 0

    Message # 138 | 9:28 AM
    <embed src="---Music--Link---" width="144" height="60" autostart="true" loop="true" hidden="true"></embed>
    were do i put this do i put it in the custmize design or in the page html
    Scubs
    Posts: 18
    Reputation: 2

    Message # 139 | 10:50 AM
    where u wan't it to appear ofcourse
    Admistrator
    Posts: 105
    Reputation: -3

    Message # 140 | 10:50 AM
    Can i put background music on my website and NOT let the users on my website have a choice to turn it off? :/
    HeinLay
    Posts: 126
    Reputation: 0

    Message # 141 | 11:53 AM
    You can use some code.you can search in Google.
    uCoz forever user from
    shadychiri
    Posts: 62
    Reputation: 2

    Message # 142 | 1:15 PM
    @Newbie
    you upload your song to the file manager then you point the src to the location of your file in the file server for instance if your site is
    Code
    http://somesite.ucoz.com/

    then assuming you upload it to the file manager without inserting it in a folder then your code will be something like this
    <bgsound src="/your song .mid" loop=0 volume=1 balance=0>
    notice that if your file is in another site you have to use the full code in the src for instance
    Code
    <bgsound src="/http://someothersite.com/music/music.mid" loop=0 volume=1 balance=0>

    loop means how many times you want the song to repeat if you want forever then use code autostart="true" and eliminate the loop code
    good luck

    Admistrator
    Posts: 105
    Reputation: -3

    Message # 143 | 8:16 PM
    Natashko Where do i go to do that? or where do i go to hide it?
    Natashko
    Posts: 3366
    Reputation: 171

    Message # 144 | 1:14 PM
    Admistrator, just read the first post carefully. Everything is explained there.
    It depends on where you want to put it. E.g. if in a module - embed the code in the entry (enable BB-codes) If the main page: CP->Main » Page Editor » Entries management->Home page->Change (enable BB codes) etc. Be more specific.
    fattyspins
    Posts: 12
    Reputation: 0

    Message # 145 | 10:22 PM
    i have a player called xspf player for a website it can play playlists and single mp3s

    player download http://eitee2009.ucoz.com/xspf_player.swf

    Code

    <?xml version="1.0" encoding="UTF-8"?>
    <playlist version="0" xmlns = "http://xspf.org/ns/0/">
        <trackList>

    <track>
          <location>http://www.YOURDOMAIN.com/NAME.mp3</location>
          <image>http://www.name.com/folder/picture2.jpg</image>
          <annotation>Forever - Chris Brown</annotation>
         </track>

    <track>    <location>http://www.YOURDOMAIN.com/NAME.mp3</location>
          <image>http://www.name.com/folder/picture2.jpg</image>
          <annotation>She Moves In Her Own Way - The Kooks</annotation>
         </track>

    <track>    <location>http://www.YOURDOMAIN.com/NAME.mp3</location>
          <image>http://www.name.com/folder/picture2.jpg</image>
          <annotation>Me Haces Bien - Jorge Drexler</annotation>
         </track>

        </trackList>
    </playlist>

    copy the playlist code to notepad and save it with notepad
    save playlist as .xspf
    ------------------------------------
    embleming on to the site
    Code
    <object type="application/x-shockwave-flash" width="400" height="170"
    data="http://yourdomain.com/xspf_player.swf?playlist_url=http://yourdomain.com/yourplaylistlist.xspf">
    <param name="movie"   
    value="http://yourdomain.com/xspf_player.swf?playlist_url=http://yourdomain.com/yourplaylistlist.xspf" />
    </object>
    Post edited by fattyspins - Wednesday, 2010-12-08, 10:26 PM
    FuriousAngels
    Posts: 28
    Reputation: 0

    Message # 146 | 6:57 PM
    fattyspins, I am confused by your post.
    fattyspins
    Posts: 12
    Reputation: 0

    Message # 147 | 11:44 PM
    FuriousAngels, sorry then its easy to me
    mmet67
    Posts: 3
    Reputation: 0

    Message # 148 | 9:27 AM
    I have a problem. I have a mp3 player on my site and it works just fine. My problem is that I want it to show up on all my pages. It isn't showing up on the pages I created. I placed the code here

    >main >Custom Design >The first Container

    I want it to show up over my menu and it does. I just don't understand why it isn't showing up on all pages. I have installed other codes in the same spot and they show up on them all. Here is the code:

    Code
    <!-- <block1> --> <center><!--
    BEGIN JAVASCRIPT PLAYER EMBED CODE  
    More players and documentation at: www.premiumbeat.com/flash_media_players
    -->

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>
    <div id="player-holder"></div>

    <script type="text/javascript">
      var options = {};
      options.mediaPath = "http://marias-family.ucoz.com/Great_Glen.mp3";
      options.autoPlay = "true";
      var params = {};
      params.allowScriptAccess = "always";
       
      swfobject.embedSWF("LWMusicPlayer.swf", "player-holder", "65", "21", "9.0.0",true, options, params, {});
    </script>

    <!-- END PLAYER EMBED CODE --></center><br>
       
    <?if($SMENU_1$)?>
    <div class="box"><h3><!-- <bt> -->Site Menu<!-- </bt> --></h3><div class="boxContent"><!-- <bc> -->$SMENU_1$<!-- </bc> --></div></div>
    <?endif?>
    <!-- </block1> -->

    Here is my website so you can see what I am talking about

    marias-family.ucoz.com

    Thanks

    Natashko
    Posts: 3366
    Reputation: 171

    Message # 149 | 3:44 PM
    mmet67, insert the code of the player into the pages, created by you. Go to Control panel: Page Editor->Pages management->Click Change next to the name of the necessary page, created by you->Insert the player code (do not forget to enable BB codes or J-S codes)->Save. Do it for all the created pages
    There is another option. You may create a block with the help of Builder and insert the player's code there. In this way it will be displayed on all the pages. You may see here how to do it http://forum.ucoz.com/forum/5-5862-1#27866
    SummerStar
    Posts: 3
    Reputation: 0

    Message # 150 | 3:34 AM
    Excuse me, I Need help are my site really bad.
    i want to put music on my site and i need help O_O actually i know how but i every time i put it on my site
    it mess up some of my pages TT_TT I need your help sad please
    i want to put this music code on my site with out messing it up here the code:
    [i*] removed[/i]

    on my site http://www.gummybearstakeover.tk/
    PLEase i put i on my site but it mess up my pages like on my photo, guestbook, games pages, and etc.
    PLEase help me fix it sad TTOTT please i begg u
    btw i dont know if this the right place to put it :O
    Post edited by SummerStar - Sunday, 2011-07-31, 3:36 AM
    uCoz Community » uCoz Modules » Additional Features » Music on the Site (How to add music .mp3, playlist so on...)
    Search: