|
@@ -63,7 +63,7 @@ cc.Class({
|
|
|
/// 初始化广告W6Lcux7ArPGCBpnWuAyEVK48PrrYX7xWBA
|
|
|
|
|
|
if (window.tt != undefined) {
|
|
|
-
|
|
|
+ GameGlobal._adVideoState = 1;
|
|
|
} else if (CC_WECHATGAME) {
|
|
|
GameGlobal._adVideo = new ADVideo();
|
|
|
GameGlobal._adVideo.wxCreateADVideo();
|
|
@@ -438,5 +438,35 @@ cc.Class({
|
|
|
this.additionTipsNode.show(text, type);
|
|
|
}
|
|
|
},
|
|
|
+
|
|
|
+ //处理头条录制视频然后分享的功能
|
|
|
+ handleTTRecordVideo: _.debounce((event) => {
|
|
|
+ const recorder = tt.getGameRecorderManager();
|
|
|
+
|
|
|
+ recorder.start({
|
|
|
+ microphoneEnabled: true,
|
|
|
+ })
|
|
|
+
|
|
|
+ recorder.onStart(res =>{
|
|
|
+ // 录屏开始
|
|
|
+ console.log(res.microphoneStatus);
|
|
|
+ // do somethine;
|
|
|
+ })
|
|
|
+
|
|
|
+ recorder.onStop(res =>{
|
|
|
+ // 录屏结束;
|
|
|
+ console.log(res.videoPath);
|
|
|
+ })
|
|
|
+
|
|
|
+ recorder.onPause(() =>{
|
|
|
+ // 录屏已暂停;
|
|
|
+ })
|
|
|
+
|
|
|
+ recorder.onResume(() =>{
|
|
|
+ // 录屏已恢复;
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+ }, 1000, true),
|
|
|
// update (dt) {},
|
|
|
});
|