mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-05 19:42:38 +02:00
Update
This commit is contained in:
parent
ca089ec17e
commit
a71f0f4c55
3 changed files with 10 additions and 4 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -109,4 +109,4 @@ CreatePlugin/plugins/
|
|||
vendor/james-heinrich/getid3/demos/
|
||||
AVideoStorage/
|
||||
plugin/VideoHLSOverlay/
|
||||
plugin/Live/WebRTC/WebRTC2RTMP.json
|
||||
plugin/WebRTC/WebRTC2RTMP.json
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
"version": 1,
|
||||
"domain": "vlu.me",
|
||||
"serverPort": 3000,
|
||||
"time": "2025-01-12 15:01:04",
|
||||
"phpTimestamp": 1736694064,
|
||||
"time": "2025-01-12 15:12:04",
|
||||
"phpTimestamp": 1736694724,
|
||||
"isPremium": true,
|
||||
"maxRtmpRuntimeMinutes": 120,
|
||||
"maxConcurrentRtmp": 4
|
||||
|
|
|
@ -70,13 +70,19 @@ function sendStreamToServer(stream) {
|
|||
console.error('MediaRecorder error:', event.error);
|
||||
};
|
||||
|
||||
mediaRecorder.start(1000); // Record and send chunks every second
|
||||
const chunkSize = isIPhone() ? 250 : 1000; // 250ms for iPhone, 1000ms for others
|
||||
mediaRecorder.start(chunkSize); // Record and send chunks every second
|
||||
console.log(`MediaRecorder started`);
|
||||
} catch (error) {
|
||||
console.error('Failed to initialize MediaRecorder:', error);
|
||||
}
|
||||
}
|
||||
|
||||
// Detect if the device is an iPhone
|
||||
function isIPhone() {
|
||||
return /iPhone|iPad|iPod/i.test(navigator.userAgent);
|
||||
}
|
||||
|
||||
// Function to stop the MediaRecorder
|
||||
function stopStreamToServer() {
|
||||
if (mediaRecorder && mediaRecorder.state !== 'inactive') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue