AriasBros / flutter_video_player_web_shaka

BSD 3-Clause "New" or "Revised" License
4 stars 5 forks source link

Support for video_player_platform_interface version 6.1.0 #4

Open benjamincox opened 1 year ago

benjamincox commented 1 year ago

I'd love to try this library but got the following with pub get:

Because no versions of video_player match >2.6.1 <3.0.0 and video_player 2.6.1 depends on video_player_platform_interface ^6.1.0, video_player ^2.6.1 requires video_player_platform_interface ^6.1.0.

And because every version of video_player_web from git depends on video_player_platform_interface >=4.2.0 <6.0.0 and every version of vimeo_video_player from path depends on video_player ^2.6.1, video_player_web from git is incompatible with vimeo_video_player from path.

Seems likely that just updating the pubspec.yaml to support ^6.1.0 should work.

benjamincox commented 1 year ago

Well, I was wrong about that - here's what I got when I tried it:

Launching lib/main.dart on Chrome in debug mode...
Waiting for connection from debug service on Chrome...
../flutter_video_player_web_shaka/lib/video_player_web.dart:76:27: Error: The getter 'drmDataSource' isn't defined for the class 'DataSource'.
 - 'DataSource' is from 'package:video_player_platform_interface/video_player_platform_interface.dart' ('../../.pub-cache/hosted/pub.dev/video_player_platform_interface-6.1.0/lib/video_player_platform_interface.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'drmDataSource'.
      drmType: dataSource.drmDataSource?.type,
                          ^^^^^^^^^^^^^
../flutter_video_player_web_shaka/lib/video_player_web.dart:77:33: Error: The getter 'drmDataSource' isn't defined for the class 'DataSource'.
 - 'DataSource' is from 'package:video_player_platform_interface/video_player_platform_interface.dart' ('../../.pub-cache/hosted/pub.dev/video_player_platform_interface-6.1.0/lib/video_player_platform_interface.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'drmDataSource'.
      drmUriLicense: dataSource.drmDataSource?.uriLicense,
                                ^^^^^^^^^^^^^
../flutter_video_player_web_shaka/lib/video_player_web.dart:78:34: Error: The getter 'drmDataSource' isn't defined for the class 'DataSource'.
 - 'DataSource' is from 'package:video_player_platform_interface/video_player_platform_interface.dart' ('../../.pub-cache/hosted/pub.dev/video_player_platform_interface-6.1.0/lib/video_player_platform_interface.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'drmDataSource'.
      drmHttpHeaders: dataSource.drmDataSource?.httpHeaders,
                                 ^^^^^^^^^^^^^
../flutter_video_player_web_shaka/lib/video_player_web.dart:79:35: Error: The getter 'withCredentials' isn't defined for the class 'DataSource'.
 - 'DataSource' is from 'package:video_player_platform_interface/video_player_platform_interface.dart' ('../../.pub-cache/hosted/pub.dev/video_player_platform_interface-6.1.0/lib/video_player_platform_interface.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'withCredentials'.
      withCredentials: dataSource.withCredentials,
                                  ^^^^^^^^^^^^^^^
../flutter_video_player_web_shaka/lib/src/shaka_video_player.dart:46:21: Error: The getter 'VideoDrmType' isn't defined for the class 'ShakaVideoPlayer'.
 - 'ShakaVideoPlayer' is from 'package:video_player_web/src/shaka_video_player.dart' ('../flutter_video_player_web_shaka/lib/src/shaka_video_player.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'VideoDrmType'.
    if (_drmType == VideoDrmType.widevine) {
                    ^^^^^^^^^^^^
Failed to compile application.
AriasBros commented 1 year ago

Hi @benjamincox!

Are you overriding flutter_plugins with this fork?

https://github.com/AriasBros/flutter_plugins/tree/feat/drm-support

Example to override all what it is necessary: https://github.com/flutter/flutter/issues/66931#issuecomment-1153755980