init
This commit is contained in:
@@ -0,0 +1,134 @@
|
||||
{
|
||||
"ver": "1.0.27",
|
||||
"importer": "image",
|
||||
"imported": true,
|
||||
"uuid": "887895f4-2c65-4a6b-9b41-58bf74a6da2b",
|
||||
"files": [
|
||||
".json",
|
||||
".png"
|
||||
],
|
||||
"subMetas": {
|
||||
"6c48a": {
|
||||
"importer": "texture",
|
||||
"uuid": "887895f4-2c65-4a6b-9b41-58bf74a6da2b@6c48a",
|
||||
"displayName": "shuqing_avatar",
|
||||
"id": "6c48a",
|
||||
"name": "texture",
|
||||
"userData": {
|
||||
"wrapModeS": "clamp-to-edge",
|
||||
"wrapModeT": "clamp-to-edge",
|
||||
"imageUuidOrDatabaseUri": "887895f4-2c65-4a6b-9b41-58bf74a6da2b",
|
||||
"isUuid": true,
|
||||
"visible": false,
|
||||
"minfilter": "linear",
|
||||
"magfilter": "linear",
|
||||
"mipfilter": "none",
|
||||
"anisotropy": 0
|
||||
},
|
||||
"ver": "1.0.22",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
},
|
||||
"f9941": {
|
||||
"importer": "sprite-frame",
|
||||
"uuid": "887895f4-2c65-4a6b-9b41-58bf74a6da2b@f9941",
|
||||
"displayName": "shuqing_avatar",
|
||||
"id": "f9941",
|
||||
"name": "spriteFrame",
|
||||
"userData": {
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 80,
|
||||
"height": 80,
|
||||
"rawWidth": 80,
|
||||
"rawHeight": 80,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
"pivotY": 0.5,
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-40,
|
||||
-40,
|
||||
0,
|
||||
40,
|
||||
-40,
|
||||
0,
|
||||
-40,
|
||||
40,
|
||||
0,
|
||||
40,
|
||||
40,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
1,
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
0,
|
||||
80,
|
||||
80,
|
||||
80,
|
||||
0,
|
||||
0,
|
||||
80,
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-40,
|
||||
-40,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
40,
|
||||
40,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "887895f4-2c65-4a6b-9b41-58bf74a6da2b@6c48a",
|
||||
"atlasUuid": ""
|
||||
},
|
||||
"ver": "1.0.12",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
}
|
||||
},
|
||||
"userData": {
|
||||
"type": "sprite-frame",
|
||||
"hasAlpha": true,
|
||||
"fixAlphaTransparencyArtifacts": false,
|
||||
"redirect": "887895f4-2c65-4a6b-9b41-58bf74a6da2b@6c48a"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
{
|
||||
"ver": "1.0.27",
|
||||
"importer": "image",
|
||||
"imported": true,
|
||||
"uuid": "72b113a1-11e2-4358-b570-2fdd06da76de",
|
||||
"files": [
|
||||
".json",
|
||||
".png"
|
||||
],
|
||||
"subMetas": {
|
||||
"6c48a": {
|
||||
"importer": "texture",
|
||||
"uuid": "72b113a1-11e2-4358-b570-2fdd06da76de@6c48a",
|
||||
"displayName": "lv_38",
|
||||
"id": "6c48a",
|
||||
"name": "texture",
|
||||
"userData": {
|
||||
"wrapModeS": "clamp-to-edge",
|
||||
"wrapModeT": "clamp-to-edge",
|
||||
"imageUuidOrDatabaseUri": "72b113a1-11e2-4358-b570-2fdd06da76de",
|
||||
"isUuid": true,
|
||||
"visible": false,
|
||||
"minfilter": "linear",
|
||||
"magfilter": "linear",
|
||||
"mipfilter": "none",
|
||||
"anisotropy": 0
|
||||
},
|
||||
"ver": "1.0.22",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
},
|
||||
"f9941": {
|
||||
"importer": "sprite-frame",
|
||||
"uuid": "72b113a1-11e2-4358-b570-2fdd06da76de@f9941",
|
||||
"displayName": "lv_38",
|
||||
"id": "f9941",
|
||||
"name": "spriteFrame",
|
||||
"userData": {
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 66,
|
||||
"height": 62,
|
||||
"rawWidth": 66,
|
||||
"rawHeight": 62,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
"pivotY": 0.5,
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-33,
|
||||
-31,
|
||||
0,
|
||||
33,
|
||||
-31,
|
||||
0,
|
||||
-33,
|
||||
31,
|
||||
0,
|
||||
33,
|
||||
31,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
1,
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
0,
|
||||
62,
|
||||
66,
|
||||
62,
|
||||
0,
|
||||
0,
|
||||
66,
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-33,
|
||||
-31,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
33,
|
||||
31,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "72b113a1-11e2-4358-b570-2fdd06da76de@6c48a",
|
||||
"atlasUuid": ""
|
||||
},
|
||||
"ver": "1.0.12",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
}
|
||||
},
|
||||
"userData": {
|
||||
"type": "sprite-frame",
|
||||
"hasAlpha": true,
|
||||
"fixAlphaTransparencyArtifacts": false,
|
||||
"redirect": "72b113a1-11e2-4358-b570-2fdd06da76de@6c48a"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
{
|
||||
"ver": "1.0.27",
|
||||
"importer": "image",
|
||||
"imported": true,
|
||||
"uuid": "92250387-b484-430b-9b26-f02ca8b2bf52",
|
||||
"files": [
|
||||
".json",
|
||||
".png"
|
||||
],
|
||||
"subMetas": {
|
||||
"6c48a": {
|
||||
"importer": "texture",
|
||||
"uuid": "92250387-b484-430b-9b26-f02ca8b2bf52@6c48a",
|
||||
"displayName": "zeiterin_shy",
|
||||
"id": "6c48a",
|
||||
"name": "texture",
|
||||
"userData": {
|
||||
"wrapModeS": "clamp-to-edge",
|
||||
"wrapModeT": "clamp-to-edge",
|
||||
"imageUuidOrDatabaseUri": "92250387-b484-430b-9b26-f02ca8b2bf52",
|
||||
"isUuid": true,
|
||||
"visible": false,
|
||||
"minfilter": "linear",
|
||||
"magfilter": "linear",
|
||||
"mipfilter": "none",
|
||||
"anisotropy": 0
|
||||
},
|
||||
"ver": "1.0.22",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
},
|
||||
"f9941": {
|
||||
"importer": "sprite-frame",
|
||||
"uuid": "92250387-b484-430b-9b26-f02ca8b2bf52@f9941",
|
||||
"displayName": "zeiterin_shy",
|
||||
"id": "f9941",
|
||||
"name": "spriteFrame",
|
||||
"userData": {
|
||||
"trimType": "none",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 925,
|
||||
"height": 1189,
|
||||
"rawWidth": 925,
|
||||
"rawHeight": 1189,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
"pivotY": 0.5,
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-462.5,
|
||||
-594.5,
|
||||
0,
|
||||
462.5,
|
||||
-594.5,
|
||||
0,
|
||||
-462.5,
|
||||
594.5,
|
||||
0,
|
||||
462.5,
|
||||
594.5,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
1,
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
0,
|
||||
1189,
|
||||
925,
|
||||
1189,
|
||||
0,
|
||||
0,
|
||||
925,
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-462.5,
|
||||
-594.5,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
462.5,
|
||||
594.5,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "92250387-b484-430b-9b26-f02ca8b2bf52@6c48a",
|
||||
"atlasUuid": ""
|
||||
},
|
||||
"ver": "1.0.12",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
}
|
||||
},
|
||||
"userData": {
|
||||
"type": "sprite-frame",
|
||||
"hasAlpha": true,
|
||||
"fixAlphaTransparencyArtifacts": false,
|
||||
"redirect": "92250387-b484-430b-9b26-f02ca8b2bf52@6c48a"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,296 @@
|
||||
import { VideoPlayer, Node, director, Component, isValid } from "cc";
|
||||
import HttpUnit from "../Common/HttpUnit";
|
||||
import { SDKManager } from "./SDKManager";
|
||||
import { SceneBgVideoLayer } from "../../Sub/UI/SceneBgVideoLayer";
|
||||
import { BgVideo } from "./BgVideo";
|
||||
import Utils from "../Common/Utils";
|
||||
import { InnerMsgCode } from "../Config/InnerMsgCode";
|
||||
import { VideoRoleType } from "../Common/GlobalValue";
|
||||
|
||||
export class WebSDK{
|
||||
|
||||
//初始化
|
||||
init(cb: Function = null) {
|
||||
console.log("init webSDK");
|
||||
cb && cb();
|
||||
}
|
||||
|
||||
//检查权限
|
||||
checkAutoSetting(autoKey:string, cb:Function = null) {
|
||||
cb && cb(true);
|
||||
}
|
||||
|
||||
//获取用户信息
|
||||
getUserInfo(cb:Function = null) {
|
||||
let name = HttpUnit.GetNickName();
|
||||
cb && cb({ nickName:name, avatarUrl:"https://hxzgame.vip.hnhxzkj.com/lzx/XiangQin/webHead.png" });
|
||||
}
|
||||
|
||||
//region 登录
|
||||
login(cb: Function = null) {
|
||||
cb && cb({ platform:2, code: null });
|
||||
}
|
||||
|
||||
//显示视频广告
|
||||
show_video(callback:Function, tag:number) {
|
||||
callback && callback({ code: 0, tag: tag });
|
||||
SDKManager.video_ad_back();
|
||||
}
|
||||
|
||||
//显示插屏
|
||||
show_splash() {
|
||||
|
||||
|
||||
}
|
||||
|
||||
//显示Banner
|
||||
show_banner(...args) {
|
||||
|
||||
}
|
||||
|
||||
//隐藏Banner
|
||||
hide_banner(...args) {
|
||||
|
||||
}
|
||||
|
||||
//主动拉起分享
|
||||
show_share(rewardCB?:Function) {
|
||||
rewardCB && rewardCB();
|
||||
}
|
||||
|
||||
//获取设备分辨率
|
||||
getWindowSize() {
|
||||
return {width:screen.width, height: screen.height};
|
||||
}
|
||||
|
||||
//显示游戏圈
|
||||
show_gameClub(leftRatio, topRatio, widthRatio, heightRatio) {
|
||||
|
||||
}
|
||||
//隐藏游戏圈
|
||||
hide_gameClub() {
|
||||
|
||||
}
|
||||
|
||||
//检查是否支持base64音频播放
|
||||
checkSupportBase64Audio() {
|
||||
return true;
|
||||
}
|
||||
//播放base64音频
|
||||
private _audioInst:HTMLAudioElement = null;
|
||||
playBase64Audio(base64:string, loop:boolean) {
|
||||
let substring = base64;
|
||||
let qianzhui = "data:audio/x-wav;base64,"
|
||||
if(base64.startsWith(qianzhui)) {
|
||||
substring = base64.substring(qianzhui.length, base64.length)
|
||||
}
|
||||
|
||||
// 解码 Base64 字符串为二进制数据
|
||||
const binaryData = atob(substring);
|
||||
|
||||
// 创建一个包含二进制数据的 Uint8Array
|
||||
const byteArray = new Uint8Array(binaryData.length);
|
||||
for (let i = 0; i < binaryData.length; i++) {
|
||||
byteArray[i] = binaryData.charCodeAt(i);
|
||||
}
|
||||
|
||||
// 创建 Blob 对象,指定 MIME 类型为音频格式(例如 mp3)
|
||||
const audioBlob = new Blob([byteArray], { type: 'audio/mp3' });
|
||||
|
||||
// 创建音频 URL
|
||||
const audioUrl = URL.createObjectURL(audioBlob);
|
||||
|
||||
console.log("web 播放base64音频", audioUrl)
|
||||
// 创建音频元素并播放
|
||||
if (this._audioInst == null) {
|
||||
this._audioInst = new Audio(audioUrl);
|
||||
} else {
|
||||
this._audioInst.src = audioUrl;
|
||||
}
|
||||
this._audioInst.play();
|
||||
|
||||
}
|
||||
|
||||
//客服功能是否支持
|
||||
kefuSupport() {
|
||||
console.log("web 不支持联系客服")
|
||||
return false;
|
||||
}
|
||||
//进入联系客服
|
||||
openKefu() {
|
||||
console.log("web 进入联系客服")
|
||||
}
|
||||
|
||||
|
||||
//region 播放主背景视频
|
||||
private zhuVideo1: BgVideo | null = null;
|
||||
private zhuExtra1: any = null;
|
||||
playBgAudio(remoteUrl:string, vtype:VideoRoleType, loop:boolean = false, extra:any = {}) {
|
||||
let bgvideo = SceneBgVideoLayer.handle
|
||||
if (!bgvideo) {
|
||||
return
|
||||
}
|
||||
|
||||
this.initBgAudio()
|
||||
if (this.zhuVideo1 && this.zhuVideo1.isPlaying) {
|
||||
this.playBgAudioNext(remoteUrl, vtype, loop, extra);
|
||||
return
|
||||
}
|
||||
|
||||
if (!this.zhuVideo1) {
|
||||
this.zhuVideo1 = bgvideo.getVideoClone();
|
||||
}
|
||||
this.zhuExtra1 = extra;
|
||||
this.zhuVideo1.vtype = vtype;
|
||||
this.zhuVideo1.cbReady = this.audioReady.bind(this);
|
||||
this.zhuVideo1.cbEnd = this.audioEnded.bind(this);
|
||||
this.zhuVideo1.playVideo(remoteUrl, loop, false);
|
||||
}
|
||||
initBgAudio() {
|
||||
let bgvideo = SceneBgVideoLayer.handle
|
||||
if (!bgvideo) {
|
||||
return
|
||||
}
|
||||
|
||||
console.log("web 初始化主背景视频")
|
||||
if (!this.zhuVideo1) {
|
||||
this.zhuVideo1 = bgvideo.getVideoClone();
|
||||
this.zhuVideo1.remoteUrl = "http://hxzgame.vip.hnhxzkj.com/lzx/XiangQin/bginited.mp4"
|
||||
}
|
||||
if (!this.zhuVideo2) {
|
||||
this.zhuVideo2 = bgvideo.getVideoClone();
|
||||
this.zhuVideo2.remoteUrl = "http://hxzgame.vip.hnhxzkj.com/lzx/XiangQin/bginited.mp4"
|
||||
}
|
||||
if (!this.emoVideo1) {
|
||||
this.emoVideo1 = bgvideo.getVideoClone();
|
||||
this.emoVideo1.remoteUrl = "http://hxzgame.vip.hnhxzkj.com/lzx/XiangQin/bginited.mp4"
|
||||
}
|
||||
if (!this.emoVideo2) {
|
||||
this.emoVideo2 = bgvideo.getVideoClone();
|
||||
this.emoVideo2.remoteUrl = "http://hxzgame.vip.hnhxzkj.com/lzx/XiangQin/bginited.mp4"
|
||||
}
|
||||
}
|
||||
audioReady() {
|
||||
this.removeBgAudioNext();
|
||||
this.zhuVideo1.moveIn();
|
||||
Utils.sendInnerMsg(InnerMsgCode.BgVideo_Ready, {compo: this.zhuVideo1, extra: this.zhuExtra1});
|
||||
}
|
||||
audioEnded() {
|
||||
Utils.sendInnerMsg(InnerMsgCode.BgVideo_End, {compo: this.zhuVideo1, extra: this.zhuExtra1});
|
||||
}
|
||||
removeBgAudio() {
|
||||
if (this.zhuVideo1 && this.zhuVideo1.isPlaying) {
|
||||
this.zhuVideo1.recycleVideo();
|
||||
}
|
||||
}
|
||||
//主背景临时视频
|
||||
private zhuVideo2: BgVideo | null = null;
|
||||
private zhuExtra2: any = null;
|
||||
playBgAudioNext(remoteUrl:string, vtype:VideoRoleType, loop:boolean = false, extra:any = {}) {
|
||||
let bgvideo = SceneBgVideoLayer.handle
|
||||
if (!bgvideo) {
|
||||
return
|
||||
}
|
||||
this.removeBgAudioNext();
|
||||
if (!this.zhuVideo2) {
|
||||
this.zhuVideo2 = bgvideo.getVideoClone();
|
||||
}
|
||||
this.zhuExtra2 = extra;
|
||||
this.zhuVideo2.vtype = vtype;
|
||||
this.zhuVideo2.cbReady = this.audioNextReady.bind(this);
|
||||
this.zhuVideo2.cbEnd = this.audioNextEnded.bind(this);
|
||||
this.zhuVideo2.playVideo(remoteUrl, loop, false);
|
||||
}
|
||||
audioNextReady() {
|
||||
this.removeBgAudio();
|
||||
this.zhuVideo2.moveIn();
|
||||
Utils.sendInnerMsg(InnerMsgCode.BgVideo_Ready, {compo: this.zhuVideo2, extra: this.zhuExtra2});
|
||||
}
|
||||
audioNextEnded() {
|
||||
Utils.sendInnerMsg(InnerMsgCode.BgVideo_End, {compo: this.zhuVideo2, extra: this.zhuExtra2});
|
||||
}
|
||||
removeBgAudioNext() {
|
||||
if (this.zhuVideo2 && this.zhuVideo2.isPlaying) {
|
||||
this.zhuVideo2.recycleVideo();
|
||||
}
|
||||
}
|
||||
|
||||
//region 播放emo视频
|
||||
private emoVideo1: BgVideo | null = null;
|
||||
private emoExtra1: any = {}
|
||||
addEmoAudio(remoteUrl:string, vtype:VideoRoleType, loop:boolean = false, extra:any = {}) {
|
||||
let bgvideo = SceneBgVideoLayer.handle
|
||||
if (!bgvideo) {
|
||||
return
|
||||
}
|
||||
|
||||
if (this.emoVideo1 && this.emoVideo1.isPlaying) {
|
||||
this.playEmoAudioNext(remoteUrl, vtype, loop, extra);
|
||||
return
|
||||
// this.emoVideo1.recycleVideo();
|
||||
}
|
||||
|
||||
if (!this.emoVideo1 || !isValid(this.emoVideo1.node)) {
|
||||
this.emoVideo1 = bgvideo.getVideoClone();
|
||||
}
|
||||
this.emoExtra1 = extra;
|
||||
this.emoVideo1.vtype = vtype;
|
||||
this.emoVideo1.cbReady = this.emoReady.bind(this);
|
||||
this.emoVideo1.cbEnd = this.emoEnded.bind(this);
|
||||
this.emoVideo1.playVideo(remoteUrl, loop, false);
|
||||
}
|
||||
emoReady() {
|
||||
this.removeEmoNextAudio();
|
||||
Utils.sendInnerMsg(InnerMsgCode.BgVideo_Ready, {compo: this.emoVideo1, extra: this.emoExtra1});
|
||||
}
|
||||
emoEnded() {
|
||||
Utils.sendInnerMsg(InnerMsgCode.BgVideo_End, {compo: this.emoVideo1, extra: this.emoExtra1});
|
||||
}
|
||||
removeEmoAudio() {
|
||||
if (this.emoVideo1 && this.emoVideo1.isPlaying) {
|
||||
this.emoVideo1.recycleVideo();
|
||||
}
|
||||
}
|
||||
// 播放emo临时视频
|
||||
private emoVideo2: BgVideo | null = null;
|
||||
private emoExtra2: any = {}
|
||||
playEmoAudioNext(remoteUrl:string, vtype:VideoRoleType, loop:boolean = false, extra:any = {}) {
|
||||
let bgvideo = SceneBgVideoLayer.handle
|
||||
if (!bgvideo) {
|
||||
return
|
||||
}
|
||||
this.removeEmoNextAudio();
|
||||
if (!this.emoVideo2) {
|
||||
this.emoVideo2 = bgvideo.getVideoClone();
|
||||
}
|
||||
this.emoExtra2 = extra;
|
||||
this.emoVideo2.vtype = vtype;
|
||||
this.emoVideo2.cbReady = this.emoNextReady.bind(this);
|
||||
this.emoVideo2.cbEnd = this.emoNextEnded.bind(this);
|
||||
this.emoVideo2.playVideo(remoteUrl, loop, false);
|
||||
}
|
||||
emoNextReady() {
|
||||
this.removeEmoAudio();
|
||||
Utils.sendInnerMsg(InnerMsgCode.BgVideo_Ready, {compo: this.emoVideo2, extra: this.emoExtra2});
|
||||
}
|
||||
emoNextEnded() {
|
||||
Utils.sendInnerMsg(InnerMsgCode.BgVideo_End, {compo: this.emoVideo2, extra: this.emoExtra2});
|
||||
}
|
||||
removeEmoNextAudio() {
|
||||
if (this.emoVideo2 && this.emoVideo2.isPlaying) {
|
||||
this.emoVideo2.recycleVideo();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//region 友盟+
|
||||
umaInit() {
|
||||
}
|
||||
//友盟统计是否开启
|
||||
umaSwt() {
|
||||
return false;
|
||||
}
|
||||
//友盟事件统计
|
||||
umaEvent(eventName: string, value: any = {}) {
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 455 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
Reference in New Issue
Block a user