set On Renderer Process Crash
Sets a callback that will be called if the WebView process crashes.
When this callback is called, this ColibrioReadingSystemView, and its associated ReaderView, ReaderPublication, SyncMediaPlayer, etc. will no longer work as expected: some methods return an error, while others report success and emit events for changes the engine never applies. Do not trust state read from these objects, and do not rely on their destroyed flags to detect this state - SyncMediaPlayer.destroyed, for example, is not set by the crash. Drop all references to these objects once you have finished the recovery described below.
To recover, call destroy on this view to clean up its resources, remove it from the view tree, then create a new ColibrioReadingSystemView and reload the publication. See the guide "Handle and test webview process getting terminated" for details, including how to trigger a renderer crash in testing and how to avoid a crash-reload loop: https://docs.colibrio.com/docs/guides/handle-test-and-webview-process-getting-terminated.html
Recovering a connected ColibrioAudioPlayer
If a ColibrioAudioPlayer was connected to a SyncMediaPlayer through ReadingSystemEngine.createSyncMediaPlayer, native audio playback keeps running after the crash but can no longer be controlled: play(), pause() and seeks on the audio player, its volume, muted and playbackRate setters, and the media notification's play, pause, skip and seek buttons all have no effect. Playback continues until your app does one of the following. Choose exactly one, and do not disconnect first - that can make playback audible again before it is stopped.
Continue playback. Call ReadingSystemEngine.destroySyncMediaPlayer with the connected player. It does not need the crashed renderer process, so it still takes effect: the ColibrioAudioPlayer stops being driven by it, so calls you make on the ColibrioAudioPlayer itself, and the media notification, take effect again. A
pause()orplay()call made just before the crash that never reached the player is applied as part of the disconnect. Keep the audio publication'sResourceProvideropen for as long as playback continues, and reconnect the player to the new view with ReadingSystemEngine.createSyncMediaPlayer.Stop playback. Call AudioReadingSystemEngine.destroyAudioPlayer. This stops audio playback, removes the media notification and stops the playback service.