|
@@ -3,15 +3,21 @@
|
|
|
@implementation IjkplayerPlugin
|
|
@implementation IjkplayerPlugin
|
|
|
+ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar {
|
|
+ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar {
|
|
|
FlutterMethodChannel* channel = [FlutterMethodChannel
|
|
FlutterMethodChannel* channel = [FlutterMethodChannel
|
|
|
- methodChannelWithName:@"ijkplayer"
|
|
|
|
|
- binaryMessenger:[registrar messenger]];
|
|
|
|
|
|
|
+ methodChannelWithName:@"top.kikt/ijkplayer"
|
|
|
|
|
+ binaryMessenger:[registrar messenger]];
|
|
|
IjkplayerPlugin* instance = [[IjkplayerPlugin alloc] init];
|
|
IjkplayerPlugin* instance = [[IjkplayerPlugin alloc] init];
|
|
|
[registrar addMethodCallDelegate:instance channel:channel];
|
|
[registrar addMethodCallDelegate:instance channel:channel];
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
|
|
- (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
|
|
|
- if ([@"getPlatformVersion" isEqualToString:call.method]) {
|
|
|
|
|
- result([@"iOS " stringByAppendingString:[[UIDevice currentDevice] systemVersion]]);
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ if ([@"create" isEqualToString:call.method]) {
|
|
|
|
|
+ } else if ([@"dispose" isEqualToString:call.method]) {
|
|
|
|
|
+ } else if ([@"play" isEqualToString:call.method]) {
|
|
|
|
|
+ } else if ([@"pause" isEqualToString:call.method]) {
|
|
|
|
|
+ } else if ([@"stop" isEqualToString:call.method]) {
|
|
|
|
|
+ } else if ([@"setDataSource" isEqualToString:call.method]) {
|
|
|
} else {
|
|
} else {
|
|
|
result(FlutterMethodNotImplemented);
|
|
result(FlutterMethodNotImplemented);
|
|
|
}
|
|
}
|