Reputation: 159
I'm trying to play youtube videos as audio file in react-native-video with link gathered from react-native-ytdl. It is starts playing but I'm not unable to seek forward or backward. Is there any way to buffer audio file in memory? So maybe I can seek forward/backward with that method.
I am open to another solutions aswell.
Upvotes: 1
Views: 671
Reputation: 159
I fixed the issue with changing my code to this;
const urls = await ytdl(youtubeURL, { filter: format => format.container === 'mp4' , quality: 'highestaudio', highWaterMark: 1024 * 1024 * 14 });
ytdl was using .webm for default and react-native-video can't buffer(or seek) .webm files but it is okay with mp4 now.
Upvotes: 1