hi,
here's my "not perfect" implementation for "dailymotion support".
Unlike other plugins, this one need TWO urls:
* the one corresponding to the page of the video
* the one corresponding to the source of the flash
both urls must be separated by a non alpha numeric characters (like space or whatever)
example:
http://www.dailymotion.com/video/x271tr_beyonce & http://www.dailymotion.com/swf/4paPzsnaeimZjftsX
You can also copy the whole code for embedded player provided by dailymotion, since this one contain the two urls.
But it won't work if you copy only url of page.
Note:
the plugin support thumbnails, and needs code of page because of this.
The plugin parse the code, and retrieve two keys. In the previous example this would be: x271tr & 4paPzsnaeimZjftsX .
Technically, that was possible to work with :
- page only. By using CURL to retrieve content of the page,and then parsing/ finding/ caching code of player. But I find this solution nasty. Retrieved content is not in a xml form. Comments may screw up the parsing , or abnormaly increase loading time. Also what's the point in caching an information that doesn't change ?
I don't know if it was intended, but there's no way to retrieve information about a video in a xml form
(unless you are interested by only most popular video, or working with your favorites by rss).
- code to player only. If you type url of player in the browser, you are automatically redirected to an other url which contain all necessary informations. Unfortunately , I don't know how to automatically retrieve this new url and parse it in the php code.I tried miscellaneous code with sockets, without success. Also opening the url with curl will give the content, not the new url we are redirected to.
I've contacted dailymotion, and asked if it was possible to get the embeded player code by parsing url of page only.
I was not very surprised, but I got no answer yet.
Remark: don't forget to remove .txt extension in provided file (couldn't submit without it).
cheers
| Comment | File | Size | Author |
|---|---|---|---|
| dailymotion.inc_.txt | 2.12 KB | extrabigmehdi |
Comments
Comment #1
aaron commenteddailymotion support is available with Embedded Media Field. Please use that module now. however, it may not be fully perfect, for reasons you stated here. open an issue there if you find difficulties.
thanks,
aaron
Comment #2
aaron commentedComment #3
aaron commentedComment #4
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #5
alberto56 commentedSee also http://drupal.org/project/media_video_flotsam