I'm posting this issue which has come up in discussion on the screencast page: http://drupaltherapy.com/node/50

Some users are having trouble configuring the jw flv player to engage properly, I thought I would start us on a solution since there are a lot of hungry users waiting for this one.

"...i just have a question... where does the player have to reside? in the folder where filefield is putting the actual media or in the jquery media module folder? i have added the mdoules as described, but they show up still as a clickable link which then opens a new page and they play in the center. no matter what i tweak, im stuck at the stage of the video where you see the media, but its not being sniffed out. to make a long story short, where does the player have to reside so that it sniffs out the filefield embedded media."

I've pointed the other posters to this issue so they can follow along and/or contribute more specific information.

Comments

malcovich’s picture

I'm facing the same issue as well.
It seems that the path to the swf player keeps getting change.
From the page's source, it keeps getting changed back to

$.fn.media.defaults.flvPlayer = '/drupal/mediaplayer.swf';
$.fn.media.defaults.mp3Player = '/drupal/mediaplayer.swf';

and i do not see any embedded code that calls the player.

thewoodm’s picture

I am in the same position; thanks for organizing things so we know where to post. I also cannot find any embedded code that calls the player. In any case, I think even if the coding issue were solved, some documentation either on the project page or in the download package of this module would be something that a lot of Drupalers could get heavy mileage out of.

cybergeggy’s picture

I have the same or similar to others. I've tried including the full url to the player (renamed mediaplayer) but still no joy. All I get is a link to the file which opens in a new window and plays according to the file type. I've tried mpeg, mp4, avi and swf. I've put the player in about 57 different locations but makes no difference. The lates thing I tried was to disable the fckeditor. Again, nothing. One question I have since I'm only new to javascript: Where the various scripts are called in the head, what does '?e' mean after the file name? I've also noted 'T' and 'z'. The html source has this in the head after the calls to all .css and .js files:

<script type="text/javascript">
if (Drupal.jsEnabled) {
  $(document).ready(function() {
    $.fn.media.defaults.flvPlayer = 'http://localhost/example.com/sites/all/modules/filefield/mediaplayer.swf';
    $.fn.media.defaults.mp3Player = 'http://localhost/example.com/sites/all/modules/filefield/mediaplayer.swf';
    $('.filefield-item a').media( { width: 320, height: 240 } );
  });  
}
</script>

And in the body where the player should be:

<div class="content"><div class="field field-type-filefield field-field-filefield">
      <div class="field-label">Upload your video:&nbsp;</div>
    <div class="field-items">
                  <div class="field-item">
                                <div class="filefield-file clear-block"><div class="filefield-icon field-icon-application-x-shockwave-flash"><img class="field-icon-application-x-shockwave-flash"  alt="application/x-shockwave-flash icon" src="http://localhost/example.com/sites/all/modules/filefield/icons/protocons/16x16/mimetypes/application-octet-stream.png" /></div><a href="http://localhost/example.com/sites/default/files/video/filename.swf">filename.swf</a></div>              </div>
        </div>
</div>

I hope this is of value. By the way, Drupal is mind boggling ...

mikedillon’s picture

Guys, I submitted a bug report http://drupal.org/node/293448 that I'm faily confident will fix this problem.

You can't see any embed tags because its jquery, meaning the embed code is added to the DOM not to the source file. In order to see this try using something like Safari w/ developer tools enabled or use the tools DOM inspector in firefox

thewoodm’s picture

Just determined that this bug report is for the 5x version of this module; we are still looking for a solution in 6x. The point about no embed tags because it is jquery is well taken nonetheless.

malcovich’s picture

Is there any workaround solutions to get a FLV video to be displayed on a node? I've been trying to get JQ to work for a past few days and nothing seems to be moving in the correct direction. Please advise

spiffyd’s picture

Is JW Player 4.0 supported? 4.0 is named Player.swf instead of mediaplayer.swf? I see the filefield uploaded and video icon but I can't get any video streaming?

Also does the module support flv files? For some reason I don't see a video icon next to flv uploads.

malcovich’s picture

Just an update, I've managed to get it to work. Mis-configuration on my part.
Ontop of the usual
1) Path to MediaPlayer, I was using JW Flv player.
Physical location = /www/drupal/sites/default/files/player.swf

2)Drupal->Administer->jQuery Media->Default Players
Flash Player (flvPlayer) = sites/default/files/player.swf
MP3 Player (mp3Player) = sites/default/files/player.swf

3)Drupal->Administer->jQuery Media->Media
Auto-invoke Media class = True

**This was the part that actually does the invocation of the player. If its set wrongly, the player would not appear**
Media class: a.media
**

In the actual node,

<a href="http://www.example.com/drupal/sites/default/files/videos/someflashfile.flv" class="media {width:250, height:250}">FLV File</a>

