Rebrand the entire application from "胡萝卜社区" (Carrot BBS) to "威友" (WithYou), including:
- Update app name, package name (skin.carrot.bbs → cn.qczlit.withyou), and bundle identifier - Update API endpoints (bbs.littlelan.cn → withyou.littlelan.cn) - Update URL scheme (carrotbbs:// → withyou://) - Rename database from carrot_bbs to with_you - Update CI/CD pipeline image names and artifact naming - Add Android signing configuration for release builds - Update all UI text and comments throughout the codebase - Refactor registerStore to use in-memory state instead of AsyncStorage persistence - Improve WebRTC track handling and call stream management - Add metro platform resolution for native platform support BREAKING app package, database, and URLs are no longer valid
This commit is contained in:
@@ -146,13 +146,20 @@ function setupWebRTCEvents(callId: string, myUserId: string): void {
|
||||
* Handle remote stream with video track detection
|
||||
*/
|
||||
function handleRemoteStream(stream: MediaStream): void {
|
||||
callStore.setState({ peerStream: stream });
|
||||
// Create a new MediaStream instance to force zustand subscribers to update
|
||||
// because react-native-webrtc may add tracks to the same stream object reference
|
||||
const newStream = new MediaStream();
|
||||
stream.getTracks().forEach((track) => {
|
||||
newStream.addTrack(track);
|
||||
});
|
||||
|
||||
callStore.setState({ peerStream: newStream });
|
||||
|
||||
// Detect video tracks in remote stream
|
||||
const videoTracks = stream.getVideoTracks();
|
||||
const videoTracks = newStream.getVideoTracks();
|
||||
const hasPeerVideo = videoTracks.length > 0 && videoTracks.some((t) => t.enabled);
|
||||
|
||||
console.log('[CallStore] Remote stream received, hasVideo:', hasPeerVideo, 'videoTracks:', videoTracks.length);
|
||||
console.log('[CallStore] Remote stream received, hasVideo:', hasPeerVideo, 'videoTracks:', videoTracks.length, 'audioTracks:', newStream.getAudioTracks().length);
|
||||
|
||||
callStore.setState((s) => ({
|
||||
currentCall: s.currentCall
|
||||
|
||||
Reference in New Issue
Block a user