Branching Scenario: Add media options to Branching Question
Description
Acceptance Criteria
Attachments
Activity
Oliver Tacke September 16, 2024 at 11:51 AM
That should be everything that I need - except for some time to do the changes

Jelena Milinovic September 16, 2024 at 9:06 AM
Yes, we discussed just tweaking the size of the image but the problem with that is that we won’t be able to ensure that all the parts of the image are always readable (if someone would be using images for instructions for instance). That is why we thought “Image zooming” was the better option compared to fixed image size.
For the image, the width/alignment can be the same as for H5P.Question today (35% of the available width). For max-height, I suggest we keep the value you implemented today. Not limiting the height might be a problem in full-screen mode.
For audio and video - I would just suggest keeping the width/height restrictions you implemented as it looks and works very well. Just change the alignment so they are too left-aligned.
Oliver Tacke September 13, 2024 at 2:49 PMEdited
I was aware of potential size issues (“Some other min/max values might be set of course, but that’s just tweaking the CSS.“) Should I just use the exact same size/alignment and zoom mechanism that H5P.Question uses for the introductory media section of other content types?
Addendum: Videos do not seem to be left aligned (and limited in height), but seem to use the full width in introductory media, but I can make them left-aligned and limited in height - just would need to know what height.
When set to allow zooming in, H5P.Question starts with images at 35% of the available width without a height limit. Same here?

Jelena Milinovic September 13, 2024 at 11:35 AM
I had a chance to review this, nice feature and many will be happy to see it!
Here are some smaller findings that can be considered worked on:
Images look oversized (especially in full-screen mode) see below:
It would be nice if we can get “Image zooming” option in place. This way we can have a lot smaller default images. Then users can zoom in to see the details if needed.
I would suggest left alignment (for all media types). This is the way we have it today in MC for instance (and other content types that allow media at the top)
Oliver Tacke December 7, 2023 at 11:54 AM
Sure. The media will scale, of course. Some other min/max values might be set of course, but that’s just tweaking the CSS.
Acceptance criteria
As an author, I can optionally add an image on top of a Branching Question.
Image is displayed adequately and scales with content
If “Image” is chosen but no file uploaded, the H5P.Image placeholder will show up.
As an author, I can optionally add audio on top of a Branching Question.
Audio is displayed in “full” mode using all horizontal space and scales with the content.
If “Audio” is chosen but no file uploaded, the H5P.Audio error message will show up.
As an editor, I can neither change the audio mode to “minimalistic” nor to “transparent” in the editor. (option hidden)
As an author, I cannot change the “fit to wrapper” setting (option hidden)
As an author, I can optionally add video on top of a Branching Question.
Video is displayed adequately and scales with the content.
If “Video” is chosen but no file uploaded or link set, the H5P.Video error message will show up.
As an author, I cannot change the “fit to wrapper” setting (option hidden)
Code is fine
Background
This feature was requested multiple times on the forum at with lots of votes - at least the “image” part, but going for audio and video in one go doesn’t feel wrong.
Suggestion
Pull requests at:
Please note that for a release, all the minor versions of Branching Scenario components should probably be updated in order to avoid potential (hypothetical) issues with missing functions due to outdated dependencies.