Replies: 0 comments 2 replies
-
In R2 (at the moment) resources are also served through an HTTP server, so you can also use it to provide URLs to ExoPlayer. In the Readium Web Publication models used in R2, val audioLinks = publication.resources.filter { it.mediaType.isAudio } Then you can concatenate the base URL used to serve the publication on the server when adding the publication to the link's href to get the full URL: val baseUrl = Publication.localBaseUrlOf(publicationFilename, server.port)
val url = baseUrl + audioLinks[0].href |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In R1, We used to play the audio epub using exo-player(native player) by starting EpubServer.
Start Server:
EpubServer mServer = new EpubServer(EpubServer.HTTP_HOST, EpubServer.HTTP_PORT,
mContainer.getDefaultPackage(), false, null, getApplicationContext());
mServer.setAudioPlayingStatus();
mServer.startServer();
After starting the server, we used to supply the url( mContainer.getDefaultPackage().getManifestItem(position).getHref()) to the exo-player. now exo-player plays locally. (Epub server acts as a local server and exo-payer will communicate using url "http://127.0.0.1:8080/track1")
In R2 is there a way we can achieve the same behavior(we need to use a native player to give more controls)?
Beta Was this translation helpful? Give feedback.
All reactions