-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
406e1c8
commit c5f934c
Showing
8 changed files
with
123 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,22 @@ | ||
import 'dart:ui'; | ||
|
||
class ApiVideoLiveStreamEventsListener { | ||
mixin ApiVideoLiveStreamEventsListener { | ||
/// Gets notified when the connection is successful | ||
final VoidCallback? onConnectionSuccess; | ||
void onConnectionSuccess() {} | ||
|
||
/// Gets notified when the connection failed | ||
final Function(String)? onConnectionFailed; | ||
void onConnectionFailed(String reason) {} | ||
|
||
/// Gets notified when the device has been disconnected | ||
final VoidCallback? onDisconnection; | ||
void onDisconnection() {} | ||
|
||
/// Gets notified when the video size has changed. Mostly designed to update Widget aspect ratio. | ||
final Function(Size)? onVideoSizeChanged; | ||
void onVideoSizeChanged(Size size) {} | ||
|
||
/// Gets notified when an error occurs | ||
final Function(Exception)? onError; | ||
|
||
ApiVideoLiveStreamEventsListener( | ||
{this.onConnectionSuccess, | ||
this.onConnectionFailed, | ||
this.onDisconnection, | ||
this.onVideoSizeChanged, | ||
this.onError}); | ||
void onError(Exception error) {} | ||
} | ||
|
||
class ApiVideoLiveStreamWidgetListener { | ||
final VoidCallback? onTextureReady; | ||
|
||
ApiVideoLiveStreamWidgetListener({this.onTextureReady}); | ||
mixin ApiVideoLiveStreamWidgetListener { | ||
void onTextureReady() {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters