Note that there are some explanatory texts on larger screens.

plurals
  1. POSeeking forward in YouTube HTML5 video over Android WebView
    primarykey
    data
    text
    <blockquote> <p><strong>EDIT</strong> Nevermind, YouTube released the Native Android API (<a href="https://developers.google.com/youtube/android/player/" rel="nofollow noreferrer">https://developers.google.com/youtube/android/player/</a>)</p> </blockquote> <p>I have an application that shows an HTML5 videoview over a WebView. This video is forced to be HTML5 from YouTube service (<a href="http://www.youtube.com/embed/3FFyT039tJ0?autoplay=1&amp;rel=0&amp;showinfo=0&amp;html5=1&amp;start=90&amp;end=176" rel="nofollow noreferrer">http://www.youtube.com/embed/3FFyT039tJ0?autoplay=1&amp;rel=0&amp;showinfo=0&amp;html5=1&amp;start=90&amp;end=176</a> )</p> <p>As you can see in the URL, the parameter "start" shows the number of seconds the video must start playing at. I have been using the method <code>onShowCustomView</code> of <code>WebChromeClient</code> to obtain the <code>VideoView</code> object created by the WebView, as seen <a href="https://stackoverflow.com/questions/3815090/webview-and-html5-video">here</a>.</p> <p>When I have the reference to the <code>VideoView</code>, I can use the method <code>seekTo()</code> to accomplish my goal. Till here everything is fine, but only for Android versions lower than 4.x.</p> <p>As many of you know, the method <code>onShowCustomView</code> of <code>WebViewChromeClient</code>, from 4.x and forward, is only called when user clicks on "FullScreen" mode, but not when the video starts playing (how used to be before 4.x).</p> <p>So, the point is that I can't seek 90 seconds forward because I can't obtain the reference to the VideoView, and I can't find any workaround.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload