diff --git a/packages/video_player/video_player_web/CHANGELOG.md b/packages/video_player/video_player_web/CHANGELOG.md index d18504913d89..86d9ba700d08 100644 --- a/packages/video_player/video_player_web/CHANGELOG.md +++ b/packages/video_player/video_player_web/CHANGELOG.md @@ -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. diff --git a/packages/video_player/video_player_web/lib/video_player_web.dart b/packages/video_player/video_player_web/lib/video_player_web.dart index 251da3779e7f..4958e69ee869 100644 --- a/packages/video_player/video_player_web/lib/video_player_web.dart +++ b/packages/video_player/video_player_web/lib/video_player_web.dart @@ -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; diff --git a/packages/video_player/video_player_web/pubspec.yaml b/packages/video_player/video_player_web/pubspec.yaml index 98191bf6ba85..165a535233d4 100644 --- a/packages/video_player/video_player_web/pubspec.yaml +++ b/packages/video_player/video_player_web/pubspec.yaml @@ -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: @@ -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: