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})

Properties

archiveFactory → ArchiveFactory
final
contentProtections List<ContentProtection>
final
defaultParsers List<StreamPublicationParser>
no setter
hashCode int
The hash code for this object.
no setterinherited
ignoreDefaultParsers bool
final
onCreatePublication OnCreatePublication
final
parsers List<StreamPublicationParser>
no setter
pdfFactory PdfDocumentFactory
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