Ulysses Stuff > Ulysses Release Archives
Re: [SVN ULX/ULib only] YouTube music player (UPDATED: June 26th, 2012)
RynO-SauruS:
Hmm.. I might be able to make it retrieve the location of the .swf automatically from the video page's HTML. Pikkip, I'm not sure if that's what you meant. Could you clarify?
pikkip:
--- Quote from: RynO-SauruS on January 14, 2012, 06:29:14 PM ---Hmm.. I might be able to make it retrieve the location of the .swf automatically from the video page's HTML. Pikkip, I'm not sure if that's what you meant. Could you clarify?
--- End quote ---
Uhm... kinda like it finds what is the dirrections, and what is the website...
so it will seperate those 2 to make it put in "embed/" to make it work with the other kind of code i sended you... maybesomething like that or else... its a bit hard to explane
RynO-SauruS:
Oh, are you just saying play the videos from http://www.youtube.com/embed/ , only in an iframe? I'll try that.
Edit: Nope, playing videos in http://www.youtube.com/embed/ still gives you errors if embedding is disabled. :(
Edit 2: But there is something that seems somewhat promising: http://www.youtube.com/watch_popup?v=97S66xee0U8
The watch_popup page ignores whether embedding is enabled or not. The biggest problem with this is that I can't seem to find a way to make it not hide the player controls. =/ I've tried putting &autohide=0 in the URL (the usual parameter for this, if you're working with the .swf), but sadly it doesn't do anything. =(
JamminR:
While tinkering looking for a way to hide the controls (did ya know there's a Javascript API?? Are you already looking into it?), I found this tidbit.
Might be handy for my 'function 1 for embed allowed, function 2 for non allowed' determination idea.
From http://code.google.com/apis/youtube/player_parameters.html#ExampleUsage
BOLD is my doing -
--- Quote from: Example Usage ---If you are using the YouTube Data API, you can programmatically construct these URLs by retrieving the <yt:videoid> tag value in an API entry and replacing the VIDEO_ID text in the URLs above with that value. You should also confirm that the feed entry for the video contains a <media:content> tag for which the value of the yt:format attribute is 5. The absence of that tag indicates that the video owner had disabled embedding for the video.
--- End quote ---
EDIT - Ryno, the popup video link you included in previous post, 97S66xee0U8 ... does it allow embedding?
If not, using http://code.google.com/apis/youtube/youtube_player_demo.html and pasting in that on the right "load or cue video" field, allows it to play using the javascript API.
This MIGHT be because its hosted on the Google domain, but, worth looking into, maybe.
Now that I think about it, gmod html doesn't allow javascript, does it.
Ah well...still has brain cells burning
RynO-SauruS:
It uses the YouTube Data API to retrieve the video name and length. :) And you're right, using the API, it would be relatively simple to determine whether or not embedding is enabled.
As for the popup link, no, that video doesn't allowing embedding because it's from VEVO. Look: http://www.youtube.com/v/97S66xee0U8?autoplay=1
If only autohide=0 worked on that! :'(
Edit: If worse comes to worst, I'll simply use the official embedded player, and implement playback error messages based on info in the YouTube Data API. Then atleast it'll be stable.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version