What happens (under the cover) when I click the Play "button" on YouTube?

  • Note 1: This question applies to HTML5 only , not Flash video.
  • Note 2: In addition, these are specifically targets Android HTML5 video .

Considering the following HTML5 video on YouTube:

<div id="player">
<video poster="data:image/gif;
base64,R0lGODlhAQABAIAAAAAAAAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" 
src="http://v19.lscache2.c.youtube.com/videoplayback?begin=0&amp;itag=18&amp;
ipbits=0ampsignature=151700E49EA1B695940D89926C1C07CDF0C176F0.B7DE0453C70BFBA0BA644DE7F6BBB72E9EE43B5F&amp;
sparams=id%2Cexpire%2Cip%2Cipbits%2Citag%2Cratebypass%2Coc%3AU0hPSVRSUl9FSkNOOV9MTFZF&amp;
sver=3&amp;
ratebypass=yes&amp;expire=1304474400&amp;len=265000&amp;key=yt1&amp;ip=0.0.0.0&amp;
id=55884c15b4baba8f&amp;el=home&amp;yms=5602568839599417322&amp;app=youtube_mobile" class="bn" width="1" height="2" id="player_VYhMFbS6uo8">
</video>
</div>

I can identify the attribute src=as a loadable URL ... what exactly?

, WebView HTML5 , WebChromeClient: , , , Android , , , WebView.

, "click", .

src= URL (http://v19.lscache2.c.youtube.com/videoplayback?begin...) WebView, , WebChromeClient.onShowCustomView() , , , ... , .

, : WebView WebChromeClient, ?

, "click", ?

: @dronus LogCat ( ):

05-03 19:35:07.296: INFO/StagefrightPlayer(121):
setDataSource('http://v19.lscache2.c.youtube.com/videoplayback?begin=0
&itag=18
&ipbits=0
&signature=BB85C25344502EF07EC970250EFBF6661098373E.6A7E108FA6F48A0741CDF7A356B0E1474F185195
&sparams=id%2Cexpire%2Cip%2Cipbits%2Citag%2Cratebypass%2Coc%3AU0hPSVRTVl9FSkNOOV9MTVpJ
&sver=3
&ratebypass=yes
&expire=1304488800
&len=265000
&key=yt1
&ip=0.0.0.0
&id=55884c15b4baba8f
&el=watch
&yms=5602637908081220405
&app=youtube_mobile')

: ?

+3
1

, Intent , URL- .

Intent, , , ?

Intent tostart = new Intent(Intent.ACTION_VIEW);
tostart.setDataAndType(Uri.parse(movieurl), "video/*");
startActivity(tostart);
+1

All Articles