【问题标题】:How prevent use AirPlay on iPhone on my Next/React project如何防止在我的 Next/React 项目中使用 iPhone 上的 AirPlay
【发布时间】:2021-09-17 16:13:07
【问题描述】:

在我的项目中(Next.js/React.js)react-player 工作了很长时间。 然后我决定加密链接,它运行良好,但大约一周后,通过 AirPlay 的音频开始在 iPhone 上播放,非常不方便。

我不太明白是怎么回事,因为我什么都没改,那个人说一周前一切正常,一进来就开始连接AirPlay。

<ReactPlayer
            id='soundPlayer'
            height='1px'
            width='1px'
            ref={this.ref}
            playing={playing}
            volume={1}
            url={file}
            onPlay={this.onPlay}
            onPause={this.onPause}
            onProgress={this.onProgress}
            onDuration={this.onDuration}
            file='forceAudio'/>

播放器的设置是最常见的,已经很久没有改变了。 在所有其他浏览器和设备(MacBook、Sumsung 等)中一切正常。

有没有办法告诉 iPhone 不要使用 AirPlay? 非常感谢您的任何回答!

【问题讨论】:

    标签: reactjs iphone next.js react-player


    【解决方案1】:

    哦,对不起,就是这么简单 => 添加playsinline={true} attr

    【讨论】:

      猜你喜欢
      • 2019-08-15
      • 2021-09-18
      • 1970-01-01
      • 2022-12-25
      • 1970-01-01
      • 1970-01-01
      • 2020-07-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多