MethodChannelFlutterP2pEngine class
An implementation of FlutterP2pEnginePlatform that uses method channels.
- Inheritance
-
- Object
- PlatformInterface
- FlutterP2pEnginePlatform
- MethodChannelFlutterP2pEngine
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
disableP2p(
) → Future< void> -
override
-
enableP2p(
) → Future< void> -
override
-
getPeerId(
) → Future< String> -
Get the peer ID of p2p engine. 获取P2P Engine的peer ID
override
-
getSDKVersion(
) → Future< String> -
override
-
init(
dynamic token, {required P2pConfig config, void infoListener(Map< String, dynamic> )?, bool bufferedDurationGeneratorEnable = false}) → Future<int> -
Create a new instance with token and the specified config.
override
-
isConnected(
) → Future< bool> -
Get the connection state of p2p engine. 获取P2P Engine的连接状态
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyPlaybackStalled(
) → Future< void> -
override
-
parseStreamURL(
String sourceUrl, {String? videoId, Duration bufferedDurationGenerator()?}) → Future< String> -
Get parsed local stream url by passing the original stream url(m3u8) to CBP2pEngine instance.
override
-
restartP2p(
) → Future< void> -
Restart p2p engine.
override
-
setHttpHeadersForDash(
Map< String, String> ? headers) → Future<void> -
override
-
setHttpHeadersForHls(
Map< String, String> ? headers) → Future<void> -
override
-
shutdown(
) → Future< void> -
override
-
stopP2p(
) → Future< void> -
Stop p2p and free used resources.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited