TXLivePlayerController class

Inheritance
Implemented types

Constructors

TXLivePlayerController.new({bool? onlyAudio})

Properties

hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
onPlayerEventBroadcast Stream<Map>
no setter
onPlayerNetStatusBroadcast Stream<Map>
no setter
onPlayerState Stream<TXPlayerState?>
no setter
playState TXPlayerState?
no setter
resizeVideoHeight double?
getter/setter pairoverride-getter
resizeVideoWidth double?
getter/setter pairoverride-getter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value TXPlayerValue?
The current value of the object. When the value changes, the callbacks registered with addListener will be invoked.
getter/setter pairoverride-getter
videoBottom double?
getter/setter pairoverride-getter
videoLeft double?
getter/setter pairoverride-getter
videoRight double?
getter/setter pairoverride-getter
videoTop double?
getter/setter pairoverride-getter

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
dispose() Future<void>
Release controller.
override
enableHardwareDecode(bool enable) Future<bool>
Enable/disable hardware encoding.
override
enableReceiveSeiMessage(bool isEnabled, int payloadType) Future<int>
Enable reception of SEI messages
enterPictureInPictureMode({String? backIconForAndroid, String? playIconForAndroid, String? pauseIconForAndroid, String? forwardIconForAndroid}) Future<int>
Enter picture-in-picture mode. To enter picture-in-picture mode, you need to adapt the interface for picture-in-picture mode. Android only supports models above 7.0.
override
exitPictureInPictureMode() Future<void>
Exit picture-in-picture mode if the player is in picture-in-picture mode.
override
getSupportedBitrate() Future<List<FSteamInfo>>
get live steam info
initialize({bool? onlyAudio}) Future<void>
Player initialization, creating shared textures and initializing the player. @param onlyAudio Whether it is pure audio mode.
override
isPlaying() Future<bool>
Whether the video is currently playing.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
onNetEvent(Map event) → void
override
onPlayerEvent(Map event) → void
event type
override
pause() Future<void>
The video is paused and must be called when the player starts playing.
override
play(String url, {int? playType}) Future<bool>
When setting a LivePlayer type player, the parameter playType is required. Reference: PlayType.LIVE_RTMP ...
playerValue() TXPlayerValue?
override
printVersionInfo() → void
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
resume() Future<void>
Resume playback, called when paused.
override
setAppID(int appId) Future<void>
Set appId 设置appId
setCacheParams(double minTime, double maxTime) Future<int>
Set the minimum and maximum time for automatic adjustment of player cache (unit: seconds)
setConfig(FTXLivePlayConfig config) Future<void>
Set player configuration.
setLiveMode(TXPlayerLiveMode mode) Future<void>
Set live mode, see TXPlayerLiveMode.
setMute(bool mute) Future<void>
Set whether to mute.
override
setPlayerView(int renderViewId) Future<void>
override
setProperty(String key, Object value) Future<int>
Call the advanced API interface of V2TXLivePlayer
setRenderMode(FTXPlayerRenderMode renderMode) Future<void>
override
setVolume(int volume) Future<void>
Set video volume 0~100.
showDebugView(bool isShow) Future<void>
Whether to display the debugging overlay of player status information
startLivePlay(String url, {int? playType}) Future<bool>
Starting from version 10.7, the method startPlay has been changed to startLivePlay for playing videos via a URL. To play videos successfully, it is necessary to set the license by using the method SuperPlayerPlugin#setGlobalLicense. Failure to set the license will result in video playback failure (a black screen). Live streaming, short video, and video playback licenses can all be used. If you do not have any of the above licenses, you can apply for a free trial license to play videos normallyQuickly apply for a free trial version Licence (https://cloud.tencent.com/act/event/License).Official licenses can be purchased (https://cloud.tencent.com/document/product/881/74588#.E8.B4.AD.E4.B9.B0.E5.B9.B6.E6.96.B0.E5.BB.BA.E6.AD.A3.E5.BC.8F.E7.89.88-license). @param url : 视频播放地址 video playback address return 是否播放成功 if play successfully
stop({bool isNeedClear = false}) Future<bool>
Stop playing. return Whether to stop successfully.
override
switchStream(String url) Future<int>
Switch playback stream.
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

kTag String
getter/setter pair