Skip to main content

Presenting a We Are Story in an embedded context (iFrame, LMS, or similar)

Embedding, iFrame, LMS, We Are Story

When embedding a Story into an external platform, like an iFrame or Learning Management System (LMS), the content will automatically adapt to different screen sizes. Here’s how the presentation works across various devices and how you can control the display modes.

Desktop and mobile views

We Are Stories provide two main views: desktop and mobile. Each is optimized to ensure the best possible user experience, whether on a large screen or a mobile device.

• Desktop view: When the screen width is 1024px or larger, the Story will default to the desktop view.

• Mobile view: If the screen width is less than 1024px, the mobile view is automatically applied for easier readability. The mobile version includes larger text on captions and responses to enhance the reading experience on smaller screens.

In both cases, the Story maintains a fixed aspect ratio of 10:16. For the content to display in desktop view, the embedded frame needs to meet both the width requirement and a minimum height, ensuring the aspect ratio is preserved.

Fullscreen mode

If a user chooses to view the Story in fullscreen, it will always default to the desktop view, regardless of the screen width or device type. This ensures that the content is displayed optimally when taking advantage of the full screen.

Permissions the iframe needs

Browsers block some features inside an iframe unless the page that embeds the Story explicitly allows them. Add an allow attribute to your iframe like this:

<iframe src="https://play.wearelearning.com/play/yourStoryID" allow="autoplay; fullscreen; microphone; camera"></iframe>
  • autoplay lets the Story play sound and video from the start. Without it, learners may not hear anything at the beginning of the Story.

  • fullscreen lets learners switch to fullscreen mode.

  • microphone lets learners answer open responses by voice. Without it, the browser blocks microphone access, and learners can't record audio responses.

  • camera is used by features that need the learner's camera.

This is the same configuration we use in our SCORM packages.

Completion tracking

Embedding a Story on its own doesn't send completions to your LMS, because We Are doesn't know who the learner is. To track completions, launch the Story with xAPI/cmi5 launch parameters (see Integrate We Are with any learning management system) or use a SCORM package.

Overriding the view mode

You have the option to override the automatic view settings with a query parameter in the URL. This is handy when you want to enforce a specific display mode in an embedded environment, no matter what device is being used.

• To force the desktop view, append the following query parameter to the Story URL:

?forceDisplayMode=desktop

• To force the mobile view, use this query parameter:

?forceDisplayMode=mobile

For example, the Story URL might look like this:

https://play.wearelearning.com/play/yourStoryID?forceDisplayMode=desktop

By including these parameters, you gain full control over how the Story is presented in embedded environments, ensuring a consistent experience for your users.

Did this answer your question?