Random page reloads in iOS while streaming webcam to video
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 17.6k
- Forks
- 4.4k
- PR merge metrics
- No merged PRs in 30d
Description
This is the exact same problem reported in issue 2782 in 2017 and originally resolved with this commit. I am experiencing this issue again, possibly for a different reason.
My application streams video to aframe from a remote server using WebRTC. Everything works fine until I enter VR mode and rotate the phone to landscape. It continues to work as expected, streams reliably in VR mode, and looks fine, but after 10-20 seconds, the webpage randomly refreshes.
Note that the 360-video example which this is based on, does not have the issue, so the refresh is not triggered with a normal with a source mp4, just for me when I try to stream to the video tag using WebRTC. I'm wondering whether something goes wrong in the WebRTC process (try to send corrupted data to the video tag?) which causes the refresh. This may be out of scope for A-Frame if it's a WebRTC issue, but I am wondering if there is any quick fix in A-Frame that lets me disable or otherwise mitigate these refreshes.
- A-Frame Version: 1.04
- Platform / Device: iPhone 11, iOS
- Reproducible Code Snippet or URL:
<html>
<head>
<meta charset="UTF-8"/>
<meta name="description" content="A-Frame webcam">
<title>Aframe webcam</title>
<script src="https://aframe.io/releases/1.0.4/aframe.min.js"></script>
</head>
<body>
<a-scene>
<a-assets>
<video id="video" autoplay="true" crossOrigin="anonymous"></video>
</a-assets>
<a-videosphere src="#video" rotation="0 180 0"></a-videosphere>
</a-scene>
<script>
window.addEventListener('click', function () {
var video = document.querySelector('#video');
if (video.paused == true) {
video.play();
} else {
video.pause();
}
}, false);
</script>
</body>
</html>
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the supplied HTML/WebRTC reproduction and compare it with the 360-video example, then read issue 2782 and pull request 2925 for the earlier resolution. Confirm whether the reload can be reproduced on the stated iPhone/iOS setup and whether the cause is in A-Frame or the WebRTC stream; document the boundary and any verified mitigation as done.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- audio-video-rtc, frontend
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100