Remove skin icons pip and fullscreen by default
This commit is contained in:
@@ -145,7 +145,7 @@ class VideoPlayerController extends ValueNotifier<VideoPlayerValue> {
|
||||
)).toList()
|
||||
);
|
||||
|
||||
final playerId = await nutPlayerPlatform.create(platformContent);
|
||||
final playerId = await nutPlayerPlatform.create(content: platformContent, params: null);
|
||||
_playerId = playerId;
|
||||
_creationHandler?.complete(null);
|
||||
_creationHandler = null;
|
||||
|
||||
@@ -45,8 +45,8 @@ class NutPlayerAndroidPlatform extends NutPlayerPlatform {
|
||||
}
|
||||
|
||||
@override
|
||||
Future<PlayerId> create(PlatformPlayerContent content) async {
|
||||
final playerId = await _pluginChannel.invokeMethod("pluginCreate", [content.toJson()]);
|
||||
Future<PlayerId> create({required PlatformPlayerContent content, Map<String, bool>? params}) async {
|
||||
final playerId = await _pluginChannel.invokeMethod("pluginCreate", [content.toJson(), params]);
|
||||
return playerId;
|
||||
}
|
||||
|
||||
|
||||
@@ -33,13 +33,12 @@ final class NutPlayerViewFactory: NSObject, FlutterPlatformViewFactory {
|
||||
let playerId = arguments["playerId"] as? Int64,
|
||||
let player = self.delegate?.player(for: playerId) {
|
||||
let settings = NutPlayerSkinPlugin.Settings(
|
||||
onPip: { onEnter in
|
||||
onPip: nil,/*{ onEnter in
|
||||
player.pipController.value >>- {
|
||||
onEnter ? $0.start() : $0.stop()
|
||||
}
|
||||
}) { onEnter in
|
||||
print("Fullscreen")
|
||||
}
|
||||
}*/
|
||||
onFullscreen: nil)
|
||||
view = NutPlayerViewBuilder()
|
||||
.defaultSkin(settings: settings)
|
||||
.build(with: player)
|
||||
|
||||
@@ -46,8 +46,8 @@ class NutPlayerIosPlatform extends NutPlayerPlatform {
|
||||
}
|
||||
|
||||
@override
|
||||
Future<PlayerId> create(PlatformPlayerContent content) async {
|
||||
final playerId = await _pluginChannel.invokeMethod("pluginCreate", [content.toJson()]);
|
||||
Future<PlayerId> create({required PlatformPlayerContent content, Map<String, bool>? params}) async {
|
||||
final playerId = await _pluginChannel.invokeMethod("pluginCreate", [content.toJson(), params]);
|
||||
return playerId;
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ abstract class NutPlayerPlatform extends PlatformInterface {
|
||||
}
|
||||
|
||||
/// Creates an instance of a video player and returns its PlayerId.
|
||||
Future<PlayerId> create(PlatformPlayerContent content) {
|
||||
Future<PlayerId> create({required PlatformPlayerContent content, Map<String, bool>? params}) {
|
||||
throw UnimplementedError('create() has not been implemented.');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user