_FF_YouTube_API.au3
works with all pages which uses the YouTube-API.
Supported commands:
loadWait / $vArg1 = TimeOut in ms (int), Default = 10000
playVideo
pauseVideo
stopVideo
clearVideo
getVideoBytesLoaded
getvideobytestotal
getVideoStartBytes
mute
unMute
isMuted
setVolume / $vArg1 = Volume (int) (min=0, max=100)
getVolume
seekTo / $vArg1 = Secs (int) / $vArg2 = allowSeekAhead (boolean), Default = true
getPlayerState
getCurrentTime
getDuration
setSize / $vArg1 = height (int) / $vArg2 = width (int) (min=50)
getVideoUrl
getVideoEmbedCode
loadVideoById / $vArg1 = id (string) / $vArg2 = start (int)
cueVideoById / $vArg1 = id (string) / $vArg2 = start (int)
Requirement(s).: FF.au3 >= 0.5.3.0 / MozRepl
Example:
#include <FF.au3> #include <_FF_YouTube_API.au3> If _FFConnect() Then _FFTabAdd("<iframe id="ytplayer" class="EmbeddedVideo" type="text/html" width="640" height="390" src="http://youtube.com/embed/T-99HbI8zec?html5=1&fs=1" frameborder="0" allowfullscreen webkitallowfullscreen /></iframe>) If _FF_YT("loadWait") Then _FF_YT("playVideo") Sleep(10000) _FF_YT("pauseVideo") _FF_YT("seekTo", 90) Sleep(3000) _FF_YT("setSize", 300) MsgBox(64, "Video size in Bytes:", _FF_YT("getVideoBytesTotal")) Sleep(5000) _FF_YT("stopVideo") EndIf _FFTabClose("YouTube - Fergie Ferg(.*?)-", "label") EndIf
Edited by Stilgar, 29 April 2009 - 05:49 PM.





