Skip to content

Commit

Permalink
Merge pull request media-kit#500 from alexmercerind/v1.1.8
Browse files Browse the repository at this point in the history
v1.1.8
  • Loading branch information
alexmercerind authored Sep 27, 2023
2 parents 3c899ca + 530a12d commit c3e3f60
Show file tree
Hide file tree
Showing 51 changed files with 330 additions and 226 deletions.
44 changes: 23 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,17 @@

```yaml
dependencies:
media_kit: ^1.1.7 # Primary package.
media_kit_video: ^1.1.8 # For video rendering.
media_kit_libs_video: ^1.0.1 # Native video dependencies.
media_kit: ^1.1.8 # Primary package.
media_kit_video: ^1.1.9 # For video rendering.
media_kit_libs_video: ^1.0.2 # Native video dependencies.
```
#### For apps that need audio playback:
```yaml
dependencies:
media_kit: ^1.1.7 # Primary package.
media_kit_libs_audio: ^1.0.1 # Native audio dependencies.
media_kit: ^1.1.8 # Primary package.
media_kit_libs_audio: ^1.0.2 # Native audio dependencies.
```
**Notes:**
Expand All @@ -70,11 +70,11 @@ dependencies:

| Platform | Video | Audio | Notes | Demo |
| -------- | ----- | ----- | ----- | ---- |
| Android | ✅ | ✅ | Android 5.0 or above. | [Download](https://github.com/media-kit/media-kit/releases/download/media_kit-v1.1.7/media_kit_test_android-arm64-v8a.apk) |
| iOS | ✅ | ✅ | iOS 9 or above. | [Download](https://github.com/media-kit/media-kit/releases/download/media_kit-v1.1.7/media_kit_test_ios_arm64.7z) |
| macOS | ✅ | ✅ | macOS 10.9 or above. | [Download](https://github.com/media-kit/media-kit/releases/download/media_kit-v1.1.7/media_kit_test_macos_universal.7z) |
| Windows | ✅ | ✅ | Windows 7 or above. | [Download](https://github.com/media-kit/media-kit/releases/download/media_kit-v1.1.7/media_kit_test_win32_x64.7z) |
| GNU/Linux | ✅ | ✅ | Any modern GNU/Linux distribution. | [Download](https://github.com/media-kit/media-kit/releases/download/media_kit-v1.1.7/media_kit_test_linux_x64.7z) |
| Android | ✅ | ✅ | Android 5.0 or above. | [Download](https://github.com/media-kit/media-kit/releases/download/media_kit-v1.1.8/media_kit_test_android-arm64-v8a.apk) |
| iOS | ✅ | ✅ | iOS 9 or above. | [Download](https://github.com/media-kit/media-kit/releases/download/media_kit-v1.1.8/media_kit_test_ios_arm64.7z) |
| macOS | ✅ | ✅ | macOS 10.9 or above. | [Download](https://github.com/media-kit/media-kit/releases/download/media_kit-v1.1.8/media_kit_test_macos_universal.7z) |
| Windows | ✅ | ✅ | Windows 7 or above. | [Download](https://github.com/media-kit/media-kit/releases/download/media_kit-v1.1.8/media_kit_test_win32_x64.7z) |
| GNU/Linux | ✅ | ✅ | Any modern GNU/Linux distribution. | [Download](https://github.com/media-kit/media-kit/releases/download/media_kit-v1.1.8/media_kit_test_linux_x64.7z) |
| Web | ✅ | ✅ | Any modern web browser. | [Visit](https://media-kit.github.io/media-kit/) |

<table>
Expand Down Expand Up @@ -1527,41 +1527,43 @@ Edit `android/app/src/main/AndroidManifest.xml` to add the following permissions
Internet access permissions.
-->
<uses-permission android:name="android.permission.INTERNET" />
<!--
Storage access permissions.
Android 12 or lower.
-->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!--
Media access permissions.
Android 13 or higher.
https://developer.android.com/about/versions/13/behavior-changes-13#granular-media-permissions
-->
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
<!--
Storage access permissions.
Android 12 or lower.
-->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
</manifest>
```

Use [`package:permission_handler`](https://pub.dev/packages/permission_handler) to request access at runtime:

```dart
if (/* Android 13 or higher. */) {
if (await Permission.storage.isDenied || await Permission.storage.isPermanentlyDenied) {
final state = await Permission.storage.request();
// Video permissions.
if (await Permission.videos.isDenied || await Permission.videos.isPermanentlyDenied) {
final state = await Permission.videos.request();
if (!state.isGranted) {
await SystemNavigator.pop();
}
}
} else {
// Audio permissions.
if (await Permission.audio.isDenied || await Permission.audio.isPermanentlyDenied) {
final state = await Permission.audio.request();
if (!state.isGranted) {
await SystemNavigator.pop();
}
}
if (await Permission.videos.isDenied || await Permission.videos.isPermanentlyDenied) {
final state = await Permission.videos.request();
} else {
if (await Permission.storage.isDenied || await Permission.storage.isPermanentlyDenied) {
final state = await Permission.storage.request();
if (!state.isGranted) {
await SystemNavigator.pop();
}
Expand Down
5 changes: 5 additions & 0 deletions libs/android/media_kit_libs_android_audio/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 1.3.4

- build: bump dependencies
- fix: DTS support

## 1.3.3

- build: bump dependencies
Expand Down
24 changes: 12 additions & 12 deletions libs/android/media_kit_libs_android_audio/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ task downloadDependencies(type: Exec) {

// Download all *.jar dependencies & verify their MD5 checksums.

def urlDefaultARM64 = "https://github.com/media-kit/libmpv-android-audio-build/releases/download/v1.1.3/default-arm64-v8a.jar"
def urlDefaultARMEABI = "https://github.com/media-kit/libmpv-android-audio-build/releases/download/v1.1.3/default-armeabi-v7a.jar"
def urlDefaultX86_64 = "https://github.com/media-kit/libmpv-android-audio-build/releases/download/v1.1.3/default-x86_64.jar"
def urlDefaultX86 = "https://github.com/media-kit/libmpv-android-audio-build/releases/download/v1.1.3/default-x86.jar"
def urlDefaultARM64 = "https://github.com/media-kit/libmpv-android-audio-build/releases/download/v1.1.4/default-arm64-v8a.jar"
def urlDefaultARMEABI = "https://github.com/media-kit/libmpv-android-audio-build/releases/download/v1.1.4/default-armeabi-v7a.jar"
def urlDefaultX86_64 = "https://github.com/media-kit/libmpv-android-audio-build/releases/download/v1.1.4/default-x86_64.jar"
def urlDefaultX86 = "https://github.com/media-kit/libmpv-android-audio-build/releases/download/v1.1.4/default-x86.jar"

def destDefaultARM64 = file("$buildDir/v1.1.3/default-arm64-v8a.jar")
def destDefaultARMEABI = file("$buildDir/v1.1.3/default-armeabi-v7a.jar")
def destDefaultX86_64 = file("$buildDir/v1.1.3/default-x86_64.jar")
def destDefaultX86 = file("$buildDir/v1.1.3/default-x86.jar")
def destDefaultARM64 = file("$buildDir/v1.1.4/default-arm64-v8a.jar")
def destDefaultARMEABI = file("$buildDir/v1.1.4/default-armeabi-v7a.jar")
def destDefaultX86_64 = file("$buildDir/v1.1.4/default-x86_64.jar")
def destDefaultX86 = file("$buildDir/v1.1.4/default-x86.jar")

if (!destDefaultARM64.exists()) {
destDefaultARM64.parentFile.mkdirs()
Expand Down Expand Up @@ -98,16 +98,16 @@ task downloadDependencies(type: Exec) {
def md5DefaultX86_64 = MessageDigest.getInstance("MD5").digest(Files.readAllBytes(destDefaultX86_64.toPath())).encodeHex().toString()
def md5DefaultX86 = MessageDigest.getInstance("MD5").digest(Files.readAllBytes(destDefaultX86.toPath())).encodeHex().toString()

if (md5DefaultARM64 != "a34a9dd3c78caeb7536de05600b1a23f") {
if (md5DefaultARM64 != "78a1a05fc812cd944c59d6cc23966634") {
throw new GradleException("media_kit: arm64-v8a JAR verification failed.")
}
if (md5DefaultARMEABI != "21584c9df210dc5d3006b4ca135c8277") {
if (md5DefaultARMEABI != "2ac4c22fe6652c8624462d4108c15f94") {
throw new GradleException("media_kit: armeabi-v7a JAR verification failed.")
}
if (md5DefaultX86_64 != "ea568e2763ec2296133562bd6440c16f") {
if (md5DefaultX86_64 != "6c0555c28c14d434c32ab8ddd8d11370") {
throw new GradleException("media_kit: x86_64 JAR verification failed.")
}
if (md5DefaultX86 != "4dfaeadd63b370d04995eb5157b2aae0") {
if (md5DefaultX86 != "d8323463ed636734d7e576e0a1fcbd01") {
throw new GradleException("media_kit: x86 JAR verification failed.")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Add in your `pubspec.yaml`:

```yaml
dependencies:
media_kit_libs_android_audio: ^1.3.3
media_kit_libs_android_audio: ^1.3.4
```
This will automatically bundle required shared libraries for audio (only) playback on Android.
2 changes: 1 addition & 1 deletion libs/android/media_kit_libs_android_audio/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: media_kit_libs_android_audio
description: Android package providing audio (only) native libraries for package:media_kit.
version: 1.3.3
version: 1.3.4
homepage: https://github.com/media-kit/media-kit.git
repository: https://github.com/media-kit/media-kit.git

Expand Down
5 changes: 5 additions & 0 deletions libs/android/media_kit_libs_android_video/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 1.3.4

- build: bump dependencies
- fix: DTS support

## 1.3.3

- build: bump dependencies
Expand Down
24 changes: 12 additions & 12 deletions libs/android/media_kit_libs_android_video/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ task downloadDependencies(type: Exec) {

// Download all *.jar dependencies & verify their MD5 checksums.

def urlDefaultARM64 = "https://github.com/media-kit/libmpv-android-video-build/releases/download/v1.1.3/default-arm64-v8a.jar"
def urlDefaultARMEABI = "https://github.com/media-kit/libmpv-android-video-build/releases/download/v1.1.3/default-armeabi-v7a.jar"
def urlDefaultX86_64 = "https://github.com/media-kit/libmpv-android-video-build/releases/download/v1.1.3/default-x86_64.jar"
def urlDefaultX86 = "https://github.com/media-kit/libmpv-android-video-build/releases/download/v1.1.3/default-x86.jar"
def urlDefaultARM64 = "https://github.com/media-kit/libmpv-android-video-build/releases/download/v1.1.4/default-arm64-v8a.jar"
def urlDefaultARMEABI = "https://github.com/media-kit/libmpv-android-video-build/releases/download/v1.1.4/default-armeabi-v7a.jar"
def urlDefaultX86_64 = "https://github.com/media-kit/libmpv-android-video-build/releases/download/v1.1.4/default-x86_64.jar"
def urlDefaultX86 = "https://github.com/media-kit/libmpv-android-video-build/releases/download/v1.1.4/default-x86.jar"

def destDefaultARM64 = file("$buildDir/v1.1.3/default-arm64-v8a.jar")
def destDefaultARMEABI = file("$buildDir/v1.1.3/default-armeabi-v7a.jar")
def destDefaultX86_64 = file("$buildDir/v1.1.3/default-x86_64.jar")
def destDefaultX86 = file("$buildDir/v1.1.3/default-x86.jar")
def destDefaultARM64 = file("$buildDir/v1.1.4/default-arm64-v8a.jar")
def destDefaultARMEABI = file("$buildDir/v1.1.4/default-armeabi-v7a.jar")
def destDefaultX86_64 = file("$buildDir/v1.1.4/default-x86_64.jar")
def destDefaultX86 = file("$buildDir/v1.1.4/default-x86.jar")

if (!destDefaultARM64.exists()) {
destDefaultARM64.parentFile.mkdirs()
Expand Down Expand Up @@ -98,16 +98,16 @@ task downloadDependencies(type: Exec) {
def md5DefaultX86_64 = MessageDigest.getInstance("MD5").digest(Files.readAllBytes(destDefaultX86_64.toPath())).encodeHex().toString()
def md5DefaultX86 = MessageDigest.getInstance("MD5").digest(Files.readAllBytes(destDefaultX86.toPath())).encodeHex().toString()

if (md5DefaultARM64 != "b2ba098ee9632ba7241e9ede89f17af3") {
if (md5DefaultARM64 != "f91527316d2bbababadff81fc7f90580") {
throw new GradleException("media_kit: arm64-v8a JAR verification failed.")
}
if (md5DefaultARMEABI != "4f1e51e9e14928f8abd8964cc10b5142") {
if (md5DefaultARMEABI != "aa634169aa2323b2ae02ac570594db89") {
throw new GradleException("media_kit: armeabi-v7a JAR verification failed.")
}
if (md5DefaultX86_64 != "0a58c0ee5890b6d0aff5438f5d7a34aa") {
if (md5DefaultX86_64 != "cc9ebfd2b57eb28f4971b42d5d689f77") {
throw new GradleException("media_kit: x86_64 JAR verification failed.")
}
if (md5DefaultX86 != "b1e9e34c00cc324004d65ee5b71e24e3") {
if (md5DefaultX86 != "d0d9caaa4240a41ccd7e2f6e30079b2b") {
throw new GradleException("media_kit: x86 JAR verification failed.")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Add in your `pubspec.yaml`:

```yaml
dependencies:
media_kit_libs_android_video: ^1.3.3
media_kit_libs_android_video: ^1.3.4
```
This will automatically bundle required shared libraries for video (& audio) playback on Android.
2 changes: 1 addition & 1 deletion libs/android/media_kit_libs_android_video/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: media_kit_libs_android_video
description: Android package providing video (& audio) native libraries for package:media_kit.
version: 1.3.3
version: 1.3.4
homepage: https://github.com/media-kit/media-kit.git
repository: https://github.com/media-kit/media-kit.git

Expand Down
6 changes: 6 additions & 0 deletions libs/ios/media_kit_libs_ios_audio/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 1.1.4

- fix: DTS support ([#437](https://github.com/media-kit/media-kit/issues/437))
- perf: replace [LibreSSL](https://www.libressl.org/) w/ [Mbed TLS](https://github.com/Mbed-TLS/mbedtls)
- perf: fix and enable assembly optimizations

## 1.1.3

- fix: DASH having BaseURL(s) with special characters not loading ([#353](https://github.com/media-kit/media-kit/issues/353))
Expand Down
2 changes: 1 addition & 1 deletion libs/ios/media_kit_libs_ios_audio/example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Add in your `pubspec.yaml`:

```yaml
dependencies:
media_kit_libs_ios_audio: ^1.1.3
media_kit_libs_ios_audio: ^1.1.4
```
This will automatically bundle required shared libraries for audio playback on iOS.
4 changes: 2 additions & 2 deletions libs/ios/media_kit_libs_ios_audio/ios/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
all: Frameworks/*.xcframework Frameworks/.symlinks

MPV_XCFRAMEWORKS_VERSION=v0.5.8
MPV_XCFRAMEWORKS_SHA256SUM=2fbaa5e21ee3af624f4e51c14252508152d703c5efc717046237b133f49bb089
MPV_XCFRAMEWORKS_VERSION=v0.6.0
MPV_XCFRAMEWORKS_SHA256SUM=8b8de92dc5482b8950c18bce6b8fa90204fd15af18f371acc9f5be07a4234e49

.cache/xcframeworks/libmpv-xcframeworks-${MPV_XCFRAMEWORKS_VERSION}-ios-universal.tar.gz:
mkdir -p .cache/xcframeworks
Expand Down
2 changes: 1 addition & 1 deletion libs/ios/media_kit_libs_ios_audio/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: media_kit_libs_ios_audio
description: iOS package providing audio native libraries for package:media_kit.
version: 1.1.3
version: 1.1.4
homepage: https://github.com/media-kit/media-kit.git
repository: https://github.com/media-kit/media-kit.git

Expand Down
10 changes: 10 additions & 0 deletions libs/ios/media_kit_libs_ios_video/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## 1.1.4

- feat: AV1 support ([#429](https://github.com/media-kit/media-kit/issues/429))
- fix: DTS support ([#437](https://github.com/media-kit/media-kit/issues/437))
- fix: movtext subtitle support ([#394](https://github.com/media-kit/media-kit/issues/394))
- fix: image based subtitles
- fix: HDR support ([#372](https://github.com/media-kit/media-kit/issues/372))
- perf: replace [LibreSSL](https://www.libressl.org/) w/ [Mbed TLS](https://github.com/Mbed-TLS/mbedtls)
- perf: fix and enable assembly optimizations

## 1.1.3

- fix: DASH having BaseURL(s) with special characters not loading ([#353](https://github.com/media-kit/media-kit/issues/353))
Expand Down
2 changes: 1 addition & 1 deletion libs/ios/media_kit_libs_ios_video/example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Add in your `pubspec.yaml`:

```yaml
dependencies:
media_kit_libs_ios_video: ^1.1.3
media_kit_libs_ios_video: ^1.1.4
```
This will automatically bundle required shared libraries for video (& audio) playback on iOS.
4 changes: 2 additions & 2 deletions libs/ios/media_kit_libs_ios_video/ios/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
all: Frameworks/*.xcframework Frameworks/.symlinks

MPV_XCFRAMEWORKS_VERSION=v0.5.8
MPV_XCFRAMEWORKS_SHA256SUM=1dcf5eb727689f01844c8b9dc0e7dd414397aa8cfd72120038defa244afeaad1
MPV_XCFRAMEWORKS_VERSION=v0.6.0
MPV_XCFRAMEWORKS_SHA256SUM=a95bc18508af26136b8a408341c05b5585d644ec013f00ac07db09d2e28d36ae

.cache/xcframeworks/libmpv-xcframeworks-${MPV_XCFRAMEWORKS_VERSION}-ios-universal.tar.gz:
mkdir -p .cache/xcframeworks
Expand Down
2 changes: 1 addition & 1 deletion libs/ios/media_kit_libs_ios_video/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: media_kit_libs_ios_video
description: iOS package providing video (& audio) native libraries for package:media_kit.
version: 1.1.3
version: 1.1.4
homepage: https://github.com/media-kit/media-kit.git
repository: https://github.com/media-kit/media-kit.git

Expand Down
4 changes: 4 additions & 0 deletions libs/linux/media_kit_libs_linux/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.1.3

- feat: improve compile-time failure handling

## 1.1.2

- build: bump libraries
Expand Down
2 changes: 1 addition & 1 deletion libs/linux/media_kit_libs_linux/example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Add in your `pubspec.yaml`:

```yaml
dependencies:
media_kit_libs_linux: ^1.1.2
media_kit_libs_linux: ^1.1.3
```
This will automatically invoke the necessary initialization code.
Loading

0 comments on commit c3e3f60

Please sign in to comment.