Closed dygy closed 1 year ago
however i can't track initiator
reproduce steps:
{
autoStart: true,
autoFallback: true,
mute: true,
controls: false,
sources: [
{
label: "eu-webrtc",
type: "webrtc",
file: "wss://eu-link/webrtc",
},
{
label: "ap-webrtc",
type: "webrtc",
file: "wss://ap-link/webrtc",
},
],
};
3. make code such as
var ovenPlayer = null;
function loadOvenPlayer () {
if (ovenPlayer) {
ovenPlayer.remove();
ovenPlayer = null;
}
ovenPlayer = OvenPlayer.create({/*your_options*/});
// Reload OvenPlayer when error occured.
ovenPlayer.on('error', function () {
// Wait 1 sec and relaod.
setTimeout(function () {
loadOvenPlayer();
}, 1000)
});
}
loadOvenPlayer();
4. DDoS your system via Network Link Conditioner (for mac os) or similar, so your web-rtc closes multiple time
5. watch the console
<img width="494" alt="Screenshot 2023-09-23 at 18 28 30" src="https://github.com/AirenSoft/OvenPlayer/assets/23248488/f5f2784a-95df-458b-93d6-c6292eb58100">
Anecdotally I have seen this, if not on every single page load. I also couldn't figure out what was causing it... very interested to see what you come up with!
While removing player (call .remove()
) we set src attribute to null. It is possible that this code calls /null.
https://github.com/AirenSoft/OvenPlayer/blob/e2eb1c8612c8c6dbf460354e0a55119a5743da2b/src/js/api/media/Manager.js#L68
I will find the code that prevents requesting /null
.
after seeing such an issue for myself https://github.com/AirenSoft/OvenPlayer/issues/240 on the version I had to do a similar job as in the comments, results in version 0.10.30 or 0.10.31 I'm facing a fact that oven-player tries to GET /null/ on every re-load. And on very different projects and stacks same behavior