Some improvements
This commit is contained in:
parent
bf29f728f0
commit
03a1541aa0
4 changed files with 25 additions and 21 deletions
|
@ -70,7 +70,7 @@ export const addVideoStream = (videoContainer, username, stream, isYours) => {
|
|||
|
||||
const video = videoContainer.querySelector("video")
|
||||
video.srcObject = stream
|
||||
if (CSS.supports("::-webkit-media-controls-panel"))
|
||||
if (CSS.supports("video::-webkit-media-controls-panel"))
|
||||
video.controls = "controls"
|
||||
video.addEventListener("loadedmetadata", async () => {
|
||||
if (isYours) {
|
||||
|
|
|
@ -42,6 +42,7 @@ myPeer.on("open", async (id) => {
|
|||
connectToNewUser(userId, username, stream, myPeer)
|
||||
)
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
if (error instanceof DOMException) return showNoVideoPrompt()
|
||||
|
||||
throw error
|
||||
|
|
Reference in a new issue