コード例 #1
0
        public static PlayInfoResponse Unmarshall(UnmarshallerContext context)
        {
            PlayInfoResponse playInfoResponse = new PlayInfoResponse();

            playInfoResponse.HttpResponse = context.HttpResponse;
            playInfoResponse.RequestId    = context.StringValue("PlayInfo.RequestId");

            List <string> playInfoResponse_notFoundCDNDomain = new List <string>();

            for (int i = 0; i < context.Length("PlayInfo.NotFoundCDNDomain.Length"); i++)
            {
                playInfoResponse_notFoundCDNDomain.Add(context.StringValue("PlayInfo.NotFoundCDNDomain[" + i + "]"));
            }
            playInfoResponse.NotFoundCDNDomain = playInfoResponse_notFoundCDNDomain;

            List <PlayInfoResponse.PlayInfo_PlayInfo> playInfoResponse_playInfoList = new List <PlayInfoResponse.PlayInfo_PlayInfo>();

            for (int i = 0; i < context.Length("PlayInfo.PlayInfoList.Length"); i++)
            {
                PlayInfoResponse.PlayInfo_PlayInfo playInfo = new PlayInfoResponse.PlayInfo_PlayInfo();
                playInfo.Url            = context.StringValue("PlayInfo.PlayInfoList[" + i + "].Url");
                playInfo.Duration       = context.StringValue("PlayInfo.PlayInfoList[" + i + "].Duration");
                playInfo.Size           = context.StringValue("PlayInfo.PlayInfoList[" + i + "].Size");
                playInfo.Width          = context.StringValue("PlayInfo.PlayInfoList[" + i + "].Width");
                playInfo.Height         = context.StringValue("PlayInfo.PlayInfoList[" + i + "].Height");
                playInfo.Bitrate        = context.StringValue("PlayInfo.PlayInfoList[" + i + "].Bitrate");
                playInfo.Fps            = context.StringValue("PlayInfo.PlayInfoList[" + i + "].Fps");
                playInfo.Format         = context.StringValue("PlayInfo.PlayInfoList[" + i + "].Format");
                playInfo.Definition     = context.StringValue("PlayInfo.PlayInfoList[" + i + "].Definition");
                playInfo.Encryption     = context.StringValue("PlayInfo.PlayInfoList[" + i + "].Encryption");
                playInfo.Rand           = context.StringValue("PlayInfo.PlayInfoList[" + i + "].Rand");
                playInfo.Plaintext      = context.StringValue("PlayInfo.PlayInfoList[" + i + "].Plaintext");
                playInfo.Complexity     = context.StringValue("PlayInfo.PlayInfoList[" + i + "].Complexity");
                playInfo.ActivityName   = context.StringValue("PlayInfo.PlayInfoList[" + i + "].ActivityName");
                playInfo.EncryptionType = context.StringValue("PlayInfo.PlayInfoList[" + i + "].EncryptionType");
                playInfo.DownloadType   = context.StringValue("PlayInfo.PlayInfoList[" + i + "].DownloadType");

                playInfoResponse_playInfoList.Add(playInfo);
            }
            playInfoResponse.PlayInfoList = playInfoResponse_playInfoList;

            return(playInfoResponse);
        }
コード例 #2
0
        public IActionResult GetPlayInfo()
        {
            var response = new PlayInfoResponse();

            response.response_code  = 0;
            response.input          = "mc_link";
            response.playback       = "stop"; // play,stop
            response.repeat         = "off";
            response.shuffle        = "off";
            response.artist         = "";
            response.album          = "";
            response.track          = "";
            response.albumart_url   = "";
            response.albumart_id    = 16;
            response.play_time      = 0;
            response.usb_devicetype = "unknown";
            response.auto_stopped   = false;
            response.attribute      = 0;

            return(new ObjectResult(response));
        }