In ExoPlayer, i can able to play youtube video using the following code
but , when i played using the following code
i got the following error.
please help me how to covert youtube video url to play in ExoPlayer
B4X:
ExoPlayer.Prepare(ExoPlayer.CreateDashSource("https://youtube.com/api/manifest/dash/id/bf5bb2419360daf1/source/youtube?as=fmp4_audio_clear,fmp4_sd_hd_clear&sparams=ip,ipbits,expire,source,id,As&ip=0.0.0.0&ipbits=0&expire=19000000000&signature=51AF5F39AB0CEC3E5497CD9C900EBFEAECCCB5C7.8506521BFC350652163895D4C26DEE124209AA9E&key=ik0"))
but , when i played using the following code
B4X:
ExoPlayer.Prepare(ExoPlayer.CreateDashSource("https://youtube.com/watch?v=T6vELKGu-GA")
B4X:
com.google.android.exoplayer2.upstream.HttpDataSource$InvalidResponseCodeException: Response code: 404
please help me how to covert youtube video url to play in ExoPlayer