Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I love the simplicity of this player. Love it. Love it.
The only thing I can't figure out is how to get the poster images working.
Right now the videos look like this:
http://img.skitch.com/20101101-m4tuxkaceb2rsk3ytwdrgifm7r.jpg
And the generated HTML looks like this:
<!-- Begin VideoJS -->
<div class="video-js-box" id="videojs-5-field-html5-video">
<!-- Using the Video for Everybody Embed Code http://camendesign.com/code/video_for_everybody -->
<video id="videojs-5-field-html5-video" class="video-js" width="640" height="264" controls="controls" preload="auto" poster="">
<source src="http://sandbox/sites/default/files/wsop-test.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' />
<source src="http://sandbox/sites/default/files/wsop-test.mp4" type='video/webm; codecs="vp8, vorbis"' />
<source src="http://sandbox/sites/default/files/wsop-test.mp4" type='video/ogg; codecs="theora, vorbis"' />
<!-- Flash Fallback. Use any flash video player here. Make sure to keep the vjs-flash-fallback class. -->
<!-- @TODO: Add Flowplayer on SWFTools or Flowplayer API modules -->
</video>
</div>
<!-- End VideoJS -->
Maybe I'm missing it.
Comment | File | Size | Author |
---|---|---|---|
#14 | videojsposter404.jpg | 158.62 KB | bradspry |
Comments
Comment #1
heshanlkIts not yet implemented, I will add support with poster image soon
Comment #2
mattman CreditAttribution: mattman commentedheshan
I've added in poster support on my local version of your module. I took the easy way out and simply look for a filefield image named videojs_poster (which is, as you know, internally field_videojs_poster)
I simply take the first item off the filefield array and pass it through $vars. Here's the code I used.
videojs.theme.inc
Then within videojs.tpl.php
As a start, this is the easiest way to get support for poster frames. Just put this in your docs and you're good to go without adding too much code or extra stuff to prefs, etc.
Hope this helps.
Comment #3
heshanlkComment #5
mohamadaliakbari CreditAttribution: mohamadaliakbari commentedsomething link "manual upload thumbnail" option in video field in video module, is needed here.
Comment #6
Jorrit CreditAttribution: Jorrit commentedYou can add a preprocess function in your own theme to add a thumbnail entry to the items array.
Comment #7
bradspry CreditAttribution: bradspry commentedI'm also seeing the questionmark indicating a broken poster image, and the poster variable is poster="s"
<video id="videojs-483-field-video" class="video-js vjs-default-skin" poster="s" width="640" height="480" controls="controls" preload="auto" data-setup="{}">
Comment #8
Jorrit CreditAttribution: Jorrit commentedYou should have opened a new issue, because this one is closed.
It seems that you supply the thumbnail as a string. The module expects an array with file information, such as filepath, filemime, filename, etc. How are you invoking Video.js?
Comment #9
bradspry CreditAttribution: bradspry commentedThank you for your reply. I am invoking it the normal way, with a content-type containing a video filefield.
Comment #10
Jorrit CreditAttribution: Jorrit commentedWhat version of the video module are you using?
Comment #11
bradspry CreditAttribution: bradspry commented@Jorrit Video 6.x-4.2
Comment #12
Jorrit CreditAttribution: Jorrit commentedHave you considered upgrading to a more recent version?
Comment #13
bradspry CreditAttribution: bradspry commentedThank you for your patience with me. I will update the Video module ASAP and report back.
Comment #14
bradspry CreditAttribution: bradspry commentedProblem persists after updating video module to Video 6.x-5.1 and videojs module to 6.x-2.2.
Noted poster variable is now gone from video tag:
before:
<video id="videojs-483-field-video" class="video-js vjs-default-skin" poster="s" width="640" height="480" controls="controls" preload="auto" data-setup="{}">
after update:
<video id="videojs-486-field-video_html5_api" class="vjs-tech" preload="auto" data-setup="{}" src="http://url_to_file">
Poster is now referred to as IMG tag:
<img class="vjs-poster" src="s" tabindex="-1">
You can see the src="s" instead of the url to the poster graphic.
Any ideas? Thank you ahead of time.
Comment #15
Jorrit CreditAttribution: Jorrit commentedI think it is a different problem because most code has changed since 2010. It would have been better if you opened a new ticket. What version of the Video.js module are you using?