Skip to content

Commit 1ae8275

Browse files
committed
Update the default origin URL to use the bundle identifier as the host
1 parent 1072d54 commit 1ae8275

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Sources/Models/YouTubePlayer+Parameters.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,12 @@ extension YouTubePlayer.Parameters: ExpressibleByURL {
233233
public extension YouTubePlayer.Parameters {
234234

235235
/// The default origin URL.
236-
static let defaultOriginURL = URL(string: "https://youtubeplayer")
236+
static let defaultOriginURL: URL? = {
237+
var urlComponents = URLComponents()
238+
urlComponents.scheme = "https"
239+
urlComponents.host = Bundle.main.bundleIdentifier?.lowercased() ?? "youtubeplayer"
240+
return urlComponents.url
241+
}()
237242

238243
}
239244

0 commit comments

Comments
 (0)