|
@@ -35,7 +35,9 @@
|
|
<link rel="stylesheet" href="https://cdn.bootcss.com/weui/1.1.3/style/weui.min.css" />
|
|
<link rel="stylesheet" href="https://cdn.bootcss.com/weui/1.1.3/style/weui.min.css" />
|
|
<link rel="stylesheet" href="https://cdn.bootcss.com/jquery-weui/1.2.1/css/jquery-weui.min.css" />
|
|
<link rel="stylesheet" href="https://cdn.bootcss.com/jquery-weui/1.2.1/css/jquery-weui.min.css" />
|
|
<style>
|
|
<style>
|
|
- .try-use-wrap, .buy-phone-wrap, .look-wrap {
|
|
|
|
|
|
+ .try-use-wrap,
|
|
|
|
+ .buy-phone-wrap,
|
|
|
|
+ .look-wrap {
|
|
width: 100%;
|
|
width: 100%;
|
|
height: 100%;
|
|
height: 100%;
|
|
position: fixed;
|
|
position: fixed;
|
|
@@ -299,7 +301,6 @@
|
|
var isVisuable = true;
|
|
var isVisuable = true;
|
|
var isFeed = true;
|
|
var isFeed = true;
|
|
var isFinish = false;
|
|
var isFinish = false;
|
|
- var isWaitSps = false;
|
|
|
|
var myVideo = document.getElementById("playerVideo");
|
|
var myVideo = document.getElementById("playerVideo");
|
|
Module = {};
|
|
Module = {};
|
|
Module.onRuntimeInitialized = function () {
|
|
Module.onRuntimeInitialized = function () {
|
|
@@ -354,7 +355,21 @@
|
|
} else {
|
|
} else {
|
|
clearInterval(intervaler);
|
|
clearInterval(intervaler);
|
|
$.toast("画面异常,请重新进入", "text");
|
|
$.toast("画面异常,请重新进入", "text");
|
|
- quit();
|
|
|
|
|
|
+ if (navigator.userAgent.toLowerCase().includes('toutiaomicroapp')) {
|
|
|
|
+ tt.miniProgram.switchTab({
|
|
|
|
+ url: '/pages/home/home'
|
|
|
|
+ })
|
|
|
|
+ } else if (window.__wxjs_environment === 'miniprogram') {
|
|
|
|
+ wx.miniProgram.switchTab({
|
|
|
|
+ url: '/pages/home/home'
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ document.addEventListener('UniAppJSBridgeReady', function () {
|
|
|
|
+ uni.webView.navigateTo({
|
|
|
|
+ url: '/pages/index/index'
|
|
|
|
+ });
|
|
|
|
+ })
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}, 3000);
|
|
}, 3000);
|
|
|
|
|
|
@@ -372,7 +387,21 @@
|
|
if (errorTime > 1000) {
|
|
if (errorTime > 1000) {
|
|
$.toast("画面异常,请重新进入", "text");
|
|
$.toast("画面异常,请重新进入", "text");
|
|
wsss.close();
|
|
wsss.close();
|
|
- quit();
|
|
|
|
|
|
+ if (navigator.userAgent.toLowerCase().includes('toutiaomicroapp')) {
|
|
|
|
+ tt.miniProgram.switchTab({
|
|
|
|
+ url: '/pages/home/home'
|
|
|
|
+ })
|
|
|
|
+ } else if (window.__wxjs_environment === 'miniprogram') {
|
|
|
|
+ wx.miniProgram.switchTab({
|
|
|
|
+ url: '/pages/home/home'
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ document.addEventListener('UniAppJSBridgeReady', function () {
|
|
|
|
+ uni.webView.navigateTo({
|
|
|
|
+ url: '/pages/index/index'
|
|
|
|
+ });
|
|
|
|
+ })
|
|
|
|
+ }
|
|
}
|
|
}
|
|
});
|
|
});
|
|
ws.addEventListener('message', function (event) {
|
|
ws.addEventListener('message', function (event) {
|
|
@@ -411,13 +440,10 @@
|
|
if (data.frameType == 7 || data.frameType == 8) {
|
|
if (data.frameType == 7 || data.frameType == 8) {
|
|
isFeed = true;
|
|
isFeed = true;
|
|
isAudioPlay = true;
|
|
isAudioPlay = true;
|
|
- isWaitSps = false;
|
|
|
|
}
|
|
}
|
|
|
|
|
|
if (isFeed) {
|
|
if (isFeed) {
|
|
- if (!isWaitSps) {
|
|
|
|
- jmuxer.feed(data);
|
|
|
|
- }
|
|
|
|
|
|
+ jmuxer.feed(data);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -439,7 +465,21 @@
|
|
document.addEventListener("visibilitychange", function () {
|
|
document.addEventListener("visibilitychange", function () {
|
|
console.log(document[hidden]);
|
|
console.log(document[hidden]);
|
|
if (document[hidden]) {
|
|
if (document[hidden]) {
|
|
- quit();
|
|
|
|
|
|
+ if (navigator.userAgent.toLowerCase().includes('toutiaomicroapp')) {
|
|
|
|
+ tt.miniProgram.switchTab({
|
|
|
|
+ url: '/pages/home/home'
|
|
|
|
+ })
|
|
|
|
+ } else if (window.__wxjs_environment === 'miniprogram') {
|
|
|
|
+ wx.miniProgram.switchTab({
|
|
|
|
+ url: '/pages/home/home'
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ document.addEventListener('UniAppJSBridgeReady', function () {
|
|
|
|
+ uni.webView.navigateTo({
|
|
|
|
+ url: '/pages/index/index'
|
|
|
|
+ });
|
|
|
|
+ })
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}, false);
|
|
}, false);
|
|
|
|
|
|
@@ -460,24 +500,6 @@
|
|
$('.mask').hide();
|
|
$('.mask').hide();
|
|
}
|
|
}
|
|
|
|
|
|
- function quit() {
|
|
|
|
- if (navigator.userAgent.toLowerCase().includes('toutiaomicroapp')) {
|
|
|
|
- tt.miniProgram.switchTab({
|
|
|
|
- url: '/pages/home/home'
|
|
|
|
- })
|
|
|
|
- } else if (window.__wxjs_environment === 'miniprogram') {
|
|
|
|
- wx.miniProgram.switchTab({
|
|
|
|
- url: '/pages/home/home'
|
|
|
|
- })
|
|
|
|
- } else {
|
|
|
|
- document.addEventListener('UniAppJSBridgeReady', function () {
|
|
|
|
- uni.webView.navigateTo({
|
|
|
|
- url: '/pages/index/index'
|
|
|
|
- });
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
function decodeAAC(data) {
|
|
function decodeAAC(data) {
|
|
var retPtr = Module._malloc(4 * 5 * 1024); // 接收的数据
|
|
var retPtr = Module._malloc(4 * 5 * 1024); // 接收的数据
|
|
var inputPtr = Module._malloc(4 * data.length); // 输入数据
|
|
var inputPtr = Module._malloc(4 * data.length); // 输入数据
|
|
@@ -537,7 +559,21 @@
|
|
clearInterval(intervaler);
|
|
clearInterval(intervaler);
|
|
ws.close();
|
|
ws.close();
|
|
wsss.close();
|
|
wsss.close();
|
|
- quit();
|
|
|
|
|
|
+ if (navigator.userAgent.toLowerCase().includes('toutiaomicroapp')) {
|
|
|
|
+ tt.miniProgram.switchTab({
|
|
|
|
+ url: '/pages/home/home'
|
|
|
|
+ })
|
|
|
|
+ } else if (window.__wxjs_environment === 'miniprogram') {
|
|
|
|
+ wx.miniProgram.switchTab({
|
|
|
|
+ url: '/pages/home/home'
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ document.addEventListener('UniAppJSBridgeReady', function () {
|
|
|
|
+ uni.webView.navigateTo({
|
|
|
|
+ url: '/pages/index/index'
|
|
|
|
+ });
|
|
|
|
+ })
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (input[23] == 0x05) { //横竖屏标识
|
|
if (input[23] == 0x05) { //横竖屏标识
|
|
@@ -907,7 +943,21 @@
|
|
clearInterval(intervaler);
|
|
clearInterval(intervaler);
|
|
ws.close();
|
|
ws.close();
|
|
wsss.close();
|
|
wsss.close();
|
|
- quit();
|
|
|
|
|
|
+ if (navigator.userAgent.toLowerCase().includes('toutiaomicroapp')) {
|
|
|
|
+ tt.miniProgram.switchTab({
|
|
|
|
+ url: '/pages/home/home'
|
|
|
|
+ })
|
|
|
|
+ } else if (window.__wxjs_environment === 'miniprogram') {
|
|
|
|
+ wx.miniProgram.switchTab({
|
|
|
|
+ url: '/pages/home/home'
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ document.addEventListener('UniAppJSBridgeReady', function () {
|
|
|
|
+ uni.webView.navigateTo({
|
|
|
|
+ url: '/pages/index/index'
|
|
|
|
+ });
|
|
|
|
+ })
|
|
|
|
+ }
|
|
})
|
|
})
|
|
|
|
|
|
function selectText(x) {
|
|
function selectText(x) {
|
|
@@ -1080,7 +1130,21 @@
|
|
$('.buy-phone-wrap').eq(0).hide();
|
|
$('.buy-phone-wrap').eq(0).hide();
|
|
if (disconnectionFlag || getDate) {//设置了断线时间,取消直接退出
|
|
if (disconnectionFlag || getDate) {//设置了断线时间,取消直接退出
|
|
systemBuriedPoint('激活码-断线-取消');
|
|
systemBuriedPoint('激活码-断线-取消');
|
|
- quit();
|
|
|
|
|
|
+ if (navigator.userAgent.toLowerCase().includes('toutiaomicroapp')) {
|
|
|
|
+ tt.miniProgram.switchTab({
|
|
|
|
+ url: '/pages/home/home'
|
|
|
|
+ })
|
|
|
|
+ } else if (window.__wxjs_environment === 'miniprogram') {
|
|
|
|
+ wx.miniProgram.switchTab({
|
|
|
|
+ url: '/pages/home/home'
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ document.addEventListener('UniAppJSBridgeReady', function () {
|
|
|
|
+ uni.webView.navigateTo({
|
|
|
|
+ url: '/pages/index/index'
|
|
|
|
+ });
|
|
|
|
+ })
|
|
|
|
+ }
|
|
return
|
|
return
|
|
}
|
|
}
|
|
let pointName = '';
|
|
let pointName = '';
|
|
@@ -1127,7 +1191,21 @@
|
|
} else {
|
|
} else {
|
|
systemBuriedPoint('激活码-强制关闭-放弃');
|
|
systemBuriedPoint('激活码-强制关闭-放弃');
|
|
}
|
|
}
|
|
- quit();
|
|
|
|
|
|
+ if (navigator.userAgent.toLowerCase().includes('toutiaomicroapp')) {
|
|
|
|
+ tt.miniProgram.switchTab({
|
|
|
|
+ url: '/pages/home/home'
|
|
|
|
+ })
|
|
|
|
+ } else if (window.__wxjs_environment === 'miniprogram') {
|
|
|
|
+ wx.miniProgram.switchTab({
|
|
|
|
+ url: '/pages/home/home'
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ document.addEventListener('UniAppJSBridgeReady', function () {
|
|
|
|
+ uni.webView.navigateTo({
|
|
|
|
+ url: '/pages/index/index'
|
|
|
|
+ });
|
|
|
|
+ })
|
|
|
|
+ }
|
|
})
|
|
})
|
|
// 继续观看
|
|
// 继续观看
|
|
$('.looking')[0].addEventListener('click', () => {
|
|
$('.looking')[0].addEventListener('click', () => {
|