react-native-create-thumbnail icon indicating copy to clipboard operation
react-native-create-thumbnail copied to clipboard

setDataSource failed error

Open sania232 opened this issue 2 years ago • 5 comments

When Im trying this with a youtube video URL it is giving me the below error: setDataSource failed: status = 0x80000000 I followed the example code and am using React Native CLI

sania232 avatar Apr 28 '22 21:04 sania232

Same here getting following error: Error: setDataSource failed: status = 0xFFFFFFEA

Android

Local Video File

try { const response = await createThumbnail({ url: absolutePath, timeStamp: 1, }); console.log("Thumbnail: ", response.path); } catch (err) { console.error(err); }

Subiyel avatar Apr 30 '22 10:04 Subiyel

@sania232 @Subiyel I need a few inputs. Can you please check if the video is playable(using react-native-video) on the device? (using the same path)

souvik-ghosh avatar May 03 '22 17:05 souvik-ghosh

Yes, the video is playable using the same path via react-native-video. i am picking the video using react-native-image-picker. For temporary workaround i am now uploading the video to my server and using that url to create thumbnail and it works fine. Issue is occurring only using local file path.

       buildToolsVersion = "30.0.0"
        minSdkVersion = 21
        compileSdkVersion = 31
        targetSdkVersion = 31
        ndkVersion = "21.4.7075529"
       "react-native-create-thumbnail": "^1.5.1",
       "react-native": "0.67.4",

Subiyel avatar May 03 '22 17:05 Subiyel

I'm also running into this issue on Android only. For all thumbnails the return I see is: {"err": [Error: setDataSource failed: status = 0xFFFFFFEA]}.

        buildToolsVersion = "30.0.2"
        minSdkVersion = 24
        compileSdkVersion = 31
        targetSdkVersion = 30
        ndkVersion = "21.4.7075529"
        kotlinVersion = '1.5.0'
        supportLibVersion = "29"
        playServicesVersion = "17.0.0"
"react-native-create-thumbnail": "^1.5.1",
"react-native": "^0.67.4"

AdamTyler avatar May 12 '22 14:05 AdamTyler

On Android, I had 0xFFFFFFEA fixed by making sure the url starts with file://somepath rather than /somepath only

tudormarze avatar May 25 '22 13:05 tudormarze

Hii @tudormarze , Could you provide me the example of this? How can you implemented it?

Thanks

ranjitAcelucid avatar Sep 08 '23 12:09 ranjitAcelucid

@sania232 @Subiyel I need a few inputs. Can you please check if the video is playable(using react-native-video) on the device? (using the same path)

iam using youtube url links for creating thumbnails iam getting same error app.json app.json

import React, {useState} from 'react'; import { Image, Text, View, StyleSheet, TextInput, Button, ActivityIndicator, } from 'react-native'; import {createThumbnail} from 'react-native-create-thumbnail';

const placeholderImage = require('./Images/image.png');

const App = () => { const [path, setPath] = useState(''); const [thumbnail, setThumbnail] = useState(''); const [timeStamp, setTimeStamp] = useState('1000'); const [isLoading, setIsLoading] = useState(false);

return ( <View style={styles.container}> <Text style={styles.welcome}>☆CreateThumbnail example☆</Text> <TextInput value={path} onChangeText={setPath} style={styles.pathInput} placeholder="Paste video url" placeholderTextColor="lightgrey" /> <TextInput keyboardType="numeric" value={timeStamp} onChangeText={setTimeStamp} style={styles.timeInput} placeholder="Timestamp" /> <Button title="Generate Thumbnail" disabled={isLoading} onPress={generateThumbnail} /> <Text style={styles.welcome}>☆THUMBNAIL☆</Text> <View style={styles.image}> {isLoading ? ( <ActivityIndicator size="large" /> ) : ( <Image style={styles.image} source={thumbnail ? {uri: thumbnail} : placeholderImage} /> )} </View> </View> );

async function generateThumbnail() { if (!path) { return; }

setIsLoading(true);

try {
  const response = await createThumbnail({
    url: path,
    timeStamp: parseInt(timeStamp, 10),
  });
  setThumbnail(response.path);
} catch (err) {
  console.error(err, 'error');
} finally {
  setIsLoading(false);
}

} };

const styles = StyleSheet.create({ container: { flex: 1, justifyContent: 'center', alignItems: 'center', backgroundColor: '#F5FCFF', }, welcome: { fontSize: 20, textAlign: 'center', margin: 20, color: 'black', }, instructions: { textAlign: 'center', color: '#333333', marginBottom: 20, }, image: { height: 150, width: 250, backgroundColor: 'lightgrey', justifyContent: 'center', }, pathInput: { backgroundColor: '#eaeaea', width: '80%', paddingHorizontal: 10, color: 'black', borderColor: 'lightgrey', borderWidth: 1, }, timeInput: { backgroundColor: '#eaeaea', width: '40%', paddingHorizontal: 10, margin: 20, color: 'black', borderColor: 'lightgrey', borderWidth: 1, }, });

export default App; this is my code can u please help

vrsmk1995 avatar Jan 29 '24 04:01 vrsmk1995

@vrsmk1995 Youtube links won't work. This library only supports direct links to videos.

souvik-ghosh avatar Jan 30 '24 09:01 souvik-ghosh

is there any solution for HLS player videos support with this plugin

On Tue, 30 Jan 2024 at 15:18, Souvik Ghosh @.***> wrote:

@vrsmk1995 https://github.com/vrsmk1995 Youtube links won't work. This library only supports direct links to videos.

— Reply to this email directly, view it on GitHub https://github.com/souvik-ghosh/react-native-create-thumbnail/issues/62#issuecomment-1916454765, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3QYYNESSTZRBJOJ7ZFXK7TYRC6WRAVCNFSM5UTYNZW2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJRGY2DKNBXGY2Q . You are receiving this because you were mentioned.Message ID: @.*** com>

vrsmk1995 avatar Jan 31 '24 04:01 vrsmk1995

@vrsmk1995 Any breakthrough on HLS player support ?

ahsanreal4 avatar Feb 26 '24 15:02 ahsanreal4