React 360:Safari无法找到变量:AudioContext

问题描述 投票:0回答:1

在Safari中使用react 360启动react实例时,我收到了AudioContext错误。

我实例化如下:

import {ReactInstance} from 'react-360-web';

function init(bundle, parent, options = {}) {
  const r360 = new ReactInstance(bundle, parent, {
    fullScreen: true,
    ...options,
  });
}

window.React360 = {init};

并且包中的错误堆栈是这样的:

1.

n = new r.ReactInstance(e,t,babelHelpers.extends({fullScreen:!0},o));

2.

this.runtime = new U.default(this.scene,(0,o.default)(t),l),this.vrState = new p.default,this.vrState.onDisplayChange(function(e){e?a .overlay.setVRButtonState(!0,“在VR中查看”,a.enterVR):a.overlay.setVRButtonState(!1,“No Headset”,null)}),this.controls.addCameraController(new g.default(this ._eventLayer)),this.controls.addCameraController(new v.default(this._eventLayer)),this.controls.addCameraController(new b.default(this._eventLayer)),this.controls.addEventChannel(new L.default( this._eventLayer)),this.controls.addEventChannel(new V.default(this._eventLayer)),this.controls.addEventChannel(new P.default),this.controls.addEventChannel(new H.default),this.controls .addRaycaster(new z.default),this.controls.addRaycaster(new A.default(this._eventLayer)),this.controls.addRaycaster(new Q.default(this._eventLayer))}

3.

“功能”== typeof a? this.context.registerModule(a(this.context)):this.context.registerModule(a)

4.

nativeModules:[new B.default(this.compositor.getEnvironment()),function(e){var t = new T.default(e);返回a._audioModule = t,t},function(e){

5.

return a._audioCtx = new AudioContext,a._audioData = {},a._handles = {},a._loaders = {},a._rnctx = e,a ////////// ---> >>找不到变量:AudioContext

如何正确使用React 360 for Safari?有什么方法可以关闭音频模块吗?

safari audiocontext react-360 webkitaudiocontext
1个回答
0
投票
© www.soinside.com 2019 - 2024. All rights reserved.