- Issue created by @axb
- Assigned to scott_earnest
- πΊπΈUnited States axb
Let me know if I can help at all. I could try to write some tests or something.
- πΊπΈUnited States scott_earnest
Thank you @alexb7217 - i have time set aside to work on this next week and appreciate your help.
- Status changed to Needs work
over 1 year ago 11:31pm 9 June 2023 - πΊπΈUnited States scott_earnest
Hi there @alexb7217 -
I think this is a good suggestion. I will continue work on this at a later date, but my idea was the formatter would be able to get the fieldname from it's definition. I was thinking something like:
// If the media loaded successfully, continue with the formatting. if (!empty($media) && !empty($formatter_type)) { $fieldname = $this->fieldDefinition->getName(); if (array_key_exists($fieldname, $media->getFields())) { // Grab the remote video URL. $video_url = $media->getFields()[$fieldname]->getValue()[0]['value']; // Use these to generate the URL for local oembed iframe. $request = new RequestContext($video_url);
needs some work as that introduces deprecations to other field types (like image etc)
I will keep this open and hope to get back to it soon. thank you for the suggestion!