newtaDev / pod_player

Video player for flutter web & mobile devices, Play video from youtube or vimeo or network in flutter using pod player
https://pub.dev/packages/pod_player
MIT License
105 stars 201 forks source link

Vimeo private video is not working #151

Open yangsh91 opened 1 year ago

yangsh91 commented 1 year ago

`class _VodScreenState extends State { late final PodPlayerController controller;

@override void initState() { super.initState();

String videoId = *****;
String token = *****;
final Map<String, String> headers = <String, String>{};
headers['Authorization'] = 'Bearer $token';

print(headers);

controller = PodPlayerController(
  playVideoFrom: PlayVideoFrom.vimeoPrivateVideos(
    videoId,
    httpHeaders: headers,
  ),
)..initialise();

}

@override Widget build(BuildContext context) { return Scaffold( body: PodVideoPlayer(controller: controller), ); } } `

[POD] PodVideoPlayerType.vimeoPrivateVideos flutter: ===== VIMEO API ERROR: type 'Null' is not a subtype of type 'List' in type cast ========== [POD] ERROR ON POD_PLAYER: type 'Null' is not a subtype of type 'List' in type cast [POD] [#95632] Pod Player Controller failed to initialize

I don't know How to solve this problem?

Joseph-Nathan commented 1 year ago

any news !

stormenergy91 commented 1 year ago

I have the same problem. I think the problem is that in the line 80 of video_apis.dart it refer to files but there is no this option in the json response of the endpoint: https://api.vimeo.com/videos/$videoId

stormenergy91 commented 1 year ago

Reading Vimeo docs I think this function is only available with Vimeo Standard (ex Pro) or greater