Active
Project:
Dash Media Player
Version:
6.x-1.7
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
18 Mar 2010 at 00:34 UTC
Updated:
30 Jan 2011 at 16:13 UTC
I watched the videos, but didn't see this subject brought up in them.
Is it possible to have a single dashplayer handle both, audio and video playlists? I was trying something along the lines of:
$params['linkarg1'] = "videos";
$params['linkindex1'] = 0;
$params['linktext1'] = "Videos";
$params['playlist1'] = 'videos';
$params['linkarg2'] = "Mp3s";
$params['linkindex2'] = 0;
$params['linktext2'] = "Mp3s";
$params['playlist2'] = 'audio';
print dashplayer_get_player( $params );
but, it didn't work.. What I'm trying to accomplish is having a single player page come up, and based on which tab you choose, it selects the audio or video playlists. If someone has figured out a way to get this to work, could you post the solution? Thanks!
Greywolf
Comments
Comment #1
scottalan commentedYes, it's definitely possible. Below is the code used to make this happen-
-Scott
Comment #2
greywolfsspirit commentedlooking at this.. I'm still a little confused.. in the $params['playlist'] = 'theViewName', how does it differentiate between audios or videos, since they are uploaded as two different content types? Would I just delete one of the content types, and change the remaining one to something like, multimedia, and just change the allowed file extensions to include both graphics and audio in there? I think this idea may have some merit, but not 100% sure. What would be a plus would be a way to have it switch skins based on whether the files are audio or video (ie: audiopro or default). I'm probably being way too wishful on trying to accomplish this, but it was just a thought.
- Jim
Comment #3
scottalan commentedSorry for the confusion. Here is the way I have this set up:
The
$params['linkarg1'] = 'audio';tells the player to only show the content type of 'audio' in that particular tab. The same is true of any media type you would like to see displayed in that 'tab'.The view uses filters to determine what content types are allowed in that view. Arguments are used to determine which content type the player will show.
If your unsure how views args works, or how filtering works I would recommend checking this out: http://views-help.doc.logrus.com/
Hope this helps
Comment #4
scottalan commentedAnother option would be to have "2" completely different playlists connected to the same 'player'.
Example:
I wasn't sure if this is what you were looking for....
-Scott
Comment #5
greywolfsspirit commentedScott,
this is close to what I wanted! Thank you so much for your help! I used the 2nd version you posted and installed perfectly and runs fairly well. Thanks again!
-Jim
Comment #6
scottalan commentedYour Welcome! Glad it helped.
-Scott
Comment #7
greywolfsspirit commentedScott,
Okay, I'm using my setup for my playlists based off message #4 here, I seen in the other threads your able to get dash working with services 2.0, and needing to put the $params['api'] = 3; line in the php coding.. Just want to see where I'm going wrong with this.. I've downloaded the beta 3 of the dash player, from the IE8 issue topic..
My dashconfig.xml file is as follows:
and I'm still using the older jquery_update, not the current developer version
and my node post with the php code is as follows:
Now, do I enable the key authentication module that came with services 2.0 or not?
As it is right now, if I stay with services 1.5, and change the config file to api 2, player works perfectly..
switch to services 2, and switch the api to 3.. get the constant loading state.. any ideas what I'm overlooking?
Thanks
Jim
Comment #8
scottalan commentedI was using "vplaylist" as an example for the "vertical playlist", but you need to change it to just "playlist". I believe this is the problem. Unless you have renamed the file to "vplaylist".
One called - videos
One called - audio
Content Type - video
Content Type - audio
Let me know if this helps.
-scott
Comment #9
asak commentedA bit off topic (but still related enough for this thread i think): Is it possible to simply define the skin.swf to use in the $params?
I need to setup 3 players, using 3 different skins, on the same site, and control when to display the player with which skin.
I tried setting the $params['connect'] but it doesn't seem to work - is that what it does...?
Is there another way to specify a specific skin.swf when printing dashplayer_get_player($params) ?
Thanks... ;)
Comment #10
greywolfsspirit commentedScott,
I did notice something, that you may want to investigate further into..
When using services 6.x-2, the player will come up on single nodes, but will not pull up playlists..
I also noticed dashplayer seems to not get along with views 3 branch...
So, if a person wants to attach dashplayer to a single node, with services 6.x-2, it should work. I tried with the above suggestions, and still can't get it work correctly with the updated services. It plays perfectly with services 6.x-0.1.5, views 6.x-2.10 flawlessly(albiet slowly because its parsing both audio and video at the same time) to where I re-split it back to 2 separate players again.
Comment #11
greywolfsspirit commentedHey Scott, long time since I last bugged you on this. I've re-built my site, and am re-doing the media player for it and have hit a small snag with this suggested method for having one player with audio and video. Regardless of choosing Audio or Video on their tabs, it's showing all audio and video files. When I set my view up, media, I did it as a node type, and have it looking for node types Audio and Video in the same instance. I think that is correct, and under filters it should not show:
Type = Audio
Type = published
Type = Video
Type = Published
but should look like
Type = Audio, Video
Type = Published
is there a bug in the above code of yours? (Drupal 6 still)
Jim