And thats it. The video player should appear from then on.
I've still have not figured out how to get the filefield part to work yet, which would be required for user uploaded content, so if anyone has any insights on it, please shed some light.

Cheers

akolahi’s picture

Probably not the best solution, but i DID get it to work by for filefield by broadening the Media class:

JQuery Media-> Classes -> Media (make sure Auto-invoke Media class is checked off) -> Then for Media class: i just have 'a'

note: just the letter 'a' with no period.

I think this is causing JQuery to sniff all links to see if they are videos

spiffyd’s picture

@#8:

**This was the part that actually does the invocation of the player. If its set wrongly, the player would not appear**
Media class: a.media
**

This is exactly what was needed to solve my problem. I was not using Filefield to attach my videos and so the default .filefield-item a invocation class didn't do anything! I had to customize it to whatever else I was using...

Speaking of which, I was trying to get jQuery Media automatically working with FlashVideo attachments without the need to type any code in the body- anyone able to do that? What invocation class did you use?

spiffyd’s picture

Out of curiosity, I just realized that SWF Tools Integration module does exactly what jQuery Media can do. The only difference is maybe SWF Tools Integration can detect less file formats. Can someone correct me if I'm wrong? What's different between these 2 modules?

cybergeggy’s picture

OK akolahi!

When you said 'make sure the Auto invoke media class is checked off', I thought you meant OFF as in not enabled. But, with it ON (ie enabled) and the media class as just 'a' it works for sure. Very cool ...

NonProfit’s picture

Hi, I have a similar issue:

My Modules:
CCK 6.x-2.0-rc6
FileField 6.x-3.x
jQ 6.x-1.0
jQuery Media 6.x-1.4-beta1
On Drupal 6.4

My CCK:
Video content type created
filefield field added
Widget type:file upload
Permitted upload file extensions: flv mov
File size restrictions: none
File path: videos
Global settings: not required
Default list value: Listed
How should the list value be handled?: User Configurable
Description field: Enabled

