Plugin

Developer
Supported

MC Player

ExpressionEngine 1.x, ExpressionEngine 2

Back to this add-on's main page
View Other Add-ons From Michael Cohen

     

You must be logged in to post.

Using the Jw Player plugins

Support Request

Maza
Maza

Hi, First of all thank you for creating and sharing this great plugin.
I am not sure what the syntax is for use with other plugins from Longtail.
I have tried:
{exp:mc_player:play file=“file.xml” width=“1024” height=“600” playerpath=”/player.swf” skin=”/skins/skin/skin.zip” controlbar=“bottom” autoplay=“true” wmode=“transparent” plugins=“sharing-3”}
  {exp:mc_player:plugins sharing-3.link=”{site_url}”}
{/exp:mc_player:play}
and
{exp:mc_player:play file=“file.xml” width=“1024” height=“600” playerpath=”/player.swf” skin=”/skins/skin/skin.zip” controlbar=“bottom” autoplay=“true” wmode=“transparent” }
  {exp:mc_player:plugins}
                  {exp:mc_player:plugin name=“sharing-3” link=”{video-url}”}{/exp:mc_player:plugin}
          {/exp:mc_player:plugins}
{/exp:mc_player:play}

Need some help on this. Thank you very much.

Michael C.
# 1
Developer
Michael C.

Hi Maza,

Could you give me more details? Are you on EE 1 or 2? What is showing up when you use the above code, and have you checked for any errors being output in template logging?

Maza
# 2
Maza

Hi,

I am using EE2.5.
My main issue is that I could not find anywhere a guide on how to use the plugins, I based my code on the use with levels and modes. I am not getting any erors but the plugins setting is not being added to the JW embedder code.

this is the EE input:

{exp:mc_player:play file=“file.xml” width=“1024” height=“600” playerpath=”/player.swf” skin=”/skins/chama/chama.zip” controlbar=“bottom” autoplay=“true” wmode=“transparent”}
{exp:mc_player:plugins}
  {exp:mc_player:plugin name=“sharing-3” link=”{site_url}”}{/exp:mc_player:plugin}
{/exp:mc_player:plugins}
{/exp:mc_player:play}

and this is the output:

<div id=“player_1” class=“media_player”>Javascript must be enabled to play this media.</div>
[removed]
jwplayer(‘player_1’).setup({
flashplayer: ‘/player.swf’,
file: ‘file.xml’,
wmode: ‘transparent’,
skin: ‘/skins/chama/chama.zip’,
width: ‘1024’,
height: ‘624’,
autostart: ‘true’,
volume: ‘80’,
‘controlbar.position’: ‘bottom’
});
[removed]

This is what I would expect it to output:

<div id=“player_1” class=“media_player”>Javascript must be enabled to play this media.</div>
[removed]
jwplayer(‘player_1’).setup({
flashplayer: ‘/player.swf’,
file: ‘file.xml’,
wmode: ‘transparent’,
skin: ‘/skins/chama/chama.zip’,
width: ‘1024’,
height: ‘624’,
autostart: ‘true’,
volume: ‘80’,
‘controlbar.position’: ‘bottom’,
    plugins: {
      “sharing-3”: {
        link: “http://www.mysite.com”
      }
    }
});
[removed]

Michael C.
# 3
Developer
Michael C.

Thanks, that helps.

I just updated the plugin on GitHub with an example for both skin and plugin usage to help. Even without updating, though, you can change…

{exp:mc_player:plugin name="sharing-3" link="{site_url}"}{/exp:mc_player:plugin} 

...to…

