Skip to main content

Detect device rotation in Web

Comments

1 comment

  • Gareth Evans

    Hi Berend Veldkamp thanks for bringing this up. I looked into this briefly, you're not overlooking anything that we provide. The viewer.get-capabilities operation is the current best method of getting device orientation. VSW, as of 5.27, doesn't publish an event for orientation changes.

    If this is a strict requirement for your project you could implement this yourself. It is technically feasible to detect device orientation in JavaScript, via CSS, or as a React hook such as useOrientation. Using one of these approaches, you could then create your own custom event and subscribe to it. 

    0

Please sign in to leave a comment.