solved Embed The Playlist Player In An External Site

alt=
@andrusito
7 years ago
302 posts
Hi, following this guide:

https://www.jamroom.net/the-jamroom-network/documentation/jamroom-admin-handbook/1556/howto-embed-the-playlist-player-in-an-external-site

I've just build a playlist but it looks so bad:

http://devocionmusical.com/playlist/standalone/308

I'm using Playlist module 1.1.5

I don't have modifications on that template:

http://imgur.com/a/U1J27

Is that a bug?
Thanks !

updated by @andrusito: 10/26/17 08:14:34AM
paul
@paul
7 years ago
4,331 posts
I'm seeing this in the AudioPro skin as well. It works ok with other skins.
Let me check it out.
Thanks


--
Paul Asher - JR Developer and System Import Specialist
alt=
@andrusito
7 years ago
302 posts
Sure.
Thanks Paul-
michael
@michael
7 years ago
7,746 posts
This is fixed in jrPlaylist ver 1.1.6 which is in the marketplace now.

update and it should be working.
alt=
@andrusito
7 years ago
302 posts
Thanks Michael and Paul!

Now it works.
alt=
@andrusito
7 years ago
302 posts
Just one last question:

Do I have to create a new playlist for each player I want to embed?
I mean, the artist or the album.. don't they have an ID I could use here?:

http://devocionmusical.com/playlist/standalone/HERE

Just asking :)

Thanks again-
paul
@paul
7 years ago
4,331 posts
To play all the tracks of different artists, seperate playlists for each artist would need to be created.
Hope that helps


--
Paul Asher - JR Developer and System Import Specialist
michael
@michael
7 years ago
7,746 posts
That playlist player is a player that plays playlists, so the ID you have at HERE is the id of a playlist.

If you wanted to not use a playlist, you could set it up a different way to take the ID of the profile then use the {jrCore_list} function to play all of that artists songs.

Take a look at the standalone_player.tpl file in the playlist module to see how its set up and make a page in your skin to do it for artists instead if you prefer that.
alt=
@andrusito
7 years ago
302 posts
Do I have to create a page for each artist following the method you suggest?
alt=
@andrusito
7 years ago
302 posts
How can I use {jrCore_media_player} passing in a profile_id?

I've already check this guide but can't find the right way:

https://www.jamroom.net/the-jamroom-network/documentation/module-developer-guide/788/jrcore-media-player
alt=
@andrusito
7 years ago
302 posts
I'm trying this:

on AudioPro/test.tpl:

{jrCore_list module="jrAudio" order_by='audio_display_order numerical_asc' limit="10" profile_id="24044"  template="standalone_player.tpl"}

and on jrAudio/standalone_player.tpl:

{jrCore_media_player module="jrAudio" type="jrAudio_player_dark"}

The result is a white square with a loading gif in the middle. (attached img)

What's wrong in that code? How can I show a player with all songs from this artist id: 24044?
updated by @andrusito: 07/24/17 08:16:45AM
douglas
@douglas
7 years ago
2,793 posts
Hello,

I think your jrCore_media_player function should look more like this...

{if isset($_items)}
{foreach $_items as $item}
{jrCore_media_player type="jrAudio_player_dark" module="jrAudio" field="audio_file" item=$item}
{foreach}
{/if}

Here are the Docs on the jrCore_media_player function.
https://www.jamroom.net/the-jamroom-network/documentation/module-developer-guide/788/jrcore-media-player

Hope this helps!


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
michael
@michael
7 years ago
7,746 posts
Take a look at this section:

Docs: ".....Use a variable from the URL"
https://www.jamroom.net/the-jamroom-network/documentation/module-developer-guide/1637/howto-use-capture-to-avoid-using-another-file-for-jrcore-list-calls#optional-use-a-variable-from-the-url

It goes over how to pass in the profile id from the address bar.
michael
@michael
7 years ago
7,746 posts
andrusito:
I'm trying this:

