12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class SynchronizationVideo : MonoBehaviour
- {
- private AVProVideoPlayer AvideoPlayer;
- private void Start()
- {
- AvideoPlayer = GetComponent<AVProVideoPlayer>();
- MultiPlayerManager.Instance.OnSynVideo += OnSyncVideo;
- }
- private void OnSyncVideo(SyncVideo syncVideo)
- {
- if (syncVideo.isPlay)
- AvideoPlayer.Play();
- else
- AvideoPlayer.Pause();
- if (syncVideo.times != -1)
- AvideoPlayer.SetSeek(syncVideo.times);
- }
- public void SendSyncVideo()
- {
- }
- public void IsPlay()
- {
- }
- public void isPause()
- {
- }
- public void SetSeek( float times)
- {
- }
- }
|