JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 6th, 2013, 12:29 PM
killer_rabbit killer_rabbit is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2013
Location: Beijing
Posts: 5 killer_rabbit User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 45 m 53 sec
Reputation Power: 0
Question Other - Tweaking the SCM music player for indiv. track info

Hey y'all!

Warning: while I'm at ease with HTML + CSS, I know very little JS. Please forgive me for being ignorant on these matters...

I've just implemented a nice open-source, JS-based radio on our Wordpress website: SCM Music Player (Sorry, I'd like to provide an URL, but it's blocked in my post... Easy to Google, though). Among other qualities, it enables one to browse around on the site while streaming.

Our website is at: www(dot)meridian(hyphen)online(dot)com

This radio is meant to enhance the browsing experience of our website, but also to give an introduction to the various artists who composed the music being played. Therefore, what I'd like to do is 'add' an extra piece of info to each track: a link to a page on our website presenting the musician, the contents of the track, etc.

For example, when the track "Transfiguration" is being played, I would like the music player to include a link to the page discussing this track.

Now I've included to the player a hard-coded link to the page presenting *all* of the available tracks; but I don't know how to replace this by a customized link that would directly lead to the post discussing the song.

Right now, the player works this way: in the header of my Wordpress theme, I must add a snippet of code, including the names + URL of each music file ("{'title':'Transfiguracão - by Cordel do Fogo Encantado','url':'(.../meridian-online/transfigurac-o-cordel-do-fogo'}" etc.).

I suppose I would have to find a way to add an extra bit of metadata for each track — namely, the URL to the explanatory page. But I don't know how to modify the JS files accordingly.

Any advice on how to handle this?
(I've written the plugin developer, but after many weeks, still no reply)

Cheers,
D-

Reply With Quote
  #2  
Old January 6th, 2013, 02:52 PM
web_loone08's Avatar
web_loone08 web_loone08 is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Aug 2008
Posts: 605 web_loone08 User rank is Second Lieutenant (5000 - 10000 Reputation Level)web_loone08 User rank is Second Lieutenant (5000 - 10000 Reputation Level)web_loone08 User rank is Second Lieutenant (5000 - 10000 Reputation Level)web_loone08 User rank is Second Lieutenant (5000 - 10000 Reputation Level)web_loone08 User rank is Second Lieutenant (5000 - 10000 Reputation Level)web_loone08 User rank is Second Lieutenant (5000 - 10000 Reputation Level)web_loone08 User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 1 Day 16 h 34 m 55 sec
Reputation Power: 69
From what I can tell; the script is creating an iframe to display the player on your site. So my idea would be this (since you do not have any support from the plugin developer)... use HTML5 window.postMessage() to retrieve the text from this tag:

Code:
<div class="text" id="title" data-bind="
		followLeft:'#seeker',
		text:display
		">Castle - by Dear Eloise</div>


which resides in this iframe ("Castle - by Dear Eloise", happened to be the singer and song that was playing, when I inspected the iframe element). Then display the singer and the song back into your page. I would create an array (either static or dynamic) of musician's names and corresponding links to the musician's website; then use a regex to match the musician's name (from the postMessage()... which I would probably put into a variable, to make it easier to compare, for the regex) with the link in the array and display that along beside the singer and song, in your website. This would all be put in a function; that would update ever X amount of seconds (to create a real time display [within your website] of the singer, song, and singer's website).

Off the top of my head; that sounds like a winner to me - good luck.

Reply With Quote
  #3  
Old January 17th, 2013, 01:02 AM
killer_rabbit killer_rabbit is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2013
Location: Beijing
Posts: 5 killer_rabbit User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 45 m 53 sec
Reputation Power: 0
Hey man,
Thanks a lot for taking the time to write this reply.
The problem is, I don't know the first thing about Javascript... I looked up the terminology you mention, and I get a rough idea of what to do, but with my very deep ignorance of this language I will need... many, many hours (days possibly) in order to have anything happen.

I don't suppose there would be any easier way, right? If not, I'll just have to wait until I can coax someone into doing this for me! I'm sure it's a matter of minutes for someone who's really into this...

Cheers,
D-

Reply With Quote
  #4  
Old January 17th, 2013, 01:28 AM
web_loone08's Avatar
web_loone08 web_loone08 is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Aug 2008
Posts: 605 web_loone08 User rank is Second Lieutenant (5000 - 10000 Reputation Level)web_loone08 User rank is Second Lieutenant (5000 - 10000 Reputation Level)web_loone08 User rank is Second Lieutenant (5000 - 10000 Reputation Level)web_loone08 User rank is Second Lieutenant (5000 - 10000 Reputation Level)web_loone08 User rank is Second Lieutenant (5000 - 10000 Reputation Level)web_loone08 User rank is Second Lieutenant (5000 - 10000 Reputation Level)web_loone08 User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 1 Day 16 h 34 m 55 sec
Reputation Power: 69
Actually, after further pondering on my response to your question; I realized that you would need to have access to add a small piece of code to the plug-in website and you would not be able to do that; I am almost sure of that. My other idea would be to create a timed function that would be based on the song's length; that would update an element's innerHTML... and display the artist and the song title. Of course; you could not obtain the time dynamically; hence it would have to be hard coded or static... within your page. This also would not be an absolute real time correlation with the plug-in song's length... as I mentioned earlier... you cannot access the DOM of the iframe (that the plug-in creates, to display the music player widget). In my opinion; after reviewing your site and considering your limitation; I think your better off with the one page with all the artist and song titles, in it. Or... if I was you; I would try to contact the plug-in author/developer and present them with what your trying to do and ask them if they might have any suggestions.

Last edited by web_loone08 : January 17th, 2013 at 01:31 AM.

Reply With Quote
  #5  
Old January 17th, 2013, 05:16 AM
killer_rabbit killer_rabbit is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2013
Location: Beijing
Posts: 5 killer_rabbit User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 45 m 53 sec
Reputation Power: 0
Yes, I think I'll try to pester the plug-in developer enough so that he'll agree to help me out on this.

Thanks again, anyhow!

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > Other - Tweaking the SCM music player for indiv. track info

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap