chore: migrate browser example to Shaka player [skip ci] (#471)

* chore: use Shaka for the browser example

* chore: lint

* fix(HashtagFeed): resolve type casting issue so tests pass
This commit is contained in:
LuanRT
2023-08-12 23:21:20 -03:00
committed by GitHub
parent 31d27b1bca
commit 6c8a916f0f
7 changed files with 736 additions and 144 deletions

View File

@@ -8,9 +8,10 @@ import type Actions from '../../core/Actions.js';
import type { ApiResponse } from '../../core/Actions.js';
import type ChipCloudChip from '../classes/ChipCloudChip.js';
import type { IBrowseResponse } from '../index.js';
import { PageHeader } from '../nodes.js';
export default class HashtagFeed extends FilterableFeed<IBrowseResponse> {
header?: HashtagHeader;
header?: HashtagHeader | PageHeader;
contents: RichGrid;
constructor(actions: Actions, response: IBrowseResponse | ApiResponse) {
@@ -25,7 +26,7 @@ export default class HashtagFeed extends FilterableFeed<IBrowseResponse> {
throw new InnertubeError('Content tab has no content', tab);
if (this.page.header) {
this.header = this.page.header.item().as(HashtagHeader);
this.header = this.page.header.item().as(HashtagHeader, PageHeader);
}
this.contents = tab.content.as(RichGrid);