Safari seems to be having trouble locating the variable MediaRecorder

I've encountered an issue while working on a video chat application and attempting to record the video. Specifically, I'm struggling with recording the local Stream or Remote Stream in the Safari browser. An error message stating "can't find variable: MediaRecorder" keeps popping up.

Below is my code snippet:

function startRecording() {

    recordedBlobs = [];

    var options = { mimeType: 'video/webm;codecs=vp9' };
    if (!MediaRecorder.isTypeSupported(options.mimeType)) {
        console.log(options.mimeType + ' is not Supported');
        options = { mimeType: 'video/webm;codecs=vp8' };
        if (!MediaRecorder.isTypeSupported(options.mimeType)) {
            console.log(options.mimeType + ' is not Supported');
            options = { mimeType: 'video/webm' };
            if (!MediaRecorder.isTypeSupported(options.mimeType)) {
                console.log(options.mimeType + ' is not Supported');
                options = { mimeType: '' };
            }
        }
    }
}

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Managing file responses in Node.js

Hey there! I've been working on implementing ajax image upload and here's how far I've gotten. This is my index.html: <!DOCTYPE HTML> <html lang="en-US"> <head> <meta charset="UTF-8> <title>File Upload ...

Is it possible to utilize a controller within a different controller?

As I work on developing an application, I am faced with the challenge of using controller functions within another controller function. Is it possible to achieve this or not? Use-case: My goal is to verify in the User collection (using mongoDB) if a user ...

Incorporate a new class into the slot's scope

I'm developing a custom table feature that allows users to customize <td> elements using a slot. Here's the current setup: <tbody> <tr v-for="(item, key) in items"> <slot :item=item"> <td v-for="(header, he ...

Getting the length of child elements in Angular using ngFor loop

Can anyone help me figure out how to check the length of a child element in my Angular *ngFor loop? I am fetching data from a real-time firebase database. What am I doing wrong? Here is the code snippet I am using: <div *ngFor="let event of events"> ...

Implementing a Div response within the actionPerformed method

I've spent hours working on this javascript/ajax code trying to get it to add a div response that was echoed by a php script. Any assistance with this would be greatly appreciated. <form id="form1" name="form1" method="post" enctype="multipart/for ...

Ways to address issues in my tree-building algorithm when the parent ID is missing

Currently, I'm in the process of creating a function to build a tree. Everything seems to be functioning correctly until I encounter a scenario where a document is added with a parentID that doesn't exist in the list. The root node is intended to ...

"Activate click event on the div element, excluding any child elements within

I need to create a list with text on the left and an image on the right. I want to set up a click event so that when clicking on the list item, it triggers some code. However, if I click on the image within the same list item, I don't want the code t ...

What is the best way to access the dimensions of a parent element in React with Hooks?

I am currently working on a new component and I am facing the challenge of obtaining the width and height of its parent <div>. Since all my components are functional ones using Hooks, the examples I found involving classes do not fit my case. Here i ...

Troubleshooting an ENOTFOUND issue in my express.js application created with nodejs

I always seem to encounter an issue when trying to redirect to another webpage (such as google.com) using my nodejs express server. The error message that consistently appears is: throw er; // Unhandled stream error in pipe. ^ Error: getaddrinfo ...

Importing Next.js with variables or conditionally importing the module

import { keyFeatures } from 'common/data/AppClassic'; I am completely new to using Next.js and templates. Despite that, I have successfully integrated i18n into my project without much difficulty. However, I now face the challenge of wanting to ...

The process of transferring information from a JSON API to TypeScript models

When working with my JSON API in my services, I need to pass the data to my models. What is the most efficient way to accomplish this task? Currently, I am following this process: import { Attachment } from '.'; export class Contact { id: nu ...

The function queryDatabases is not supported in the DocumentDB JavaScript API

Currently, I am developing a service for Azure Functions using JavaScript/Node.js. However, I encounter an error when trying to access the function DocumentClient.queryDatabases. Despite having the correct references installed in Visual Studio Code and bei ...

Error message indicating unauthorized access while trying to implement Backbone with Slim framework and Tuupola basic authentication

I've been working on connecting my Backbone app with my server API (using Slim) and have implemented Tuppola / Basic Auth Middleware to handle authentication. The setup is fairly simple, as I'm just trying to make it work. When I access the serv ...

MongooseError: The operation `users.findOne()` has encountered an issue

While working on my movie website, I encountered an issue when setting up the login feature. When trying to register using POST through Insomnia, I received an error message stating "MongooseError: Operation users.findOne() buffering timed out after 10000m ...

Identify the specific code that will be executed upon pressing a button - checkbox restriction

Check out my code example on jsfiddle: https://jsfiddle.net/elenderg/wzarrg06/63/ In the first div, there are 10 buttons. See image below: https://i.sstatic.net/BDdtG.png <button class='btn btn-info custom' onclick="myFunction()" ...

Simply click on a single checkbox in ReactJS

Is there a way to implement a method in which clicking on one checkbox will automatically deselect the other checkboxes, allowing only one selection at a time? import React, { Component } from 'react'; export default class Tablerow extends Comp ...

Update the array by incorporating a new object that corresponds to a provided list with a unique key-value pair

When selecting objects from a list using a checkbox, I want to make the selection recognizable by adding a new key-value pair to the selected objects with the label of the selected value. This is what I have tried: var checkCheckboxOnOff = [{"fieldName": ...

Guide to refreshing extensive dataset using MySQL migration scripts

We are in the process of developing a Nodejs application for a client who has requested that we use migration scripts to streamline updating the production database. As someone new to MySQL, I am struggling with how to update table contents using only MySQ ...

Transferring an array from PHP to JavaScript within a function

Having trouble accessing the array returned by a PHP function in JavaScript. Instead of seeing the actual array, I get the message: function Array() { [native code] } How can I retrieve and work with the items in the array? When I try using alert(pad ...

Pause animation when the mouse leaves the screen

After searching through various resources, I couldn't find a definitive solution to my issue. The problem I am facing is that when the .mouseenter(function(){ }) function is triggered, and immediately followed by the .mouseleave(function(){ }) functio ...