Inline frame video loop

how do i loop the video (local video file) in inline frame?

If you are just loading a video file as an Inline Frame widget’s Frame Target, then I don’t think it is possible to set attributes for the video object, nor dynamically control it. But, with javascript injection you can do this in order to create and control the HTML tag.

  • Note: this method is not supported by Axure nor guaranteed to work in all browsers. It won’t kill anything, and lots of people use javascript successfully. You just won’t be able to get official support from Axure for this.
  • Browsers and operating systems handle video differently and the “rules” are subject to change. For instance, in 2018 Google Chrome changed to block video from autoplaying in order to cut down on annoyances and unexpected experiences. However, they do allow muted autoplaying. In general though, the user must either interact with something on the page or domain in order for videos to automatically play. So far, no issues or special rules about looping.

Here is a demonstration with an inline frame on the “Home” page. The Frame Target is another page in the prototype, “video page”, and on that page, a video is loaded into a dynamic panel. See the page’s OnPageLoad event. You can change the source="https://ia802.. .mp4" to load your local file. (I just picked a short video on archive.org that will easily demonstrate looping.)

  • There are four attributes assigned to the video tag:
  1. mute (necessary for autoplay to work at all; even though this sample video has no sound)
  2. autoplay (which may not work, but worth a shot)
  3. loop (this is the key attribute for your need)
  4. controls (shows the video controls; necessary to allow user to play video if autoplay doesn’t work)
  • For me, the video will auto-loop in Chrome on Win10.
  • This does not work on iOS and Axure Share app. (I have gotten videos to work in past though…)
  • If I load the “Home” page, I must click the video to play it first, but then it loops.
  • If I load the “video page” directly, the video autoplays and loops.
  • After visiting the “video page” if I return to Home, the video loads, autoplays and loops. I think this is due to how Google Chrome handles video in general, as the inline frame is basically another domain/browser instance, so the video won’t play until I interact with that page first.

VideoInFrame.rp (54.3 KB)
https://fxkos9.axshare.com

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.