This commit is contained in:
Peter
2019-08-30 23:32:32 +04:00
parent ee8deffc76
commit f1d1754aa5
326 changed files with 4981 additions and 2895 deletions

View File

@@ -2,6 +2,7 @@ import Foundation
import WebKit
import SwiftSignalKit
import UniversalMediaPlayer
import AppBundle
final class GenericEmbedImplementation: WebEmbedImplementation {
private var evalImpl: ((String) -> Void)?
@@ -17,7 +18,7 @@ final class GenericEmbedImplementation: WebEmbedImplementation {
}
func setup(_ webView: WKWebView, userContentController: WKUserContentController, evaluateJavaScript: @escaping (String) -> Void, updateStatus: @escaping (MediaPlayerStatus) -> Void, onPlaybackStarted: @escaping () -> Void) {
let bundle = Bundle(for: type(of: self))
let bundle = getAppBundle()
guard let userScriptPath = bundle.path(forResource: "GenericUserScript", ofType: "js") else {
return
}