我在用
<iframe width="550" height="314" src="https://www.youtube.com/embed/vidid?modestbranding=1&rel=0&showinfo=0" frameborder="0" allowfullscreen></iframe>
Run Code Online (Sandbox Code Playgroud)
这将删除右侧底部"Youtube"徽标.并删除悬停时出现的"标题栏".
但在这个问题是,当我悬停在视频上然后在右侧底部"Youtube"tumbnail /文本即将到来,当我删除鼠标然后它消失.
当我使用"autohide = 1"时,控制栏会被隐藏,在右下角,悬停时会显示一个"Youtube"图标/图像/徽标.我在用
iframe.setAttribute("src", "youtube.com/embed/" + youtube.id + "?modestbranding=1&;showinfo=0&;autohide=1&;rel=0;");
Run Code Online (Sandbox Code Playgroud)
这个.有了这个,我可以从控制栏中删除/隐藏标题栏和徽标,但在右下角悬停时屏幕上还有另一个徽标,我应该使用哪个参数来隐藏它?

我正在尝试隐藏显示在右下角带有嵌入角的YouTube徽标。由于某些原因,modestbranding = 1无效:
<iframe class="gtms-intro" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;" width="1280" height="720" src="https://www.youtube.com/embed/ywFGJecodxQ?rel=0&controls=0&showinfo=0&autoplay=1&loop=1&modestbranding=1&playlist=ywFGJecodxQ" frameborder="0"></iframe>
Run Code Online (Sandbox Code Playgroud) 所以根据苹果的文档:https : //developer.apple.com/documentation/webkit/wkwebviewconfiguration/1614793-allowsinlinemediaplayback
我应该能够使用 Swift 4 轻松地在线播放视频,但无论我做什么,它总是会在本机视频播放器中打开视频。
这是我的代码:
convenience init(style: UITableViewCell.CellStyle, reuseIdentifier: String?, url: String = "", title: String) {
self.init(style: style, reuseIdentifier: reuseIdentifier)
self.videoTitleLabel.text = title
self.urlToVideo = url
setUpUI()
setUpLayout()
webView.backgroundColor = .smalt
webView.translatesAutoresizingMaskIntoConstraints = false
webView.configuration.allowsInlineMediaPlayback = true
webView.configuration.preferences.javaScriptEnabled = true
webView.load(URLRequest(url: URL(string: self.urlToVideo + "?playsinline")! ))
}
Run Code Online (Sandbox Code Playgroud)
我究竟做错了什么?