fix: prevent Nepal media from opening external browsers in Pinokio

This commit is contained in:
manjunath22466 committed 2026-09-15 23:54:07 +05:30
1 parent 81b82da056
commit 94f83c59de
4 files changed
+70 -1

No files matched your search

+7 -1
View File
@@ -595,7 +595,13 @@ export function createBhoteKoshiEmbeddedMedia({
facebookLoader = loadFacebookSdk,
youtubeLoader = loadYouTubeApi,
} = {}) {
if (!documentRef?.createElement || !viewer) {
// Pinokio externalizes HTTPS iframe navigation, including hidden preloads.
// Use the existing source-card/local-clip fallback before allocating provider
// resources. Browsers visiting the same Pinokio-launched server keep embeds.
const pinokioShell = /(?:^|\s)Pinokio\/[^\s]+/i.test(
globalRef.navigator?.userAgent || '',
);
if (pinokioShell || !documentRef?.createElement || !viewer) {
return {
warm: () => false,
show: () => false,