React-native-youtube: Video Unavailable (only on IOS)

Created on 11 Sep 2018  路  2Comments  路  Source: davidohayon669/react-native-youtube

Hi,

Using the videoId T-fSsXqH-Qk
I am able to play it on Android without a problem.
However, on IOS, the video will just flash in half a
second (or less) then will show Video Unavailable.

What could be causing this?

Thanks

Most helpful comment

adding this
origin="http://www.youtube.com"
solved the issue

All 2 comments

adding this
origin="http://www.youtube.com"
solved the issue

{Platform.OS === "android" ? (
style={{ alignSelf: "stretch", height: 248 }}
source={{ uri: "https://www.youtube.com/embed/" + getFinalId }}
/>
) : (
videoId={getFinalId}
fullscreen={true}
onReady={e => this.setState({ isReady: true })}
onChangeState={e => this.setState({ status: e.state })}
onChangeQuality={e => this.setState({ quality: e.quality })}
onError={e => this.setState({ error: e.error })}
style={{ alignSelf: "stretch", height: 248 }}
/>
)}

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jokopurnomoa picture jokopurnomoa  路  5Comments

RetroPronghorn picture RetroPronghorn  路  3Comments

MattJLeach picture MattJLeach  路  5Comments

LorienHW picture LorienHW  路  3Comments

ishita-kothari picture ishita-kothari  路  5Comments