Hi Travis,

Here is my second questions:
I embedded uploaded and emfield videos successfully through .tpl.php files inside my nodes:

 if (!empty($node->field_video_embed[0]['view']) OR !empty($node->field_video_upload[0]['view'])) {
	  $params['node'] = $node->nid;
	  $params['volume'] = 100;
	  $params['embedwidth'] = 550;
	  $params['embedheight'] = 375;
	  print dashplayer_get_player( $params );
	  }

Now I've created a View with fields as "field design" and have to show this videos.
My problem is that the emfield video is not rendered in the Dash Player but in the usual YouTube player.

Can you tell me how to get the video inside the Dash Player like on nodes?

Thank you very much for your help. :)

Regards,
Stefan

Comments

platonik’s picture

Have you seen the new Dash Player video documentation? It's very helpful and there is a section covering the youtube support that I think will help solve your problem. You can see the videos here: http://www.tmtdigital.com/node/37

design.er’s picture

Thank you for the hint. I know the videos already but this is not just a YouTube support question but YouTube in Views fields.

travist’s picture

Status: Active » Closed (duplicate)

Thought is was duplicate... sorry... answer below.

travist’s picture

You can use Contemplate to do this? Are you able to use contemplate with your tpl files? If not, then you can theme your node by creating a template file called {node_type}-node.tpl.php, where {node_type} is the name of the node type you would like to theme.

You can then place the usual dashplayer code, and it will recognize that the video is YouTube and show it within the player.

I hope this is what you are asking.

Travis.

design.er’s picture

Hi Travis,

Thank you for your help.
I already use tpl.php files to render the Dash Player in nodes - it works great so far.
But this time I have to use a View with field design (not node design). So I have a field from the emfield module that stores a You Tube video and I'd like to know how to get this Video showed through the Dash Player. At the moment I see the video through the standard You Tube player.

Help is much appreciated.

Thank you,
Stefan

travist’s picture

Oh I get it. Man, to be honest with you, I have never played around with the field design of views, but it seems really cool. Is there any way to manually provide the templates for the field designs, or are these provided through the modules? If the latter, then you can probably override that template within the template.php file, but again, this is something I am pretty fresh on. I wish I could be more help with this.

Thanks.

Travis.

design.er’s picture

I'm also not that Views crack. But I know that it's possible to create templates for each individual views field (i.e. views-view-field--video--default--field-video-upload-fid.tpl.php) which name you can grab from "Theme" inside of the views ui.

My problem is that I don't know if the embed code for nodes does generally work for views fields and if yes which information to write in my example:

if (!empty($node->field_video_embed[0]['view']) OR !empty($node->field_video_upload[0]['view'])) {
      $params['node'] = $node->nid;
      $params['volume'] = 100;
      $params['embedwidth'] = 550;
      $params['embedheight'] = 375;
      print dashplayer_get_player( $params );
      }

What to replace with the fields $node->field_video_embed[0]['view'] & $node->field_video_upload[0]['view'] and the param $params['node'] = $node->nid;....

Maybe you are interested in to take a look into this or contact merlinofchaos (maintainer of the views modules). I'm sure he will help you as you are the maintainer of this module and this would be a great help for a lot of people.

I think it would be the easiest way for the enduser if there will be a view field formatter like mp3 player, emfield and SWF Tools provide them -> if there is a field with a video or mp3 file (something the module can work with) it provides a formatter.

Thank you very much for your passion, work and time. It's amazing! :)

Kind regards,
Stefan

design.er’s picture

Status: Closed (duplicate) » Active

Forgot to set this thread to active.

rickh’s picture

hey guys, has there been any solutions on this. I seriously need the same functionality. Any help would be appreciated.