Closed f0k closed 6 months ago
Hey @f0k,
thank you very much for writing this issue! I decided to implemented option 3 and additionally added support for replacement of links, so there is no problem if users forget to switch the tab in the 'embed media' popup. The parsing should now be a lot more reliable (especially with newlines within / between tags) and I think only fail in cases like <video title=">" src="..."></video>
, which might be such an edgy edge case, that it is acceptable.
Cheers Justus
In my first attempt to add an OpenCast video to a Moodle text page, Moodle created the following HTML code:
Interestingly, Firefox renders this as a video element, even though the content of a
<video>
tag is only meant as a fallback for browsers who do not know or want to render the<video>
element at all. However, the OpenCast filter does not recognize this pattern, so I (wrongly) assumed my university had done something wrong.In all future attempts, Moodle created HTML code as follows:
This is the only pattern supported by the filter.
There is another valid pattern for videos:
I.e., if there is only a single source, it can be specified as an attribute on the
<video>
element. This pattern is also unsupported.There are four options to take:
I'm not advocating for any of these options, I just wanted to document that there is a potential problem. If I ever manage to reproduce the first pattern in Moodle, I'll report back here.