Improve live stream playback stability and responsiveness
Adjust delay for HLS stream initialization in LivePage.tsx and remove unused isFullscreen state. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 45a1dcfc-f8a2-475a-a6b9-96fbb841dc27 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/60d372ff-2c10-46c7-b01b-10c3435136b0/45a1dcfc-f8a2-475a-a6b9-96fbb841dc27/qiQVNFN
This commit is contained in:
parent
3b513ba9e8
commit
a89e422af6
4
.replit
4
.replit
@ -15,10 +15,6 @@ run = ["npm", "run", "start"]
|
|||||||
localPort = 5000
|
localPort = 5000
|
||||||
externalPort = 80
|
externalPort = 80
|
||||||
|
|
||||||
[[ports]]
|
|
||||||
localPort = 33401
|
|
||||||
externalPort = 3001
|
|
||||||
|
|
||||||
[[ports]]
|
[[ports]]
|
||||||
localPort = 35637
|
localPort = 35637
|
||||||
externalPort = 3000
|
externalPort = 3000
|
||||||
|
|||||||
@ -17,7 +17,6 @@ export default function LivePage() {
|
|||||||
const [isPlaying, setIsPlaying] = useState(false);
|
const [isPlaying, setIsPlaying] = useState(false);
|
||||||
const [volume, setVolume] = useState(1);
|
const [volume, setVolume] = useState(1);
|
||||||
const [isMuted, setIsMuted] = useState(false);
|
const [isMuted, setIsMuted] = useState(false);
|
||||||
const [isFullscreen, setIsFullscreen] = useState(false);
|
|
||||||
const [error, setError] = useState<string | null>(null);
|
const [error, setError] = useState<string | null>(null);
|
||||||
|
|
||||||
// HLS stream URL
|
// HLS stream URL
|
||||||
@ -224,7 +223,7 @@ export default function LivePage() {
|
|||||||
// Add a small delay to ensure DOM is ready
|
// Add a small delay to ensure DOM is ready
|
||||||
const timer = setTimeout(() => {
|
const timer = setTimeout(() => {
|
||||||
initializePlayer();
|
initializePlayer();
|
||||||
}, 100);
|
}, 200);
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
clearTimeout(timer);
|
clearTimeout(timer);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user