on AudioPro/test.tpl:

{jrCore_list module="jrAudio" order_by='audio_display_order numerical_asc' limit="10" profile_id="24044"  template="standalone_player.tpl"}

and on jrAudio/standalone_player.tpl:

{jrCore_media_player module="jrAudio" type="jrAudio_player_dark"}

The result is a white square with a loading gif in the middle. (attached img)

What's wrong in that code? How can I show a player with all songs from this artist id: 24044?

You need to look at what your asking, then if its not returning what you're expecting, re-phrase it.
{jrCore_list module="jrAudio" order_by='audio_display_order numerical_asc' limit="10" profile_id="24044"  template="standalone_player.tpl"}
That reads: "Get me a list of 10 audio items from the profile 24044 and pass the list in to the template standalone_player.tpl"

Which would be fine if standalone_player.tpl was setup to receive a list, but its not, so don't pass it a list. You need to build your own template file which is expecting to receive a list.

The next piece of code you have
{jrCore_media_player module="jrAudio" type="jrAudio_player_dark"}
reads: "Show an audio player with a dark skin"

But there is no mention of anything to play, so it will play nothing.
alt=
@andrusito
7 years ago
302 posts
Thanks guys,

michael:
You need to look at what your asking, then if its not returning what you're expecting, re-phrase it.

I know it's not returning what I'm expecting, that's why I came here to get some help. I'm not a programmer and I don't know how to edit the code to make it work. I've doing some test, but it still don't work.

I know you know how to do it, or what I'm missing, so please tell me.

@douglas, I tried the code you provided me, but it doesn't work.

@michael you said "there is no mention of anything to play" so how do I mention something to play? That document you sent me is great, that's what I was looking for. Thanks.

This is what I got now:

test.tpl

{jrCore_list module="jrAudio" order_by='audio_display_order numerical_asc' limit="10" template="standalone_player.tpl" profile_id=$option}

standalone_player.tpl

{jrCore_media_player type="jrAudio_player_dark" module="jrAudio" field="audio_file" item=$item}

But I get a blank page...

Thanks again to both of you.
updated by @andrusito: 07/25/17 06:27:46AM
douglas
@douglas
7 years ago
2,793 posts
Hello,

See if this works for you...

ltest.tpl

{jrCore_list module="jrAudio" order_by="_item_id desc" limit="10" template="standalone_player.tpl" profile_id="1"}

standalone_player.tpl

{if isset($_items)}
{foreach $_items as $item}
{jrCore_media_player type="jrAudio_player_dark" module="jrAudio" field="audio_file" item=$item}
{/foreach}
{/if}

Hope this helps!


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
alt=
@andrusito
7 years ago
302 posts
Hi @douglas this is the result: http://devocionmusical.com/test

I had to change profile_id="1" to "24044".

I'd prefer to have only one audio player with all song from that profile id on it.

Thanks, I think it's closer.
updated by @andrusito: 07/26/17 06:33:25AM
douglas
@douglas
7 years ago
2,793 posts
Try using jrPlaylist_player_dark for the type instead of jrAudio_player_dark.

Hope this helps!


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
alt=
@andrusito
7 years ago
302 posts
mm there's no difference :/

I also tried with type="jrPlaylist_player_dark" module="jrPlaylist"

Do you think it's not possible then?
updated by @andrusito: 07/26/17 08:26:19AM
douglas
@douglas
7 years ago
2,793 posts
Your correct, that isn't going to work but this should, just tested it.

test.tpl

{jrCore_list module="jrAudio" order_by="_item_id desc" limit="1" template="standalone_player.tpl" profile_id="24044"}

standalone_player.tpl

{if isset($_items)}
{foreach $_items as $item}
{jrCore_media_player module="jrAudio" field="audio_file" search1="_profile_id = `$_items.0._profile_id`" order_by="audio_file_track numerical_asc" limit="50" autoplay=false}
{/foreach}
{/if}

Hope this helps!


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos

Tags