this question is relative to [javascript & vfp] users.
youtube player is a javascript "object" whose fills an iframe in a div in body/html/page.
its created by a script of the
https://www.youtube.com/player_api this follow is a common main javascript code for that in a web page:
<body scroll="no">
<div id="ytplayer"></div>
<script>
// Load the IFrame Player API code asynchronously.
var tag = document.createElement('script');
tag.src = "https://www.youtube.com/player_api";
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
// Replace the 'ytplayer' element with an <iframe> and
// YouTube player after the API code downloads.
var player;
function onYouTubePlayerAPIReady() {
player = new YT.Player('ytplayer', {
width: '640',
height: '480',
playerVars: {autoplay:1, loop:0,rel:0,enablejsapi:1,frameborder:0 ,allowfullscreen:1,controls:0},
videoId: 'M7lc1UVf-VE'
});
}
</script>
</body>
if save this code as an html file and open it in browser: it plays a youtube video...
i made in javascript code:controls=0 in settings to dont see the toolbar youtube player (play,pause,stop,volume,currentTime,duration,Fullscreen,......).
this toolbar appears at the bottom of the player (if controls=1 ;0 for hidden).
Questions:
i want to command the player as well as the native toolbar does but from vfp exclusively.
how can i access at runtime, from vfp,to the player object (if the case : in javascript ist a VAR..) and its commands (out of given known shortcuts) like
-play,pause,stop,getVolume, setVolume by a slider or spinner,duration,current time,fullscreen on/off.....
thanks in advance .