// [SerializeField, HideInInspector] /// <summary> /// The path to the movie for MPMP to play </summary> // protected string _moviePath; public override bool SetValues(ClipPlayer.PlayerValues values) { _mediaPlayer = gameObject.GetComponent <monoflow.MPMP>(); if (_mediaPlayer == null) { // no media component already added to this component, try adding a MediaPlayer component try { _mediaPlayer = gameObject.AddComponent <monoflow.MPMP>(); } catch (Exception e) { Debug.LogError("MPMP not found in project: " + e.ToString()); return(false); } } if (values.moviePath != "") { //set the path of the movie based on passed in params _mediaPlayer.videoPath = values.moviePath; return(true); } return(false); }
/// <summary> /// Called when player vars are changed but player itself isn't changed </summary> public void RefreshPlayerValues() { ClipPlayer.PlayerValues values = new ClipPlayer.PlayerValues(); values.moviePath = _moviePath; values.location = _fileLocation; values.videoClip = _videoClip; _playerSetup = Player.SetValues(values); }
public bool Setup(ClipPlayer.PlayerValues values, AvailablePlayerType playerType, RenderType renderType, string metadataPath) { Setup(values, playerType, renderType); _dynamicMetadataFile = true; _metaDataFilePath = metadataPath; RefreshMetaData(); return(IsSetup); }
/// <summary> /// Configures the player with a TextAsset resource /// </summary> public bool Setup(ClipPlayer.PlayerValues values, AvailablePlayerType playerType, RenderType renderType, TextAsset metadata) { Setup(values, playerType, renderType); _dynamicMetadataFile = false; _metaDataFile = metadata; RefreshMetaData(); return(IsSetup); }
protected void Setup(ClipPlayer.PlayerValues values, AvailablePlayerType playerType, RenderType renderType) { //configure the clip with all the inputs _moviePath = values.moviePath; _fileLocation = values.location; _videoClip = values.videoClip; _playerType = playerType; _renderType = renderType; //build the components ResetPlayer(); ResetRenderer(); }
/// <summary> /// Sets up the player values with the given configuration. </summary> public abstract bool SetValues(ClipPlayer.PlayerValues values);