{exp:mc_player:plugin plugin_name="sharing-3" link="{site_url}"

...and that should fix things. The primary change is “plugin_name” instead of “name”.

FYI, the closing tag is only needed in situations where other occurrences of the same tag (just tag names, not parameters… eg. {exp:mc_player:plugin plugin_name=“ABC”} is considered the same as {exp:mc_player:plugin plugin_name=“XYZ”}, but is not the same as {exp:mc_player:levels}) in the template also have closing tags - if one has them, all need to have them.

Maza
# 4
Maza

Hi,

I have just tried this:
{exp:mc_player:play file=“file.xml” width=“1024” height=“600” playerpath=”/player.swf” skin=”/skins/chama/chama.zip” controlbar=“bottom” autoplay=“true” wmode=“transparent”}
  {exp:mc_player:plugins} 
{exp:mc_player:plugin plugin_name=“sharing-3” link=”{site_url}”}
  {/exp:mc_player:plugins} 
{/exp:mc_player:play}

and I am getting:
Error 330 (net::ERR_CONTENT_DECODING_FAILED): Unknown error.

I also tried a different plugin just in case and I am still getting the same error.(see below with different plugin)
{exp:mc_player:play file=“file.xml” width=“1024” height=“600” playerpath=”/player.swf” skin=”/skins/chama/chama.zip” controlbar=“bottom” autoplay=“true” wmode=“transparent”}
  {exp:mc_player:plugins} 
{exp:mc_player:plugin plugin_name=“flow-2”}
  {/exp:mc_player:plugins} 
{/exp:mc_player:play}

Thank you for your help its much appreciated.

Michael C.
# 5
Developer
Michael C.

You’re specifying an XML file; to specify a playlist, use it like this:

{exp:mc_player:play width="480" height="270" playerpath="/path/to/player.swf"}
  {exp
:mc_player:playlist file="playlist.xml" position="right" size="360"}
 {
/exp:mc_player:play} 
Maza
# 6
Maza

I just changed it but its still returning the same error.

EE input:

{exp:mc_player:play width=“1024” height=“600” playerpath=”/player.swf” skin=”/skins/chama/chama.zip” controlbar=“bottom” autoplay=“true” wmode=“transparent”}
{exp:mc_player:playlist file=“file.xml” position=“right” size=“360”}
{exp:mc_player:plugins}{exp:mc_player:plugin plugin_name=“sharing-3” link=”{site_url}”}{/exp:mc_player:plugins} 
{/exp:mc_player:play}

Error:
Error 330 (net::ERR_CONTENT_DECODING_FAILED): Unknown error.

Michael C.
# 7
Developer
Michael C.

Hmm… Can you try without the plugin and skin references and see if there’s a difference?

Maza
# 8
Maza

Hi,

I have tried with and without the skin, it doesn’t make a difference. 
It works without the playlist and skin as below:


{exp:mc_player:play file=“file.xml” width=“1024” height=“600” playerpath=”/player.swf”  controlbar=“bottom” autoplay=“true” wmode=“transparent”}

it also works with playlist and skin:

{exp:mc_player:play width=“1024” height=“600” playerpath=”/player.swf” controlbar=“bottom” autoplay=“true” wmode=“transparent” skin=”/skins/chama/chama.zip” }
{exp:mc_player:playlist file=“file.xml” position=“right” size=“360”} 
{/exp:mc_player:play}


The only time the error appears is when I add the plugin reference in particular the plugin_name. Without the plugin_name the plugin is not loaded but the video plays as normal.

{exp:mc_player:play width=“1024” height=“600” playerpath=”/player.swf” controlbar=“bottom” autoplay=“true” wmode=“transparent”}
{exp:mc_player:playlist file=“file.xml” position=“right” size=“360”} 
{exp:mc_player:plugins}
  {exp:mc_player:plugin plugin_name=“sharing-3” link=”{site_url}”}
{/exp:mc_player:plugins}
{/exp:mc_player:play}

 

Maza
# 9
Maza

I think I am getting closer. I updated the plugin with the new one from gitHub and now the output is as follows:

jwplayer(‘player_1’).setup({
flashplayer: ‘/player.swf’,
file: ‘file.xml’,
plugins: {
  sharing-3: { link: “http://dev.chamaeleon-dv.de/”, code: “” }
},
wmode: ‘transparent’,
skin: ‘/skins/chama/chama.zip’,
width: ‘1024’,
height: ‘600’,
autostart: ‘true’,
volume: ‘80’,
‘controlbar.position’: ‘bottom’
});

but having checked the user guide on plugins for jwplayer the plugin needs to have speech marks around it like so:

plugins: {
    “sharing-3”: {
    code: “<embed src=“http://example.com/embeds/123.swf
          “width=“320 />”,
    link: “http://example.com/videos/1775/”
    }
  }

so I am goin to have a quick look see if I can add it in the pugin.

Maza
# 10
Maza

Ok I have managed to make it work:

EE Code:
{exp:mc_player:play file=“file.xml” width=“1024” height=“640” playerpath=”/player.swf” skin=”/skins/chama/chama.zip” controlbar=“bottom” autoplay=“true” wmode=“transparent”}
{exp:mc_player:plugins}
  {exp:mc_player:plugin plugin_name=‘“sharing-3”’}
{/exp:mc_player:plugins}
{/exp:mc_player:play}

but I also added this to the file.xml playlist:

<jwplayer:sharing.link>{site_url}</jwplayer:sharing.link>

Michael C.
# 11
Developer
Michael C.
Maza - 03 June 2012 03:31 PM

but having checked the user guide on plugins for jwplayer the plugin needs to have speech marks around it like so:

plugins: {
    “sharing-3”: {
    code: “<embed src=“http://example.com/embeds/123.swf
          “width=“320 />”,
    link: “http://example.com/videos/1775/”
    }
  }

so I am goin to have a quick look see if I can add it in the pugin.

Interesting… do all plugin names need the quotation marks around them, or only certain ones?