[#284] Support XEP-0221 (Dataforms media element)
Summary Support XEP-0221 (Dataforms media element)
Queue gloox
Queue Version SVN
Type Enhancement
State Resolved
Priority 1. Low
Owners js (at) camaya (dot) net
Requester pulkomandy (at) pulkomandy (dot) tk
Created 09/28/2019 (358 days ago)
Updated 12/10/2019 (285 days ago)
Resolved 12/10/2019 (285 days ago)

12/10/2019 11:04:29 AM Jakob Schröter Comment #3
Assigned to Jakob Schröter
State ⇒ Resolved
Reply to this comment
gloox trunk now supports both BOB and Data Form Media Elements 
(hard-coded into DataFormField for now).
09/29/2019 06:10:03 PM pulkomandy (at) pulkomandy (dot) tk Comment #2 Reply to this comment
For reference here is the implementation I came up with

(from old gloox 1.1 branch that has been overwritten, with some changes)
09/28/2019 09:53:22 PM pulkomandy (at) pulkomandy (dot) tk Comment #1
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Type ⇒ Enhancement
Summary ⇒ Support XEP-0221 (Dataforms media element)
Queue ⇒ gloox
Reply to this comment
I'm implementing in-band registration (XEP-0077) in my client and 
found out that some servers provide a captcha image in the form they 
send. It would be nice to have this handled properly and integrated in 
the dataforms implementation in gloox.

I can do it using a separate StanzaExtension that matches the <media> 
element, but then I can't match the media element with the 
dataformfield it came from in a clean way (I can only guess by having 
my StanzaExtension parse the form item and locate the name there, then 
match using that, hoping that there is only a single field with that 

It would be much simpler if the DataForms implementation in gloox 
would support the media element directly in some way (at least allow 
me to get the media URL)