Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/video_player_avplay/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.6.0
* Support multi TizenOS version.

## 0.5.26
* Add plusplayer library for Tizen10.0.
* Update plusplayer
Expand Down
26 changes: 23 additions & 3 deletions packages/video_player_avplay/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ To use this package, add `video_player_avplay` as a dependency in your `pubspec.

```yaml
dependencies:
video_player_avplay: ^0.5.26
video_player_avplay: ^0.6.0
```

Then you can import `video_player_avplay` in your Dart code:
Expand All @@ -23,16 +23,36 @@ import 'package:video_player_avplay/video_player.dart';

Note that `video_player_avplay` is not compatible with the original `video_player` plugin. If you're writing a cross-platform app for Tizen and other platforms, it is recommended to create two separate source files and import `video_player` and `video_player_avplay` in the files respectively.

Note that `video_player_avplay` uses a compiled dynamic library, the api-version is your TV version, change it in tizen-manifest.xml:
Change api-version in tizen-manifest.xml according to your TV version.

Note that `video_player_avplay` uses a compiled dynamic library, change the api-version according to your TV version in tizen-manifest.xml :

```xml
<manifest package="xxx" version="1.0.0" api-version="6.0">
```

> [!NOTE]
> This plugin does not provide OS version compatibility.
> This plugin for a specific api-version does not provide OS version compatibility.
> | `api-version` | TizenOS version |
> |:-:|:-:|
> |6.0|6.0|
> |6.5|6.5 ~ 9.0|
> |7.0|7.0 ~ 9.0|
> |8.0|8.0 ~ 9.0|
> |9.0|9.0|
> |10.0|10.0|
>
> When you build an application with this plugin, version-specific [dynamic libraries](https://github.com/flutter-tizen/plugins/tree/master/packages/video_player_avplay/tizen/lib/armel) are packaged together based on the api-version information in tizen-manifest.xml.
> If you are planning to distribute an application that includes this plugin, you will need to build a TPK package for each TizenOS version (api-version in tizen-manifest.xml). Please refer to the [Samsung Developers](https://developer.samsung.com/smarttv/develop) for information on TizenOS versions by [TV model groups](https://developer.samsung.com/smarttv/develop/specifications/tv-model-groups.html).
>
> If you plan to distribute from TizenOS version 6.0 to 10.0, it should be packaged as follows.
> - `<.... api-version="6.0" version="1.0.0" ...> # for TizenOS 6.0.`
> - `<.... api-version="6.5" version="1.0.1" ...> # for TizenOS 6.5 ~ 9.0.`
> - `<.... api-version="10.0" version="1.0.2" ...> # for TizenOS 10.0.`
>
> If you plan to distribute from TizenOS version 7.0 to 10.0, it should be packaged as follows.
> - `<.... api-version="7.0" version="1.0.0" ...> # for TizenOS 7.0 ~ 9.0.`
> - `<.... api-version="10.0" version="1.0.1" ...> # for TizenOS 10.0.`

Note that if you play dash streams, please add dash format when creating the player:
```dart
Expand Down
33 changes: 23 additions & 10 deletions packages/video_player_avplay/lib/video_player.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import 'package:device_info_plus_tizen/device_info_plus_tizen.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_tizen/flutter_tizen.dart';
import 'package:flutter_tizen/flutter_tizen.dart' as tizen;

import 'src/closed_caption_file.dart';
import 'src/drm_configs.dart';
Expand Down Expand Up @@ -443,15 +443,28 @@ class VideoPlayerController extends ValueNotifier<VideoPlayerValue> {

if ((deviceInfo.platformVersion != null &&
deviceInfo.platformVersion!.isNotEmpty) &&
apiVersion != 'none' &&
(deviceInfo.platformVersion != apiVersion)) {
throw Exception(
'The current TizenOS version(${deviceInfo.platformVersion}) '
'and the app API version($apiVersion) are different. '
'The avplay plugin does not guarantee compatibility with '
'other versions. Therefore, please set the "api-version" '
'in tizen-manifest.xml to match the TizenOS version and rebuild.',
);
tizen.apiVersion != 'none') {
if (deviceInfo.platformVersion != tizen.apiVersion) {
final double? platformVersion =
double.tryParse(deviceInfo.platformVersion!);
final double? apiVersion = double.tryParse(tizen.apiVersion);
if (platformVersion != null && apiVersion != null) {
if (platformVersion == 6.0 || platformVersion == 10.0) {
throw Exception(
'The current TizenOS version is $platformVersion and the app API version($apiVersion). The app API version must also be $platformVersion. '
'The avplay plugin, with an apiVersion of $apiVersion does not guarantee compatibility with other TizenOS versions. Therefore '
'Please set the "api-version" in tizen-manifest.xml to $platformVersion and rebuild.',
);
} else if ((platformVersion >= 6.5 && platformVersion <= 9.0) &&
(apiVersion == 6.0 || apiVersion == 10.0)) {
throw Exception(
'The current TizenOS version is $platformVersion and the app API version($apiVersion). The app API version must be at least 6.5. '
'The avplay plugin, with an apiVersion of $apiVersion does not guarantee compatibility with other TizenOS versions. Therefore '
'Please set the "api-version" in tizen-manifest.xml to a minimum of 6.5 and rebuild.',
);
}
}
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/video_player_avplay/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: video_player_avplay
description: Flutter plugin for displaying inline video on Tizen TV devices.
homepage: https://github.com/flutter-tizen/plugins
repository: https://github.com/flutter-tizen/plugins/tree/master/packages/video_player_avplay
version: 0.5.26
version: 0.6.0

environment:
sdk: ">=3.1.0 <4.0.0"
Expand Down
Loading