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 know that @rickvug's primary use case is playing uploaded files, but it would also be helpful to play files from URLs provided in Link fields. http://drupal.org/project/link
I'll be working on this today, and I'll provide a link to my fork shortly.
Comment | File | Size | Author |
---|---|---|---|
#18 | jw_player-linkfield-1494436-18.patch | 1.89 KB | Jorrit |
#14 | jw_player-linkfield-1494436-14.patch | 2.09 KB | Jorrit |
#11 | jw_player-linkfield-1494436-11.patch | 1.93 KB | Jorrit |
#9 | jw_player-linkfield_support-1494436-9.patch | 7.06 KB | John Bickar |
Comments
Comment #1
michaek CreditAttribution: michaek commentedHere's the fork: https://github.com/michaek/drupal_jw_player
Comment #2
michaek CreditAttribution: michaek commentedI've committed my changes to the github repository. In case I push any other commits, here's a tag of the current state: https://github.com/michaek/drupal_jw_player/tree/link_field-1494436
Comment #3
rickvug CreditAttribution: rickvug commented@michaek Thank you for the patch (pull request, I guess I should say). The module should definitely support external video. I've been a bit hesitant to support link fields because I'd (personally) rather use http://drupal.org/project/remote_stream_wrapper which registers the link with the File API. I find cleaner and more correct. However I still see user requesting support for link fields so I guess I should add in support, perhaps with help text point out other options.
Can you talk me through what you're doing with the video provider code? At first glance I don't like the idea of building in support for different providers within the module itself as it should really only be about display. Via (upcoming) link field support, remote stream wrapper and Media YouTube (http://drupal.org/project/media_youtube) it should be possible to format the output of any file on a CDN or YouTube videos. Separately I do need to add in support for RTMP streaming using the flash video player.
Thanks again for your work on this! I hope to work with you on these issues. Note that I'm travelling a lot over the next few months and have spotty Internet access. I want to carve out some time to work on the module but can't offer any guarantee on response time.
Comment #4
michaek CreditAttribution: michaek commentedHi, @rickvug. I agree that including provider support in the module can be problematic. Other modules should be able to provide their own video_provider plugins, which is certainly a better pattern, though I haven't actually tested that.
As far as the remote_stream_wrapper goes, I don't think I understand the reason for treating remote files like files when PHP doesn't really have to do anything with the file other than to output its URL for jwPlayer. The media module, and its related provider modules, seemed like overkill to me.
Comment #5
rickvug CreditAttribution: rickvug commented@michaek The nice thing with the remote stream wrapper is that the file URL will behave like any other Drupal file. This means that it can be formatted by any file based formatter, re-used by a media gallery, fields can be added by file entity, the files can be listed by views and so on. While I used to make "videos nodes" in Drupal 6 in most cases nodes no longer have any advantage over file entities. In some cases none of these advantages matter so a link field formatter is just simpler but in many (most?) cases I think it is a matter of users not understanding the new possibilities in Drupal 7. The situation with Media module trying to do everything doesn't help much. I wish that the module was split into separate projects in the way file entity was factored out.
Comment #6
michaek CreditAttribution: michaek commentedI guess I just don't see the value in a file-based formatter for something that's (always) just a URL. Even for an uploaded video file, outputting a player for the file doesn't require us to know anything about the file other than the URL, so introducing some abstraction around the stream wrapper seems like design for design's sake.
Comment #7
HongPong CreditAttribution: HongPong commentedThis may be helpful (or not), we were able to introduce a file-based formatter for link and text fields in the Views RSS module. the get_header() function grabs the needed length and content type strings. In our use case, a third-party server was being used to host media files so it was essential to use something besides the filefield, in order to get needed podcast metadata.
http://drupalcode.org/project/views_rss.git/commitdiff/69321d0
Comment #8
Hopiu CreditAttribution: Hopiu commentedIs there any progress on this issue? If time is the problem, I'm willing to help.
Comment #9
John Bickar CreditAttribution: John Bickar commentedThis functionality would be greatly appreciated. I've created a patch based on the current 7.x-1.x-dev and michaek's github sandbox project.
Comment #10
BerdirMissing t(), \' should not be used in translatable strings, instead use " for the string.
Not sure if settings should be lower case here.
todo's should be formatted with @todo, not sure if this is something that needs to be implemented in this patch or not.
Might not be safe to hardcode this?
Should have some basic documentation on the class and the functions.
Same here.
And here :)
Comment #11
Jorrit CreditAttribution: Jorrit commentedAttached you'll find a patch that implements this feature request without adding any extras like video providers and such.
This is from #1395584: Provide image poster (with configuration to select the source) #20.
Comment #12
BerdirComment #13
kingfisher64 CreditAttribution: kingfisher64 commented#11 patch applied cleanly against 26th Jan 2013 dev version.
Comment #14
Jorrit CreditAttribution: Jorrit commentedRerolled the patch.
Comment #15
ArtusamakThis should not be here. Fix Drupal upstram if it's not doing the job.
Comment #16
Jorrit CreditAttribution: Jorrit commentedI have tried that, but the effort is stranded in an issue that is growing hopelessly out of scope: #1443070: Add support for popular e-book formats, Google web formats, mkv and mka in file_default_mimetype_mapping().
Comment #17
garnett2125 CreditAttribution: garnett2125 commented#14 patch applied and works with 7.x-1.0-alpha1 version of jw_player.
Comment #18
Jorrit CreditAttribution: Jorrit commentedHere is a patch without the special treatment of files ending in
.webm
. Personally, I prefer the version from #14.Comment #19
antpre CreditAttribution: antpre commentedHi, from a user's point of view this feature would be very welcome. hope it can be included soon.
I played a bit with remote_stream_wrapper and Media and found it a bit of an overkill.
This feature (ability to have link to play remote media files) is already operational in other player modules for Drupal (video.js player, media front..) it would be great to have it here.
This been said I am sorry I can't help (I m not a developer).
Good luck.
Comment #20
John Bickar CreditAttribution: John Bickar commentedI rolled this functionality out into a separate module, that provides the formatter for link fields, and provides a scaffolded way to build the link URL. It's built with some specifics of our on-campus streaming video provider, but should work with any RTMP streaming URL.
Project on Github
tar.gz of latest release
Comment #21
deanflory CreditAttribution: deanflory commentedHas this still not be committed after that issue was fixed upstream in Drupal (#16)?
Comment #22
ron_s CreditAttribution: ron_s commentedSupport for link fields exists in our recent 7.x-2.x patches. Please download 7.x-2.x-dev, add the following patches, and post if you have any issues or questions. Thanks.
* Refactor theming: https://www.drupal.org/node/2713725
* Add not empty checks and Repeat option: https://www.drupal.org/node/2719995
* Add js file to build player: https://www.drupal.org/node/2719977