Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

[video_player_web] Add cookie support (2/3) #3137

Closed
wants to merge 1 commit into from
Closed
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
4 changes: 4 additions & 0 deletions packages/video_player/video_player_web/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.1.5

* Add cookie support for remote network sources.

## 0.1.4

* Added option to set the video playback speed on the video controller.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ class VideoPlayerPlugin extends VideoPlayerPlatform {
// Do NOT modify the incoming uri, it can be a Blob, and Safari doesn't
// like blobs that have changed.
uri = dataSource.uri;
if (dataSource.cookies != null) {
for (final cookie in dataSource.cookies) {
document.cookie = cookie;
}
}
break;
case DataSourceType.asset:
String assetUrl = dataSource.asset;
Expand Down
4 changes: 2 additions & 2 deletions packages/video_player/video_player_web/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ homepage: https://github.com/flutter/plugins/tree/master/packages/video_player/v
# 0.1.y+z is compatible with 1.0.0, if you land a breaking change bump
# the version to 2.0.0.
# See more details: https://github.com/flutter/flutter/wiki/Package-migration-to-1.0.0
version: 0.1.4
version: 0.1.5

flutter:
plugin:
Expand All @@ -19,7 +19,7 @@ dependencies:
flutter_web_plugins:
sdk: flutter
meta: ^1.1.7
video_player_platform_interface: ^2.2.0
video_player_platform_interface: ^2.3.0

dev_dependencies:
flutter_test:
Expand Down