unity使用AVProVideo插件播放暂停视频

前言:自己没事写来做储备用的,用的着的童鞋可以借鉴一下。

代码如下,挺简单的,就不做解释了:

using RenderHeads.Media.AVProVideo;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;

public class PlayVideoController : MonoBehaviour
{

    [SerializeField, Tooltip("播放视频的UI")]
    private DisplayUGUI displayUGUI = null;

    [SerializeField, Tooltip("视频进度条")]
    private Slider VideoProgress = null;

    private Button PauseVideoButton = null;

    /// 
    /// 是否显示真实的视频进度
    /// 
    private bool IsShowRealVideoPreogress = true;

    // Use this for initialization
    void Start()
    {

        PauseVideoButton = displayUGUI.GetComponent

你可能感兴趣的:(Unity开发)