"Encountering a freeze in mobile Chrome while subscribing to streamCreated events using Opent

Currently, I am working on developing a webRTC chat using the opentok platform and vue.js. Everything seems to be working fine on desktop and mobile Firefox browsers, but I am facing an issue with mobile Chrome when trying to subscribe to the event stream. An interesting observation is that activating developer tools resolves the problem in mobile Chrome, making it difficult for me to debug the error logs. I have been trying to troubleshoot this for three days now without any luck. Any assistance would be greatly appreciated! Below is the relevant snippet of my code:

// Initiating the live video session
startLivevideoSession: function(session){

    this.call = true; // Setting call to true

    // Initializing opentok session
    this.LiveVideo_session = OT.initSession(session.apiKey, session.session)

    // Defining the 'streamCreated' method
    this.LiveVideo_session.on('streamCreated', function(event) {

            // The problematic section:
            this.LiveVideo_session.subscribe(event.stream, 'stream_video1', {
                  height: '100%',
                  width: '100%',
                  showControls: true,
                  style: {
                    audioLevelDisplayMode: 'auto',
                    buttonDisplayMode: 'off',
                    nameDisplayMode: 'off',
                    videoDisabledDisplayMode: 'auto',
                    showArchiveStatus: false
                  }
            }, this.handleError)
            // End of problematic section

        }.bind(this))

    // Defining the 'sessionDisconnected' method
    this.LiveVideo_session.on("sessionDisconnected", function (event) {

            if(this.call){
                this.stopVideoButtonPress() // Stopping ongoing chat session if any
                bus.$emit('showModal', "stopLivevideoSessionLeft"); // Notifying user that the other user left the page
            }
        }.bind(this))

    // Defining the connect method
    this.LiveVideo_session.connect(session.token, function(error) {

            if(error){
                this.handleError(error)
            } else {

                // If call mode is chat, do not publish video at all
                if(this.call_mode != 'chat'){
                    this.LiveVideo_session.publish(this.my_video); // Publishing my video to the chatroom
                }

                // If test session is active, also publish stream to 'stream_video1'
                if(this.testSession){
                    this.LiveVideo_session.publish(this.test_publisher)
                }
            }

        }.bind(this));

    this.premium_session = session.premium_session;

    setTimeout(() => {
        
        if(this.call_mode == "audio") { 
            var publisherOptions = {
              videoSource: null,
              name: this.connection_setup.stream_video_description+" (vain ääni)",
              width: '100%',
              height: '100%',
              opaque: '1',
              style: {
                nameDisplayMode: "on",
                audioLevelDisplayMode: "on"
                }
            };
        } else {
            var publisherOptions = {
              name: this.connection_setup.stream_video_description,
              width: '100%',
              height: '100%',
              opaque: '1',
              style: {
                nameDisplayMode: "on",
                audioLevelDisplayMode: "on"
                }
            };
        }

        if(this.call_mode != 'chat'){
            console.log("call mode"+this.call_mode);
            this.my_video = OT.initPublisher('my_video', publisherOptions, this.handleError);
        }

        if(this.testSession){
            console.log("call testSession "+this.testSession);
            publisherOptions.name = 'Sinun kuvasi keskustelukumppanin näkemänä';
            this.test_publisher = OT.initPublisher('stream_video1', publisherOptions, this.handleError);
        }

    }, 600);

},

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

What's the best way to undo a CSS transition animation when deleting an active class?

I'm currenty working on a straightforward icon animation within a VueJS application. I've implemented a Vue transition to create a fade effect on the background elements, but I'm exploring options for a subtle upward shift animation specific ...

The error message says: "VueComponent.filterKategori function cannot read property 'filter' because it is undefined at line 16260 in app.js."

this is the code snippet that I'm dealing with: computed: { filterKategori() { var kategori = this.kategori.data.filter(f => { return f.induk == null && f.id_klasifikasi == this.id_klasifikasi; }); return kat ...

What is the best way to determine if a page component is using a specific definePageMeta layout?

My application's page layout is now dynamic based on the current user. However, I want to verify if the current page has explicitly defined its layout to prevent it from being overridden by the watchEffect below. (app.vue) <template> <Nuxt ...

When trying to authorize my channel, the JSON data is coming back as a blank string

I've encountered an issue with my JavaScript code: Pusher is throwing the error message "JSON returned from auth endpoint was invalid, yet status code was 200. Data was: ", indicating empty data. I have double-checked the broadcasting service provider ...

