Problem/Motivation

When formatting a multi value file field using the "JW Player playlist" formatter, the player does not work and display a "No playable sources found" error message.

The error seems to be a trivial error in template_preprocess_jw_player() where $variables['sources'] is used instead of $variables['playlist'] in a foreach loop.

Remaining tasks

Create patch for fixes in #2.

Original report by @monaw

I have configured a (unlimited) File field in my content type to use JW player formatter in the display. However, when I look at the created node, I see a black box and the following error message inside:

Error loading player:
No playable sources found

I tried the other 2 display formatters ("JW player playlist", and "JW player sources") and for the same node, I see the same error as above AND the following error message at the top of the display:

Notice: Uninitialized string offset: 0 in template_preprocess_jw_player() (line 360 of /my_server_dir/modules/jw_player/jw_player.module).

What's wrong?

Does this module supported unlimited File field? Does this module support automatically switching the file displayed depending on the bitrate?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

monaw’s picture

Title: Runtime error: Uninitialized string offset... » Runtime error: No playable sources found
anacona16’s picture

I solved the problem by changing a line:

http://drupalcode.org/project/jw_player.git/blob/refs/heads/7.x-2.x:/jw_player.module#l376

I don't know how to make a pull request in drupalcode.org but you can change the line by:

    foreach ($variables['playlist'] as $key => $source) {

It works for me.

dgastudio’s picture

same here

Anonymous’s picture

Issue summary: View changes

Hi, I have the same problem, but the #2 solution didn't work for me. The message "Error loading player: No playable sources found" appears only at Vimeo videos. It doesn't appear at Youtube videos.

Using Media 7.x-1.4, Media: Vimeo 7.x-2.0-rc1 (tried different versions, same problem) and JW Player 7.x-2.x-dev with JW player 6.

ownage’s picture

FileSize
1.74 KB

I am having the same issue:
JW Player Issue

Proposed fix in #2 also didn't do anything.

Currently using:
JW Player v7.x-2.x-dev
JW Player Libraries v6.6.3896
Media v7.x-2.0-alpha2+13-dev
Media: Vimeo v7.x-2.0-rc1+0-dev

pbuyle’s picture

Issue summary: View changes
Status: Active » Needs work

@anacona16, Drupal.org does not use pull request. Instead you have to submit a patch in the issue queue (ie. here). See ttps://www.drupal.org/project/jw_player/git-instructions and https://www.drupal.org/node/707484 for instruction for how to make a patch.

@ramonpujol, @ownage: The symptom is the same, but if the fixe in #2 does not work it is likely not the same issue. The error message is generic and appears whenever JW Player is not able to load the file(s) given to it. Multiple causes are possible. Please open new issue and provide detailed information on your settings (how the formatter is configured, what kind of field, etc.).

pbuyle’s picture

eugene.ilyin’s picture

Hello. I wrote patch for this problem. Also it provides additional seetings for playlist: position and size.

Few screenshots

settings
Playlist

P.S. Don't forget to clear cache and resave settings of field formatter.

If it's possible, please specify me as author of commit.

Best regards

eugene.ilyin’s picture

Status: Needs work » Needs review

pbuyle’s picture

Status: Needs review » Fixed

Thanks

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.