static void setup()

in packages/video_player/video_player_android/android/src/main/java/io/flutter/plugins/videoplayer/Messages.java [348:611]


    static void setup(BinaryMessenger binaryMessenger, VideoPlayerApi api) {
      {
        BasicMessageChannel<Object> channel =
            new BasicMessageChannel<>(
                binaryMessenger,
                "dev.flutter.pigeon.VideoPlayerApi.initialize",
                new StandardMessageCodec());
        if (api != null) {
          channel.setMessageHandler(
              (message, reply) -> {
                HashMap<String, HashMap> wrapped = new HashMap<>();
                try {
                  api.initialize();
                  wrapped.put("result", null);
                } catch (Exception exception) {
                  wrapped.put("error", wrapError(exception));
                }
                reply.reply(wrapped);
              });
        } else {
          channel.setMessageHandler(null);
        }
      }
      {
        BasicMessageChannel<Object> channel =
            new BasicMessageChannel<>(
                binaryMessenger,
                "dev.flutter.pigeon.VideoPlayerApi.create",
                new StandardMessageCodec());
        if (api != null) {
          channel.setMessageHandler(
              (message, reply) -> {
                HashMap<String, HashMap> wrapped = new HashMap<>();
                try {
                  @SuppressWarnings("ConstantConditions")
                  CreateMessage input = CreateMessage.fromMap((HashMap) message);
                  TextureMessage output = api.create(input);
                  wrapped.put("result", output.toMap());
                } catch (Exception exception) {
                  wrapped.put("error", wrapError(exception));
                }
                reply.reply(wrapped);
              });
        } else {
          channel.setMessageHandler(null);
        }
      }
      {
        BasicMessageChannel<Object> channel =
            new BasicMessageChannel<>(
                binaryMessenger,
                "dev.flutter.pigeon.VideoPlayerApi.dispose",
                new StandardMessageCodec());
        if (api != null) {
          channel.setMessageHandler(
              (message, reply) -> {
                HashMap<String, HashMap> wrapped = new HashMap<>();
                try {
                  @SuppressWarnings("ConstantConditions")
                  TextureMessage input = TextureMessage.fromMap((HashMap) message);
                  api.dispose(input);
                  wrapped.put("result", null);
                } catch (Exception exception) {
                  wrapped.put("error", wrapError(exception));
                }
                reply.reply(wrapped);
              });
        } else {
          channel.setMessageHandler(null);
        }
      }
      {
        BasicMessageChannel<Object> channel =
            new BasicMessageChannel<>(
                binaryMessenger,
                "dev.flutter.pigeon.VideoPlayerApi.setLooping",
                new StandardMessageCodec());
        if (api != null) {
          channel.setMessageHandler(
              (message, reply) -> {
                HashMap<String, HashMap> wrapped = new HashMap<>();
                try {
                  @SuppressWarnings("ConstantConditions")
                  LoopingMessage input = LoopingMessage.fromMap((HashMap) message);
                  api.setLooping(input);
                  wrapped.put("result", null);
                } catch (Exception exception) {
                  wrapped.put("error", wrapError(exception));
                }
                reply.reply(wrapped);
              });
        } else {
          channel.setMessageHandler(null);
        }
      }
      {
        BasicMessageChannel<Object> channel =
            new BasicMessageChannel<>(
                binaryMessenger,
                "dev.flutter.pigeon.VideoPlayerApi.setVolume",
                new StandardMessageCodec());
        if (api != null) {
          channel.setMessageHandler(
              (message, reply) -> {
                HashMap<String, HashMap> wrapped = new HashMap<>();
                try {
                  @SuppressWarnings("ConstantConditions")
                  VolumeMessage input = VolumeMessage.fromMap((HashMap) message);
                  api.setVolume(input);
                  wrapped.put("result", null);
                } catch (Exception exception) {
                  wrapped.put("error", wrapError(exception));
                }
                reply.reply(wrapped);
              });
        } else {
          channel.setMessageHandler(null);
        }
      }
      {
        BasicMessageChannel<Object> channel =
            new BasicMessageChannel<>(
                binaryMessenger,
                "dev.flutter.pigeon.VideoPlayerApi.setPlaybackSpeed",
                new StandardMessageCodec());
        if (api != null) {
          channel.setMessageHandler(
              (message, reply) -> {
                HashMap<String, HashMap> wrapped = new HashMap<>();
                try {
                  @SuppressWarnings("ConstantConditions")
                  PlaybackSpeedMessage input = PlaybackSpeedMessage.fromMap((HashMap) message);
                  api.setPlaybackSpeed(input);
                  wrapped.put("result", null);
                } catch (Exception exception) {
                  wrapped.put("error", wrapError(exception));
                }
                reply.reply(wrapped);
              });
        } else {
          channel.setMessageHandler(null);
        }
      }
      {
        BasicMessageChannel<Object> channel =
            new BasicMessageChannel<>(
                binaryMessenger,
                "dev.flutter.pigeon.VideoPlayerApi.play",
                new StandardMessageCodec());
        if (api != null) {
          channel.setMessageHandler(
              (message, reply) -> {
                HashMap<String, HashMap> wrapped = new HashMap<>();
                try {
                  @SuppressWarnings("ConstantConditions")
                  TextureMessage input = TextureMessage.fromMap((HashMap) message);
                  api.play(input);
                  wrapped.put("result", null);
                } catch (Exception exception) {
                  wrapped.put("error", wrapError(exception));
                }
                reply.reply(wrapped);
              });
        } else {
          channel.setMessageHandler(null);
        }
      }
      {
        BasicMessageChannel<Object> channel =
            new BasicMessageChannel<>(
                binaryMessenger,
                "dev.flutter.pigeon.VideoPlayerApi.position",
                new StandardMessageCodec());
        if (api != null) {
          channel.setMessageHandler(
              (message, reply) -> {
                HashMap<String, HashMap> wrapped = new HashMap<>();
                try {
                  @SuppressWarnings("ConstantConditions")
                  TextureMessage input = TextureMessage.fromMap((HashMap) message);
                  PositionMessage output = api.position(input);
                  wrapped.put("result", output.toMap());
                } catch (Exception exception) {
                  wrapped.put("error", wrapError(exception));
                }
                reply.reply(wrapped);
              });
        } else {
          channel.setMessageHandler(null);
        }
      }
      {
        BasicMessageChannel<Object> channel =
            new BasicMessageChannel<>(
                binaryMessenger,
                "dev.flutter.pigeon.VideoPlayerApi.seekTo",
                new StandardMessageCodec());
        if (api != null) {
          channel.setMessageHandler(
              (message, reply) -> {
                HashMap<String, HashMap> wrapped = new HashMap<>();
                try {
                  @SuppressWarnings("ConstantConditions")
                  PositionMessage input = PositionMessage.fromMap((HashMap) message);
                  api.seekTo(input);
                  wrapped.put("result", null);
                } catch (Exception exception) {
                  wrapped.put("error", wrapError(exception));
                }
                reply.reply(wrapped);
              });
        } else {
          channel.setMessageHandler(null);
        }
      }
      {
        BasicMessageChannel<Object> channel =
            new BasicMessageChannel<>(
                binaryMessenger,
                "dev.flutter.pigeon.VideoPlayerApi.pause",
                new StandardMessageCodec());
        if (api != null) {
          channel.setMessageHandler(
              (message, reply) -> {
                HashMap<String, HashMap> wrapped = new HashMap<>();
                try {
                  @SuppressWarnings("ConstantConditions")
                  TextureMessage input = TextureMessage.fromMap((HashMap) message);
                  api.pause(input);
                  wrapped.put("result", null);
                } catch (Exception exception) {
                  wrapped.put("error", wrapError(exception));
                }
                reply.reply(wrapped);
              });
        } else {
          channel.setMessageHandler(null);
        }
      }
      {
        BasicMessageChannel<Object> channel =
            new BasicMessageChannel<>(
                binaryMessenger,
                "dev.flutter.pigeon.VideoPlayerApi.setMixWithOthers",
                new StandardMessageCodec());
        if (api != null) {
          channel.setMessageHandler(
              (message, reply) -> {
                HashMap<String, HashMap> wrapped = new HashMap<>();
                try {
                  @SuppressWarnings("ConstantConditions")
                  MixWithOthersMessage input = MixWithOthersMessage.fromMap((HashMap) message);
                  api.setMixWithOthers(input);
                  wrapped.put("result", null);
                } catch (Exception exception) {
                  wrapped.put("error", wrapError(exception));
                }
                reply.reply(wrapped);
              });
        } else {
          channel.setMessageHandler(null);
        }
      }
    }