How can I dynamically change the className attribute in a Vue v-for loop?

Just starting out with Vue.js and I have a question: I've been attempting this: <li v-for="(msg,index) in system_message" :class="index"> To create different classNames like 0,1,2,3 for each li element. Unfortunately, v-bin ...

Utilizing Vuex to implement a search functionality in a list

I've encountered an issue with my vueJs application. I have a list of uploaders and a search bar, but after incorporating vuex, the list is no longer rendered. Following the guidance provided in this question, I implemented the following: <templat ...

A peculiar outcome arises when running a Vue.js project folder on MacOS using the Vite development server

While working on a MacOS system, I encountered an issue when copying the entire directory of a vue.js 3 project using the command: cp -rp dir1 dir2. Subsequently, when attempting to run a development server in the copied directory (dir2) with the command: ...

What is the best way to determine the left and top coordinates when resizing a draggable image within a container?

I am struggling to correctly scale the image and set the left (x) and top (y) positions. Here is the code from my template: <div id="container" :style="`height: ${height}px;width: ${size}px;overflow: hidden;position: relative;`"> ...

Troubleshooting Error: Vue Electron Devtools Exception

Unexpectedly, a console message has been appearing when I execute npm run dev: [8492:0407/121603.977907:ERROR:CONSOLE(7830)] "Extension server error: Object not found: <top>", source: chrome-devtools://devtools/bundled/shell.js (7830) As a result, ...

Deploying Vue.js applications using Dokku

When testing my project locally in both development and production environments, it works perfectly. However, when attempting to deploy it to my DigitalOcean Ubuntu server through Dokku, the application crashes. # server.js at the root const express = req ...

Utilizing a custom component within the Vue ais-hits feature

I have been working on implementing an Algolia search page, and initially, everything was functioning correctly with the following code: <ais-hits> <template #default="{ items }"> … </template> </ais-hits> ...

Encountered an issue when executing npm command due to a permission error

My hosting is on a digitalocean droplet and my website is built in Laravel. When I try to run the following command, I encounter the attached error. The command that I am running as a root user is: npm run dev Can anyone help me with this issue? Thank y ...

There was an issue with the vue-server-renderer where the render function or template was not defined in the component

In my project with Vue 2.7 and webpack4 for SSR, I encountered an error message stating: render function or template not defined in component: anonymous. This issue arises under the following circumstances: When using a child component. <template> ...

Stop span elements from being removed within a `contenteditable` container

I am facing a challenge with an editable div that contains a span element which I would like to prevent users from deleting. My development environment is Vue3. Currently, if the user presses backspace while their cursor is to the right of the span or sel ...

Refreshing the page or directly loading it results in a blank screen being displayed

Despite researching various solutions to this common issue, none seem to work for me. Let's dive into it. I've developed a Vue 2 application integrated with Express running on AWS Amplify. When testing the app locally in 'dev' mode (np ...

Utilizing setInterval Effectively in the Vuex Store

After successfully retrieving data from the API, I encountered compatibility issues with Vue. Check out the console output here: How can I efficiently implement the use of setInterval in the Vuex store without triggering the error "mutating the vuex stor ...

How can you organize an array into rows and columns for easier viewing?

Hopefully everything is clear. I am open to making changes if needed to address any important points. In one of my components, the array items are displayed within cards as shown below: <b-card-group deck class="mb-3"> <b-card border-variant ...

Encountered an unfamiliar custom element: x while utilizing Buefy

Following the Buefy guidelines, I took the necessary steps. First, I ran: npm install Buefy Next, in my main.ts file, I imported Vue, Buefy, axios, and VueAxios like so: import Vue from 'vue'; import Buefy from 'buefy'; import axio ...

Mobile Iframe in Full View

Currently, I am working on a small project using Angular and Twitter Bootstrap. However, I have encountered a problem. I am trying to create a template that displays content in full screen upon clicking a button. The issue is that the iframe I am using wor ...

What causes the Vue.http configuration for vue-resource to be disregarded?

I am currently utilizing Vue.js 2.3.3, Vue Resource 1.3.3, and Vue Router 2.5.3 in my project while trying to configure Vue-Auth. Unfortunately, I keep encountering a console error message that reads auth.js?b7de:487 Error (@websanova/vue-auth): vue-resour ...