-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Closed as not planned
Closed as not planned
Copy link
Labels
AI HandledThis issue is fixed by AI, or the PR is reviewed by AI, or the discussion is replied to by AI.This issue is fixed by AI, or the PR is reviewed by AI, or the discussion is replied to by AI.EnglishNativeThis issue is conveyed exclusively in English.This issue is conveyed exclusively in English.
Description
html code
<script type="text/javascript">
$(function() {
let sdk = null;
const startPublish = async function() {
const videoElement = $('#rtc_media_player')[0];
try {
const stream = await navigator.mediaDevices.getUserMedia({
video: {
width: { ideal: 3840 }, // 4K
height: { ideal: 2160}, // 4K
frameRate: { ideal: 60, max: 120 } //
},
audio: true //
});
if (sdk) {
sdk.close();
}
sdk = new SrsRtcPublisherAsync();
videoElement.srcObject = stream;
sdk.stream = stream;
const url = "webrtc://xxxxxx";
await sdk.publish(url);
console.log("success!");
alert("success");
} catch (error) {
console.error("failed :", error);
alert("failed : " + error.message);
if (sdk) sdk.close();
}
};
$("#btn_publish").click(startPublish);
});
</script>
srs.sdk.js code
self.constraints = {
audio: true,
video: {
width: {ideal: 3840},
height: { ideal: 2160 },
frameRate: { ideal: 60, max: 120 }
// facingMode: 'environment'
}
};
But the actual recording is 720 * 1280 should i need to configure any additional information
Metadata
Metadata
Assignees
Labels
AI HandledThis issue is fixed by AI, or the PR is reviewed by AI, or the discussion is replied to by AI.This issue is fixed by AI, or the PR is reviewed by AI, or the discussion is replied to by AI.EnglishNativeThis issue is conveyed exclusively in English.This issue is conveyed exclusively in English.