create Sync Media Player
Creates a new SyncMediaPlayer. Use for playing synchronized media such as EPUB Media Overlays or TTS (Text-To-Speech). You can create SyncMediaTimeline instances from publications using the format specific ReaderPublication instances. For example EpubReaderPublication.createMediaOverlaySyncMediaTimeline() or PdfReaderPublication.createTtsSyncMediaTimeline()`.
A SyncMediaPlayer can be attached to a ReaderView by assigning the player to ReaderView.setSyncMediaPlayer. When a SyncMediaPlayer is attached to a ReaderView, they are able to synchronize positions and enable features such as text highlighting (if the synchronized media format supports it).
The SyncMediaPlayer can playback audio content using a WebView audio player.
Creates a new SyncMediaPlayer from an existing ColibrioAudioPlayer.
Use this to reconnect the ReaderView with your audio player using ReaderView.setSyncMediaPlayer.
Returns ColibrioResult.Error when colibrioAudioPlayer cannot be synchronized:
it is destroyed — create a new one with AudioReadingSystemEngine.createAudioPlayer;
a reload is still in progress — retry once it has finished;
a SyncMediaPlayer created by this engine is already driving it — destroy that one with destroySyncMediaPlayer first.
A player still driven by a SyncMediaPlayer that a different engine created is taken over rather than refused, which is the usual case after the ColibrioReadingSystemView it belonged to was destroyed.
A player that stops being usable while this call is in progress is refused in the same way.
If the calling coroutine is cancelled, any SyncMediaPlayer this call already created is destroyed before the cancellation propagates, so colibrioAudioPlayer is never left driven by one you did not receive.