Skip to content
Snippets Groups Projects
Commit b7eae54d authored by Robert Long's avatar Robert Long
Browse files

Merge branch 'bug/networked-video' of...

Merge branch 'bug/networked-video' of https://github.com/mozilla/mr-social-client into bug/networked-video
parents 0d1bb50d c8607b4f
No related branches found
No related tags found
No related merge requests found
:local(.video) {
height: 100px;
/* 1x1px so that Safari on iOS allows us to autoplay the video */
width: 1px; height: 1px; /* toggle to show debug video elements */
background: black;
margin: 5px;
}
:local(.container) {
position: absolute;
bottom: 0;
display: flex;
visibility: hidden; /* toggle to show debug video elements */
width: 10px; height: 10px; /* toggle to show debug video elements */
}
......@@ -32,6 +32,10 @@ AFRAME.registerComponent("networked-video-player", {
const v = document.createElement("video");
v.id = `nvp-video-${ownerId}`;
// muted and autoplay so that more restrictive browsers (e.g. Safari on iOS) will actually play the video.
v.muted = true;
v.autoplay = true;
v.playsInline = true;
v.classList.add(styles.video);
v.srcObject = new MediaStream(stream.getVideoTracks()); // We only want the video track so make a new MediaStream
container.appendChild(v);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment