Forum Discussion

PatrickGilroy-0's avatar
PatrickGilroy-0
Community Member
3 years ago

360 images not working on Windows Touch devices

We have recently built modules using the 360 degree images feature in Storyline 360. These work as expected on Desktops and on mobile devices using the responsive player, however not on the device the content was desinged for.

These devices are Panasonic FZ-G1s,  which are Windows 10 touch devices. I understand there were issues with compatibilty in the past with these kind of hybrid touch devices, but was under the impression these had been patched out over the past few years.

Specifically, it is just the 360 images that are causing issues, meaning you are simply unable to register any kind of input, whether that's a tap or drag to move around the image. Drag and drop, etc. interactions seem to be working ok.

We are exploring whether it is possible to 'brute force' storyline to launch in the mobile responsive player as this remedies the issue, but so far cannot see a way to do this.

Any help would be greatly appreciated.

11 Replies

  • Hi Patrick,

    Thanks for reporting this in a support case as well! I see you're working with Chester, and unfortunately, what you've seen has been logged as a possible product bug observed on touch-enabled computers and Wacom pen tablets.

    Please feel free to reply to the support email if you have questions about the issue.

  • BenColey's avatar
    BenColey
    Community Member

    Is there any solution to this yet?

    Am working with Viewsonic touchscreens in classrooms and not being able to navigate round the 360 images on the display is a real pain.

    • JoseTansengco's avatar
      JoseTansengco
      Staff

      Hi Ben,

      Sorry to hear that you ran into this issue. We're still working on fixing the the bug discussed here but we'll be sure to leave a message as soon as a fix is released. 

      The workaround that we've identified is to use either a pen or trackpad/mouse to move the 360° image in your course. We apologize for any inconvenience this may have caused.

  • Hi Wesley,

    Thanks for reaching out!

    We don't have any updates to share at this time, but I've added your voice to this report. We'll be sure to update this thread in the future with any news. 

    Hope that you have a great weekend!

  • Has this issue been resolved yet, or are there alternative workarounds that do not require manual override of touch inputs within a web browser?

    It has been more than 4 years since the first flag for this input issue.

    My team struggled with this 2 years ago, and used the Chrome/Firefox workaround, but this solution is not ideal for end users that need to run this content on a daily basis.

    • EricSantos's avatar
      EricSantos
      Staff

      Hello ReinetHerbst-Ro,

      I hear you. This has been a tough limitation for a long time. Our team is still looking into the 360° image touch input issue on Windows touch devices, and I do not have an update to share right now.

      One option that works without the developer tool changes is to use a mouse, trackpad, or stylus to move around the 360° image. I know that may not be ideal for your setup, but it avoids the manual override you mentioned.

      I’ve added your experience to the report so we can update you here as soon as we have news.

      Thanks for sharing how this impacts your team and learners!

  • HarryT's avatar
    HarryT
    Community Member

    Hi all

    I've found the same issue and have been working with 360 images as a key part of a couple of projects. This morning I found a solution (via CoPilot) that works on both my organisation's Lenovo touchscreen ThinkPads and tru Digital touch screens (only devices I was having issues with). I have execute Javascript prompts on each page that uses a 360 image viewer and converts screen touches into a mouse input for panning movement. This code also allows hotspots to view layers (via sewt triggers within the 360 viewer) although I have not tested if these still work for labels and tooltips that appear on hover will not work.

    Unfortunately I am unable to share this working in practice in the form of a review or source files due to NDA's and corporate ownership but please feel free to give it a go.

    Hope this helps (I know theres a lot to digest here) and best of luck with your projects. Hope Articulate can work on this for a built in and less demanding solution.

    (function () {
      // ============================================================
      // Storyline 360 Touch -> Mouse bridge (viewer-scoped version)
      // Only handles touch interactions that begin inside a detected
      // 360 viewer container. Ignores all other slide objects.
      // ============================================================
    
      // ------------------------------------------------------------
      // CONFIGURATION
      // ------------------------------------------------------------
    
      // Add / adjust selectors here if your published Storyline output
      // uses a more specific wrapper for the 360 image object.
      var VIEWER_SELECTORS = [
        // Generic Storyline / HTML object possibilities
        '[data-acc-text*="360"]',
        '[aria-label*="360"]',
        '[title*="360"]',
        '[alt*="360"]',
        '[class*="360"]',
        '[id*="360"]',
    
        // Media / object wrappers that may contain the viewer
        '.slide-object',
        '.storyline-object',
        '.html-object',
        '.video-object',
        '.media-object'
      ];
    
      // Treat movement under this threshold as a tap/click
      var DRAG_THRESHOLD = 10;
    
      // Retry detecting the viewer for a short time after the slide starts
      // in case Storyline builds the object slightly after timeline start.
      var DETECTION_RETRIES = 40;
      var DETECTION_INTERVAL = 250;
    
      // ------------------------------------------------------------
      // SHARED STATE
      // ------------------------------------------------------------
    
      if (!window.__storyline360ScopedBridge) {
        window.__storyline360ScopedBridge = {
          installed: false,
          enabled: false,
          viewerRoot: null,
          touchSession: null,
          observer: null
        };
      }
    
      var bridge = window.__storyline360ScopedBridge;
    
      // ------------------------------------------------------------
      // HELPER FUNCTIONS
      // ------------------------------------------------------------
    
      function uniqueSelectors(list) {
        return list.filter(function (item, index) {
          return list.indexOf(item) === index;
        });
      }
    
      function getCustomSelectors() {
        // Optional: allow a slide-specific selector override
        // Example:
        // window.__storyline360CustomSelectors = ['#my360Object'];
        if (Array.isArray(window.__storyline360CustomSelectors)) {
          return window.__storyline360CustomSelectors;
        }
        return [];
      }
    
      function getAllViewerSelectors() {
        return uniqueSelectors(getCustomSelectors().concat(VIEWER_SELECTORS));
      }
    
      function isVisible(el) {
        if (!el) return false;
        var style = window.getComputedStyle(el);
        return (
          style.display !== "none" &&
          style.visibility !== "hidden" &&
          el.offsetWidth > 0 &&
          el.offsetHeight > 0
        );
      }
    
      function closestMatchingAncestor(el, selectors) {
        if (!el || !selectors.length) return null;
    
        for (var i = 0; i < selectors.length; i++) {
          try {
            var match = el.closest(selectors[i]);
            if (match && isVisible(match)) {
              return match;
            }
          } catch (err) {
            // Ignore invalid selector errors just in case
          }
        }
    
        return null;
      }
    
      function getElementAtPoint(x, y) {
        return document.elementFromPoint(x, y);
      }
    
      function detectViewerRoot() {
        var selectors = getAllViewerSelectors();
    
        // First pass: query all possible candidates
        for (var i = 0; i < selectors.length; i++) {
          var nodes;
          try {
            nodes = document.querySelectorAll(selectors[i]);
          } catch (err) {
            continue;
          }
    
          for (var j = 0; j < nodes.length; j++) {
            var node = nodes[j];
            if (!isVisible(node)) continue;
    
            // Heuristic: prefer bigger interactive display areas
            var rect = node.getBoundingClientRect();
            if (rect.width > 120 && rect.height > 120) {
              return node;
            }
          }
        }
    
        return null;
      }
    
      function setViewerInteractionStyles(viewerRoot) {
        if (!viewerRoot) return;
    
        viewerRoot.style.touchAction = "none";
        viewerRoot.style.msTouchAction = "none";
        viewerRoot.style.webkitUserSelect = "none";
        viewerRoot.style.userSelect = "none";
        viewerRoot.style.webkitTouchCallout = "none";
      }
    
      function pointWithinElement(x, y, el) {
        if (!el) return false;
        var rect = el.getBoundingClientRect();
        return (
          x >= rect.left &&
          x <= rect.right &&
          y >= rect.top &&
          y <= rect.bottom
        );
      }
    
      function getInjectedTargetForTouch(touch, viewerRoot) {
        var rawTarget = getElementAtPoint(touch.clientX, touch.clientY);
    
        if (!rawTarget || !viewerRoot) return viewerRoot;
    
        // If the touched element is inside the viewer, allow it
        if (viewerRoot === rawTarget || viewerRoot.contains(rawTarget)) {
          return rawTarget;
        }
    
        // If elementAtPoint returns something nested oddly, walk up to a matching ancestor
        var matchedAncestor = closestMatchingAncestor(rawTarget, getAllViewerSelectors());
        if (matchedAncestor && (matchedAncestor === viewerRoot || viewerRoot.contains(matchedAncestor))) {
          return matchedAncestor;
        }
    
        // Otherwise, force events to the viewer container to support dragging
        return viewerRoot;
      }
    
      function createMouseEvent(type, touch) {
        return new MouseEvent(type, {
          bubbles: true,
          cancelable: true,
          view: window,
          clientX: touch.clientX,
          clientY: touch.clientY,
          screenX: touch.screenX || 0,
          screenY: touch.screenY || 0,
          button: 0,
          buttons: 1
        });
      }
    
      function dispatchMouse(type, touch, target) {
        if (!touch || !target) return;
        target.dispatchEvent(createMouseEvent(type, touch));
      }
    
      function clearTouchSession() {
        bridge.touchSession = null;
      }
    
      function beginTouchSession(touch, viewerRoot, target) {
        bridge.touchSession = {
          startX: touch.clientX,
          startY: touch.clientY,
          lastX: touch.clientX,
          lastY: touch.clientY,
          viewerRoot: viewerRoot,
          startTarget: target,
          lastTarget: target
        };
      }
    
      function updateTouchSession(touch, target) {
        if (!bridge.touchSession) return;
        bridge.touchSession.lastX = touch.clientX;
        bridge.touchSession.lastY = touch.clientY;
        bridge.touchSession.lastTarget = target;
      }
    
      function isTapGesture(touchSession, touch) {
        if (!touchSession || !touch) return false;
        var deltaX = Math.abs(touch.clientX - touchSession.startX);
        var deltaY = Math.abs(touch.clientY - touchSession.startY);
        return deltaX < DRAG_THRESHOLD && deltaY < DRAG_THRESHOLD;
      }
    
      function enableBridgeForViewer(viewerRoot) {
        bridge.viewerRoot = viewerRoot;
        bridge.enabled = true;
        setViewerInteractionStyles(viewerRoot);
      }
    
      function disableBridge() {
        bridge.enabled = false;
        bridge.viewerRoot = null;
        clearTouchSession();
      }
    
      function scanAndEnableViewer() {
        var viewer = detectViewerRoot();
        if (viewer) {
          enableBridgeForViewer(viewer);
          return true;
        }
        return false;
      }
    
      function watchForViewerChanges() {
        if (bridge.observer) {
          bridge.observer.disconnect();
          bridge.observer = null;
        }
    
        bridge.observer = new MutationObserver(function () {
          if (!bridge.viewerRoot || !document.body.contains(bridge.viewerRoot)) {
            var found = detectViewerRoot();
            if (found) {
              enableBridgeForViewer(found);
            } else {
              disableBridge();
            }
          }
        });
    
        bridge.observer.observe(document.body, {
          childList: true,
          subtree: true,
          attributes: true
        });
      }
    
      // ------------------------------------------------------------
      // EVENT HANDLERS
      // ------------------------------------------------------------
    
      function onTouchStart(e) {
        if (!bridge.enabled || !bridge.viewerRoot) return;
        if (!e.changedTouches || !e.changedTouches.length) return;
        if (e.touches && e.touches.length > 1) return; // ignore multi-touch
    
        var touch = e.changedTouches[0];
    
        // Only start handling if touch begins inside the 360 viewer
        if (!pointWithinElement(touch.clientX, touch.clientY, bridge.viewerRoot)) {
          return;
        }
    
        var target = getInjectedTargetForTouch(touch, bridge.viewerRoot);
    
        beginTouchSession(touch, bridge.viewerRoot, target);
    
        // Prevent native browser gestures only for the viewer touch interaction
        e.preventDefault();
    
        dispatchMouse("mouseover", touch, target);
        dispatchMouse("mousemove", touch, target);
        dispatchMouse("mousedown", touch, target);
      }
    
      function onTouchMove(e) {
        if (!bridge.enabled || !bridge.viewerRoot || !bridge.touchSession) return;
        if (!e.changedTouches || !e.changedTouches.length) return;
    
        var touch = e.changedTouches[0];
        var target = getInjectedTargetForTouch(touch, bridge.touchSession.viewerRoot);
    
        updateTouchSession(touch, target);
    
        e.preventDefault();
        dispatchMouse("mousemove", touch, target);
      }
    
      function onTouchEnd(e) {
        if (!bridge.enabled || !bridge.viewerRoot || !bridge.touchSession) return;
        if (!e.changedTouches || !e.changedTouches.length) return;
    
        var touch = e.changedTouches[0];
        var target = getInjectedTargetForTouch(touch, bridge.touchSession.viewerRoot);
    
        e.preventDefault();
    
        dispatchMouse("mouseup", touch, target);
    
        // Only click if gesture remained essentially a tap
        if (isTapGesture(bridge.touchSession, touch)) {
          dispatchMouse("click", touch, target);
        }
    
        clearTouchSession();
      }
    
      function onTouchCancel(e) {
        if (!bridge.enabled || !bridge.touchSession) return;
        if (!e.changedTouches || !e.changedTouches.length) return;
    
        var touch = e.changedTouches[0];
        var target = bridge.touchSession.lastTarget || bridge.touchSession.viewerRoot;
    
        dispatchMouse("mouseup", touch, target);
        clearTouchSession();
      }
    
      // ------------------------------------------------------------
      // INSTALL GLOBAL LISTENERS ONCE
      // ------------------------------------------------------------
    
      if (!bridge.installed) {
        document.addEventListener("touchstart", onTouchStart, {
          passive: false,
          capture: true
        });
    
        document.addEventListener("touchmove", onTouchMove, {
          passive: false,
          capture: true
        });
    
        document.addEventListener("touchend", onTouchEnd, {
          passive: false,
          capture: true
        });
    
        document.addEventListener("touchcancel", onTouchCancel, {
          passive: false,
          capture: true
        });
    
        bridge.installed = true;
      }
    
      // ------------------------------------------------------------
      // ACTIVATE ONLY IF A VIEWER EXISTS ON THIS SLIDE
      // ------------------------------------------------------------
    
      disableBridge();
    
      var attempts = 0;
      var timer = setInterval(function () {
        attempts++;
    
        if (scanAndEnableViewer() || attempts >= DETECTION_RETRIES) {
          clearInterval(timer);
          watchForViewerChanges();
        }
      }, DETECTION_INTERVAL);
    })();

    Many thanks,
    Harry

  • AaronWalker-0c3's avatar
    AaronWalker-0c3
    Community Member

    Aticulate - Is this something that is ever going to be fixed? Is it on your roadmap to fix, or just a function you're not developing? I need to use this functionality and it looks like I'm going to have to invest in a different tool.

    • EricSantos's avatar
      EricSantos
      Staff

      Hi AaronWalker-0c3,

      Thank you for asking so directly, and for sharing what's at stake for you. I'm sorry this has been such a long-standing frustration.

      It sounds like you'd like to use 360° images on touch devices without relying on workarounds. This behavior is logged as a bug in Storyline, not a feature we've decided not to offer. I don't have a timeline or roadmap details to share.

      If there's anything else we can help with, just let us know.