Home Events! Entrance Everyone Wiki Search Login Register

Welcome, Guest. Please login or register. - Thinking of joining the forum??
November 22, 2024 - @188.98 (what is this?)
Forum activity rating: Three Stars Posts: 36/1k.beats Unread Topics | Unread Replies | My Stuff | Random Topic | Recent Posts    Start New Topic
News: :eyes: ~ Inconvenience is counterculture ~ :eyes:

+  MelonLand Forum
|-+  World Wild Web
| |-+  ✁ ∙ Web Crafting
| | |-+  ☔︎ ∙ I need Help!
| | | |-+  Putting JS script inside of an HTML table?


« previous next »
Pages: [1] Print
Author Topic: Putting JS script inside of an HTML table?  (Read 876 times)
tarraxahum
Full Member ⚓︎
***


Xx_O_o_xX

⛺︎ My Room
SpaceHey: Friend Me!
StatusCafe: tarraxahum
iMood: tarraxahum
Matrix: Chat!

View Profile WWW

First 1000 Members!Joined 2022!
« on: December 15, 2022 @936.61 »

I honestly don't know how to formulate that title any better than this.

So here's the thing. There's this music player for tumblr themes and websites, SCM Music Player. Great thing, lets you choose a skin or even build your own, lets you create a playlist using YouTube videos (which means you don't have to upload mp3s anywhere), etc.

And I had this brilliant idea to have multiple of such players on a page by sticking them inside separate sections of an HTML table.

Well, what I'm quickly learning is that the script for the SCM player is coded in a way that it can only stick to the top or the bottom of the whole page, and putting the script code inside the td section of the table code does nothing to change that.

Which is where I'm faced with the brutal realization that I don't know JS that well (I'm mostly at "putting bricks of pre-made code together" stage of my website making experience…) to know how to do the thing I want to do.

For context, the code for the player looks like this:

Code
<!-- SCM Music Player https://www.scmplayer.net -->
<script type="text/javascript" src="https://www.scmplayer.net/script.js" 
data-config="{'skin':'skins/cyber/skin.css','volume':50,'autoplay':false,'shuffle':false,'repeat':1,'placement':'top','showplaylist':false,'playlist':[{'title':'VALKILLY -TOKYO RED (HUBRID Remix)','url':' in Reverse-Zombified','url':' ></script>
<!-- SCM Music Player script end -->

And the corresponding script goes thusly and scares my newbie butt with its complexity.

And what I had in my head before I got the reality check looks like this (roughly mocked up; the table is borderless but basically every element is in its own section, this is a 3x2 table):



Soooo this is the point where I gesture to all of this helplessly and ask if anyone would be so kind and point me to whatever could be done with the table code or the script (suppose I could download it to tweak) to make my vision come true and squish the player in that table frame.

Or to some other way to make a YouTube powered music player that could be squished into a table more easily.

Or just tell me that I'm in over my head, that works too! :grin:
Logged



"Why change the past, when you can own this day?" (c)
Melooon
Hero Member ⚓︎
*****


So many stars!

⛺︎ My Room
SpaceHey: Friend Me!
StatusCafe: melon
iMood: Melonking
Itch.io: My Games

View Profile WWW

Thanks for being rad!a puppy for your travelsAlways My PalFirst 1000 Members!spring 2023!Squirtle!!!!MIDI WarriorMIDI Warrior1234 Posts!OzspeckCool Dude AwardRising Star of the Web AwardMessage BuddyPocket Icelogist!OG! Joined 2021!...
« Reply #1 on: December 16, 2022 @54.14 »

Iv not looked at the code much - it looks annoying :tongue: but a super hacky solution that should totally work would be to put an iFrame in each player box of your table and then have the separate players in separate html files in your iframes. They'd be forced into the table because they'd be forced to stay inside their iframes! You'd have to fiddle a bit to make it look cohesive but I think it should work without too much trouble as long as you get the sizes right.
« Last Edit: December 16, 2022 @57.59 by Melooon » Logged


everything lost will be recovered, when you drift into the arms of the undiscovered
cinni
Full Member ⚓︎
***


believe in your dreams <3

⛺︎ My Room
SpaceHey: Friend Me!
StatusCafe: cinni

View Profile WWW

First 1000 Members!OG! Joined 2021!
« Reply #2 on: December 16, 2022 @258.60 »

not that i have a solution, but i found from personal experience that scmplayer does not work in iframes :sad:

edit: upon searching i found this! https://github.com/blackle/blamscamp looks like it could be right up your alley, i'll hafta look further into it
« Last Edit: December 16, 2022 @262.18 by cinni » Logged

tarraxahum
Full Member ⚓︎
***


Xx_O_o_xX

⛺︎ My Room
SpaceHey: Friend Me!
StatusCafe: tarraxahum
iMood: tarraxahum
Matrix: Chat!

View Profile WWW

First 1000 Members!Joined 2022!
« Reply #3 on: December 17, 2022 @869.95 »

Okay I'm back, can confirm, scmplayer does not work in iframes :tongue:

looks like it could be right up your alley, i'll hafta look further into it

I will look into it, thanks! From what I see at the first glance it still uses mp3s stored on the website or elsewhere, and I'd hoped to cheat the system with SCM's ability to play from YouTube, but maybe I just need to bite the bullet and load some songs onto a dropbox :grin:
Logged



"Why change the past, when you can own this day?" (c)
Pages: [1] Print 
« previous next »
 

Vaguely similar topics! (3)

What is an extremely messy way to write a hello world script?

Started by Icey!Board ☔︎ ∙ I need Help!

Replies: 9
Views: 2672
Last post September 03, 2023 @739.02
by Kallistero
sleepyXTRA - Inside The Mind of The Lo-Fi Artist - released FREE!

Started by ellievoyydBoard © ∙ Music Room

Replies: 1
Views: 1665
Last post September 28, 2024 @297.34
by evelly
HELP: Unity/C# Random Weather Script

Started by cinniBoard ☔︎ ∙ I need Help!

Replies: 1
Views: 1358
Last post May 17, 2022 @786.75
by Melooon

Melonking.Net © Always and ever was! SMF 2.0.19 | SMF © 2021, Simple Machines | Terms and Policies 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