You should put BetterPlayerSubtitlesConfiguration in BetterPlayerConfiguration. You can provide subtitles configuration with this class. /Defines flag which enabled/disabled auto dispose on BetterPlayer dispose. /Defines flag which enables/disables lifecycle handling (pause on app closed, / and value will beįinal bool autoDetectFullscreenDeviceOrientation /then video will be played horizontally. /Defines if player should auto detect full screen device orientation based If null, then default english translations /Defines function which will react on player visibility changedįinal Function(double visibilityFraction) playerVisibilit圜hangedBehavior /Angle will rotate only video box, controls will be in the same place. /Defines rotation of the video in degrees. /Defines fit of the video, allows to fix video stretching, see possible / Defines a event listener where video player events will be sendįinal Function(BetterPlayerEvent) eventListener įinal BetterPlayerSubtitlesConfiguration subtitlesConfiguration įinal BetterPlayerControlsConfiguration controlsConfiguration / Defines a custom RoutePageBuilder for the fullscreenįinal BetterPlayerRoutePageBuilder routePageBuilder / Defines the set of allowed device orientations after exiting fullscreenįinal List deviceOrientationsAfterFullScreen / Defines the system overlays visible after exiting fullscreenįinal List systemOverlaysAfterFullScreen / Defines the set of allowed device orientations on entering fullscreenįinal List deviceOrientationsOnFullScreen / Defines aspect ratio which will be used in fullscreen / Defines if the player will sleep in fullscreen or not / Defines if the player will start in fullscreen when play is pressed / A widget which is placed between the video and the controls / displayed on the bottom, so user need to hide it manually. / Placeholder position of player stack. / Should the placeholder be shown until play is pressed / The placeholder is displayed underneath the Video before it is initialized / Will fallback to fitting within the space allowed. Call createMicrophoneAudioTrack to create a MicrophoneAudioTrack object and call createCameraVideoTrack to create a CameraVideoTrack object. Call AgoraRTCClient.join to join a specified channel. / When the video playback runs into an error, you can build a customįinal Widget Function(BuildContext context, String errorMessage) errorBuilder The process of implementing a basic video call is as follows: Call createClient to create an AgoraRTCClient object with your App ID. / Weather or not to show the controls when initializing the widget. Possible configuration options: /// Play the video as soon as it's displayed var betterPlayerConfiguration = BetterPlayerConfiguration( You can provide configuration to your player when creating BetterPlayerController. You can pass multiple subtitles for one video: var dataSource = BetterPlayerDataSource( Here is an example: build(BuildContext context) /example_subtitles.srt", There methods setup basic configuration for you and allows you to start using player in few seconds. There are 2 basic methods which you can use to setup Better Player: work(url, configuration) Import 'package:better_player/better_player.dart' Ĭheck Example project which shows how to use Better Player in different scenarios. ✔️ HLS support (track, subtitles selection) ✔️ Subtitles support: (formats: SRT, WEBVTT with HTML tags support subtitles from HLS multiple subtitles for video) Better player fix common bugs, adds more configuration options and solves typical use cases. Better Player is a continuation of ideas introduced in Chewie. Chewie is awesome plugin and works well in many cases. function generateToken(channelName: string, userAccount: string, expirationTime: FirebaseFirestore.Better video player for Flutter, with multiple configuration options. This is my cloud Function for generating an agora token. > Note: Channel is successful join but not able to connect video call. But problem is that it's working when I am starting a video call, I am unable to connect with another participant. I am generating an agora token with buildTokenWithAccount(), token is generated Successful and stored in Firebase. I have a collection of consultations where I have a doctor and patient IDs as well I have a consultation start time and end time.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |