jetpack_vr_viewer_iframe_padding

Get padding for IFRAME depending on view type.

Description

jetpack_vr_viewer_iframe_padding( (view) $view ); 

Parameters (1)

0. $view (view)
- string cinema, 360 - default cinema

Usage

  1. if ( !function_exists( 'jetpack_vr_viewer_iframe_padding' ) ) { 
  2. require_once '/modules/shortcodes/vr.php'; 
  3.  
  4. // - string cinema, 360 - default cinema 
  5. $view = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = jetpack_vr_viewer_iframe_padding($view); 
  9.  

Defined (1)

The function is defined in the following location(s).

/modules/shortcodes/vr.php  
  1. function jetpack_vr_viewer_iframe_padding( $view ) { 
  2. if ( $view === '360' ) { 
  3. return '100%'; // 1:1 square aspect for 360 
  4.  
  5. return '50%'; // 2:1 panorama aspect