OpenTokController class
Controls OpenTok video platform and provides updates when the state is changing.
The publisher/subscriber video is displayed in a Flutter app by creating a OpenTokView widget.
- Inheritance
-
- Object
- ChangeNotifier
- ValueNotifier<
OpenTokValue> - OpenTokController
Constructors
- OpenTokController.new()
- Constructs a OpenTokController.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value ↔ OpenTokValue
-
The current value stored in this notifier.
getter/setter pairinherited
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
dispose(
) → void -
Discards any resources used by the object. After this is called, the
object is not in a usable state and should be discarded (calls to
addListener will throw after the object is disposed).
inherited
-
disposeVideo(
) → void - Disposes the already ended session so that the hardware resources can be freed.
-
endSession(
) → void - Ends the OpenTok session.
-
initSession(
OpenTokConfig config) → void - Initiates a OpenTok session with the given open_tok.OpenTokConfig values.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
onStateUpdate(
ConnectionStateCallback connection) → void - This method gets called whenever the OpenTok session state changes.
-
pause(
) → void - Pauses the video session.
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
resume(
) → void - Resumes the video session.
-
toggleAudio(
bool enabled) → void - Enable/Disable audio (Microphone) for current OpenTok session.
-
toggleCamera(
) → void - Toggle/Switch between front/back camera if available.
-
toggleVideo(
bool enabled) → void - Enable/Disable video for current OpenTok session.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited