0
votes

I load an HTML article into UIWebView which contain video. However, after I finish playing the video, and I replay it, that video becoming the next video (maybe it's something like playlist, I don't know). How to stop it play next video when U replay that video? I just wanna play one video, do not next video.

I use default player iOS

I use this in webview (from API) :

<iframe src=\"https://www.youtube.com/embed/sample\" width=\"100%\" height=\"auto\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"></iframe>
1
Did adding autoplay=0 help? - valosip
I did. but it's not working - Seishin Okigaru
Finally, I found the SOLUTION. use '?rel=0' at the end of embed youtube id to disappear the video suggestion, so there's nothing suggest and next video Sample : from : youtube.com/embed/TSUxbWmdNms to : youtube.com/embed/TSUxbWmdNms?rel=0 Thank to everybody for helping and answer :) Best Regards - Seishin Okigaru
hello @SeishinOkigaru it is not working in iframe so please have any solution please share with me thanks. - Ilesh P
Hello @ilesh , I used iframe and it's work in iOS webView. Do you use embed url in youtube? Regards - Seishin Okigaru

1 Answers

0
votes

Try adding the "autoplay=0" parameter to the video source

src="//www.youtube.com/embed/AgwAywJlo1M?list=foo&autoplay=0"