@sidd123456 need more details
I got the same problem.
After clicking the play button / change the play state, the player will start playing 1-2 seconds and just freezed.
@tikkichan4 do you get anything from onError?
+1.
onError output: {target: 304, error: "UNAUTHORIZED_OVERLAY"}
@martinchristov On Android, the player view shouldn't be covered with any other view
https://github.com/inProgress-team/react-native-youtube#unauthorized_overlay-and-player_view_too_small-on-android
@davidohayon669
I have the same problem on iOS. The player starts working and then gets paused automatically with no error. This happens only the first time.
After the first time, the player plays any number of videos normally. How can this be fixed? I've tried versions 0.8.2 as well as 1.0.0-beta3.
@salmankhann you can simply do this:
{(Platform.OS !== 'ios') &&
<WebView
style={{ alignSelf: 'stretch' }}
source={{uri: `https://www.youtube.com/embed/${this.state.youtubeID}?controls=1&showinfo=0`}}
/>
}
I had no more time to put into it, so this is what I did.
But you're suggesting to do this without using this component right ?
Sent from my iPhone
On Sep 15, 2017, at 5:12 PM, Martin Christov <[email protected]notifications@github.com> wrote:
@salmankhannhttps://github.com/salmankhann you can simply do this:
{(Platform.OS !== 'ios') &&
source={{uri: https://www.youtube.com/embed/${this.state.youtubeID}?controls=1&showinfo=0}}
/>
}
I had no more time to put into it, so this is what I did.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/inProgress-team/react-native-youtube/issues/215#issuecomment-329778655, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AC0qzpbOU0W8ZENOMUn1QDwhK4nqSd4Uks5sineygaJpZM4PQr6u.
To be clear though, this library used to work with me but something broke it and now it just pauses automatically only the first time you play. Works perfectly every time after that. Also to add, I'm playing in full screen only and not inline
Sent from my iPhone
On Sep 15, 2017, at 5:12 PM, Martin Christov <[email protected]notifications@github.com> wrote:
@salmankhannhttps://github.com/salmankhann you can simply do this:
{(Platform.OS !== 'ios') &&
source={{uri: https://www.youtube.com/embed/${this.state.youtubeID}?controls=1&showinfo=0}}
/>
}
I had no more time to put into it, so this is what I did.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/inProgress-team/react-native-youtube/issues/215#issuecomment-329778655, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AC0qzpbOU0W8ZENOMUn1QDwhK4nqSd4Uks5sineygaJpZM4PQr6u.
In that case you'll have to figure it out, because the webview doesn't have fullscreen :)
let me know if you do...
@salmankhann can you provide more details? like exact props you pass to the component, stuff coming from onChangeState / onError or can you recreate this problem with the example app?
same issue :( any one has solution for this ???
apiKey={APP_CONFIG.youtubeKey}
play={true} // control playback of video with true/false
showFullscreenButton
fullscreen={this.state.fullscreen} // control whether the video should play in fullscreen or inline
onChangeFullscreen={e => {
this.setState({fullscreen: e.isFullscreen});
}}
// loop // control whether the video should loop when ended
// onReady={e => this.setState({isReady: true})}
// onChangeState={e => this.setState({ status: e.state })}
// onChangeQuality={e => this.setState({ quality: e.quality })}
onError={e => console.log('ERROR', e)}
controls={2}
style={{flex: 1, alignSelf: 'stretch'}}
/>
I have the same problem, apparently the video only plays if it is fullscreen.
<YouTube
videoId="xxxxx"
apiKey="xxxxx"
play
fullscreen
style={{ alignSelf: 'stretch', height: 300 }}
/>
I have the same problem, Video getting stop after some time and getting this below error
{"error": "PLAYER_VIEW_TOO_SMALL", "target": 15143}
Most helpful comment
I got the same problem.
After clicking the play button / change the play state, the player will start playing 1-2 seconds and just freezed.