Hello, thanks for your work.

Can't get it to load on a page

Uncaught ReferenceError: jQuery is not defined

something to do with the drupal add js perhaps ?

Cheers

Comments

Lux Delux’s picture

Ok after removing

array('scope' => 'footer')

from the drupal_add_js the player loads.

However, it tries to load a youtube video, even though it's used on a file field with an uploaded file.

Cheers

jamesbenison’s picture

That is odd.

Can you be a bit more specific?

Are you trying to use it with views?

As a heads up, this module is not stable yet. I was about to place a warming on the project page.

Thanks for testing.

jamesbenison’s picture

BTW, I already removed the scope => footer in the latest push.

That was done to try to solve an issue I was having with the player.

Lux Delux’s picture

When I was testing I just selected the player as a display mode for a file field where I uploaded 2 video files.

When inspecting the html I saw it was pointing to a youtube link.

Haven't tried anything with views.

jamesbenison’s picture

All the items in the playlists are added via jQuery extend. The html won't have anything but video tags with projekktor id's and classes like so:

<video class="projekktor-content projekktor clearfix" id="projekktor-<?php print $id; ?>" controls>
</video>

That's it. That's all the html it puts on the page whether you have one video or a playlist with fifty items.

Could another module be interfering?

So far for me the field formatters have been working flawlessly. If you happen to have a link to your site I'd be happy to check it out. Or if you could post the offensive code that would be great. You've got me intrigued.

I pushed another update just a couple hours ago. Seem like the git repo has been a little slow on the snapshots.

And thanks again for testing.

Lux Delux’s picture

Sorry for being unclear, I didn't notice it in the HTML but in Chromiums inspector windows, gives an error that the youtube video can't be loaded. After checking the html a bit I can see it creates a div with the youtube ID.

Basically it seems to pass whatever is uploaded in a standard file field as a youtube link.

Hmmm maybe because it's getting the file back from Amazon S3? As I use that for storage.

I'll try and check that later, website is currently closed, under development so I don't want to open it all up just yet. I'll see if I can pull something on that regard over the weekend

Cheers

jamesbenison’s picture

Thanks for the update.

Actually this module won't put a youtube id in the html. It will only add the code I listed above except that the php will return a single digit number to assign a unique id.

You mentioned that a problem went away when you removed "scope => footer" from the drupal_add_js array. That means your theme probably doesn't have a footer. You may have another module installed that loads js in the footer that is breaking your site.

Lux Delux’s picture

Ah, nice call! Actually I do have a footer, but it wasn't enabled for all pages, gonna look into that.

Thanks

Lux Delux’s picture

You may close this, seems to load up fine now :)

jamesbenison’s picture

Status: Active » Closed (fixed)

Thanks.