diff --git a/core-shared-ui/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/YoutubePlayerComponent.android.kt b/core-shared-ui/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/YoutubePlayerComponent.android.kt
index eb43e553..6ea60aad 100644
--- a/core-shared-ui/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/YoutubePlayerComponent.android.kt
+++ b/core-shared-ui/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/YoutubePlayerComponent.android.kt
@@ -42,7 +42,7 @@ actual fun YoutubePlayerComponentPlatform(videoId: String, modifier: Modifier) {
AndroidView(
modifier = modifier,
factory = { webView },
- update = { it.loadDataWithBaseURL(null, embedHTML, "text/html", "UTF-8", null) },
+ update = { it.loadDataWithBaseURL(CODANDOTV_DOMAIN, embedHTML, "text/html", "UTF-8", null) },
onReset = { it.destroy() }
)
}
diff --git a/core-shared-ui/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/YoutubePlayerComponentPlatform.kt b/core-shared-ui/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/YoutubePlayerComponentPlatform.kt
index 2cd17320..29bf5c0d 100644
--- a/core-shared-ui/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/YoutubePlayerComponentPlatform.kt
+++ b/core-shared-ui/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/YoutubePlayerComponentPlatform.kt
@@ -10,9 +10,11 @@ expect fun YoutubePlayerComponentPlatform(videoId: String, modifier: Modifier =
internal fun String.videoIdToEmbedHTML(): String {
- val iframeProperties = "width=\"100%\" height=\"100%\""
- return ""
+ return """
+
+ """.trimIndent()
}
+internal const val CODANDOTV_DOMAIN = "https://com.codandotv.com/streamplayerapp"
diff --git a/core-shared-ui/src/iosMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/YoutubePlayerComponentPlatform.ios.kt b/core-shared-ui/src/iosMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/YoutubePlayerComponentPlatform.ios.kt
index b0e59344..b77441c3 100644
--- a/core-shared-ui/src/iosMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/YoutubePlayerComponentPlatform.ios.kt
+++ b/core-shared-ui/src/iosMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/YoutubePlayerComponentPlatform.ios.kt
@@ -6,6 +6,7 @@ import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.viewinterop.UIKitView
+import platform.Foundation.NSURL
import platform.WebKit.WKWebView
import platform.WebKit.WKWebViewConfiguration
import platform.WebKit.WKWebsiteDataStore
@@ -23,7 +24,7 @@ actual fun YoutubePlayerComponentPlatform(videoId: String, modifier: Modifier){
configuration.limitsNavigationsToAppBoundDomains = false
loadHTMLString(
string = embedHTML,
- baseURL = null
+ baseURL = NSURL(string = CODANDOTV_DOMAIN),
)
}
}