mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
Video avatar fixes
This commit is contained in:
@@ -43,8 +43,12 @@ final class GenericEmbedImplementation: WebEmbedImplementation {
|
||||
self.onPlaybackStarted = onPlaybackStarted
|
||||
updateStatus(self.status)
|
||||
|
||||
let html = String(format: htmlTemplate, self.url)
|
||||
webView.loadHTMLString(html, baseURL: URL(string: "about:blank"))
|
||||
if self.url.contains("player.twitch.tv/"), let url = URL(string: self.url) {
|
||||
webView.load(URLRequest(url: url))
|
||||
} else {
|
||||
let html = String(format: htmlTemplate, self.url)
|
||||
webView.loadHTMLString(html, baseURL: URL(string: "about:blank"))
|
||||
}
|
||||
|
||||
userContentController.addUserScript(WKUserScript(source: userScript, injectionTime: .atDocumentEnd, forMainFrameOnly: false))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user