DMVideoPlayer/DMPlayerController.cs
/// <summary>
/// Handles the events fired from the Webview and passes the information on
/// </summary>
Handles the events fired from the Webview and passes the information on
Handles the events fired from the Webview and passes the information on
private void DmWebView_ScriptNotify(object sender, NotifyEventArgs e)
        {
            var eventNames = getEventNames(e?.Value);
            if (eventNames != null)
            {
                foreach (var name in eventNames)
                {
                    switch (name.Value)
                    {
                        case "apiready":
                            {
                                ApiReady = true;
                                if (PendingPlay)
                                {
                                    PendingPlay = false;
                                    Load();
                                }
                                break;
                            }
                        case "ad_start":
                            {
                                ShowingAd = true;
                                break;
                            }
                        case "ad_end":
                            {
                                ShowingAd = false;
                                break;
                            }
                    }
                    DmWebViewMessage = name;
                }
            }
        }
private void DmWebView_ScriptNotify ( object sender , NotifyEventArgs e ) { var eventNames = getEventNames ( e ? . Value ) ; if ( eventNames != null ) { foreach ( var name in eventNames ) { switch ( name . Value ) { case " " : { ApiReady = true ; if ( PendingPlay ) { PendingPlay = false ; Load ( ) ; } break ; } case " " : { ShowingAd = true ; break ; } case " " : { ShowingAd = false ; break ; } } DmWebViewMessage = name ; } } }
Handles the events fired from the Webview and passes the information on
Handles the events fired from the Webview and passes the information on
//Debug.WriteLine(name.ToString()); //Tracking.setPV5Info(map);
sender
object
e
NotifyEventArgs