External Video Player
Last updated
Last updated
You can use an External Video Player script to load a video from a URL and display it on an object. You can play videos from YouTube, and videos that you load through a direct URL to the file. For more information, refer to in the public documentation.
To set up an External Video Player script to display a 2D video on an object, complete the following steps:
Add a Mesh Renderer
component to the object, if it doesn't have one already.
Add the External Video Player
script to the object.
In the External Video Player script parameters, in the Url field, enter the URL for the video that you want to play.
Select the Play On Enable No Sync check box so that the video plays automatically when the location loads.
Expand the Screen Renderers list, and then select the plus button to create a new slot.
Drag the object from the Hierarchy panel to the Screen Renderers slot that you just added.
The video will begin to play when the location loads in ENGAGE. You can't test the video in Unity. For more information about the available parameters, see External Video Player parameters.
If you use one of Unity's standard Plane 3D objects with an External Video Player script, and you want to ensure the correct orientation, change the coordinate system to Local, and rotate the plane so that the Z axis is pointing down and the X axis is pointing left as you face the screen.
You can display a 360 video on the interior surface of a sphere. Any user inside the sphere will then be able to look around and be immersed in the 360 video. The setup for a 360 video is slightly different to the basic setup.
To set up an External Video Player script to display a 360 video, complete the following steps:
Create an empty game object.
Add an ENGAGE_360_Video_Photo_Sphere.FBX
model as a child of the game object. You can find the model in the Assets
> ENGAGE_CreatorSDK
> Meshes
folder.
In the Inspector panel, set the X rotation of the ENGAGE_360_Video_Photo_Sphere
model to 0
.
Add an External Video Player
script to the parent game object.
In the External Video Player script settings in the Inspector panel, enter the URL for the video that you want to play in the Url field.
Select the Play On Enable No Sync check box so that the video plays automatically when the location loads.
Expand the Screen Renderers list, and then select the plus button to create a new slot.
Drag the ENGAGE_360_Video_Photo_Sphere
object from the Hierarchy panel to the Screen Renderers slot that you just added.
Turn off the Use Aspect Ratio Correction check box.
The video will begin to play when the location loads in ENGAGE. You can't test the video in Unity. For more information about the available parameters, see External Video Player parameters.
Url
Required URL of the video to load.
Start Time Offset Seconds
Enter 0
to play the video from the start. Enter a value greater than 0
to begin playback at that point in the video.
Play On Enable No Sync
Recommended: Select to begin playback of the video when the script is enabled. This typically occurs when the location loads. When this parameter is turned on, the video plays independently for each user. The video begins to play when the object the script is attached to becomes active for the user. If you want to synchronize playback, you can use AFX or network states to synchronize activation of the object. However, there may still be slight differences between users, and users that join late will see the video play from the start.
When this parameter is turned off, the video will not play unless the video screen is uploaded to ENGAGE servers as an IFX, and ENGAGE staff apply additional configuration settings.
Volume
The audio volume. Enter a value between 0
(muted) and 100
(maximum volume).
Is Loop
Select to restart the video when it ends. If you clear this check box, videos loaded through a direct URL to the file will display the final frame of the video when they end. Note: This setting is not compatible with YouTube videos. When a YouTube video ends, it will display a view determined by YouTube. For example, the thumbnails for suggested videos to watch next.
Youtube Resolution
Deprecated
Is 3d
Select if the the video is 3D.
Screen Renderers
List of Mesh Renderers on which to display the video.
Screens 360
Use Aspect Ratio Correction
Important: Clear this option if you want to display a 360 video. Select this option to force the video to a target aspect ratio.
Target Aspect Ratio
Enter a float representation of a target aspect ratio. To calculate the value, divide the target width by the target height.
For example, for a 16:9 aspect ratio, enter 1.7778
.
Use Chroma
Select to use chroma keying, where the background is made transparent based on its color.
Use Custom Chroma Key Color
Select to define a specific chroma key color. You can then choose a color in the Custom Chroma Key Color parameter.
Custom Chroma Key Color
The color to be used for chroma keying, which will become transparent in the video.
Spatial Audio Option > Is Spatial Audio
Select to enable spatial audio, where the volume reduces as you get further away from the object.
Spatial Audio Option > Spatial Audio Range
The maximum range from the object at which audio will be heard. Measured in Unity units.
Additional Audio Points
A list of transforms that define the centres of additional audio zones. The audio from the video will be heard by a user when they're within the defined range of an audio point.
Canvas Renderers
Advanced feature. Contact ENGAGE for more information.
Note: You can add screens that play synchronized video from an external URL in the Experience Editor. For more information, refer to in the public documentation.
Not required to display 360 video. For more information, see .