getByVideo method

Future<Channel> getByVideo(
  1. dynamic videoId
)

Gets the metadata associated with the channel that uploaded the specified video.

Implementation

Future<Channel> getByVideo(dynamic videoId) async {
  videoId = VideoId.fromString(videoId);
  final videoInfoResponse = await WatchPage.get(_httpClient, videoId.value);
  final playerResponse = videoInfoResponse.playerResponse!;

  final channelId = playerResponse.videoChannelId;
  return get(ChannelId(channelId));
}