|
1 |
| -// Autogenerated from Pigeon (v0.1.0-experimental.10), do not edit directly. |
| 1 | +// Autogenerated from Pigeon (v0.1.0-experimental.11), do not edit directly. |
2 | 2 | // See also: https://pub.dev/packages/pigeon
|
3 | 3 |
|
4 | 4 | package io.flutter.plugins.videoplayer;
|
@@ -251,187 +251,223 @@ public static void setup(BinaryMessenger binaryMessenger, VideoPlayerApi api) {
|
251 | 251 | binaryMessenger,
|
252 | 252 | "dev.flutter.pigeon.VideoPlayerApi.initialize",
|
253 | 253 | new StandardMessageCodec());
|
254 |
| - channel.setMessageHandler( |
255 |
| - new BasicMessageChannel.MessageHandler<Object>() { |
256 |
| - public void onMessage(Object message, BasicMessageChannel.Reply<Object> reply) { |
257 |
| - HashMap<String, HashMap> wrapped = new HashMap<String, HashMap>(); |
258 |
| - try { |
259 |
| - api.initialize(); |
260 |
| - wrapped.put("result", null); |
261 |
| - } catch (Exception exception) { |
262 |
| - wrapped.put("error", wrapError(exception)); |
| 254 | + if (api != null) { |
| 255 | + channel.setMessageHandler( |
| 256 | + new BasicMessageChannel.MessageHandler<Object>() { |
| 257 | + public void onMessage(Object message, BasicMessageChannel.Reply<Object> reply) { |
| 258 | + HashMap<String, HashMap> wrapped = new HashMap<String, HashMap>(); |
| 259 | + try { |
| 260 | + api.initialize(); |
| 261 | + wrapped.put("result", null); |
| 262 | + } catch (Exception exception) { |
| 263 | + wrapped.put("error", wrapError(exception)); |
| 264 | + } |
| 265 | + reply.reply(wrapped); |
263 | 266 | }
|
264 |
| - reply.reply(wrapped); |
265 |
| - } |
266 |
| - }); |
| 267 | + }); |
| 268 | + } else { |
| 269 | + channel.setMessageHandler(null); |
| 270 | + } |
267 | 271 | }
|
268 | 272 | {
|
269 | 273 | BasicMessageChannel<Object> channel =
|
270 | 274 | new BasicMessageChannel<Object>(
|
271 | 275 | binaryMessenger,
|
272 | 276 | "dev.flutter.pigeon.VideoPlayerApi.create",
|
273 | 277 | new StandardMessageCodec());
|
274 |
| - channel.setMessageHandler( |
275 |
| - new BasicMessageChannel.MessageHandler<Object>() { |
276 |
| - public void onMessage(Object message, BasicMessageChannel.Reply<Object> reply) { |
277 |
| - CreateMessage input = CreateMessage.fromMap((HashMap) message); |
278 |
| - HashMap<String, HashMap> wrapped = new HashMap<String, HashMap>(); |
279 |
| - try { |
280 |
| - TextureMessage output = api.create(input); |
281 |
| - wrapped.put("result", output.toMap()); |
282 |
| - } catch (Exception exception) { |
283 |
| - wrapped.put("error", wrapError(exception)); |
| 278 | + if (api != null) { |
| 279 | + channel.setMessageHandler( |
| 280 | + new BasicMessageChannel.MessageHandler<Object>() { |
| 281 | + public void onMessage(Object message, BasicMessageChannel.Reply<Object> reply) { |
| 282 | + CreateMessage input = CreateMessage.fromMap((HashMap) message); |
| 283 | + HashMap<String, HashMap> wrapped = new HashMap<String, HashMap>(); |
| 284 | + try { |
| 285 | + TextureMessage output = api.create(input); |
| 286 | + wrapped.put("result", output.toMap()); |
| 287 | + } catch (Exception exception) { |
| 288 | + wrapped.put("error", wrapError(exception)); |
| 289 | + } |
| 290 | + reply.reply(wrapped); |
284 | 291 | }
|
285 |
| - reply.reply(wrapped); |
286 |
| - } |
287 |
| - }); |
| 292 | + }); |
| 293 | + } else { |
| 294 | + channel.setMessageHandler(null); |
| 295 | + } |
288 | 296 | }
|
289 | 297 | {
|
290 | 298 | BasicMessageChannel<Object> channel =
|
291 | 299 | new BasicMessageChannel<Object>(
|
292 | 300 | binaryMessenger,
|
293 | 301 | "dev.flutter.pigeon.VideoPlayerApi.dispose",
|
294 | 302 | new StandardMessageCodec());
|
295 |
| - channel.setMessageHandler( |
296 |
| - new BasicMessageChannel.MessageHandler<Object>() { |
297 |
| - public void onMessage(Object message, BasicMessageChannel.Reply<Object> reply) { |
298 |
| - TextureMessage input = TextureMessage.fromMap((HashMap) message); |
299 |
| - HashMap<String, HashMap> wrapped = new HashMap<String, HashMap>(); |
300 |
| - try { |
301 |
| - api.dispose(input); |
302 |
| - wrapped.put("result", null); |
303 |
| - } catch (Exception exception) { |
304 |
| - wrapped.put("error", wrapError(exception)); |
| 303 | + if (api != null) { |
| 304 | + channel.setMessageHandler( |
| 305 | + new BasicMessageChannel.MessageHandler<Object>() { |
| 306 | + public void onMessage(Object message, BasicMessageChannel.Reply<Object> reply) { |
| 307 | + TextureMessage input = TextureMessage.fromMap((HashMap) message); |
| 308 | + HashMap<String, HashMap> wrapped = new HashMap<String, HashMap>(); |
| 309 | + try { |
| 310 | + api.dispose(input); |
| 311 | + wrapped.put("result", null); |
| 312 | + } catch (Exception exception) { |
| 313 | + wrapped.put("error", wrapError(exception)); |
| 314 | + } |
| 315 | + reply.reply(wrapped); |
305 | 316 | }
|
306 |
| - reply.reply(wrapped); |
307 |
| - } |
308 |
| - }); |
| 317 | + }); |
| 318 | + } else { |
| 319 | + channel.setMessageHandler(null); |
| 320 | + } |
309 | 321 | }
|
310 | 322 | {
|
311 | 323 | BasicMessageChannel<Object> channel =
|
312 | 324 | new BasicMessageChannel<Object>(
|
313 | 325 | binaryMessenger,
|
314 | 326 | "dev.flutter.pigeon.VideoPlayerApi.setLooping",
|
315 | 327 | new StandardMessageCodec());
|
316 |
| - channel.setMessageHandler( |
317 |
| - new BasicMessageChannel.MessageHandler<Object>() { |
318 |
| - public void onMessage(Object message, BasicMessageChannel.Reply<Object> reply) { |
319 |
| - LoopingMessage input = LoopingMessage.fromMap((HashMap) message); |
320 |
| - HashMap<String, HashMap> wrapped = new HashMap<String, HashMap>(); |
321 |
| - try { |
322 |
| - api.setLooping(input); |
323 |
| - wrapped.put("result", null); |
324 |
| - } catch (Exception exception) { |
325 |
| - wrapped.put("error", wrapError(exception)); |
| 328 | + if (api != null) { |
| 329 | + channel.setMessageHandler( |
| 330 | + new BasicMessageChannel.MessageHandler<Object>() { |
| 331 | + public void onMessage(Object message, BasicMessageChannel.Reply<Object> reply) { |
| 332 | + LoopingMessage input = LoopingMessage.fromMap((HashMap) message); |
| 333 | + HashMap<String, HashMap> wrapped = new HashMap<String, HashMap>(); |
| 334 | + try { |
| 335 | + api.setLooping(input); |
| 336 | + wrapped.put("result", null); |
| 337 | + } catch (Exception exception) { |
| 338 | + wrapped.put("error", wrapError(exception)); |
| 339 | + } |
| 340 | + reply.reply(wrapped); |
326 | 341 | }
|
327 |
| - reply.reply(wrapped); |
328 |
| - } |
329 |
| - }); |
| 342 | + }); |
| 343 | + } else { |
| 344 | + channel.setMessageHandler(null); |
| 345 | + } |
330 | 346 | }
|
331 | 347 | {
|
332 | 348 | BasicMessageChannel<Object> channel =
|
333 | 349 | new BasicMessageChannel<Object>(
|
334 | 350 | binaryMessenger,
|
335 | 351 | "dev.flutter.pigeon.VideoPlayerApi.setVolume",
|
336 | 352 | new StandardMessageCodec());
|
337 |
| - channel.setMessageHandler( |
338 |
| - new BasicMessageChannel.MessageHandler<Object>() { |
339 |
| - public void onMessage(Object message, BasicMessageChannel.Reply<Object> reply) { |
340 |
| - VolumeMessage input = VolumeMessage.fromMap((HashMap) message); |
341 |
| - HashMap<String, HashMap> wrapped = new HashMap<String, HashMap>(); |
342 |
| - try { |
343 |
| - api.setVolume(input); |
344 |
| - wrapped.put("result", null); |
345 |
| - } catch (Exception exception) { |
346 |
| - wrapped.put("error", wrapError(exception)); |
| 353 | + if (api != null) { |
| 354 | + channel.setMessageHandler( |
| 355 | + new BasicMessageChannel.MessageHandler<Object>() { |
| 356 | + public void onMessage(Object message, BasicMessageChannel.Reply<Object> reply) { |
| 357 | + VolumeMessage input = VolumeMessage.fromMap((HashMap) message); |
| 358 | + HashMap<String, HashMap> wrapped = new HashMap<String, HashMap>(); |
| 359 | + try { |
| 360 | + api.setVolume(input); |
| 361 | + wrapped.put("result", null); |
| 362 | + } catch (Exception exception) { |
| 363 | + wrapped.put("error", wrapError(exception)); |
| 364 | + } |
| 365 | + reply.reply(wrapped); |
347 | 366 | }
|
348 |
| - reply.reply(wrapped); |
349 |
| - } |
350 |
| - }); |
| 367 | + }); |
| 368 | + } else { |
| 369 | + channel.setMessageHandler(null); |
| 370 | + } |
351 | 371 | }
|
352 | 372 | {
|
353 | 373 | BasicMessageChannel<Object> channel =
|
354 | 374 | new BasicMessageChannel<Object>(
|
355 | 375 | binaryMessenger,
|
356 | 376 | "dev.flutter.pigeon.VideoPlayerApi.play",
|
357 | 377 | new StandardMessageCodec());
|
358 |
| - channel.setMessageHandler( |
359 |
| - new BasicMessageChannel.MessageHandler<Object>() { |
360 |
| - public void onMessage(Object message, BasicMessageChannel.Reply<Object> reply) { |
361 |
| - TextureMessage input = TextureMessage.fromMap((HashMap) message); |
362 |
| - HashMap<String, HashMap> wrapped = new HashMap<String, HashMap>(); |
363 |
| - try { |
364 |
| - api.play(input); |
365 |
| - wrapped.put("result", null); |
366 |
| - } catch (Exception exception) { |
367 |
| - wrapped.put("error", wrapError(exception)); |
| 378 | + if (api != null) { |
| 379 | + channel.setMessageHandler( |
| 380 | + new BasicMessageChannel.MessageHandler<Object>() { |
| 381 | + public void onMessage(Object message, BasicMessageChannel.Reply<Object> reply) { |
| 382 | + TextureMessage input = TextureMessage.fromMap((HashMap) message); |
| 383 | + HashMap<String, HashMap> wrapped = new HashMap<String, HashMap>(); |
| 384 | + try { |
| 385 | + api.play(input); |
| 386 | + wrapped.put("result", null); |
| 387 | + } catch (Exception exception) { |
| 388 | + wrapped.put("error", wrapError(exception)); |
| 389 | + } |
| 390 | + reply.reply(wrapped); |
368 | 391 | }
|
369 |
| - reply.reply(wrapped); |
370 |
| - } |
371 |
| - }); |
| 392 | + }); |
| 393 | + } else { |
| 394 | + channel.setMessageHandler(null); |
| 395 | + } |
372 | 396 | }
|
373 | 397 | {
|
374 | 398 | BasicMessageChannel<Object> channel =
|
375 | 399 | new BasicMessageChannel<Object>(
|
376 | 400 | binaryMessenger,
|
377 | 401 | "dev.flutter.pigeon.VideoPlayerApi.position",
|
378 | 402 | new StandardMessageCodec());
|
379 |
| - channel.setMessageHandler( |
380 |
| - new BasicMessageChannel.MessageHandler<Object>() { |
381 |
| - public void onMessage(Object message, BasicMessageChannel.Reply<Object> reply) { |
382 |
| - TextureMessage input = TextureMessage.fromMap((HashMap) message); |
383 |
| - HashMap<String, HashMap> wrapped = new HashMap<String, HashMap>(); |
384 |
| - try { |
385 |
| - PositionMessage output = api.position(input); |
386 |
| - wrapped.put("result", output.toMap()); |
387 |
| - } catch (Exception exception) { |
388 |
| - wrapped.put("error", wrapError(exception)); |
| 403 | + if (api != null) { |
| 404 | + channel.setMessageHandler( |
| 405 | + new BasicMessageChannel.MessageHandler<Object>() { |
| 406 | + public void onMessage(Object message, BasicMessageChannel.Reply<Object> reply) { |
| 407 | + TextureMessage input = TextureMessage.fromMap((HashMap) message); |
| 408 | + HashMap<String, HashMap> wrapped = new HashMap<String, HashMap>(); |
| 409 | + try { |
| 410 | + PositionMessage output = api.position(input); |
| 411 | + wrapped.put("result", output.toMap()); |
| 412 | + } catch (Exception exception) { |
| 413 | + wrapped.put("error", wrapError(exception)); |
| 414 | + } |
| 415 | + reply.reply(wrapped); |
389 | 416 | }
|
390 |
| - reply.reply(wrapped); |
391 |
| - } |
392 |
| - }); |
| 417 | + }); |
| 418 | + } else { |
| 419 | + channel.setMessageHandler(null); |
| 420 | + } |
393 | 421 | }
|
394 | 422 | {
|
395 | 423 | BasicMessageChannel<Object> channel =
|
396 | 424 | new BasicMessageChannel<Object>(
|
397 | 425 | binaryMessenger,
|
398 | 426 | "dev.flutter.pigeon.VideoPlayerApi.seekTo",
|
399 | 427 | new StandardMessageCodec());
|
400 |
| - channel.setMessageHandler( |
401 |
| - new BasicMessageChannel.MessageHandler<Object>() { |
402 |
| - public void onMessage(Object message, BasicMessageChannel.Reply<Object> reply) { |
403 |
| - PositionMessage input = PositionMessage.fromMap((HashMap) message); |
404 |
| - HashMap<String, HashMap> wrapped = new HashMap<String, HashMap>(); |
405 |
| - try { |
406 |
| - api.seekTo(input); |
407 |
| - wrapped.put("result", null); |
408 |
| - } catch (Exception exception) { |
409 |
| - wrapped.put("error", wrapError(exception)); |
| 428 | + if (api != null) { |
| 429 | + channel.setMessageHandler( |
| 430 | + new BasicMessageChannel.MessageHandler<Object>() { |
| 431 | + public void onMessage(Object message, BasicMessageChannel.Reply<Object> reply) { |
| 432 | + PositionMessage input = PositionMessage.fromMap((HashMap) message); |
| 433 | + HashMap<String, HashMap> wrapped = new HashMap<String, HashMap>(); |
| 434 | + try { |
| 435 | + api.seekTo(input); |
| 436 | + wrapped.put("result", null); |
| 437 | + } catch (Exception exception) { |
| 438 | + wrapped.put("error", wrapError(exception)); |
| 439 | + } |
| 440 | + reply.reply(wrapped); |
410 | 441 | }
|
411 |
| - reply.reply(wrapped); |
412 |
| - } |
413 |
| - }); |
| 442 | + }); |
| 443 | + } else { |
| 444 | + channel.setMessageHandler(null); |
| 445 | + } |
414 | 446 | }
|
415 | 447 | {
|
416 | 448 | BasicMessageChannel<Object> channel =
|
417 | 449 | new BasicMessageChannel<Object>(
|
418 | 450 | binaryMessenger,
|
419 | 451 | "dev.flutter.pigeon.VideoPlayerApi.pause",
|
420 | 452 | new StandardMessageCodec());
|
421 |
| - channel.setMessageHandler( |
422 |
| - new BasicMessageChannel.MessageHandler<Object>() { |
423 |
| - public void onMessage(Object message, BasicMessageChannel.Reply<Object> reply) { |
424 |
| - TextureMessage input = TextureMessage.fromMap((HashMap) message); |
425 |
| - HashMap<String, HashMap> wrapped = new HashMap<String, HashMap>(); |
426 |
| - try { |
427 |
| - api.pause(input); |
428 |
| - wrapped.put("result", null); |
429 |
| - } catch (Exception exception) { |
430 |
| - wrapped.put("error", wrapError(exception)); |
| 453 | + if (api != null) { |
| 454 | + channel.setMessageHandler( |
| 455 | + new BasicMessageChannel.MessageHandler<Object>() { |
| 456 | + public void onMessage(Object message, BasicMessageChannel.Reply<Object> reply) { |
| 457 | + TextureMessage input = TextureMessage.fromMap((HashMap) message); |
| 458 | + HashMap<String, HashMap> wrapped = new HashMap<String, HashMap>(); |
| 459 | + try { |
| 460 | + api.pause(input); |
| 461 | + wrapped.put("result", null); |
| 462 | + } catch (Exception exception) { |
| 463 | + wrapped.put("error", wrapError(exception)); |
| 464 | + } |
| 465 | + reply.reply(wrapped); |
431 | 466 | }
|
432 |
| - reply.reply(wrapped); |
433 |
| - } |
434 |
| - }); |
| 467 | + }); |
| 468 | + } else { |
| 469 | + channel.setMessageHandler(null); |
| 470 | + } |
435 | 471 | }
|
436 | 472 | }
|
437 | 473 | }
|
|
0 commit comments