jQ Plugin Administration:
jQuery Media (jquery_media) is enabled
Video node type is selected
Auto-invoke Media class is selected
The correct class (.filefield-file a) is selected (although I've not had success with the more generic 'a')
Default player is installed and linked to /sites/default/files/player.swf (link is good; directly entering URL launches player)

The Node:
I've uploaded video.flv as my filefield. It is listed.
Input format is set to Full HTML

HTML output:
jquery_media is being called in html head <script src="/sites/all/modules/jquery_media/js/jquery.media.js?3" type="text/javascript">
My setup sniffs that the filefield is media and generates:
<embed width="320" height="240" flashvars="file=http://[site]/sites/default/files/videos/video.flv" autoplay="true" wmode="transparent" bgcolor="#000000" pluginspage="http://www.adobe.com/go/getflashplayer" type="application/x-shockwave-flash" src="//sites/default/files/player.swf?file=http:/[site]/sites/default/files/videos/video.flv" style="display: block;"/>

Even though I have autoplay enabled (not my first choice; but I was grasping) there is no way I have found the play the video.

Any thoughts? Thanks! -NP

EDIT: When I control-click (like a right click on a PC) the About Flash box appears and I am told the video is not loaded. However when I change my class (and break the player) the filefield list allows me to download the video. Why would the player launch but not load the video?

skritek00’s picture

I am having similar issues because of my locales being enabled. So the path is getting output as '/en/path_to_my_player' and of course that path does not exist so it's broken. I'm not much of a javascript programmer so I've been struggling to fix it. any ideas would be much appreciated. Thanks

Greggus’s picture

I have the same problem too. I was not able to see player at all.
Does anybody know why player is not starting?
I've tried everything...

eriknewby’s picture

After struggling with the same issue here for a little bit, I found what seems to be the issue. At least it fixed it for me.
After I turned on clean urls, the mediaplayer finally showed up.

Without clean urls turned on, jquery media was adding ?q= into the filepath to the mediaplayer.swf making it invalid.
/drupal/?q=sites/default/files/mediaplayer.swf

with Clean Urls on, it now is: /drupal/sites/default/files/mediaplayer.swf
and my files are playing just fine.

I'm running drupal 6.4 on MAMP.

skritek00’s picture

Yes this works fine if you don't have locale module enabled. I am working on a multilingual site and with clean URLs there is always the language prefix. I have temporarily fixed it by overriding what JW FLV outputs as the path with some code in my template.php file. But I would prefer to fix it a better way.

Thomas_Zahreddin’s picture

Version: 6.x-1.3 » 5.x-1.3

same on a Drupal Version 5.10 installation:

the embed tag created by jquery_media:

<embed style="display: block;"

src="/?q=sites%5Call%5Cmodules%5Cmediaplayer%5Cplayer.swf?file=http://d5/files/drupal5/motif_200kbps_0.flv"

type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" bgcolor="#ffffff" autoplay="false" flashvars="file=http://d5/files/drupal5/motif_200kbps_0.flv" height="200" width="320">

and the correct embed tag: (handmade in the moment)

<embed style="display: block;"

src="/sites/all/modules/mediaplayer/player.swf?file=http://d5/files/drupal5/motif_200kbps_0.flv" type="application/x-shockwave-flash"

pluginspage="http://www.adobe.com/go/getflashplayer" bgcolor="#ffffff" autoplay="false" flashvars="file=http://d5/files/drupal5/motif_200kbps_0.flv" height="200" width="320">

Just for information for people using it on Drupal 5.x
on my local install (d5) is

Best
Thomas Zahreddin

.kuma’s picture

You need to change the Media class in the jQ admin page to the correct class.

1. Go to a page you have video on that isn't displaying properly.
2. Look at the source of the page and find your video (search for the title)
3. You'll get something like this:
etc....
<div class="filefield-file clear-block"><div class="filefield-icon field-icon-video-quicktime"><img class="field-icon-video-quicktime" alt="video/quicktime icon" src="http://example.com/sites/all/modules/filefield/icons/protocons/16x16/mimetypes/video-x-generic.png" /></div><a href="http://example.com/sites/default/files/videos/1.mov">Some Title</a></div></div>
etc....

4. Get the name of the DIV surrounding your video file (but not the one for the icon). Here it's filefield-file.
5. On the jQ admin page, ensure "Auto-invoke Media class is checked. Next fill in the "Media class" field like so:
.(name of your DIV found in step 4) a

Mine is like this: .filefield-file a

It does work using just "a" and no class, although for me this caused other items on some pages to think they were videos...

Does anyone know how to get the Quicktime player to show up on the page? All I have is a video with no controls (when clicked, it plays...)

seaneffel’s picture

I can comment on your very last question above.

A video display but no controls may be that your original QT media file is, say, 640x480 but you may have your jQuery Media playback size set to, say, 320x240. Try that first.

Second, when you set a playback size for QT you need to add +16 pixels to the height value in order to display the QT control bar at the bottom of the player. So for a 320x240 QT player you often need to set the player size to 320x256.

Let me know if any of those tricks work.

.kuma’s picture

Thanks Sean! That was indeed the problem.

So what would be the best way to handle user uploads, which might be various different sizes?

Thanks again for the reply, and also for the very helpful screencast!

seaneffel’s picture

Kuma, I opened an issue for scaling video dimensions so we can continue this discussion there:
http://drupal.org/node/315458

marco88’s picture

Hi there,

I have problems with the player config as well. I can get to the player directly through:

http://www.weiersmuller.org/sites/all/mediaplayers/JWFLV/player.swf

I tried in JQuery Media config:

http://www.weiersmuller.org/sites/all/mediaplayers/JWFLV/player.swf
sites/all/mediaplayers/JWFLV/player.swf
drupal/sites/all/mediaplayers/JWFLV/player.swf
/sites/all/mediaplayers/JWFLV/player.swf
/drupal/sites/all/mediaplayers/JWFLV/player.swf

It does not work. I get the Windows media player not JW FLV. If I turn off auto Auto-invoke Media class then the Windows media player does not appear at all and I get a link to the file instead (no media player at all).

I see the following code in the webpage:

<div class="field field-type-file field-field-video"><div class="field-items"><div class="field-item"><div class="filefield-item"><div class="filefield-icon field-icon-video-avi"><img src="http://www.weiersmuller.org/sites/all/modules/filefield/icons/protocons/16x16/mimetypes/video-x-generic.png" class="field-icon-video-avi"/></div><div style="background-color: rgb(255, 255, 255); width: 320px;"><embed height="300" width="320" autostart="0" bgcolor="#ffffff" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" type="application/x-mplayer2" src="http://www.weiersmuller.org/system/files/videos/m000034.avi" style="display: block;"/><div>m000034.avi</div></div></div></div></div></div>

I am running Drupal 5.7, J Query Media 5.x-1.3, I did install the query update module 5.x.2.0.

I have installed the lastest JW FLV media player.

Can anybody shed some light please?

Thanks in advance.

Kind regards,
Marc.

marco88’s picture

I tried with a gif file as I understand that JVF does not support AVI (see http://www.jeroenwijering.com/?item=JW_FLV_Player) but then the J Query media does not work:

<div class="field field-type-file field-field-video">
<div class="field-items">
<div class="field-item">
<div class="filefield-item">
<div class="filefield-icon field-icon-image-gif">
</div>
<a href="http://www.weiersmuller.org/system/files/videos/m000036.gif">m000036.gif</a>
</div>
</div>
</div>
</div>
<p>This is a quick recording done on a mobile phone of James' heartbeat during a visit in Singapore to the old family doctor. James was then just a 2 month old foetus.</p>

Any ideas?

capellic’s picture

I am following the instructions for Drupal Therapy and can't get this to work. I have a fresh install of Drupal 6.6 and I have the following modules enabled in addition to default core modules:

CCK 6.x-2.0-rc10
FileField 6.x-3.0-alpha5
jQ 6.x-1.2
jQuery Media 6.x-1.4-beta1

The only difference in what I have done and what the tutorial has done is that I am trying to get an MP3 to work. When I add the MP#, save and view the node, I see the file icon and the file name is replaced with nothing. So it is apparent *something* is happening. Note that I am not using any flash player - just the system default.

I then tried to use an MOV file and it worked. Since I am not trying to use a Flash player, I am wondering if this indicates something wrong with my environment. I am using OS X.5 and MAMP.

skritek00’s picture

Is MP3 a valid mime-type on your server? check your Apache settings to see if it recognizes MP3 as a valid format. When you get the file icon and the mime-type is the generic octet stream you know it's not being picked up. You can try somethihng like
AddType audio/mpeg mp3 MP3
to your httpd.conf file.

This site might be helpful. http://httpd.apache.org/docs/1.3/mod/mod_mime.html see if you have the module enabled or not working

-Anti-’s picture

My error was 'video was not loaded'. I'm using the JW FLV player.

#8
Thank you for helping me towards the solution.
However, I did the paths the other way round:

The 'Default players' paths in jquery media settings page need to be full absolute:
http://domain.net/sites/all/player/player.swf
or
http://sub.domain.net/sites/all/player/player.swf

(I put the player in the 'all' folder, bearing in mind my multisites will share it; seemed to make sense)

and the link in the content can be 'partial absolute', like it is supposed to be:

<a class="media" href="/sites/files/media/video.flv">description of video</a>

This is great, because the partial absolute path is used by file-browsing modules like IMCE or fckeditor's own browser. So to add a video, users simply have to upload it to their folder and then use the normal 'link' button in the wysiwyg editor to link to the file. They can type 'media' as a class, or the class can be added using the 'style' dropdown.

I've got more testing to do, but at the moment this seems like an awesome module, and I hope in the future, the method of adding media to content moves away from adding cck fields and towards more modules using this method - turning simple links to files into embedded media. Thanks so much for developing this revolutionary module.

#14 and #17
I do not have this issue with the locale module. Drupal always adds 'en' or 'es' to my urls but everything appears to be working fine in both english and spanish modes. I'm using D6.6 and jquery media 1.4-beta1.

Cheers!

Agileware’s picture

I had a similiar problem where the same code & Drupal website was working on a Ubuntu server but not on a SUSE server. On Ubuntu, jquery media was using the plugin JW FLV Player (correct) whilst on SUSE it was Quicktime. At first we thought it must be a configuration issue with mime types in Apache, but this was not the case.

HTML output from Ubuntu:

<object width="250" height="300" type="application/x-shockwave-flash" data="/files/mediaplayer/player.swf?file=http%3A%2F%2Fexample.com%2Fsystem%2Ffiles%2Faudio%2FPortishead%2B-%2BGlory%2Bbox.mp3" id="movie_player_2" style="visibility: visible;"><param name="bgColor" value="#ffffff"/><param name="allowfullscreen" value="true"/><param name="autoplay" value="false"/><param name="flashvars" value="file=http%3A%2F%2Fexample.com%2Fsystem%2Ffiles%2Faudio%2FPortishead%2B-%2BGlory%2Bbox.mp3&amp;backcolor=d3d3d3"/></object>

HTML output from SUSE:

<embed width="250" height="300" autoplay="false" allowfullscreen="true" bgcolor="#ffffff" pluginspage="http://www.apple.com/quicktime/download/" src="http://example.com/system/files/audio/Portishead+-+Glory+box.mp3" style="display: block;"/>

The solution in our case was simply to upgrade the jquery.media.js file located in the jquery_media/js directory. The version distributed with the module is version: 0.75 (02/20/2008) whilst the version we installed which fixed the issue was 0.82 (10/14/2008). Download from http://www.malsup.com/jquery/media/jquery.media.js

No idea if this would work for anyone else, but it really stumped us for 4+ hours.

artscientific’s picture

Thanks for a great solution guys but theres one things thats killing it all for me, when the node comes up the first frame of the video is not shown. Works great with quicktime just not with flash, would like to confirm that this is a player issue and not a plugin config issue...

thanks,
-Peter
http://www.artscientific.com

seanmclucas’s picture

Actually, it turned out just to be a permissions issue for me. I made sure that there was "read" permissions on the folder that the player was stored in. In my example "root dir/mediaplayer". Easy fix

bradallenfisher’s picture

Please watch this video series to see if you can take a different route to solve your problem
https://elearning.psu.edu/elearning/using-drupal-generate-jwplayer-frien...