我们有同样的问题。诀窍(或 Facebook 错误)是在编辑器中设置带有视频链接的材料的 url。然后在您的代码中执行以下操作:
const Scene = require('Scene');
const Animation = require('Animation');
const Materials = require('Materials');
const Textures = require('Textures');
const D = require('Diagnostics');
const Audio = require('Audio');
const animRoot = Scene.root.find('animRoot');
const planeTracker = Scene.root.find('planeTracker');
const targetMat = Materials.get('targetMat');
const externalText = Textures.get('externalAnimation');
const playbackController = Audio.getPlaybackController('playback_controller_model0');
planeTracker.confidence.eq('HIGH').onOn({fireOnInitialValue: true}).subscribe(function(e) {
playbackController.play();
externalText.url = '';
externalText.url = 'https://urlToYourVideo.mp4';
D.log('Tracking starts');
});
planeTracker.confidence.eq('HIGH').onOff({fireOnInitialValue: true}).subscribe(function(e) {
playbackController.stop();
externalText.url = '';
D.log('Tracking stops');
});
希望这可以帮助!