Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/orange-snakes-wonder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"react-native-youtube-bridge": patch
---

refactor(web): extract YouTubePlayerCore class for better architecture
- Separate business logic from React lifecycle
- Create framework-agnostic core with useYouTubePlayer hook
1 change: 0 additions & 1 deletion example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ function App() {
console.log('Player is ready!');
Alert.alert('알림', 'YouTube 플레이어가 준비되었습니다!');

// 플레이어 준비 완료 후 정보 가져오기
console.log('rates', playerInfo.availablePlaybackRates);
console.log('vol', playerInfo.volume);
console.log('muted', playerInfo.muted);
Expand Down
2 changes: 0 additions & 2 deletions src/YoutubePlayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,8 @@ const YoutubePlayer = forwardRef<PlayerControls, YoutubePlayerProps>(

useEffect(() => {
return () => {
// 모든 pending commands 정리
pendingCommandsRef.current.clear();

// WebView 내부 cleanup 호출
if (webViewRef.current && isReady) {
sendCommand('cleanup');
}
Expand Down
Loading