AgoraIO-Community / OpenAgoraWeb-React

Video Call App built with :heart:Agora SDK:heart: and React
MIT License
100 stars 43 forks source link

Player 0 video Status Changed Detected by Timer: init=>paused Javascript #10

Open xAlstrat opened 5 years ago

xAlstrat commented 5 years ago

I'm trying to show a preview of the users webcam before publishing to the client/room.

local_stream.play('my-dom') works okay when there is no other users in the room: the user can see himself before and after publishing (client.publish(local_stream)). But when is there other users in the room, playing the local stream (before publishing it) doesn't seem to work.

The console shows 'Player 0 video Status Changed Detected by Timer: init=>paused'.

Using local_stream.resume() didn't work. Playing it again logs that the stream is paused and can't be played again, just resumed.

Thanks !

Matrixbirds commented 5 years ago

@xAlstrat Please provide your web browser environment i will try to reproduce it ASAP.

xAlstrat commented 5 years ago

The browser is firefox 68.0, and the SO Ubuntu 16.

Publishing resumes the video stream (but also means that the webcam preview won't be a preview anymore).

The solution I found was to stop the stream and to play it again to the same DOM instead of using resume(). I think is a problem of the web sdk.

Thanks!

plutoless commented 5 years ago

is there any dom changes happening to your local stream dom? i'm wondering if it's because you 1. played video first 2. change the dom, which causes video play to pause?

Kailash-Malviya-bs commented 4 years ago

so @plutoless if that is the case I mean if dom changes are there then what to do because I'm getting the same issue dom changes are there in my case how can I resolve that could you please assist me on this

plutoless commented 4 years ago

@Kailash-Malviya-bs dom change should be expected behavior controlled by app logic. before you are going to change the video dom you will need to stop the stream and call play again when you new dom is ready