Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Access to javascript youtube player
Message
From
25/03/2017 14:48:58
 
 
To
25/03/2017 12:46:29
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Miscellaneous
Thread ID:
01649327
Message ID:
01649332
Views:
76
>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 .

Do you want to use Youtube player specifically, or do you want to stream Youtube videos inside a VFP form?
----------------------------------
António Tavares Lopes
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform