Show / Hide Table of Contents

Class MediaPlayer360

Media player class for playing Audio, Image and Video with 360 degree.
媒體播放器類別,用於 360 角度播放音訊、影像及視訊。

Inheritance
System.Object
UnityEngine.Object
UnityEngine.Component
UnityEngine.Behaviour
UnityEngine.MonoBehaviour
MediaPlayer
MediaPlayer360
Inherited Members
MediaPlayer.fileLocation
MediaPlayer.media
MediaPlayer.ignoreList
MediaPlayer.autoPlay
MediaPlayer.autoNext
MediaPlayer.random
MediaPlayer.loop
MediaPlayer.volume
MediaPlayer.mute
MediaPlayer.defaultTexture
MediaPlayer.renderers
MediaPlayer.uiElements
MediaPlayer.volumeControl
MediaPlayer.timeControl
MediaPlayer.timeText
MediaPlayer.timeBar
MediaPlayer.volumeText
MediaPlayer.volumeBar
MediaPlayer.playPauseButton
MediaPlayer.loopButton
MediaPlayer.randomButton
MediaPlayer.muteButton
MediaPlayer.autoPlayButton
MediaPlayer.autoNextButton
MediaPlayer.playPauseTexture
MediaPlayer.loopTexture
MediaPlayer.randomTexture
MediaPlayer.muteTexture
MediaPlayer.autoPlayTexture
MediaPlayer.autoNextTexture
MediaPlayer.initialized
MediaPlayer.current
MediaPlayer.time
MediaPlayer.duration
MediaPlayer.timeDuration
MediaPlayer.isPlaying
MediaPlayer.isPaused
MediaPlayer.isFinished
MediaPlayer.currentMedia
MediaPlayer.audios
MediaPlayer.images
MediaPlayer.videos
MediaPlayer.Open(String)
MediaPlayer.Play()
MediaPlayer.Play(Single, Single)
MediaPlayer.Play(Int32, Single, Single)
MediaPlayer.Play(String, Single, Single)
MediaPlayer.Play(Int32, Int32, Int32, Single, Single)
MediaPlayer.Play(String, Int32, Int32, Single, Single)
MediaPlayer.Play(Int32, Int32, String, Single, Single)
MediaPlayer.Play(String, Int32, String, Single, Single)
MediaPlayer.Seek()
MediaPlayer.Seek(Boolean)
MediaPlayer.Stop()
MediaPlayer.StopAll()
MediaPlayer.Pause()
MediaPlayer.UnPause()
MediaPlayer.PlayPause()
MediaPlayer.Next()
MediaPlayer.Next(Int32, Single, Single, Boolean)
MediaPlayer.Last()
MediaPlayer.Last(Single, Single, Boolean)
MediaPlayer.Previous()
MediaPlayer.Previous(Int32, Single, Single, Boolean)
MediaPlayer.First()
MediaPlayer.First(Single, Single, Boolean)
MediaPlayer.SetLoop()
MediaPlayer.SetLoop(Loop)
MediaPlayer.SetRandom()
MediaPlayer.SetRandom(Boolean)
MediaPlayer.SetVolume()
MediaPlayer.SetVolume(Parameter)
MediaPlayer.SetVolume(Single)
MediaPlayer.SetMute()
MediaPlayer.SetMute(Boolean)
MediaPlayer.SetAutoPlay()
MediaPlayer.SetAutoPlay(Boolean)
MediaPlayer.SetAutoNext()
MediaPlayer.SetAutoNext(Boolean)
MediaPlayer.LoadAudio(String, Int32, AudioSource, ExternalAudio)
MediaPlayer.LoadImage(String, Single, ExternalAudio)
MediaPlayer.LoadVideo(String, Boolean, ExternalAudio)
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
X 軸

System.Boolean y

Y axis
Y 軸

System.Boolean z

Z axis
Z 軸

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
當 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
當 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
放大方向

In This Article
Back to top Generated by DocFX