Skip to content

Commit

Permalink
Minor media3 navigator fixes (readium#447)
Browse files Browse the repository at this point in the history
  • Loading branch information
qnga authored Jan 16, 2024
1 parent cb9d2c0 commit eb2f4e3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ internal class DefaultMediaMetadataFactory(
// byte array will go cross processes and should be kept small
publication.coverFitting(Size(400, 400))
?.compress(Bitmap.CompressFormat.PNG, 80, byteStream)
byteStream.toByteArray()
?.let { byteStream.toByteArray() }
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import org.readium.r2.shared.util.format.AdeptSpecification
import org.readium.r2.shared.util.format.LcpSpecification

/**
* [ContentProtection] implementation used as a fallback by when detecting known DRMs
* [ContentProtection] implementation used as a fallback when detecting known DRMs
* not supported by the app.
*/
public class FallbackContentProtection : ContentProtection {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public class AudioParser(
private fun parseResourceAsset(
asset: ResourceAsset
): Try<Publication.Builder, PublicationParser.ParseError> {
if (asset.format.conformsToAny(audioSpecifications)) {
if (!asset.format.conformsToAny(audioSpecifications)) {
return Try.failure(PublicationParser.ParseError.FormatNotSupported())
}

Expand Down

0 comments on commit eb2f4e3

Please sign in to comment.