【发布时间】:2021-06-23 18:29:29
【问题描述】:
我使用 Ionic 创建了一个应用程序,它嵌入了用于流和剪辑的 twitch 播放器。
var url = https://player.twitch.tv/?video=v${videoId}&time=${time}&parent=localhost
<iframe [src]='url' frameborder='0' allow='autoplay; encrypted-media' allowfullscreen></iframe>
在 Android 上它运行完美,但在 iOS 应用程序中 iframe 不会显示并且没有播放器可用。只是一个白屏。
有人知道这个问题可能与ios有关吗?
【问题讨论】:
-
我怀疑这是与 iOS 相关的安全权限。要么不支持,要么清单文件需要一些特殊条目
-
另外,您可能应该通过 angular sanitizer 传递 url
-
我已经绕过了代码中的url,抱歉我没有提到:this.trustedVideoUrl = this.domSanitizer.bypassSecurityTrustResourceUrl(this.twitchService.getEmbedLiveStreamUrl(this.selectedChannel.channelName));
标签: ios ionic-framework twitch twitch-api