|
6 | 6 | import 'dart:async'; |
7 | 7 | import 'dart:io'; |
8 | 8 |
|
9 | | -import 'package:device_info_plus_tizen/device_info_plus_tizen.dart'; |
10 | 9 | import 'package:flutter/foundation.dart'; |
11 | 10 | import 'package:flutter/material.dart'; |
12 | 11 | import 'package:flutter/services.dart'; |
13 | | -import 'package:flutter_tizen/flutter_tizen.dart' as tizen; |
14 | 12 |
|
15 | 13 | import 'src/ad_info_from_dash.dart'; |
16 | 14 | import 'src/closed_caption_file.dart'; |
@@ -462,41 +460,41 @@ class VideoPlayerController extends ValueNotifier<VideoPlayerValue> { |
462 | 460 | 'dev.flutter.videoplayer.drm', |
463 | 461 | ); |
464 | 462 |
|
465 | | - Future<void> _checkPlatformAndApiVersion() async { |
466 | | - final DeviceInfoPluginTizen deviceInfoPlugin = DeviceInfoPluginTizen(); |
467 | | - final TizenDeviceInfo deviceInfo = await deviceInfoPlugin.tizenInfo; |
468 | | - |
469 | | - if ((deviceInfo.platformVersion != null && |
470 | | - deviceInfo.platformVersion!.isNotEmpty) && |
471 | | - tizen.apiVersion != 'none') { |
472 | | - if (deviceInfo.platformVersion != tizen.apiVersion) { |
473 | | - final double? platformVersion = double.tryParse( |
474 | | - deviceInfo.platformVersion!, |
475 | | - ); |
476 | | - final double? apiVersion = double.tryParse(tizen.apiVersion); |
477 | | - if (platformVersion != null && apiVersion != null) { |
478 | | - if (platformVersion == 6.0 || platformVersion == 10.0) { |
479 | | - throw Exception( |
480 | | - 'The current TizenOS version is $platformVersion and the app API version($apiVersion). The app API version must also be $platformVersion. ' |
481 | | - 'The avplay plugin, with an apiVersion of $apiVersion does not guarantee compatibility with other TizenOS versions. Therefore ' |
482 | | - 'Please set the "api-version" in tizen-manifest.xml to $platformVersion and rebuild.', |
483 | | - ); |
484 | | - } else if ((platformVersion >= 6.5 && platformVersion <= 9.0) && |
485 | | - (apiVersion == 6.0 || apiVersion == 10.0)) { |
486 | | - throw Exception( |
487 | | - 'The current TizenOS version is $platformVersion and the app API version($apiVersion). The app API version must be at least 6.5. ' |
488 | | - 'The avplay plugin, with an apiVersion of $apiVersion does not guarantee compatibility with other TizenOS versions. Therefore ' |
489 | | - 'Please set the "api-version" in tizen-manifest.xml to a minimum of 6.5 and rebuild.', |
490 | | - ); |
491 | | - } |
492 | | - } |
493 | | - } |
494 | | - } |
495 | | - } |
| 463 | + // Future<void> _checkPlatformAndApiVersion() async { |
| 464 | + // final DeviceInfoPluginTizen deviceInfoPlugin = DeviceInfoPluginTizen(); |
| 465 | + // final TizenDeviceInfo deviceInfo = await deviceInfoPlugin.tizenInfo; |
| 466 | + |
| 467 | + // if ((deviceInfo.platformVersion != null && |
| 468 | + // deviceInfo.platformVersion!.isNotEmpty) && |
| 469 | + // tizen.apiVersion != 'none') { |
| 470 | + // if (deviceInfo.platformVersion != tizen.apiVersion) { |
| 471 | + // final double? platformVersion = double.tryParse( |
| 472 | + // deviceInfo.platformVersion!, |
| 473 | + // ); |
| 474 | + // final double? apiVersion = double.tryParse(tizen.apiVersion); |
| 475 | + // if (platformVersion != null && apiVersion != null) { |
| 476 | + // if (platformVersion == 6.0 || platformVersion == 10.0) { |
| 477 | + // throw Exception( |
| 478 | + // 'The current TizenOS version is $platformVersion and the app API version($apiVersion). The app API version must also be $platformVersion. ' |
| 479 | + // 'The avplay plugin, with an apiVersion of $apiVersion does not guarantee compatibility with other TizenOS versions. Therefore ' |
| 480 | + // 'Please set the "api-version" in tizen-manifest.xml to $platformVersion and rebuild.', |
| 481 | + // ); |
| 482 | + // } else if ((platformVersion >= 6.5 && platformVersion <= 9.0) && |
| 483 | + // (apiVersion == 6.0 || apiVersion == 10.0)) { |
| 484 | + // throw Exception( |
| 485 | + // 'The current TizenOS version is $platformVersion and the app API version($apiVersion). The app API version must be at least 6.5. ' |
| 486 | + // 'The avplay plugin, with an apiVersion of $apiVersion does not guarantee compatibility with other TizenOS versions. Therefore ' |
| 487 | + // 'Please set the "api-version" in tizen-manifest.xml to a minimum of 6.5 and rebuild.', |
| 488 | + // ); |
| 489 | + // } |
| 490 | + // } |
| 491 | + // } |
| 492 | + // } |
| 493 | + // } |
496 | 494 |
|
497 | 495 | /// Attempts to open the given [dataSource] and load metadata about the video. |
498 | 496 | Future<void> initialize() async { |
499 | | - await _checkPlatformAndApiVersion(); |
| 497 | + // await _checkPlatformAndApiVersion(); |
500 | 498 |
|
501 | 499 | final bool allowBackgroundPlayback = |
502 | 500 | videoPlayerOptions?.allowBackgroundPlayback ?? false; |
@@ -913,7 +911,8 @@ class VideoPlayerController extends ValueNotifier<VideoPlayerValue> { |
913 | 911 | type == StreamingPropertyType.dashToken || |
914 | 912 | type == StreamingPropertyType.openHttpHeader)) { |
915 | 913 | throw Exception( |
916 | | - 'setStreamingProperty().$type only support for dash format!'); |
| 914 | + 'setStreamingProperty().$type only support for dash format!', |
| 915 | + ); |
917 | 916 | } |
918 | 917 | return _videoPlayerPlatform.setStreamingProperty(_playerId, type, value); |
919 | 918 | } |
|
0 commit comments