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.
Problem/Motivation
Let's have this module a first-class citizen in the D8Media Initiative.
Proposed resolution
As discussed with D8Media folks during meetings, Daniel's https://github.com/dawehner/media_entity_brightcove should be a submodule here.
Remaining tasks
Copy code from GitHub. Have this documented.
User interface changes
API changes
Data model changes
There's still an ongoing debate over in #2625854: Provide default source_field when creating new media entity bundles which might have an effect on how the fields gonna be created.
Comments
Comment #3
dawehnerI'm quite glad that you are picking up the idea! Conceptually it totally always made sense for me to let brightcove be part of the larger ecosystem
Comment #4
BoobaaThe attached patch needs a(t least one) minor change in core: either #2274433: Do not allow to alter Locked field via UI, #2887731: EntityreferenceAutocompleteWidget constraint cannot stop form submission or even both. Additionally, as media.module is only present in the upcoming drupal-8.4.x release's branch, I'm not committing this right now, but submitting here for review. The @MediaSource plugin in the patch is already prepared for #2865184: Allow MediaSource plugins provide default field form/view display settings as well.
Comment #5
BoobaaLooks like I forgot about the constraints earlier, fixing this now. Checked if the bug reported in #2896582: Ensure \Drupal\media_entity_brightcove\Plugin\MediaEntity\Type\BrightcoveVideo::thumbnail always returns a file URI is still present here, but it's gone.
The related core bugs are still present, so I'm still not committing this.
Comment #6
pingwin4egComposer can't automatically apply the patch from #5. So here's the rerolled version for the current 8.x-1.x module's branch.
Comment #7
keithdoyle9 CreditAttribution: keithdoyle9 at SEI Global Services Inc. commentedAny progress on the issue?
Comment #8
ccarrascal CreditAttribution: ccarrascal at Johnson & Johnson commentedI was still having trouble with composer to apply the patch in #6, so I had to modify it a little bit.
Now it works for me with the current 8.x-1.3 version of the module.
Comment #9
tariqinam CreditAttribution: tariqinam commentedI applied patch #8 on version 8.x-1-3 with drupal 8.7.8 (media module enabled).
I created a media type of Brightcove video, and added media field to default article content type. In the form display setting, I selected entity browser to browse and upload BC video.
when creating a new article, I can browse a video successfully but when selected and try to add, an error comes up saying:
"Entity must be type of media"
See attached image. Is there anything not right here?
This entity browser view works fine when used with Brightcove video field itself to add video to a node.
Comment #10
kducharm CreditAttribution: kducharm at CivicActions for National Science Foundation commentedRe-rolled patch for 2.0
Comment #11
Dinesh18 CreditAttribution: Dinesh18 as a volunteer and at Singapore Press Holdings commentedFacing similar issues. Any idea how can we fix it ?
Comment #12
jan.mashat CreditAttribution: jan.mashat at Pronovix for BrightCove commentedComment #13
jan.mashat CreditAttribution: jan.mashat at Pronovix for BrightCove commentedComment #14
BoobaaAttached patch does two things:
media_brightcove
.media_entity_brightcove
submodule (by hiding it and triggering a deprecation message based on [#3081957] and #3062281: Deprecate block_place module for removal in Drupal 9).Rationale:
media_entity
module,media_brightcove
seems to be a more proper name.media_entity
approach (which might or might not work with themedia_entity_brightcove
submodule, I haven't tested), so I also kept that one without other changes than deprecation/hiding (so it cannot be enabled on the web UI, but if it worked that way, it should still work).Comment #15
jan.mashat CreditAttribution: jan.mashat at Pronovix for BrightCove commentedComment #17
BoobaaThanks for all the inputs, all the best pieces have been included in the patch.
Comment #19
dalinBecause this module didn't integrate with Media module for many years, and the alternative modules that did integrate are now no longer supported, it would be great to mention on the project description that this module now does integrate with Media module.