fix(ios): hide function bach in native shell (YouTube embed error 153) - #29
Merged
Conversation
… rejected capacitor://localhost origin fails YouTube's embed referrer check (playability error 153), and WKWebView reserves http/https so iosScheme cannot be switched. Gate the bach widget behind isNativeShell(): skip loading the IFrame API and hide the header widget in the native shell. Web/PWA behavior is unchanged. Documented as KI-002 in docs/KNOWN_ISSUES.md with regression coverage in the bach UI test and a native-shell-emulated e2e case. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
문제
Capacitor iOS 앱(iPad 시뮬레이터)에서
function bach재생 시 "재생에 실패했습니다. 채널/영상 URL을 확인해주세요" 에러 발생. 웹/PWA에서는 정상.근본 원인
네이티브 셸의 페이지 origin이
capacitor://localhost라서 YouTube 임베드 플레이어의 referrer/origin 검증에 실패함 (YouTube playability error 153 — "embedder identity missing referrer"). WKWebView는 커스텀 스킴 페이지에서 유효한 HTTP referrer를 보내지 않음.검토한 대안
iosScheme: 'https'전환 — 불가: WKWebView가 http/https 스킴 핸들러 등록을 금지하므로 Capacitor iOS에서 사용할 수 없음 (Capacitor config 문서).조치 (옵션 b)
useBachPlayer:isNativeShell()기반isBachSupported플래그 추가 — 네이티브 셸에서는 YouTube IFrame API 로드 자체를 생략.MaestroHeader:isBachSupported === false면 bach 위젯 비노출. 웹/PWA 동작 불변.docs/KNOWN_ISSUES.md에 KI-002로 기록.테스트
App.function-bach.ui.test.jsx)tests/e2e/maestro.e2e.spec.js) — 웹 경로는 기존 케이스 유지npm test117/117,npm run test:e2e4/4, 웹/CAPACITOR_BUILD 빌드 통과🤖 Generated with Claude Code