Fix lack of onError
event
The native code was receiving the event, but not reasing the event. Which [apparently](https://github.com/microsoft/react-native-windows/issues/4206) needs to be prefixed with "top" and then that turns into "onError". Note that this raises the event, but no error object is included. Better than nothing.
This commit is contained in:
parent
3f48c64364
commit
06593344f6
@ -132,7 +132,13 @@ void ReactVideoView::OnMediaOpened(IInspectable const &, IInspectable const &) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReactVideoView::OnMediaFailed(IInspectable const &, IInspectable const &) {}
|
void ReactVideoView::OnMediaFailed(IInspectable const &, IInspectable const &) {
|
||||||
|
runOnQueue([weak_this{get_weak()}]() {
|
||||||
|
if (auto strong_this{weak_this.get()}) {
|
||||||
|
strong_this->m_reactContext.DispatchEvent(*strong_this, L"topError", nullptr);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
void ReactVideoView::OnMediaEnded(IInspectable const &, IInspectable const &) {
|
void ReactVideoView::OnMediaEnded(IInspectable const &, IInspectable const &) {
|
||||||
runOnQueue([weak_this{get_weak()}]() {
|
runOnQueue([weak_this{get_weak()}]() {
|
||||||
|
Loading…
Reference in New Issue
Block a user