123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- 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(SyncVideoData 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)
- {
- }
- }
|