public MediaPlayerAPI(YouTubeMediaElement element, int elementId)
 {
     element.ThrowIfArgumentNull("Failed to create MediaPlayer API JsonRpc service object because media element was null");
     LogTo.Debug($"Loading MediaPlayer API JsonRpc service for YouTube id {element.Id} element id {elementId}");
     this.ExpectedElementId   = elementId;
     this.CurrentMediaElement = element;
 }
コード例 #2
0
 public MpvPlayerWindow(YouTubeMediaElement element, int elementId)
 {
     element.ThrowIfArgumentNull("Failed to open Mpv Player Window because media element is null");
     Element = element;
     API     = new MediaPlayerAPI(element, elementId);
     Server.RegisterService(API);
     BeginMpvProcess();
 }