streamingTest : DOMException: The play() request was interrupted by a call to pause() janus.js:310

937 views
Skip to first unread message

손을준

unread,
Jan 28, 2021, 9:02:38 AM1/28/21
to meetecho-janus

i am following the streaming demo
if i ran this,
Uncaught (in promise) DOMException: The play() request was interrupted by a call to pause() error came out
and there is only spinner and never came out the video

Insert the controller option into the video tag and press the play button, the player play well.

my js code is https://pastebin.com/nUbn07kZ
html is https://pastebin.com/d306mPiY
and my chrome log is https://pastebin.com/p7e3WStE

What did I miss?

august black

unread,
Jan 28, 2021, 9:49:26 AM1/28/21
to 손을준, meetecho-janus

the .play() function on media elements is now promise based.


at the very least, you should add a .catch(console.log)

In my experience, the behaviour of playing media elements is still pretty weird in browsers.
You will get that exception here and there for what appears to be no reason.
Maybe someone on this list has a better understanding and can clarify.

If you .catch() you can at least move on and do something about it.



--
You received this message because you are subscribed to the Google Groups "meetecho-janus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to meetecho-janu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/meetecho-janus/dd1433d1-0270-41d4-82ad-b613cc21c345n%40googlegroups.com.

Mirko Brankovic

unread,
Jan 28, 2021, 10:55:16 AM1/28/21
to meetecho-janus
play requires a user action from recently, so refreshing the page won't start the stream automagically :D



--
Regards,
Mirko
Reply all
Reply to author
Forward
0 new messages