Hi,
I'm currently using JW Media Player via the SWF Tools module and would like to switch to this module. At present i'm creating the player in my nodes by using the code below and referencing my file field. Would it be possible to do this with the JW Player Module?
// Displays the media player with an Imagefield preview and the Play icon turned off
print swf($node-> field_video_advert [0]['filepath'],
array(
'params' => array('width' => '300', 'height' =>'300'),
'flashvars' => array(
'image' => 'activity_event_images/' . ($node-> field_image_product [0]['filename']),
'icons' => 'false')
));
Any advice is appreciated!
Thanks,
Evelyn
Comments
Comment #1
JW Player commentedHi Evelyn,
There are two ways I can think of off the top of my head to do this. The first is to use the theme function the module provides. The function theme_jwplayermodule_render_player takes in the config (the name of your custom player) and an array of flashvars. So in your case you would pass in an array something like this:
The other way is to dynamically create the jwplayer embed tag. So something like the following:
If you have any problems just let me know.
Hope this helps!
Comment #2
nyleve101 commentedHi,
Thanks for getting back to me- it's much appreciated!
At the moment the I keep getting the error in the screenshot where the video is supposed but hopefully we'll be able to get to the bottom of this soon.
Thanks again!
Evelyn
Comment #3
nyleve101 commentedHi Longtail,
thanks for the code unfortunately it doesn't seem to be working. The only thing that happens is that the player loads the 'video not found or access denied' message shown in the screenshot attached above. To test the issue I switched back to using jwplayer using swftools and everything worked again.
Could you provide any further help please? I like swftools but I'd really like to use this module so i can purchase some extra plugins.
Hope all is well.
Thanks,
Evelyn
Comment #4
nyleve101 commentedHi,
in case anyone else needs it the code below did the trick:
just put in your own fields and imagecache presets.
hope you're well and taking care of yourselves,
Evelyn
Comment #5
JW Player commentedHi Evelyn,
Sorry for the delay in responding. Glad to see you got it working!
Looks like using imagecache_create_url('product_pic', $node->field_image_product[0]['filepath']); instead got it to work.
If you have any more issues just let me know.
Thanks.
Comment #6
nyleve101 commentedHi,
I just purchased a commercial player with the facebook and twitter plugins but I can't seem to get it to work.
1. I've changed player-licenced.swf to player.swf and put this along with the yt.swf in the module folder.
2. I've enabled the dock and also the respective plugins on the jw configuration page.
However, the player still appear as an unlicenced player without the plugins. Could you provide any guidance? I am using the code below to print the player from my node tpl.
Any help is appreciated!
Evelyn
Comment #7
JW Player commentedHi Evelyn,
Do you have a test page I could look at? Seeing the code and the page in action should help me to debug your issue.
Thanks.
Comment #8
nyleve101 commentedHi,
thanks for getting back to me. You can see an example on this page http://ilivedtoday.com/content/hampton-court-kayaking-tour
Thanks again!!
Evelyn
Comment #9
nyleve101 commentedHi Longtail,
any luck? I'm very eager to get the plugins working!
Thanks,
evelyn
Comment #10
JW Player commentedHi Evelyn,
I just took a look at your test page. I'm seeing the Licensed Player with twitter and facebook in the dock. Did you change anything?
If you're still not seeing the plugins try clearing your browser cache. Your browser may have cached the config XML file with your old settings in it.
Thanks.
Comment #11
nyleve101 commentedProblem solved! Thanks again for your help!
Evelyn
Comment #12
JW Player commentedComment #13
michel3 commentedhi!
ok, i have used the code from nyleve101 and it works! thank you!
but now, same problem, it seems that plugins are not working.
i have tried with facebook plugin and hd plugin. i don't see them, i have tried cleaning my web cache but nothing.
for hd plugin than i was triyng to use filefield for that also, so my code was:
it's that possibly corect?
third: strange thing but there isn't the watermak in my videos!!
to se a trial: http://sanbanet.it/drupal/prova
save me! thank you!
Comment #14
michel3 commentedComment #15
JW Player commented@michel3,
It appears that you're using the JW 4.0 player. This module was actually designed to use the version 5.0 and higher JW Player. That is likely why a lot of your configuration options aren't working.
Thanks.
Comment #16
michel3 commentedthank you longtail,
well i tried using jw5 but with same result (maybe for caching problem, i don't know), but if i put the player.swf on the main directory of my site and not under the modules/jwplayermodule (changing the path in the framework.php) it works!
it works also the code for the hd.file with filefield! Yep!
thank you for the help and for this preciuos module, can't wait for the html5 support!
Comment #17
michel3 commenteduh, i was thinking, can i put a plugin on my own server? i need a translation for the caption plugin (change the image for the dock icon), so i was thinking to translate it and put on my server, but how i direct the player to "see" it on my server? it is that possible?
Comment #18
michel3 commentedwell, i answer myself: it is possible in skinning option,
this is a incredible and usable tool!
amazing!
Comment #19
JW Player commented@michel3,
Glad to hear that it's working for you.
Thanks.
Comment #20
michel3 commentedwell, hi everyone,
how can i get html5 support with the code in node.php.tpl?
re-copy the code i'm using:
so, what var for the html5 player?
Comment #21
JW Player commentedYou shouldn't really need to do anything special. If HTML5 is necessary the player should switch to it automatically.
Are you seeing any errors?
Thanks.
Comment #22
michel3 commentedmmm well,
so it simply doesn't work.
video works just fine with flash player, but it doesn't go to html5 in iPad o iPhone. videos are in mp4
so i haven't to tell jwplayer where is the html5 file?
Comment #23
JW Player commented@michel3
Can you provide a link to where it is failing?
Thanks.
Comment #24
michel3 commentedThank you,
Http://www.webtv-trento.it
Comment #25
JW Player commented@michel3,
The issue seems to be the result of jwplayer.js being present. This is required for the HTML5 fallback. You'll need to get this file from the JW Player download .zip.
The flash player works since the plugin uses swfobject.js loaded from google if jwplayer.js isn't present.
Thanks.
Comment #26
michel3 commentedok, i'm an idiot.
it works!!!!!!
thank you!! great job!
Comment #27
nyleve101 commentedHi,
which version of jw player would be required for HTML 5 support?
Thanks for your help!
Evelyn
Comment #28
JW Player commentedHi Evelyn,
5.3 would be the absolute minimum version, however I would recommend 5.5 or higher.
Thanks.
Comment #29
nyleve101 commentedThank you!