@@ -104,34 +104,6 @@ local function closeAdView(adId, data)
104104 end
105105end
106106
107- local function trackNotice (data , requestType , status , isShow )
108- if (data == nil or requestType == nil or status == nil or isShow == nil ) then
109- return nil
110- end
111-
112- -- local OS_HTTP_POST_CHECK_HOTSPOT_TRACK = OS_HTTP_HOST .. "/statisticConfirmLaunch"
113-
114- -- print("[LuaView] "..paramDataString)
115- -- print("[LuaView] "..OS_HTTP_POST_CHECK_HOTSPOT_TRACK)
116-
117- mainNode .request :post (OS_HTTP_POST_CHECK_HOTSPOT_TRACK , {
118- bu_id = buId ,
119- device_type = deviceType ,
120- videoId = Native :nativeVideoID (),
121- id = data .id ,
122- launchPlanId = data .launchPlanId ,
123- createId = data .createId ,
124- timestamp = data .videoStartTime ,
125- type = requestType ,
126- status = status ,
127- isShow = isShow ,
128- commonParam = Native :commonParam ()
129- }, function (response , errorInfo )
130- -- print("luaview getVoteCountInfo")
131-
132- end )
133- end
134-
135107local function checkHotspotShow (data )
136108
137109 if (data == nil ) then
@@ -160,30 +132,24 @@ local function checkHotspotShow(data)
160132 data = Native :aesEncrypt (paramDataString , OS_HTTP_PUBLIC_KEY , OS_HTTP_PUBLIC_KEY )
161133 }, function (response , errorInfo )
162134 -- print("luaview getVoteCountInfo")
135+ if (response == nil ) then
136+ return
137+ end
138+ -- print("luaview getVoteCountInfo 11"..Native:tableToJson(response))
139+ responseData = Native :aesDecrypt (response .encryptData , OS_HTTP_PUBLIC_KEY , OS_HTTP_PUBLIC_KEY )
140+ -- print("luaview " .. Native:tableToJson(data))
141+ -- print("luaview " .. responseData)
142+ response = toTable (responseData )
143+ if (response .resCode ~= " 00" ) then
144+ return
145+ end
163146
164- local requestType = 0
165- local playStatus = 0
166- local isShow = 0
167- if (response ~= nil ) then
168- requestType = 1
169- -- print("luaview getVoteCountInfo 11"..Native:tableToJson(response))
170- responseData = Native :aesDecrypt (response .encryptData , OS_HTTP_PUBLIC_KEY , OS_HTTP_PUBLIC_KEY )
171- -- print("luaview " .. Native:tableToJson(data))
172- -- print("luaview " .. responseData)
173- response = toTable (responseData )
174- if (response .resCode == " 00" ) then
175- if (response .status == " 00" ) then
176- playStatus = 1
177- if checkAdTable [data .id ] ~= nil then
178- checkAdTable [data .id ] = true
179- end
180- if data .videoStartTime + adShowInterval > lastProgress then
181- isShow = 1
182- end
183- end
147+ if (response .status == " 00" ) then
148+ if checkAdTable [data .id ] ~= nil then
149+ checkAdTable [data .id ] = true
184150 end
185151 end
186- trackNotice ( data , requestType , playStatus , isShow )
152+
187153 end )
188154end
189155
@@ -356,17 +322,7 @@ local function getTaglist()
356322 if (dataTable == nil ) then
357323 return
358324 end
359-
360- -- 下载投放的lua文件
361- local luaList = {}
362- for i ,v in ipairs (dataTable ) do
363- if (v .luaList ~= nil ) then
364- table.insert (luaList , v .luaList )
365- end
366- end
367- Native :preloadLuaList (luaList )
368-
369- -- osTypeVideoOS = 1, osTypeLiveOS = 2, 点播按时间点加载,直播直接加载
325+ -- osTypeVideoOS = 1, osTypeLiveOS = 2, 直播开启Mqtt,点播不开启
370326 if Native :osType () < osTypeLiveOS then
371327 print (" osTypeVideoOS" )
372328 for key , value in pairs (dataTable ) do
@@ -484,8 +440,7 @@ local function getResourcelist()
484440 local videoList = {}
485441 local imageList = {}
486442 for i , v in ipairs (dataTable ) do
487- local lowerUrl = string.lower (v )
488- local position = string.find (lowerUrl , " .mp4" , 1 )
443+ local position = string.find (v , " .mp4" , 1 )
489444 if position ~= nil and position > 0 then
490445 table.insert (videoList , v )
491446 else
@@ -543,11 +498,6 @@ function show(args)
543498 if (response .resCode ~= " 00" ) then
544499 return
545500 end
546-
547- if (response .confirmTime ~= nil ) then
548- adCheckInterval = response .confirmTime * 1000.0
549- end
550-
551501 mainNode .mqtt = registerMqtt (response )
552502 getTag ()
553503 getResourcelist ()
0 commit comments