flutter_kinescope_sdk 0.1.0 flutter_kinescope_sdk: ^0.1.0 copied to clipboard
Flutter plugin for the Kinescope player.
Flutter Kinescope SDK #
Flutter plugin for the Kinescope player.
This package supports Android and iOS and uses flutter_inappwebview under-the-hood.
Requirements #
- Android:
minSdkVersion 17
and add support forandroidx
(see AndroidX Migration) - iOS:
--ios-language swift
, Xcode version >= 11
Usage #
KinescopePlayer(
controller: KinescopePlayerController(
yourVideoId,
parameters: const PlayerParameters(
autoplay: true,
muted: true,
loop: true,
),
),
aspectRatio: 16 / 10,
)
Available methods #
Methods available for KinescopePlayerController
.
Method | Description |
---|---|
play() | Plays the currently cued/loaded video. |
pause() | Pauses the currently playing video. |
stop() | Stops and cancels loading of the current video. |
load(String videoId) | Loads and plays the specified video. |
getCurrentTime() | Returns current position. |
getDuration() | Returns duration of video. |
seekTo(Duration position) | Seeks to a specified time in the video. |
mute() | Mutes the player. |
ummute() | Unmutes the player. |
setVolume(double volume) | Sets the volume of player. Works only on Android. |
PlayerParameters #
You can set initial Kinescope player parameters using PlayerParameters.
Parameter | Description |
---|---|
autoplay | Specifies whether the initial video will automatically start to play when the player loads. Default = false |
muted | Mutes the player. Default = true |
loop | Restart the video automatically after it's ended. |
For a more detailed usage example, go to example.
Installation #
Add flutter_kinescope_sdk
to your pubspec.yaml
file:
dependencies:
flutter_kinescope_sdk: ^0.1.0
Changelog #
All notable changes to this project will be documented in this file.