DMVideoPlayer/DMPlayerController.cs
/// <summary>
/// Sends a command to the player, for example seek/pause/play
/// </summary>
/// <param name="method"></param>
/// <param name="argument"></param>
Sends a command to the player, for example seek/pause/play
Sends a command to the player for example seek / pause / play
private async void NotifyPlayerApi(string method, string argument = null)
        {
            string callingMethod = string.Format("player.api('{0}')", method);
            List<string> callingJsMethod = new List<string>();
            callingJsMethod.Add(callingMethod);
            try
            {
                await DmVideoPlayer?.InvokeScriptAsync("eval", callingJsMethod);
            }
            catch (Exception e)
            {
                HasPlayerError = true;
                throw new Exception("Error : " + callingMethod);
            }
        }
private async void NotifyPlayerApi ( string method , string argument = null ) { string callingMethod = string . Format ( " " , method ) ; List < string > callingJsMethod = new List < string > ( ) ; callingJsMethod . Add ( callingMethod ) ; try { await DmVideoPlayer ? . InvokeScriptAsync ( " " , callingJsMethod ) ; } catch ( Exception e ) { HasPlayerError = true ; throw new Exception ( " " + callingMethod ) ; } }
Sends a command to the player, for example seek/pause/play
Sends a command to the player for example seek / pause / play
method
string
None
argument
string
None