Skip to content

Commit 5e84f0e

Browse files
committed
Support Tizen10.0 publishing
1 parent 7d0b876 commit 5e84f0e

21 files changed

+38
-38
lines changed

packages/video_player_avplay/example/pubspec.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ dependencies:
1111
sdk: flutter
1212
http: ^0.13.0
1313
video_player_avplay:
14-
path: ../
14+
git:
15+
url: https://github.com/flutter-tizen/plugins.git
16+
path: packages/video_player_avplay
17+
ref: video_player_avplay_tizen10_publish
1518

1619
dev_dependencies:
1720
flutter_driver:

packages/video_player_avplay/lib/video_player.dart

Lines changed: 34 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@
66
import 'dart:async';
77
import 'dart:io';
88

9-
import 'package:device_info_plus_tizen/device_info_plus_tizen.dart';
109
import 'package:flutter/foundation.dart';
1110
import 'package:flutter/material.dart';
1211
import 'package:flutter/services.dart';
13-
import 'package:flutter_tizen/flutter_tizen.dart' as tizen;
1412

1513
import 'src/ad_info_from_dash.dart';
1614
import 'src/closed_caption_file.dart';
@@ -462,41 +460,41 @@ class VideoPlayerController extends ValueNotifier<VideoPlayerValue> {
462460
'dev.flutter.videoplayer.drm',
463461
);
464462

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+
// }
496494

497495
/// Attempts to open the given [dataSource] and load metadata about the video.
498496
Future<void> initialize() async {
499-
await _checkPlatformAndApiVersion();
497+
// await _checkPlatformAndApiVersion();
500498

501499
final bool allowBackgroundPlayback =
502500
videoPlayerOptions?.allowBackgroundPlayback ?? false;
@@ -913,7 +911,8 @@ class VideoPlayerController extends ValueNotifier<VideoPlayerValue> {
913911
type == StreamingPropertyType.dashToken ||
914912
type == StreamingPropertyType.openHttpHeader)) {
915913
throw Exception(
916-
'setStreamingProperty().$type only support for dash format!');
914+
'setStreamingProperty().$type only support for dash format!',
915+
);
917916
}
918917
return _videoPlayerPlatform.setStreamingProperty(_playerId, type, value);
919918
}

packages/video_player_avplay/pubspec.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,8 @@ flutter:
1616
fileName: video_player_tizen_plugin.h
1717

1818
dependencies:
19-
device_info_plus_tizen: ^1.2.0
2019
flutter:
2120
sdk: flutter
22-
flutter_tizen: ^0.2.4
2321
html: ^0.15.0
2422
plugin_platform_interface: ^2.1.0
2523

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-20 KB
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)