8thwall / web

8th Wall Web projects and resources.
519 stars 326 forks source link

dispatch events on recorder start, stop and error events #178

Closed vejandla closed 3 years ago

vejandla commented 3 years ago

Currently, when users need to subscribe to a record start event, the only option is to find the dom element and add an event listener for touchstart event. This works fine in a vanilla JavaScript environment. But with SPA frameworks like Angular or React, it is hard to get hold of the recorder button as it gets added to the dom by Xtras library dynamically.

Secondly, Xtras library is already dispatching events for several recorder events, not sure why we avoided events for start, stop, and error.

https://www.8thwall.com/docs/web/#xr8mediarecorderrecordvideo

vejandla commented 3 years ago

@atomarch fixed the typos.. Sorry. forgot to save the file, before.

atomarch commented 3 years ago

Awesome, thanks for the contribution!

vejandla commented 3 years ago

@atomarch When will we possibly see a release with these changes? I'm currently using CDN URL.

<script src="//cdn.8thwall.com/web/xrextras/xrextras.js" type="text/javascript" />