blob: 90c9fbb61ea0b2d4bf46a354ccebc604824c7d8d [file] [log] [blame]
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:pigeon/pigeon.dart';
@ConfigurePigeon(PigeonOptions(
dartOut: 'lib/src/messages.g.dart',
dartTestOut: 'test/test_api.g.dart',
javaOut: 'android/src/main/java/io/flutter/plugins/videoplayer/Messages.java',
javaOptions: JavaOptions(
package: 'io.flutter.plugins.videoplayer',
),
copyrightHeader: 'pigeons/copyright.txt',
))
class TextureMessage {
TextureMessage(this.textureId);
int textureId;
}
class LoopingMessage {
LoopingMessage(this.textureId, this.isLooping);
int textureId;
bool isLooping;
}
class VolumeMessage {
VolumeMessage(this.textureId, this.volume);
int textureId;
double volume;
}
class PlaybackSpeedMessage {
PlaybackSpeedMessage(this.textureId, this.speed);
int textureId;
double speed;
}
class PositionMessage {
PositionMessage(this.textureId, this.position);
int textureId;
int position;
}
class CreateMessage {
CreateMessage({required this.httpHeaders});
String? asset;
String? uri;
String? packageName;
String? formatHint;
Map<String?, String?> httpHeaders;
}
class MixWithOthersMessage {
MixWithOthersMessage(this.mixWithOthers);
bool mixWithOthers;
}
@HostApi(dartHostTestHandler: 'TestHostVideoPlayerApi')
abstract class AndroidVideoPlayerApi {
void initialize();
TextureMessage create(CreateMessage msg);
void dispose(TextureMessage msg);
void setLooping(LoopingMessage msg);
void setVolume(VolumeMessage msg);
void setPlaybackSpeed(PlaybackSpeedMessage msg);
void play(TextureMessage msg);
PositionMessage position(TextureMessage msg);
void seekTo(PositionMessage msg);
void pause(TextureMessage msg);
void setMixWithOthers(MixWithOthersMessage msg);
}