public override void OnMessage(IMessage message) { switch (message.Name) { case MessageDef.VideoPlay: //更新消息 MediaPlayerMgr.Rewind(false); MediaPlayerMgr.Play(); break; } }
public void VideoPlay(VideoNode data) { string message = data.name; string url = Util.VideoDicPath + data.name; if (!File.Exists(url)) { return; } PicturePlayer.enabled = false; MediaPlayerMgr.OpenVideoFromFile(MediaPlayer.FileLocation.AbsolutePathOrURL, url, true); MediaPlayerMgr.Play(); }