移动IPTV机顶盒开机流程
2022-03-28 11:08:08 6 举报
EPG
作者其他创作
大纲/内容
访问
true
执行机顶盒软件版本【STBVersion:机顶盒软件版本,跟系统版本很像,写死在机顶盒里面的,可以直接拿】判断
请求失败
<form action=\"getchannellistHWCTC.jsp\" name=\"authform\" method=\"post\"><input type=\"hidden\" name=\"conntype\" value=\"lan\"><input type=\"hidden\" name=\"UserToken\" value=\"DIA0sDIA0s12Np1ninj2KOVzRP7tNlCg\"><input type=\"hidden\" name=\"tempKey\" value=\"\"><input type=\"hidden\" name=\"stbid\" value=\"000002\"><input type=\"hidden\" name=\"SupportHD\" value=\"1\"><input type=\"hidden\" name=\"UserID\" value=\"testxmt35\"><input type=\"hidden\" name=\"Lang\" value=\"1\"></form>
赋值关键代码
window.location.href = \"page/layout.html?R=\" + Math.random();
false
直接跳转到指定页面window.location.href = nexturl;如果yjList.indexOf(stbID)>-1为true: window.location.href = '../../../v6groupb/en/Category.jsp';
语音识别关键代码
执行请求from表单的关键代码
{\"adx_id\":\"1000001\
【200】text/htmll
执行setLoc(\"-1\")函数逻辑
true【初次登陆】
记事本:
发起请求
判断当前URL的地址是会否携带nexturl及time参数
判断是否有订购记录【需要判断指定机顶盒才有资格去订购记录】
播放结束关键判断
判断进入开机广告的关键逻辑代码
请求crm
判断机顶盒的用户ID【userID:配置写死在机顶盒里面的】是否在指定数组中
执行form表表单请求关键代码
【执行开机画面三】代码逻辑
对返回的广告数据类型进行判断
执行首页跳转逻辑初始化于语音识别
这认证地址跟认证的账号是在机顶盒里面写死的配置
执行重定关键代码
播放视屏playVod(codes0);播放结束,跳转指定地址
二次认证信息判断industryData.resultCode
展示图片 lookPic(codes0);展示倒计时结束,跳转指定地址 window.location.href = nexturl;
【200验证通过】text/html
返回数据判断:JSON.stringify(dataAll)!==\"{}\" && dataAll.vodDataList.length !== 0
请求杭研接口
频道列表本地初始化操作关键代码
直接跳转到指定页面window.location.href = nexturl;
false【没有】
/EPG/v6groupb/en/Category.jsp
method:GEThost: 117.187.176.79:33200api:/EPG/jsp/default/en/hwdatajsp/vodList.jsp参数:categoryCode=catauto11172
跳转的关键代码
拼接EPG服务目录请求验证关键代码
var V6Url = \"../../v6groupb/en/Category.jsp\";
图片广告
fasle
请求参数
判断当前机顶盒用户【userID】是否属于指定的数组中的一个
ndustryData == null || industryData == \"null\"【容错处理】
method:GEThost:117.187.176.79:33200 api:/EPG/jsp/default/en/page/adplay.html
跳转到对应首页
method:POSThost:117.187.176.79:33200 api:/EPG/jsp/ValidAuthenticationHWCTC.jsp
method:GEThost:117.187.220.2:8000 api:/behavior/crmUser/getGroupByAccount?account=testxmt35
if(lpList.indexOf(Authentication.CUGetConfig('UserID'))>-1){ return window.location.href = '../../../ydv6cs/en/Category.jsp'; }
industryData.resultCode==‘11111 或者所有判断都没有匹配到
跳转到指定URL地址window.location.href = V6Url;
【200】返回text/html
返回信息
method:POSThost:117.187.176.90:33200 api:/tvlsms/stb/queryContentInfo
请求
执行beginInit(group)函数逻辑
function doLogin(){ if (true) { Authentication.CTCSetConfig(\"ShowPic\
执行二次认证信息状态码判断industryData.useStatus
industryData.resultCode==‘000000’
返回值
var noadList = [ \"004603000002089018049C62AB3EA8FB\
function delayJump() { Authentication.CTCSetConfig(\"ShowPic\
返回值信息初始化
method:GEThost:117.187.176.79:33200 api:/EPG/jsp/PreDealHWCTC.jsp?directPlay=0&lastChannelNo=null&FIRSTPAGE=default/en/Category.jsp
method:POSThost:117.187.176.79:33200 api:/EPG/jsp/getchannellistHWCTC.jsp
执行登陆的关键代码
【执行开机画面二】代码逻辑
执行url跳转
执行页面初始化函数turnOnYuyin
执行URL跳转
重置登陆状态
判断当前机顶盒的stbID【STBID:机顶盒串号,写在机顶盒背面的】是否在当前指定数据中
判断当前机顶盒stbID【机顶盒串号,机顶盒出场就设置好的,在机顶盒背面】是否在免广告数组中
<form action=\"ServicesEntryHWCTC.jsp\" name=\"authform\" method=\"post\"> <input type=\"hidden\" name=\"lang\" value=\"1\"> <input type=\"hidden\" name=\"UserID\" value=\"testxmt35\"></form>document.authform.submit();
【执行开机画面一】代码逻辑
对返回的数据进行判断
机顶盒本地信息初始化关键代码
按首页键的流程从这里开始
getList.err_code !== 0 || getList.adx_res.length === 0
【200】text/html
执行setLoc((\"-3\"/\"-4\")函数逻辑
method:gethost:iptveds.gz.chinamobile.com:8082 api:/EDS/jsp/AuthenticationURL?UserID=testxmt35&Action=Login
false【不属于】
判断:dataAll.vodDataList[0].name.indexOf(\"yyyk\")>-1
发起二次认证请求
{\"code\
执行机顶盒信息本地初始化设置,并发起直播频道列表表单请求
getList.err_code === 0 && getList.adx_res.length 0
判断的关键代码
跳转到指定URL地址: window.location.href = 'page/channelplayer/channelPlayer.jsp?channelIndex=16&needMar=tr&returnUrl=' + escape('../../Category.jsp');
请求超时
判断是否有视频
/EPG/jsp/default/en/Category.jsp
加载首页,开机结束
发起两个探针上报请求
String tempDate = formatter.format(date);var curDate = \"<%=tempDate%>\";if (curDate == \"20200404\")
conntype=lan&UserToken=DIA0sDIA0s12Np1ninj2KOVzRP7tNlCg&tempKey=B159BB5357B64AFD1578E2E972D829C9&stbid=000002&SupportHD=1&UserID=testxmt35&Lang=1
判断关键代码
shList.indexOf(stbID)-1 || list.indexOf(stbID)-1 ||qdnList.indexOf(stbID)-1 ||xsList.indexOf(stbID)-1 ||yjList.indexOf(stbID)-1
关键判断代码
对返回的数据进行判断:crmData && crmData.result && crmData.result.groupMap && crmData.result.groupMap.epgBootDiversion && crmData.result.groupMap.epgBootDiversion[0]
Authentication.CTCSetConfig(\"ShowPic\
{\"msg\":\"······\
method:GEThost:172.17.102.200:8082 api:/jyBizAuth2/bizServer/getAccountStartAndEpg?account=\" + userId + \"&boxId=\" + stbId + \"&ip=\
执行crmInfo函数
industryData.resultCode!=‘000000“或者所有判断都没有匹配到
执行判断:curDate == \"20200404\"
视频广告
看图说明:红线:代表这处的判断实际上没有执行的曲形虚线:主要是代码逻辑注释机顶盒:M301H
执行setLoc((res.ids[0])函数逻辑
true【属于】
true【有】
判断广告类型:des.indexOf(\"@pic\")>-1
{\"resultCode\":\"000000\
发起登陆请求
method:POSThost:117.187.176.79:33200 api:/EPG/jsp/ServicesEntryHWCTC.jsp入参:lang=1&UserID=testxmt35
window.location.href = \"page/error.html?error=6\";跳转到指定错误页面
对nexturl,time赋值
V6Url = \"../../ydv6cs/en/Category.jsp\";
关键代码
method:GEThost:117.187.176.79:33200 api:/EPG/jsp/indexHWCTC.jsp?lang=1&UserID=testxmt35
industryData.useStatus ==1
!!data.show_type
if(lpList.indexOf(Authentication.CUGetConfig('UserID'))>-1){ goIndex(); }
true【有开机广告】
发起认证请求
执行机顶是否是开机初次登陆判断
var list = [ \"005504FF0004201017055CCBCA679370\"....]var shList = [ \"004603000002089018049C62AB3EA8FB\"....]var qdnList = [ \"005504FF00042010110354F6C59B0DB8\"....]var yjList = [ \"005504FF00042010250E5CCBCAB065B8\"....]var xsList = [ \"005504FF00042010070D54F6C58934C0\"....]if(list.indexOf(stbID)>-1)else if(shList.indexOf(stbID)>-1)else if(qdnList.indexOf(stbID)>-1)else if(yjList.indexOf(stbID)>-1)else if(xsList.indexOf(stbID)>-1)
分组信息判断【分组ID=-1】
频道列表请求参数
执行机顶盒频道列表本地初始化操作,发起表单提交请求
返回数据类型
industryData.useStatus != 1
执行beginInit(-1)函数逻辑
xhr.readyState == 4 && xhr.status == 200
判断是否有图片:pic!=\"\"&&pic!=null&&pic!=\"undefined\"
groupID=-1
nexturl=adplayTwo.html【开机一】time=6【开机一】nexturl=adplayOld.html【开机二】time=11【开机二】nexturl=adplayTwo.html【开机一】time=6【开机一】nexturl=v6groupb/en/Category.jsp【开机三】time=6【开机三】
method:GEThost:117.187.176.79:33200 api:/EPG/jsp/default/en/page/adplayTwo.html
industryData.useStatus == 1
UserID=testxmt35&Lang=1&SupportHD=1&NetUserID=&Authenticator=80D6F4C7A43C89153329E43A693FCA973557FB91DEA8175852E243E22E5CA7E6FC584C3694D0B45D648AFCF3FD708ED39A3B4A9D4484AA4CC01CA09354780B543272DB13AC582D6AFF700372B318AD1183BA0F1825935C6D739292C97349F6C6158501C65ABDECC8BC3AA5B158380D953D8EBABB679C467569DC3AE91B621EFE&STBType=M301H_ZN9_GZ55&STBVersion=M301H-ZN-1.0.5-GZYDV6&conntype=lan&STBID=00550300000299104102086BD1AE5048&templateName=&areaId=&userToken=80920FE3CC6905ED1DFD82E99EEDA119&userGroupId=&productPackageId=&mac=08%3A6B%3AD1%3AAE%3A50%3A48&UserField=2&SoftwareVersion=M301H-ZN-1.0.5-GZYDV6&IsSmartStb=0&desktopId=&stbmaker=&XMPPCapability=1&ChipID=&VIP=
开机
// 语音遥控判断var aShowYyykStb = [ \"CM201-2\
var stbType = Authentication.CTCGetConfig(\"STBVersion\");if (typeof stbType != \"undefined\" && stbType != null && stbType != \"\" && (stbType.indexOf(\"GZYDV6\") > -1 || stbType.indexOf(\"19.2.0-LGZY\") > -1))
对返回的数据进行判断:typeof(res.ids) != \"undefined\" && res.ids.length>0
method:GEThost:117.187.176.79:33200 api:/jyDataCollect/dataCollect/b.gif
method:POSThost:117.187.176.79:33200 api:/EPG/jsp/authLoginHWCTC.jsp入参:UserID=testxmt35&VIP=‘’
xhr.readyState != 4 || xhr.status != 200
0
URL跳转关键代码
var frontPage = 'default/en/Category.jsp';var directPlaytemp = \"DirectPlay\";var lastChannelNotemp = \"LastChannelNo\";var targetUrl = '';var predealUrl = 'PreDealHWCTC.jsp';var directPlay = Authentication.CTCGetConfig(directPlaytemp); var isGoChannel = false; if (isGoChannel) { directPlay = 1; } var lastChannelNo = Authentication.CTCGetConfig(lastChannelNotemp); if (directPlay != 1) { directPlay = 0; lastChannelNo = null; } targetUrl = predealUrl + '?directPlay=' + directPlay + '&lastChannelNo=' + lastChannelNo + '&FIRSTPAGE=' + frontPage;window.location.href = targetUrl;
function onloadxiri() { var sence = getScence(); //此处是回调函数 1command对应sence中的command的key,例如command['_PLAY'] = [\"$P(_PLAY)\"];,那么回调中intent.._command的值就为_PLAY var callback = function(intent) { }; //同步客户端信息 var clientInfo = {}; clientInfo['basePath'] = \"<%=basePath%>\"; var channelInfo = {} //同步客户端信息 var listener = new Xiri.Listener(callback); listener.regist(sence); listener.syncChannelInfo(channelInfo); listener.syncClientInfo(clientInfo); }
执行机顶盒登陆操作
启动webview
method:get117.187.176.79:33200 api:/EPG/jsp/AuthenticationURL?UserID=testxmt35&Action=Login
{\"totalSize\
V6Url = \"page/adplay.html\";
到这里,服务端返回set-cookie【302】重定向
请求出错
var V6Url = \"../../v6groupb/en/Category.jsp\"; if(typeof lpList != \"undefined\" && lpList.indexOf(Authentication.CUGetConfig('UserID'))>-1){ V6Url = \"../../ydv6cs/en/Category.jsp\"; }
语音识别插件初始化,跳转到移动v1首页:window.location.href = \"page/index.html?stbType=\" + stbType;
请求成功
其他id值
method:GEThost: 117.187.220.2:801 api:/pz/r
data.show_type==0
都不属于
都没有
返回数据判断:JSON.stringify(dataAll)===\"{}\"||dataAll.vodDataList.length == 0
收藏
收藏
0 条评论
下一页