result
code
<iframesrc=""width="600"height="400"id="ysOpenDevice"allowfullscreen></iframe>
mdoel为后台返回的实体对象
var appKey = '${model.appKey}';var appSecret = '${model.appSecret}';var deviceSerial = '${model.deviceSerial}';var channelNo = '${model.channelNo}';var accessToken = '';$.ajax({type: 'POST',contentType: 'application/json;charset=UTF-8',dataType: "json",url: "https://open.ys7.com/api/lapp/token/get?appKey=" + appKey + "&appSecret=" + appSecret,success: function (res) {accessToken = res.data.accessToken;document.getElementById("ysOpenDevice").src = "https://open.ys7.com/ezopen/h5/iframe_se?url=ezopen://open.ys7.com/" + deviceSerial + "/" + channelNo + ".live&autoplay=1&audio=1&accessToken=" + accessToken + "&templete=2";}});