solved JR Video Player on index.tpl or any other skin template

elric
@elric
10 years ago
81 posts
Repost from the documentation comments:

elric
15 Oct 2014 05:44:01PM @elric:
Hello, I've been looking for a way to use this to embed the dark player for video on my index.tpl, and have it play all videos on my site with a specific genre as a play list. Sort of like the old Jamroom 4.x with the admin video play list...Any suggestions?

Cheers,
~E

michael
16 Oct 2014 02:09:08AM @michael:
Better to ask questions in the forums, I almost missed this one. The code you want is:
{jrCore_media_player module="jrVideo" search="video_genre = rock"}

To play all videos in the 'rock' genre.

The other way to do it is to use the {jrCore_list} function to create the list of items, then pass that into the player.

{jrCore_list module="jrVideo" search="video_genre = rock" template="playlist.tpl"}

Then in playlist.tpl
{jrCore_media_player module="jrVideo" items=$_items}

Both ways will work.
- See more at: https://www.jamroom.net/the-jamroom-network/documentation/development/788/jrcore-media-player#sthash.0THyaCkE.dpuf
updated by @elric: 12/10/14 04:40:13PM
michael
@michael
10 years ago
7,714 posts
Yeah, I tried both ways before suggesting them. Both ways work. What code are you using?
elric
@elric
10 years ago
81 posts
I get this error:
Quote: jrCore_media_player: invalid type parameter
with this code:
{jrCore_media_player module="jrVideo" search="video_genre = rock"}


Chances are I'm misunderstanding implementation. Is this literally a copy and paste to work index.tpl?
updated by @elric: 10/16/14 10:27:37PM
michael
@michael
10 years ago
7,714 posts
It would but it looks like your skin does not define a default player to use. So you will need to add a type parameter.

In the skins from the-jamroom-network in the include.php file inside the _init() function you will see this type of setup:

jrCore_register_module_feature('jrCore', 'media_player_skin', 'jrElastic', 'jrVideo', 'jrVideo_player_dark');

Which is the skin registering which player it wants to use as the default player.

Since you getting a "jrCore_media_player: invalid type parameter" error it means that your skin hasn't got that setting set and that you will need to set it manually.

So use:
{jrCore_media_player module="jrVideo" items=$_items type="jrVideo_player_dark"}

and you should be good to go.
elric
@elric
10 years ago
81 posts
Michael! Thank you. You just helped make a really bad day a much better.

Cheers,
~E
michael
@michael
10 years ago
7,714 posts
good stuff. :)
elric
@elric
10 years ago
81 posts
On this whole note, I just want to say...the Jamroom community is still the best out there. In the course of my day job, I need to spend a lot of time in open source forums (vTiger, SugarCRM, Drupal, WordPress, etc.) Some are okay, mostly friendly (Drupal, Sugar), but some can be downright nasty (vTiger!!!). This community is by far the most like a 'community'. I hope I can pay forward the coolness I receive here.
michael
@michael
10 years ago
7,714 posts
Warm fuzzy feeling. :) What an awesome thing to say. That should be posted on the front page.

Nice one.
brian
@brian
10 years ago
10,148 posts
elric:
On this whole note, I just want to say...the Jamroom community is still the best out there. In the course of my day job, I need to spend a lot of time in open source forums (vTiger, SugarCRM, Drupal, WordPress, etc.) Some are okay, mostly friendly (Drupal, Sugar), but some can be downright nasty (vTiger!!!). This community is by far the most like a 'community'. I hope I can pay forward the coolness I receive here.

I agree with Michael - this type of feedback is awesome and is really appreciated ;)


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Ministry of Musics
Ministry of Musics
@xmafax
10 years ago
55 posts
Good day, I use M5 Dark template and I have the same error with audio and video player. Can you tell me please what files do I need to edit ?
I already try the template forum, but I didnt get any support.
Thanks
Paulo
brian
@brian
10 years ago
10,148 posts
You'll need to post your questions to the n8flex forum:

http://www.jamroom.net/n8flex/forum

we can't support the M5 skin as we did not create it.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

Tags