PipFlutterPlayerDataSource class

Representation of data source which will be played in PipFlutter Player. Allows to setup all necessary configuration connected to video source.

Constructors

PipFlutterPlayerDataSource(PipFlutterPlayerDataSourceType type, String url, {List<int>? bytes, List<PipFlutterPlayerSubtitlesSource>? subtitles, bool? liveStream = false, Map<String, String>? headers, bool? useAsmsSubtitles = true, bool? useAsmsTracks = true, bool? useAsmsAudioTracks = true, List<String>? asmsTrackNames, Map<String, String>? resolutions, PipFlutterPlayerCacheConfiguration? cacheConfiguration, PipFlutterPlayerNotificationConfiguration? notificationConfiguration = const PipFlutterPlayerNotificationConfiguration(showNotification: false), Duration? overriddenDuration, PipFlutterPlayerVideoFormat? videoFormat, String? videoExtension, PipFlutterPlayerDrmConfiguration? drmConfiguration, Widget? placeholder, PipFlutterPlayerBufferingConfiguration bufferingConfiguration = const PipFlutterPlayerBufferingConfiguration()})
PipFlutterPlayerDataSource.file(String url, {List<PipFlutterPlayerSubtitlesSource>? subtitles, bool? useAsmsSubtitles, bool? useAsmsTracks, Map<String, String>? qualities, PipFlutterPlayerCacheConfiguration? cacheConfiguration, PipFlutterPlayerNotificationConfiguration? notificationConfiguration, Duration? overriddenDuration, Widget? placeholder})
Factory method to build file data source which uses url as data source. Bytes parameter is not used in this data source.
factory
PipFlutterPlayerDataSource.memory(List<int> bytes, {String? videoExtension, List<PipFlutterPlayerSubtitlesSource>? subtitles, bool? useAsmsSubtitles, bool? useAsmsTracks, Map<String, String>? qualities, PipFlutterPlayerCacheConfiguration? cacheConfiguration, PipFlutterPlayerNotificationConfiguration? notificationConfiguration, Duration? overriddenDuration, Widget? placeholder})
Factory method to build network data source which uses bytes as data source. Url parameter is not used in this data source.
factory
PipFlutterPlayerDataSource.network(String url, {List<PipFlutterPlayerSubtitlesSource>? subtitles, bool? liveStream, Map<String, String>? headers, bool? useAsmsSubtitles, bool? useAsmsTracks, bool? useAsmsAudioTracks, Map<String, String>? qualities, PipFlutterPlayerCacheConfiguration? cacheConfiguration, PipFlutterPlayerNotificationConfiguration notificationConfiguration = const PipFlutterPlayerNotificationConfiguration(showNotification: false), Duration? overriddenDuration, PipFlutterPlayerVideoFormat? videoFormat, PipFlutterPlayerDrmConfiguration? drmConfiguration, Widget? placeholder, PipFlutterPlayerBufferingConfiguration bufferingConfiguration = const PipFlutterPlayerBufferingConfiguration()})
Factory method to build network data source which uses url as data source Bytes parameter is not used in this data source.
factory

Properties

asmsTrackNames List<String>?
List of strings that represents tracks names. If empty, then pipflutter player will choose name based on track parameters
final
bufferingConfiguration PipFlutterPlayerBufferingConfiguration
Configuration of video buffering. Currently only supported in Android platform.
final
bytes List<int>?
List of bytes, used only in memory player
final
cacheConfiguration PipFlutterPlayerCacheConfiguration?
Optional cache configuration, used only for network data sources
final
drmConfiguration PipFlutterPlayerDrmConfiguration?
Configuration of content protection
final
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, String>?
Custom headers for player
final
liveStream bool?
Flag to determine if current data source is live stream
final
notificationConfiguration PipFlutterPlayerNotificationConfiguration?
Configuration of remote controls notification
final
overriddenDuration Duration?
Duration which will be returned instead of original duration
final
placeholder Widget?
Placeholder widget which will be shown until video load or play. This placeholder may be useful if you want to show placeholder before each video in playlist. Otherwise, you should use placeholder from PipFlutterPlayerConfiguration.
final
resolutions Map<String, String>?
Optional, alternative resolutions for non-hls/dash 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.
no setterinherited
subtitles List<PipFlutterPlayerSubtitlesSource>?
Subtitles configuration
final
type PipFlutterPlayerDataSourceType
Type of source of video
final
url String
Url of the video
final
useAsmsAudioTracks bool?
Should player use hls /das audio tracks
final
useAsmsSubtitles bool?
Should player use hls / dash subtitles (ASMS - Adaptive Streaming Media Sources).
final
useAsmsTracks bool?
Should player use hls tracks
final
videoExtension String?
Extension of video without dot.
final
videoFormat PipFlutterPlayerVideoFormat?
Video format hint when data source url has not valid extension.
final

Methods

copyWith({PipFlutterPlayerDataSourceType? type, String? url, List<int>? bytes, List<PipFlutterPlayerSubtitlesSource>? subtitles, bool? liveStream, Map<String, String>? headers, bool? useAsmsSubtitles, bool? useAsmsTracks, bool? useAsmsAudioTracks, Map<String, String>? resolutions, PipFlutterPlayerCacheConfiguration? cacheConfiguration, PipFlutterPlayerNotificationConfiguration? notificationConfiguration = const PipFlutterPlayerNotificationConfiguration(showNotification: false), Duration? overriddenDuration, PipFlutterPlayerVideoFormat? videoFormat, String? videoExtension, PipFlutterPlayerDrmConfiguration? drmConfiguration, Widget? placeholder, PipFlutterPlayerBufferingConfiguration? bufferingConfiguration = const PipFlutterPlayerBufferingConfiguration()}) PipFlutterPlayerDataSource
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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