Class MediaPlayer360
Media player class for playing Audio, Image and Video with 360 degree.
媒體播放器類別,用於 360 角度播放音訊、影像及視訊。
Inheritance
Inherited Members
Namespace: Votanic.vMedia.MediaPlayer
Assembly: Votanic.vMedia.dll
Syntax
[AddComponentMenu("")]
public class MediaPlayer360 : MediaPlayer
Fields
calibrateFactor
Calibrate factor for calibrator.
校正的因子。
Declaration
[Tooltip("Calibrate factor for calibrator.\n校正的因子。")]
public float calibrateFactor
Field Value
Type | Description |
---|---|
System.Single |
calibrator
Transform for yaw and roll angles.
用作校正偏擺及翻滾角度的 Transform。
Declaration
[Tooltip("Transform for yaw and roll angles.\n用作校正偏擺及翻滾角度的 Transform。")]
public Transform calibrator
Field Value
Type | Description |
---|---|
UnityEngine.Transform |
dataPath
Path of json file which store the media data in the path.
儲存與 path 有關的媒體數據的 Json 文件路經。
Declaration
[Header("[360]")]
[Tooltip("Path of json file which store the media data in the path.\n儲存與 path 有關的媒體數據的 Json 文件路經。")]
public string dataPath
Field Value
Type | Description |
---|---|
System.String |
logo
Display logo element.
顯示 Logo 元素。
Declaration
[Tooltip(" Display logo element.\n顯示 Logo 元素。")]
public bool logo
Field Value
Type | Description |
---|---|
System.Boolean |
logoElement
Logo Element for hiding top and bottom of 360 medium.
用作隱藏 360 媒體頂及底部的 Logo 元素。
Declaration
[Tooltip("Logo Element for hiding top and bottom of 360 medium.\n用作隱藏 360 媒體頂及底部的 Logo 元素。")]
public GameObject logoElement
Field Value
Type | Description |
---|---|
UnityEngine.GameObject |
pitcher
Transform for pitch angle.
用作校正俯仰角度的 Transform。
Declaration
[Tooltip("Transform for pitch angle.\n用作校正俯仰角度的 Transform。")]
public Transform pitcher
Field Value
Type | Description |
---|---|
UnityEngine.Transform |
rotater
Transform for rotate.
用作旋轉的 Transform。
Declaration
[Tooltip("Transform for rotate.\n用作旋轉的 Transform。")]
public Transform rotater
Field Value
Type | Description |
---|---|
UnityEngine.Transform |
rotateSpeed
Rotate speed of rotater.
旋轉的速度。
Declaration
[Tooltip("Rotate speed of rotater.\n旋轉的速度。")]
public float rotateSpeed
Field Value
Type | Description |
---|---|
System.Single |
rotation
Rotate with rotate speed if true.
當 true 時根據旋轉速度旋轉。
Declaration
[Tooltip("Rotate with rotate speed.\n根據旋轉速度旋轉。")]
public bool rotation
Field Value
Type | Description |
---|---|
System.Boolean |
scale
Size of sphere.
球體的大小。
Declaration
[Tooltip("Size of sphere.\n球體的大小。")]
public float scale
Field Value
Type | Description |
---|---|
System.Single |
scaler
Transform for scaling the size of Sphere Inverted Normal.
用作調整法線反轉球面大小的 Transform。
Declaration
[Tooltip("Transform for scaling the size of Sphere Inverted Normal.\n用作調整法線反轉球面大小的 Transform。")]
public Transform scaler
Field Value
Type | Description |
---|---|
UnityEngine.Transform |
zoom
Cuurent zoom level.
目前放大等級。
Declaration
[Tooltip("Cuurent zoom level.\n目前放大等級。")]
public int zoom
Field Value
Type | Description |
---|---|
System.Int32 |
zoomer
Transform for zoom.
用作放大的 Transform。
Declaration
[Tooltip("Transform for zoom.\n用作放大的 Transform。")]
public Transform zoomer
Field Value
Type | Description |
---|---|
UnityEngine.Transform |
zoomSpeed
Zoom speed of zoomer.
放大的速度。
Declaration
[Tooltip("Zoom speed of zoomer.\n放大的速度。")]
public float zoomSpeed
Field Value
Type | Description |
---|---|
System.Single |
Methods
Load()
Load data of media player and media. 讀取播放器及媒體資料。
Declaration
public void Load()
Mirror()
Change the mirror state of current medium.
更改目前媒體的鏡像狀態。
Declaration
public void Mirror()
Mirror(Boolean, Boolean, Boolean)
Set the mirror state of current medium.
設定目前媒體的鏡像狀態。
Declaration
public void Mirror(bool x, bool y, bool z)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | x | X axis |
System.Boolean | y | Y axis |
System.Boolean | z | Z axis |
Pitch(Single)
Calibrate the pitch angle of current medium.
校正目前媒體的俯仰角。
Pitch(5)
Declaration
public void Pitch(float angle)
Parameters
Type | Name | Description |
---|---|---|
System.Single | angle | Calibrate angle |
ResetAngles()
Reset the angles of calibrator.
重置校正角度。
Declaration
public void ResetAngles()
ResetZoom()
Reset zoom setting of current medium.
重置目標媒體放大設定。
Declaration
public void ResetZoom()
Roll(Single)
Calibrate the roll angle of current medium.
校正目前媒體的翻滾角。
Roll(5)
Declaration
public void Roll(float angle)
Parameters
Type | Name | Description |
---|---|---|
System.Single | angle | Calibrate angle |
Save()
Save data of media player and media. 儲存播放器及媒體資料。
Declaration
public void Save()
SetLayers(Int32, Int32)
Set left and right eye display layers.
設定左右眼顯示層級。
SetLayers(26, 27)
Declaration
public void SetLayers(int left, int right)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | left | Left layer |
System.Int32 | right | Right layer |
SetRotation(Boolean)
Set rotation of media player.
設定媒體播放器的旋轉功能。
SetRotation(true)
Declaration
public void SetRotation(bool rorate)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | rorate | Rotate if true |
SetStereoType()
Change the stereo type of current medium.
更改目前媒體的立體類型。
Declaration
public void SetStereoType()
SetStereoType(StereoType)
Set the stereo type of current medium.
設定目前媒體的立體類型。
SetStereoType(StereoType.UpDown)
Declaration
public void SetStereoType(StereoType stereoType)
Parameters
Type | Name | Description |
---|---|---|
StereoType | stereoType | Stereo Type |
ShowLogo(Boolean)
Show or Hide logo element.
顯示或隱藏 Logo 元素。
ShowLogo(true)
Declaration
public void ShowLogo(bool show = true)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | show | Show if true |
Yaw(Single)
Calibrate the yaw angle of current medium.
校正目前媒體的偏擺角。
Yaw(5)
Declaration
public void Yaw(float angle)
Parameters
Type | Name | Description |
---|---|---|
System.Single | angle | Calibrate angle |
Zoom(Int32, Vector3)
Change zoom setting of current medium.
放大或縮小目前媒體。
Zoom(3, new Vector3(0, 0, 1))
Declaration
public void Zoom(int level, Vector3 direction)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | level | Zoom level -10 ~ 10 |
UnityEngine.Vector3 | direction | Zoom direction |