How to use the react-native-ytdl.getVideoID function in react-native-ytdl

To help you get started, we’ve selected a few react-native-ytdl examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github AbelTesfaye / dingo / src / UI / Pages / PageSearch.js View on Github external
_handleSearchSubmit = q => {
		const query = q;
		if (ytdl.validateURL(query)) {
			const videoId = ytdl.getVideoID(query);
			AppInstance.startInPlayer([{ videoId }]);
		} else {
			AppInstance.startSearch(query);
		}

		database.insertSearchHistory(new Date().getTime(), query).catch(e => console.error(e));
	};
	const AppInstance = props.AppInstance;

react-native-ytdl

YouTube video and audio stream extractor for react native.

ISC
Latest version published 3 years ago

Package Health Score

45 / 100
Full package analysis