I have the player imbedded into a block now i want it to play the audio/video that is attached to the node. How can I do that?
I have the player imbedded into a block now i want it to play the audio/video that is attached to the node. How can I do that?
Comments
Comment #1
travist commentedYou can just use the arguments to get the node ID and then pass that to the player in the block... Like this....
Comment #2
pamshalligan commentedHi and ty for the response
Is there a way to set up dash to do this dynamicaly?
I was hoping to use something similar to the [video] tag in flashvideo but cant get it to work
Comment #3
pamshalligan commentedI tryed this and had no luck. The player is still playing the latest vid to be added not the one attached to the node
Comment #4
pamshalligan commentedComment #5
jinitpatel commentedPlease add this code in CONTENT part of your node.tpl.php(under your theme) file.
Comment #6
rengomez commentedHello
I am using the player with audiopro and have followed all the tutorials it works great.
Would it be possible to have the player in a block and then load mp3s to it by selecting from a list of nodes or a view of nodes? Is that what the code above does? I am not sure where you would add it.
The block is in a sidebar and the nodes are displayed on the front page.
Thanks. Brilliant player (-;
Cheers
Comment #7
jimmb commentedGreat question rengomez!
I also want to put the dash player in a block on the homepage and let people stream music there. Would love to know to set this up....
Jim
Comment #8
travist commentedjimmb,
There are several ways to do this... If you just wish to play the current node in the media player in the block, then you can add a new block with the media player, and then add this code.
You just need to make sure that you set the Input Format to PHP Code, and then also make sure that this block is only visible on the paths that are node/*
Another way to do this, is to use the JavaScript interface for the player, and then send commands using JavaScript. Like this for jQuery...
Hope this helps.
Travis.