XF 1.5 SCM Music Player

Alex Ayano

Member
Hello,

I was wondering about creating a special feature for members to use. Is it possible to allow users to use the SCM Player on users profiles? http://scmplayer.net/

I am a member in another site and they are IPB 3.4.9 When you visit my profile the SCM player begins playing whatever song I set up as shown here:

Nb95TUa.jpg



in my profile options where I can edit everything, I can choose to create the playlist and change the player skin and play options:

m0slrTs.jpg


If this is possible in IPB 3.4.x I suppose it can be done here in XF too. But how would one go about to adding the files as part of the profile so all the groups can have a music player in their profiles?

All the files for the music player are here: https://github.com/cshum/SCM-Music-Player/

Thanks in advance.
 
Looking at the embed code, if you just want one song in the playlist it's straightforward:
HTML:
<script type="text/javascript" src="http://scmplayer.net/script.js"
data-config="{'skin':'skins/tunes/skin.css','volume':50,'autoplay':false,'shuffle':false,'repeat':1,'placement':'top','showplaylist':false,'playlist':[{'title':'Test','url':'http://test.net/song1.mp3'}]}" ></script>

You could implement it as a custom user field (member puts URL of song) which then you can replace as a variable when displaying as HTML replacement:
https://xenforo.com/help/custom-user-fields/

On mobile but that should get you started.
 
Looking at the embed code, if you just want one song in the playlist it's straightforward:
HTML:
<script type="text/javascript" src="http://scmplayer.net/script.js"
data-config="{'skin':'skins/tunes/skin.css','volume':50,'autoplay':false,'shuffle':false,'repeat':1,'placement':'top','showplaylist':false,'playlist':[{'title':'Test','url':'http://test.net/song1.mp3'}]}" ></script>

You could implement it as a custom user field (member puts URL of song) which then you can replace as a variable when displaying as HTML replacement:
https://xenforo.com/help/custom-user-fields/

On mobile but that should get you started.
Thank you it seems to work, only that when I visit other areas the song keeps playing
 
It looks like the script is designed to be "persistent" - great for traditional websites/blogs... not so great for forums..

I'm not familiar with this script - you'll have to see if there's an option to change this behaviour..
 
There is no option to disable that with this script it looks like. The only solution I can think of without really exerting effort would be to write a js function that removes playlist entries and then kills the player if no media for the player is detected as specified on the page being viewed.

All in all it would probably just be easier to use a different player for this.
 
There is no option to disable that with this script it looks like. The only solution I can think of without really exerting effort would be to write a js function that removes playlist entries and then kills the player if no media for the player is detected as specified on the page being viewed.

All in all it would probably just be easier to use a different player for this.
What are other good players that can be used with XF
 
Top Bottom