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.
Hi, I upload flv files but in jplayer module it show id is audio type, can help to update this? my item_type is file, choice file type in manage field part. that's reason, I can't choice ”Multimedia asset“ follow this http://www.ostraining.com/blog/drupal/media-field/
any suggestion about it? how can I change the type to correctly? thanks
Comment | File | Size | Author |
---|---|---|---|
#6 | video-with-sizes-1815642-6.patch | 8.88 KB | kylesmith |
#3 | video-with-sizes-1815642.patch | 7.07 KB | valthebald |
#1 | video-as-audio-player.png | 8.92 KB | kingfisher64 |
#1 | audio-display.png | 6.1 KB | kingfisher64 |
Comments
Comment #1
kingfisher64 CreditAttribution: kingfisher64 commentedI'm having a similar issue. It appears it's more than one format.
For me it's mp4 format.
I've read readme.txt and the jplayer instance is set to single not playlist. (screenshot attached)
How do I get the player to display as a video player?
Comment #2
steveburge CreditAttribution: steveburge commentedHi nathan.zhu and kingfisher64
I wrote that original article. Since then, I think they've changed the way the Media module works. Choose the "file" field type, rather than ”Multimedia asset“.
Comment #3
valthebaldThere are several issues with video displaying
1. jplayer expects m4v in playerSettings.supplied, but jplayer.module sends file extensions "as is". As a result, *.mp4 files are opened with audio (which is default)
2. jplayer supports changing video size from default 480x270, but there are no appropriate settings
3. (PHP5.3+ specific?) When jplayer_sort_files() gets $item_type = null, it does not treat it as default value ('file'), so setting file url fails
Attached patch solves these problems
Comment #4
kingfisher64 CreditAttribution: kingfisher64 commented@ #2 SteveBurge - I did use file field not multimedia asset. THought maybe i'd done something else wrong but given #3 comments...
thanks valthebald
Comment #4.0
kingfisher64 CreditAttribution: kingfisher64 commentedupdate new description.
Comment #5
spgd01 CreditAttribution: spgd01 commentedPatch works for flv and mp4. However theme is a little off and I get the following error:
Notice: Undefined index: cssStyle in template_preprocess_jplayer() (line 54 of E:\Websites\drupaltest-7\website\sites\all\modules\jplayer\includes\jplayer.theme.inc).
Comment #6
kylesmith CreditAttribution: kylesmith commentedBig thanks to valthebald for patch #3. I couldn't apply the patch automatically with the current 2.x-dev code, but I could manually make those changes and it solved this issue for me. I am updating patch #3 so those changes can be automatically applied.
This patch can be used to set a video player size in the admin/structure/types/manage//display page, either by specifying a custom CSS class or by setting the width and height in pixels. With patch #3 (and also this patch #6), using a CSS class will prevent the width/height settings from being applied.
Video files with *.mp4 file extensions will also display in the video player.
I am making a few other modifications:
Reviewers would be appreciated. I haven't tested this patch with audio files, and as I mentioned above, I couldn't get the custom CSS class to work to define width/height for my video player.