mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-08 05:43:04 +00:00
fix: keep autoplay fallback from saving mute
(cherry picked from commit f373bb9ce7)
This commit is contained in:
1 parent
0513c7fcd8
commit
d8e5113efd
7 files changed
+96
-10
No files matched your search
@@ -232,7 +232,18 @@ export function createAuthSessionCoordinator(deps) {
|
||||
}
|
||||
|
||||
this.applyAuthenticatedUiState();
|
||||
this.commentController?.refreshAuthState?.();
|
||||
const activeModalVideo =
|
||||
typeof this.videoModal?.getCurrentVideo === "function"
|
||||
? this.videoModal.getCurrentVideo()
|
||||
: this.commentController?.currentVideo || null;
|
||||
if (this.commentController && activeModalVideo) {
|
||||
// Login can reconfigure relay-backed services. Reload the active thread
|
||||
// instead of only enabling its composer so readable comments survive
|
||||
// the transition from guest to authenticated state.
|
||||
this.commentController.load(activeModalVideo);
|
||||
} else {
|
||||
this.commentController?.refreshAuthState?.();
|
||||
}
|
||||
this.updateShareNostrAuthState({ reason: "auth-login" });
|
||||
if (typeof this.refreshUnreadDmIndicator === "function") {
|
||||
void this.refreshUnreadDmIndicator({ reason: "auth-login" });
|
||||
|
||||
@@ -237,7 +237,7 @@ export function createPlaybackCoordinator(deps) {
|
||||
this.log("Autoplay failed:", err);
|
||||
if (!this.modalVideo.muted) {
|
||||
this.log("Falling back to muted autoplay.");
|
||||
this.modalVideo.muted = true;
|
||||
this.playbackService.muteForAutoplayFallback(this.modalVideo);
|
||||
this.modalVideo.play().catch((err2) => {
|
||||
this.log("Muted autoplay also failed:", err2);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user