How to use the same player in two different sizes!

Edit Entry Player Broken

Overview

The module allows you to set the default size for Media Node and Remix Node.
In case you want to display players in different sizes for the same node type, you have to do it through template.php theme override or in the relevant .tpl file.

Implementation

Using template.php:

Assuming your theme is called "mytheme", you can implement an override function that returns the rendered HTML for a certain item.
For this example, I'll assume that we need to set different sizes for Media Node.
- First, we will declare the function in template.php file:

function mytheme_node_kaltura_entry_entryId($node, $teaser);

- This function should return a kaltura special tag of the following structure:

[kaltura-widget media_type="$node->kaltura_media_type" entry="$node->kaltura_entryId" width="???" height="???" /]

You should set the width/height according to the context.
Recommended – look at the original function (in this case, in plugins/node_kaltura_entry/node_kaltura_entry.module), you might want to copy most of the code and add your own changes where needed.

Using .tpl file:

Assuming you have template file for Media node type, with the name of node-kaltura_entry.tpl.php
This function can include the HTML that will be displayed when rendering a Kaltura media node.
In the same manner as the first method described above, you should create the kaltura special tag with the wanted values,
Than call kaltura_replace_tags() function, passing it a string variable that contains the special tag.

In both methods, the tag will be replaced with the embed code with the wanted size.

Comments

Any chance this could be 'fleshed out" a bit more?

For someone who mostly cuts and pastes code, any chance this doc could be expanded a little? I don't understand what to put in the template.php file. Obviously cutting and pasting "[kaltura-widget media_type="$node->kaltura_media_type" entry="$node->kaltura_entryId" width="???" height="???" /]
" isn't going to work. Can we get a code example at all?

Cheers