source={{
html: '<html><body>Some stuff that generates a twitter timeline in an iframe</body></html>',
baseUrl: ''
}}>
我已经将我的设置为空,如上所述,我认为创建一个带有网址的网页视图' about:blank '. When I changed it to ' https://www.twitter.com ', the frame-ancestors violation dissappeared and the video played successfully. I then changed the url to ' https://www.ifThisIsEmptyThenVideoWillNotPlay.com ' and it still worked, so I guess it just has to be a url. I'我不确定这是否会有所帮助,但我觉得我必须把它放在某个地方,因为它对我来说似乎模糊不清 . ..
1 回答
这应该是一个评论,但我没有足够的声誉 . 我今天花了很多时间尝试将Twitter时间线嵌入到React-Native WebView中 . 获得时间表后,我发现我面对的视频无效 . 将WebView连接到chrome devtools我发现我遇到了和你一样的错误 .
在React-Native webview中,您可以传递HTML以显示和'baseUrl':
我已经将我的设置为空,如上所述,我认为创建一个带有网址的网页视图' about:blank '. When I changed it to ' https://www.twitter.com ', the frame-ancestors violation dissappeared and the video played successfully. I then changed the url to ' https://www.ifThisIsEmptyThenVideoWillNotPlay.com ' and it still worked, so I guess it just has to be a url. I'我不确定这是否会有所帮助,但我觉得我必须把它放在某个地方,因为它对我来说似乎模糊不清 . ..