dl8-cinema
<dl8-cinema>
The <dl8-cinema> element lets users sit in a virtual cinema and watch regular 2D videos as well as 3D stereoscopic videos. The element works much like a normal video tag. You can define different sources with qualities as child elements to tell the element what video content to play on the cinema screen.
Whats special about the dl8-cinema element is that you can freely customize the room the user should sit in and where the virtual screen should be placed.
<dl8-cinema title="Example Video" poster="poster.jpg" author="John Doe"
room-format="STEREO_360_TB" room-src="cinema.png"
format="MONO_FLAT" force-show-cinema>
<source src="example.mp4" type="video/mp4" />
<source src="example.webm" type="video/webm" />
</dl8-cinema>
format="<string>" [mandatory]
Defines the mono or stereo format the flat video playing on the screen is provided in. Delight VR supports all common 2D flat video and stereoscopic 3D flat video formats.
- MONO_FLAT: A monoscopic 2D flat video.
- STEREO_FLAT_LR: A stereoscopic 3D flat video, left and right eye being side by side. The pixel aspect ratio follows the video aspect ratio.
- STEREO_FLAT_LR_SQUARE: A stereoscopic 3D flat video, left and right eye being side by side. The pixel aspect ratio is square (1:1).
- STEREO_FLAT_TB: A stereoscopic 3D flat video, left and right eye being on top and bottom respectively. The pixel aspect ratio follows the video aspect ratio.
- STEREO_FLAT_TB_SQUARE: A stereoscopic 3D flat video, left and right eye being on top and bottom respectively. The pixel aspect ratio is square (1:1).
{room-src|room-src-left|room-src-right}="<uri>" [mandatory]
The room image src URI to use as the cinema. A stereoscopic image works best as it better establishes the room the user sits in. You can optionally provide room-src-left and room-src-right to separately define the image for each eye in VR.
Note that the virtual screen is always displayed in the front (negative z-axis).
room-format="<string>" [mandatory]
Defines the mono or stereo format the room image is provided in. Delight VR supports all common stereo/mono 360/180 equirectangular and spherical formats.
- STEREO_180_LR: A 180 degree stereo equirectangular mapping, left and right eye being side by side.
- STEREO_180_LR_SPHERICAL: A 180 degree stereo spherical mapping, left and right eye being side by side.
- STEREO_180_TB: A 180 degree stereo equirectangular mapping, left and right eye being on top and bottom respectively.
- STEREO_180_TB_SPHERICAL: A 180 degree stereo spherical mapping, left and right eye being on top and bottom respectively.
- STEREO_360_TB: A 360 degree stereo equirectangular mapping, left and right eye being on top and bottom respectively.
- STEREO_360_LR: A 360 degree stereo equirectangular mapping, left and right eye being side by side.
- MONO_360: A 360 degree mono equirectangular mapping.
- STEREO_CUBEMAP: A 360 degree stereo cubemap. 6 sides horizontally for each eye. Please provide src-left and src-right for this format. This format is commonly exported from OctaneVR renderer.
- CARDBOARD_PHOTO: A photo taken with the Cardboard Camera App. This is typically a 360° equirectangular jpg with the left eye as the base image data and the right eye encoded in metadata.
screen-width="<number>" [optional]
Width of the cinema screen in meters. The default is 2.5 meters. Not that depending on the aspect of the video the actual width can be less than the given width.
screen-height="<number>" [optional]
Height of the cinema screen in meters. The default is 1.5 meters. Not that depending on the aspect of the video the actual height can be less than the given height.
screen-distance="<number>" [optional]
Distance from the viewer to the cinema screen in meters. The default is 2 meters.
screen-x-offset="<number>" [optional]
Relative horizontal translation of the screen. With this parameter you can fine tune the placement of the cinema screen in the room. The default is 0.
screen-y-offset="<number>" [optional]
Relative vertical translation of the screen. With this parameter you can fine tune the placement of the cinema screen in the room. The default is 0.
Other <dl8-video> attributes
The dl8-cinema element supports all additional <dl8-video> attributes like loop, muted, crossorigin and fps. You can see the dl8-video API for detailed information.
Customization
Customization
Customizing the color scheme of Delight VR can be done globally per HTML document via the use of meta tags. This enables you to easily customize the appearance of the player to match your corporate identity.
Example
<head>
...
<!-- Color scheme customization -->
<meta name="dl8-customization-primary-color" content="#00e573">
<meta name="dl8-customization-secondary-color" content="#000090">
<!-- White label customization -->
<meta name="dl8-customization-brand-name" content="Company Name">
<meta name="dl8-customization-brand-logo" content="company-logo.svg">
<meta name="dl8-customization-brand-watermark-logo" content="watermark-logo.svg">
<meta name="dl8-customization-brand-url" content="http://...">
...
</head>
dl8-customization-primary-color
Defines the primary color of the Delight VR theme. Bright, saturated and memorable colors work best because it is used as the main accent and highlight color. The value is an RGB hex string.
dl8-customization-secondary-color
Defines the secondary color of the Delight VR theme. It is mainly used to complement the strong accent color as a slightly darker muted background tone and to style secondary buttons and headlines. The value is an RGB hex string.
dl8-customization-brand-name
Defines the name of your brand or company. It appears in several interfaces like the wizard and some dialogs. The default is the standard Delight VR brand name.
dl8-customization-brand-logo
Defines the logo of your brand or company. It appears in the top right in the embed and top left inside the viewer when no custom watermark logo is present. Logos with clear silhouettes in lighter tones work best. The width should be around 32 to 90 pixels and the height should not exceed 32 pixels. Consider using vector graphics files (.svg). The default is the Delight VR logo.
dl8-customization-brand-watermark-logo
Defines the watermark brand logo of your brand or company. It appears in the top left corner inside the viewer and should be roughly squared in size. Logos with clear silhouettes in lighter tones work best. The width and height should be around 32 pixels. Consider using vector graphics files (.svg). The default is the Delight VR watermark logo.
dl8-customization-brand-url
Defines the URL of your brand or company. By clicking the brand logo users are guided to the given brand URL. The default is the Delight VR website.
dl8-customization-no-brand-logo
Add this meta tag if you don’t want the brand logo to appear in the embed.
dl8-customization-no-brand-watermark-logo
Add this meta tag if you don’t want the watermark to appear in the player.
dl8-customization-no-content-badge
Add this meta tag if you don’t want the content type badge in the embed to appear in the bottom left corner.
dl8-customization-no-compass
Add this meta tag if you don’t want the compass to appear on the right side.
dl8-customization-no-vr-button
This meta tag hides the VR button displayed in the bottom right corner of the player UI.
dl8-customization-no-settings-button
This meta tag hides the settings button displayed in the bottom right corner of the player UI.
dl8-customization-no-fullscreen-button
This meta tag hides the fullscreen button displayed in the bottom right corner of the player UI.
dl8-customization-no-controls
This meta tag hides the video player control bar at the bottom of the player UI. This includes the seeking bar, sound control, time and duration labels.
dl8-customization-no-title
This meta tag hides the title at the top of the player UI.
dl8-customization-skip-vr-wizard
This meta tag disables the wizard when entering VR mode.
dl8-customization-force-native-vr-resolution
This meta tag is used to force a 1:1 resolution of the device instead of using the default optimized resolution for Android devices.
Common API
Common API
All Delight VR HTML elements are prefixed with “dl8-” and share a common API that, like with standardized HTML elements, is exported as attributes on the element. The following attributes are common amongst all Delight VR elements:
display-mode="<string>"
Defines the display mode behavior when the play button on a given content embed element is pressed. Due to minimal screen estate and good responsive practises the display-mode=”inline” attribute always defaults to “fullscreen” on mobile devices. If you want to explicitly change that behavior you can set the display-mode to “force-inline”. The default display-mode is “inline”.
Possible values: inline fullscreen force-inline
width="<css-value>" [optional]
The width of the embed element. Enter any valid CSS value such as 100%, px, rem and so forth. When left blank the other two dimension attributes “height” and “aspect” take precedence. When none of the three dimension attributes are given, width is set to 100% to completely fill the parent.
height="<css-value>" [optional]
The height of the embed element. Enter any valid CSS value such as 100%, px, rem and so forth. When left blank the other two dimension attributes “width” and “aspect” take precedence.
aspect="<string>" [optional]
The aspect ratio of the embed element. The aspect is given as a string value in the format “w:h”. The default is “16:10”.
poster="<uri>" [optional]
Defines a fallback image that is displayed as a default before initializing or playing any content. It can be any valid URI that points to an image. You an use any image format you would normally use as an image in the web. The default is the plain secondary dark color, which is part of the theme (also see Customization).
title="<string>" [optional]
Defines the content title string that appears on the embed and in the Delight VR player HUD on the top of the content. The default is no title. For the title to be readable on all screen sizes you should keep it under 50 characters if possible.
author="<string>" [optional]
Defines the content’s author as a string that appears on the embed below the title of the content. The default is no author.
author-href="<string>" [optional]
Defines the url to the author’s website. The user can access this link by clicking on the author text. Note that the author-href isn’t visible without the user supplying an author. The default is no author-href.
start-lat="<number>" [optional]
Defines the camera’s starting angle latitude in degrees. The default is 0 degrees.
start-lon="<number>" [optional]
Defines the camera’s starting angle longitude in degrees. The default is 0 degrees.
focal-length="<number>" [optional]
The camera’s starting field of view. The smaller the focal length the wider the lens. The unit of focal length is mm. The default is 15 mm.
min-focal-length="<number>" [optional]
The camera’s minimum field of view. The smaller the focal length the wider the lens. The unit of focal length is mm. The default is 10 mm.
max-focal-length="<number>" [optional]
The camera’s maximum field of view. The smaller the focal length the wider the lens. The unit of focal length is mm. The default is 80 mm.
preferred-controls="<string>" [optional]
The preferred camera control mode. Defaults to “MAGIC_WINDOW_CONTROLS”.
Can be one of “MAGIC_WINDOW_CONTROLS” and “DRAG_CONTROLS”.
drag-controls-damping="<number>" [optional]
The higher the value the more the drag control camera floats before coming to a halt. The attribute accepts ranges between 0.025 and 0.2. The default is 0.1
disable-scroll-capture [optional]
This attribute disables capturing of scroll events on content element.
disable-touch-capture [optional]
This attribute disables capturing of touch events on content element.
disable-mouse-capture [optional]
This attribute disables capturing of mouse events on content element.
disable-vertical-touch-dragging [optional]
Adding this attribute to a content element vertical touch-dragging and only allows touch-dragging on the horizontal-axis.
disable-vertical-mouse-dragging [optional]
Adding this attribute to a content element vertical mouse-dragging and only allows mouse-dragging on the horizontal-axis (non-mobile devices).
autostart [optional]
A boolean attribute that automatically starts the element with the attribute in the player. Video content with the autostart attribute is muted by default.
disable-tap-to-unmute [optional]
Use this attribute on an element with the autostart attribute to prevent the default mute behaviour.
autostart-vr [optional]
Automatically start the content element in VR mode by providing this attribute.
Programmatic Actions
To control the player embed via Javascript Delight VR offers the following APIs on the element. This can be used for example for starting the player automatically after the site is loaded.
Start player:
var element = document.querySelector("dl8-video")
element.start()
Exit player:
var element = document.querySelector("dl8-video")
element.exit()
Update dimensions:
var element = document.querySelector("dl8-video")
element.updateDimensions()
You can call this function on the element to trigger a size recalculation. This is especially useful when the visibility of the element changes. The player updates the dimensions according to the new DOM state.
Programmatic Events
Delight VR offers some custom events that you can listen to. These are useful when you need detailed insights into the player lifecycle and want to trigger certain logic after detecting them:
‘x-dl8-evt-ready‘ (all player resources have been initialized):
document.addEventListener('x-dl8-evt-ready', function () {
// when DOM is also loaded you are good to call Delight VR element APIs like .start()
}
‘x-dl8-evt-loading-started‘ (content loading started) :
document.addEventListener('x-dl8-evt-loading-started', function () {
// resource loading has been started
// for example after the user presses the play button on the embed
}
‘x-dl8-evt-loading-progress‘ :
document.addEventListener('x-dl8-evt-loading-progress', function (t) {
// resource loading has progressed
// the 't' param indicates the progress from 0.0 to 1.0
}
‘x-dl8-evt-loading-finished‘ (content loading finished) :
document.addEventListener('x-dl8-evt-loading-finished', function () {
// resource loading has finished
}
Beta 5 - Feature Update
Beta 5 - Feature Update
Published on: Jul 15, 2016
Introducing: Delight VR Cinema
Checkout all changes below:
Virtual Cinema
The Delight VR family of elements just grew larger with the introduction of the Virtual Cinema element. The Virtual Cinema element let’s you create amazing showroom experiences to display 2D and 3D stereoscopic video within a customizable room in VR. Start building a virtual showroom for your products or a virtual cinema experience for showing your 2D and 3D movie content right now!
Inline error reporting
Delight VR now reports errors regarding declaration of your Delight VR Suite tags early and inline such that you and your customers will not be subject to any surprises when clicking on Delight VR powered content. This feature will be in effect for all elements in the Delight VR Suite starting today.
Beta 4 - Feature Update
Beta 4 - Feature Update
Published on: Jun 30, 2016
Cinematic Video: Watch 3D movies in VR
Checkout all changes below:
Support for regular stereoscopic and monoscopic videos
With the latest version of Delight VR (v1.0.0-beta4) we added support for various flat video formats. Now you can add regular videos as well as 3D videos to your site and watch them in VR!
Let your customers sit back, relax, grab an ice cold drink and enjoy a virtual cinema experience.
Beta 3 - Feature Update
Beta 3 - Feature Update
Published on: Jun 17, 2016
Update: Launching VR Video Controls and Delight VR Tour!
Checkout all changes below:
VR Video Controls
Delight VR just got better with the introduction of a fully featured 3D user-interface for videos! Your customers are now in full control while being immersed in Virtual Reality videos. Staying true to our mission of providing truly HMD agnostic experiences, Delight VR’s 3D UI supports gaze based interaction as well as optionally button and controller interaction.
To further strengthen your brand identification, Delight VR’s 3D UI fully respects the common Delight VR customization options, thus providing a coherent experience on your site that extends into VR!
Delight VR Tour Support
We’re proud to announce the launch of the Delight VR Tour element! The tour element provides you with a fully declarative way of building interactive connected tours. Be it from stereoscopic 3D renderings, stereoscopic 360 photos, mono 360 images or even Cardboard Camera images: The choice is yours! Impress your customers today with an interactive tour!
Gaze based Interaction
With the new release of VR Video Controls and Delight VR Tour we have taken great care to provide headset and input device agnostic interaction. Gaze based interaction is fully supported and optionally available buttons as well as controllers are taken into account. This means seamless scaling from Cardboard solutions to Gear VR to high-end HMDs like the Vive or Oculus and ultimately a better and coherent experience for your customers!