0
votes

Recently I posted a question about the youtube api not working with chrome and iframes. It did work with IE. I had an asp.net page, and it had a button called 'seek', and every time you clicked on it it was supposed to make the video (in the iframe above it) seek somewhere. All sorts of errors happened in chrome, including no video appearing at all, and just the soundtrack playing. So I tried copying in the latest code from: https://developers.google.com/youtube/iframe_api_reference I did modify it somewhat. I kept all of the code, except for a label, outside of the form that every asp.net page has.
But even with the new changes in the api, it just doesn't work right. Here is one modification I made: function onYouTubeIframeAPIReady() { player = new YT.Player('player', { height: '315', width: '420', videoId: '<%=session("youtubecode") %>', playerVars: {'controls':0, 'fs':1, 'autoplay':0, 'autohide':0, 'modestbranding':1, 'rel':0, 'showinfo':0}, events: { 'onReady': onPlayerReady, 'onStateChange': onPlayerStateChange } }); }

I don't think the player variable is being created. Anyway, I post here because maybe someone at google (responsible either for chrome or for the api) might look at this. Just make an asp.net page, and design it with a seek button that seeks to maybe the middle of the video, and then plays for 10 seconds. Thanks.

1

1 Answers

0
votes

I tested it again this morning, and it seems that it works fine with IIS, but not with the local web server that comes with Visual Studio. Anyway, I'm one happy camper now.