UNPKG

innertuber-rn

Version:

A wrapper around YouTube's private API. Supports YouTube, YouTube Music, YouTube Kids and YouTube Studio (WIP).

19 lines 661 B
import { timeToSeconds } from '../../utils/Utils.js'; import { YTNode } from '../helpers.js'; import NavigationEndpoint from './NavigationEndpoint.js'; import Text from './misc/Text.js'; class ChildVideo extends YTNode { constructor(data) { super(); this.id = data.videoId; this.title = new Text(data.title); this.duration = { text: data.lengthText.simpleText, seconds: timeToSeconds(data.lengthText.simpleText) }; this.endpoint = new NavigationEndpoint(data.navigationEndpoint); } } ChildVideo.type = 'ChildVideo'; export default ChildVideo; //# sourceMappingURL=ChildVideo.js.map