-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactored THEOlive interfaces and new PublicationState property
- Loading branch information
Daniel Dallos
committed
Oct 18, 2024
1 parent
d39aa55
commit 14932f8
Showing
3 changed files
with
56 additions
and
17 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
8 changes: 8 additions & 0 deletions
8
...r_theoplayer_sdk/flutter_theoplayer_sdk_platform_interface/lib/theolive/theolive_api.dart
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,7 +1,15 @@ | ||
import 'package:theoplayer_platform_interface/theoplayer_event_dispatcher_interface.dart'; | ||
|
||
|
||
/// Callback that's triggered every time the internal player state is changing. See [THEOplayer.setStateListener]. | ||
typedef THEOliveStateChangeListener = void Function(); | ||
|
||
abstract class THEOlive implements EventDispatcher{ | ||
void preloadChannels(List<String> channelIDs); | ||
void set badNetworkMode(bool badNetworkMode); | ||
bool get badNetworkMode; | ||
void setStateListener(THEOliveStateChangeListener listener); | ||
PublicationState get publicationState; | ||
} | ||
|
||
enum PublicationState { idle, loading, loaded, intentToFallback, offline } |
9 changes: 6 additions & 3 deletions
9
...yer_sdk/flutter_theoplayer_sdk_platform_interface/lib/theolive/theolive_internal_api.dart
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,5 +1,8 @@ | ||
import 'package:theoplayer_platform_interface/theolive/theolive_api.dart'; | ||
import 'package:theoplayer_platform_interface/theoplayer_event_dispatcher_interface.dart'; | ||
|
||
abstract class THEOliveInternalInterface extends THEOlive { | ||
abstract class THEOliveInternalInterface implements EventDispatcher { | ||
void preloadChannels(List<String> channelIDs); | ||
void set badNetworkMode(bool badNetworkMode); | ||
bool get badNetworkMode; | ||
void dispose(); | ||
} | ||
} |