Ejemplo n.º 1
0
 void VlcMediaPlayer_MediaChanged(object sender, Meta.Vlc.MediaPlayerMediaChangedEventArgs e)
 {
     if (OnMediaChanged != null)
     {
         OnMediaChanged.Invoke(this, EventArgs.Empty);
     }
 }
Ejemplo n.º 2
0
 internal void TrigerOnMediaChanged(MediaChangedEvent mediaChangedEvent)
 {
     SDKLogger.Instance.Debug($"trigerOnMediaChanged: {mediaChangedEvent.GetType().Name}");
     if (mediaChangedEvent is LocalVideoReadyEvent)
     {
         isSendingVideo = true;
         isSendingAudio = true;
     }
     else if (mediaChangedEvent is RemoteVideoReadyEvent)
     {
         IsRemoteSendingVideo = true;
         IsRemoteSendingAudio = true;
         isReceivingVideo     = true;
         isReceivingAudio     = true;
     }
     else if (mediaChangedEvent is ReceivingVideoEvent)
     {
         isReceivingVideo = ((ReceivingVideoEvent)mediaChangedEvent).IsReceiving;
     }
     else if (mediaChangedEvent is ReceivingAudioEvent)
     {
         isReceivingAudio = ((ReceivingAudioEvent)mediaChangedEvent).IsReceiving;
     }
     else if (mediaChangedEvent is SendingVideoEvent)
     {
         isSendingVideo = ((SendingVideoEvent)mediaChangedEvent).IsSending;
     }
     else if (mediaChangedEvent is SendingAudioEvent)
     {
         isSendingAudio = ((SendingAudioEvent)mediaChangedEvent).IsSending;
     }
     else if (mediaChangedEvent is RemoteSendingAudioEvent)
     {
         IsRemoteSendingAudio = ((RemoteSendingAudioEvent)mediaChangedEvent).IsSending;
     }
     else if (mediaChangedEvent is RemoteSendingVideoEvent)
     {
         IsRemoteSendingVideo = ((RemoteSendingVideoEvent)mediaChangedEvent).IsSending;
     }
     else if (mediaChangedEvent is RemoteSendingShareEvent)
     {
         IsRemoteSendingShare = ((RemoteSendingShareEvent)mediaChangedEvent).IsSending;
         isReceivingShare     = IsRemoteSendingShare;
     }
     else if (mediaChangedEvent is ReceivingShareEvent)
     {
         isReceivingShare = ((ReceivingShareEvent)mediaChangedEvent).IsReceiving;
     }
     else if (mediaChangedEvent is SendingShareEvent)
     {
         IsSendingShare = ((SendingShareEvent)mediaChangedEvent).IsSending;
     }
     else
     {
     }
     OnMediaChanged?.Invoke(mediaChangedEvent);
 }
Ejemplo n.º 3
0
        private async void Wv_ContentLoading(WebView sender, WebViewContentLoadingEventArgs args)
        {
            var url = await wvMain.InvokeScriptAsync("eval", new string[] { "document.location.href;" });

            if (HasUrlBeenProcessed(url))
            {
                return;
            }

            lastProcessedUrl = url;

            OnMediaChanged?.Invoke(null, new MediaChangedEventArgs()
            {
                MediaUri = new Uri(url)
            });
        }
Ejemplo n.º 4
0
        internal void TrigerOnMediaChanged(MediaChangedEvent mediaChangedEvent)
        {
            SdkLogger.Instance.Debug($"trigerOnMediaChanged: {mediaChangedEvent.GetType().Name}");

            if (mediaChangedEvent is ReceivingVideoEvent receivingVideoEvent)
            {
                isReceivingVideo = receivingVideoEvent.IsReceiving;
            }
            else if (mediaChangedEvent is ReceivingAudioEvent receivingAudioEvent)
            {
                isReceivingAudio = receivingAudioEvent.IsReceiving;
            }
            else if (mediaChangedEvent is SendingVideoEvent sendingVideoEvent)
            {
                isSendingVideo = sendingVideoEvent.IsSending;
            }
            else if (mediaChangedEvent is SendingAudioEvent sendingAudioEvent)
            {
                isSendingAudio = sendingAudioEvent.IsSending;
            }
            else if (mediaChangedEvent is RemoteSendingAudioEvent remoteSendingAudioEvent)
            {
                IsRemoteSendingAudio = remoteSendingAudioEvent.IsSending;
            }
            else if (mediaChangedEvent is RemoteSendingVideoEvent remoteSendingVideoEvent)
            {
                IsRemoteSendingVideo = remoteSendingVideoEvent.IsSending;
            }
            else if (mediaChangedEvent is RemoteSendingShareEvent remoteSendingShareEvent)
            {
                IsRemoteSendingShare = remoteSendingShareEvent.IsSending;
                isReceivingShare     = IsRemoteSendingShare;
            }
            else if (mediaChangedEvent is ReceivingShareEvent receivingShareEvent)
            {
                isReceivingShare = receivingShareEvent.IsReceiving;
            }
            else if (mediaChangedEvent is SendingShareEvent sendingShareEvent)
            {
                IsSendingShare = sendingShareEvent.IsSending;
            }

            OnMediaChanged?.Invoke(mediaChangedEvent);
        }
Ejemplo n.º 5
0
 private static void mk_media_changed(int regist, IntPtr mk_media_source)
 {
     OnMediaChanged?.Invoke(regist, new MediaSource(mk_media_source));
 }