You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: MIGRATION-v3-to-v4.md
+30-30Lines changed: 30 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,16 @@
1
-
# Migration Guide: v3.x.x → v4.0.0 🎬
1
+
# Migration Guide: v3.x.x → v4 🎬
2
2
3
-
This guide will help you migrate from `cached_video_player_plus` v3.x.x to v4.0.0.
3
+
This guide will help you migrate from `cached_video_player_plus` v3.x.x to v4.
4
4
5
5
## Overview
6
6
7
-
Version 4.0.0 introduces a major API restructure that simplifies usage while maintaining all existing functionality. The package now uses a class-based approach instead of the previous controller-widget pattern.
7
+
Version 4 introduces a major API restructure that simplifies usage while maintaining all existing functionality. The package now uses a class-based approach instead of the previous controller-widget pattern.
8
8
9
9
_Translation: We Marie Kondo'd the API - everything that doesn't spark joy got yeeted into the digital void!_ ✨🗑️
Version 4.0.0 migrates from `get_storage` to `shared_preferences` for storing cached video metadata. This change improves compatibility and reduces dependencies.
13
+
Version 4 migrates from `get_storage` to `shared_preferences` for storing cached video metadata. This change improves compatibility and reduces dependencies.
14
14
15
15
### 🔄 Automatic Migration
16
16
@@ -44,11 +44,11 @@ _Don't worry, we'll clean up after ourselves - unlike that one roommate who neve
44
44
45
45
### 🗝️ Cache Key Prefix Change (No Action Needed)
46
46
47
-
In v4.0.0, the internal cache key prefix used for storing video cache metadata has changed:
47
+
In v4, the internal cache key prefix used for storing video cache metadata has changed:
48
48
49
49
-**Before (v3.x.x):**
50
50
-`cached_video_player_plus_video_expiration_of_`
51
-
-**After (v4.0.0):**
51
+
-**After (v4):**
52
52
-`cached_video_player_plus_caching_time_of_`
53
53
54
54
This change is handled automatically by the package and does **not** require any action from developers. It is noted here for reference and transparency. All cache management and migration utilities are aware of this change and will continue to work as expected.
@@ -70,7 +70,7 @@ await controller.initialize();
70
70
CachedVideoPlayerPlus(controller)
71
71
```
72
72
73
-
**After (v4.0.0):**
73
+
**After (v4):**
74
74
75
75
```dart
76
76
// New class-based approach
@@ -126,7 +126,7 @@ final controller = CachedVideoPlayerPlusController.contentUri(
126
126
```
127
127
128
128
```dart
129
-
// After (v4.0.0)
129
+
// After (v4)
130
130
// Network videos
131
131
final player = CachedVideoPlayerPlus.networkUrl(
132
132
Uri.parse('https://example.com/video.mp4'),
@@ -152,13 +152,13 @@ final player = CachedVideoPlayerPlus.contentUri(
152
152
153
153
### 4. Deprecated Constructor Removal
154
154
155
-
The deprecated `CachedVideoPlayerPlusController.network()` constructor has been completely removed in v4.0.0:
155
+
The deprecated `CachedVideoPlayerPlusController.network()` constructor has been completely removed in v4:
We Marie Kondo'd the entire API! Everything that didn't spark joy got yeeted into the digital void! ✨🗑️
24
24
@@ -32,7 +32,7 @@ We Marie Kondo'd the entire API! Everything that didn't spark joy got yeeted int
32
32
>
33
33
> **🚨 BREAKING CHANGES AHEAD!**
34
34
>
35
-
> Version 4.0.0 introduces a total API restructuring, adding new features while maintaining all functionality. These changes introduce major breaking changes.
35
+
> Version 4 introduces a total API restructuring, adding new features while maintaining all functionality. These changes introduce major breaking changes.
0 commit comments