BetterPlayerDataSource class

Constructors

BetterPlayerDataSource(BetterPlayerDataSourceType type, String url, {List<int> bytes, List<BetterPlayerSubtitlesSource> subtitles, bool liveStream = false, Map<String, String> headers, bool useHlsSubtitles = true, bool useHlsTracks = true, List<String> hlsTrackNames, Map<String, String> resolutions, BetterPlayerCacheConfiguration cacheConfiguration, BetterPlayerNotificationConfiguration notificationConfiguration = const BetterPlayerNotificationConfiguration(showNotification: false), Duration overriddenDuration})
BetterPlayerDataSource.file(String url, {List<BetterPlayerSubtitlesSource> subtitles, bool useHlsSubtitles, bool useHlsTracks, Map<String, String> qualities, BetterPlayerCacheConfiguration cacheConfiguration, BetterPlayerNotificationConfiguration notificationConfiguration, Duration overriddenDuration})
Factory method to build file data source which uses url as data source. Bytes parameter is not used in this data source.
factory
BetterPlayerDataSource.memory(List<int> bytes, {List<BetterPlayerSubtitlesSource> subtitles, bool useHlsSubtitles, bool useHlsTracks, Map<String, String> qualities, BetterPlayerCacheConfiguration cacheConfiguration, BetterPlayerNotificationConfiguration notificationConfiguration, Duration overriddenDuration})
Factory method to build network data source which uses bytes as data source. Url parameter is not used in this data source.
factory
BetterPlayerDataSource.network(String url, {List<BetterPlayerSubtitlesSource> subtitles, bool liveStream, Map<String, String> headers, bool useHlsSubtitles, bool useHlsTracks, Map<String, String> qualities, BetterPlayerCacheConfiguration cacheConfiguration, BetterPlayerNotificationConfiguration notificationConfiguration, Duration overriddenDuration})
Factory method to build network data source which uses url as data source Bytes parameter is not used in this data source.
factory

Properties

bytes → List<int>
List of bytes, used only in memory player
final
cacheConfiguration BetterPlayerCacheConfiguration
Optional cache configuration, used only for network data sources
final
hashCode → int
The hash code for this object. [...]
read-only, inherited
headers → Map<String, String>
Custom headers for player
final
hlsTrackNames → List<String>
List of strings that represents tracks names. If empty, then better player will choose name based on track parameters
final
liveStream → bool
Flag to determine if current data source is live stream
final
notificationConfiguration BetterPlayerNotificationConfiguration
Configuration of remote controls notification
final
overriddenDuration → Duration
Duration which will be returned instead of original duration
final
resolutions → Map<String, String>
Optional, alternative resolutions for non-hls video. Used to setup different qualities for video. Data should be in given format: {"360p": "url", "540p": "url2" }
final
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited
subtitles → List<BetterPlayerSubtitlesSource>
Subtitles configuration
final
type BetterPlayerDataSourceType
Type of source of video
final
url → String
Url of the video
final
useHlsSubtitles → bool
Should player use hls subtitles
final
useHlsTracks → bool
Should player use hls tracks
final

Methods

copyWith({BetterPlayerDataSourceType type, String url, List<int> bytes, List<BetterPlayerSubtitlesSource> subtitles, bool liveStream, Map<String, String> headers, bool useHlsSubtitles, bool useHlsTracks, Map<String, String> resolutions, BetterPlayerCacheConfiguration cacheConfiguration, BetterPlayerNotificationConfiguration notificationConfiguration, Duration overriddenDuration}) BetterPlayerDataSource
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator. [...]
inherited