Streamer class

Opens a Publication using a list of parsers.

The Streamer is configured to use Readium's default parsers, which you can bypass using ignoreDefaultParsers. However, you can provide additional parsers which will take precedence over the default ones. This can also be used to provide an alternative configuration of a default parser.

@param context Application context. @param parsers Parsers used to open a publication, in addition to the default parsers. @param ignoreDefaultParsers When true, only parsers provided in parsers will be used. @param archiveFactory Opens an archive (e.g. ZIP, RAR), optionally protected by credentials. @param onCreatePublication Called on every parsed PublicationBuilder. It can be used to modify the Manifest, the root Fetcher or the list of service factories of a Publication.

Constructors

Streamer({List<StreamPublicationParser> parsers = const [], bool ignoreDefaultParsers = false, List<ContentProtection> contentProtections = const [], ArchiveFactory archiveFactory = const DefaultArchiveFactory(), required PdfDocumentFactory pdfFactory, OnCreatePublication? onCreatePublication})
Creates an instance of Streamer.

Properties

archiveFactory → ArchiveFactory
The archiveFactory instance that can create an Archive corresponding to the actual file.
final
contentProtections List<ContentProtection>
List of the ContentProtection implementation that are supported.
final
hashCode int
The hash code for this object.
no setterinherited
ignoreDefaultParsers bool
This property indicate that it should ignore default parsers when parsing a publication.
final
onCreatePublication OnCreatePublication
onCreatePublication is a callback that is called after the PublicationBuilder is created.
final
pdfFactory PdfDocumentFactory
pdfFactory provide a way to create PdfDocument instance.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
open(PublicationAsset asset, bool allowUserInteraction, {String? credentials, dynamic sender, OnCreatePublication? onCreatePublication}) Future<PublicationTry<Publication>>
Parses a Publication from the given asset.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited