Artifacts Gallery Guilds Search Wiki Login Register

Welcome, Guest. Please login or register. - Thinking of joining?
Autumn, 28 Oct 2026 - @478.17
Forum Activity: Three Stars Random | Recent Posts | Guild Recents
News: :skull: Websites are like whispers in the night  :skull: Guild Events: Halloween Watch-a-thon
Super News: ~~MelonLand's Halloween Profile Design Contest 2026~~
+  MelonLand Forum
|-+  Da Web Revival
| |-+  ✁ ∙ Web Crafting
| | |-+  ☔︎ ∙ I need Help!
| | | |-+  HELP: webamp and iframe help


« previous next »
Pages: [1] Print Embed
Author Topic: HELP: webamp and iframe help  (Read 2162 times)
Memory
Guest

« on: Autumn, 07 Sep 2023 @192 » Embed

so im trying to have a little box that contains a webamp in it like this : https://codepen.io/anonymousredfox/pen/dywNoXM

id like it to stay in a small area like it is there

but i dont know how to just embed the webamp into said area. im not sure how i would take a little piece of my html page to embed in a box-
does anyone know how i could do that?


Logged
TheNothingMonster
Sr. Member ⚓︎
****
View Profile WWW


Hey psst! Wanna see something spooky?
⛺︎ My Room
StatusCafe: thenothingmonster

Artifacts:
Great Posts PacmanFirst 1000 Members!Joined 2023!
« Reply #1 on: Autumn, 07 Sep 2023 @435 » Toggle Font Embed

You just have to make a new HTML page containing only your Webamp and link that page into the iframe you want!

So, create a new HTML page with only your webamp included. Let's name it "webamp_player_frame.html" for the sake of this example.
Your new webamp page should look something along these lines (I referenced dokodemo's webamp guide for the scripts):
Code
<!DOCTYPE html>
<html>
  <head>
    <title>Webamp Player Frame</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://unpkg.com/webamp@1.4.0/built/webamp.bundle.min.js"></script>
  </head>
  <body>
    <div style="width:40px; height:40px; position:absolute; bottom:0px; left:0px;">
      <div id="winamp-container"></div>
      <script>
        const Winamp = window.Webamp;
        // All configuration options are optional.
        const webamp = new Webamp({
          // Optional.
          initialTracks: [
            {
              metaData: {
                artist: "Artist",
                title: "Title",
              },
              url: "URL TO SONG .mp3",
            },
            {
              metaData: {
                artist: "Artist",
                title: "Title",
              },
              url: "URL TO SONG .mp3",
            },
            {
              metaData: {
                artist: "Artist",
                title: "Title",
              },
              url: "URL TO SONG .mp3",
            },
          ],
          initialSkin: {
            url: "URL TO SKIN .WSZ"
          },
        });
        webamp.renderWhenReady(document.getElementById('winamp-container'));
      </script>
    </div>
  </body>
</html>

And to link your webamp, just insert an iframe sourcing the new webamp page (webamp_player_frame.html) in the page you want for the webamp to appear! (I hope that made sense.)
Code
<iframe src="webamp_player_frame.html" height="348" width="275" title="Webamp Player"></iframe>
The iframe will link your webamp player within its box according to its src attribute. You may have to tweak the width/height settings a bit, as well as the path to the webamp's page inside the iframe. Other than that, it should work just fine.

Of course, you can customise anything you want. Feel free to take these snippets as a base and build along. :grin:
If something did not work out for you, you can always ask!

Logged

~~~~~~~~~~~~
Memory
Guest

« Reply #2 on: Autumn, 07 Sep 2023 @951 » Embed

thank you! it worked :grin:

Logged
Memory
Guest

« Reply #3 on: Autumn, 08 Sep 2023 @653 » Embed

You just have to make a new HTML page containing only your Webamp and link that page into the iframe you want!

So, create a new HTML page with only your webamp included. Let's name it "webamp_player_frame.html" for the sake of this example.
Your new webamp page should look something along these lines (I referenced dokodemo's webamp guide for the scripts):
Code
<!DOCTYPE html>
<html>
  <head>
    <title>Webamp Player Frame</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://unpkg.com/webamp@1.4.0/built/webamp.bundle.min.js"></script>
  </head>
  <body>
    <div style="width:40px; height:40px; position:absolute; bottom:0px; left:0px;">
      <div id="winamp-container"></div>
      <script>
        const Winamp = window.Webamp;
        // All configuration options are optional.
        const webamp = new Webamp({
          // Optional.
          initialTracks: [
            {
              metaData: {
                artist: "Artist",
                title: "Title",
              },
              url: "URL TO SONG .mp3",
            },
            {
              metaData: {
                artist: "Artist",
                title: "Title",
              },
              url: "URL TO SONG .mp3",
            },
            {
              metaData: {
                artist: "Artist",
                title: "Title",
              },
              url: "URL TO SONG .mp3",
            },
          ],
          initialSkin: {
            url: "URL TO SKIN .WSZ"
          },
        });
        webamp.renderWhenReady(document.getElementById('winamp-container'));
      </script>
    </div>
  </body>
</html>

And to link your webamp, just insert an iframe sourcing the new webamp page (webamp_player_frame.html) in the page you want for the webamp to appear! (I hope that made sense.)
Code
<iframe src="webamp_player_frame.html" height="348" width="275" title="Webamp Player"></iframe>
The iframe will link your webamp player within its box according to its src attribute. You may have to tweak the width/height settings a bit, as well as the path to the webamp's page inside the iframe. Other than that, it should work just fine.

Of course, you can customise anything you want. Feel free to take these snippets as a base and build along. :grin:
If something did not work out for you, you can always ask!



there is one thing i noticed that i have a question about : https://cdn.discordapp.com/attachments/1137355840978944091/1149715745622724648/winamp.PNG


the scrollbars on the right and bottom of the iframe. is there a way to make it so these cant be seen?

Logged
TheNothingMonster
Sr. Member ⚓︎
****
View Profile WWW


Hey psst! Wanna see something spooky?
⛺︎ My Room
StatusCafe: thenothingmonster

Artifacts:
Great Posts PacmanFirst 1000 Members!Joined 2023!
« Reply #4 on: Autumn, 08 Sep 2023 @688 » Toggle Font Embed

is there a way to make it so these cant be seen?
Yes, just adjust the iframe's width and height properties (numbers) so that the box has more space to show the webamp.

<iframe src="webamp_player_frame.html" height="348" width="275" title="Webamp Player"></iframe> <-- these numbers I marked with underlining. Just increase them by a bit until there are no more scrollbars. ^^

Logged

~~~~~~~~~~~~
Memory
Guest

« Reply #5 on: Autumn, 08 Sep 2023 @716 » Embed

thanks ^^

Logged
Pages: [1] Print Embed 
« previous next »
 

Melonking.Net © Always and ever was! SMF 2.0.19 | SMF © 2021 | Privacy Notice | Send Feedback | Supporters ♥ Forum Guide | Rules | RSS | WAP | Mobile


MelonLand Badges and Other Melon Sites!

MelonLand Project! Visit the MelonLand Forum! Support the Forum
Visit Melonking.Net! Visit the Gif Gallery! Pixel Sea TamaNOTchi
@000 Melon
Land
Forum Art Hub Chat Webring Explore Random Recent Tenement Arcade Want to Login or Join ? Web Craft Guide Graphic Catalogue Wiki Help I'm Lost! Link Land Newsletters Image Stream Minecraft: Online
Zap!
Passport Sites tamaNOTchi Asatte Add your site?
Aero Archive Onio Cafe 32 Bit Cafe Status Cafe