[Embed Video] A simple module to embed youtube, google, or remote .flv videos

apippin

Joined: 2007-06-11
Posts: 190
Posted: Mon, 2009-05-11 01:20
madrocketscientist wrote:

Upgraded to 1.1.3 and still doesn't work:
Error (ERROR_STORAGE_FAILURE) : Unable to copy thumbnail from url: -

That is very odd. It used to work for me just fine (when I first released the new version). I was able to embed it at that time. However, I can't embed it now either (I get the same error you do). It appears something has changed since the last time I tried it in the way the google page looks, and the thumbnail image is no longer able to be parsed from google by the module. I'll have to look into it some more to see what they have changed again in the format of how they store the thumbnail reference in the webpage.

 
apippin

Joined: 2007-06-11
Posts: 190
Posted: Mon, 2009-05-11 02:23
kabaldan wrote:
Hi!

Apippin, could you please add allowFullScreen (true/false) variable that will enable the fullscreen button on embedded youtube videos?

I was able to add it to the code base. However, the embedded video does not come up playing in full screen mode. It simply allows the user to click the full screen button and have it actually work. So, since it doesn't appear to affect the video itself being in full screen mode or not when it starts playing, but simply allows for it to happen, I won't add a specific option to enable this feature. I will simply add the allowFullScreen property by default and set it to true. Since it has no affect on the server if it is allowed or not, simply enabling it by default seems to be the right call. The embedded video will start up in its given size, and the user will then be "allowed" to fullscreen it if they wish. How does this sound?

 
apippin

Joined: 2007-06-11
Posts: 190
Posted: Mon, 2009-05-11 02:24
apippin wrote:
madrocketscientist wrote:

Upgraded to 1.1.3 and still doesn't work:
Error (ERROR_STORAGE_FAILURE) : Unable to copy thumbnail from url: -

That is very odd. It used to work for me just fine (when I first released the new version). I was able to embed it at that time. However, I can't embed it now either (I get the same error you do). It appears something has changed since the last time I tried it in the way the google page looks, and the thumbnail image is no longer able to be parsed from google by the module. I'll have to look into it some more to see what they have changed again in the format of how they store the thumbnail reference in the webpage.

I fixed the thumbnail parsing issue with google videos again. They did change some things that threw the parser off. I will have the fix released in the next release I do. I will do that shortly, but I'm waiting to hear back on my proposed "allowFullScreen" option support for youtube videos. Once that is finalized, I'll make the release.

 
madrocketscientist

Joined: 2008-12-12
Posts: 3
Posted: Tue, 2009-06-16 15:41

Thanks for all the great work. Though Google has stopped offering video hosting since they bought YouTube, so that will be one less format to deal with (though they still continue to host any previously uploaded content). Now I'm having trouble with YouTube. I uploaded 3 vids, and 2 of them embedded fine. The 3rd one (http://www.youtube.com/watch?v=L0pgc1lSMwo) fails with the following:
Error (ERROR_BAD_PATH) : Unable to get video information at url: http://www.youtube.com/watch?v=L0pgc1lSMwo - HTTP/1.0 404 Not Found

* in modules/embedvideo/ItemAddEmbedVideo.inc at line 229 (GalleryCoreApi::error)
* in modules/core/ItemAdd.inc at line 159 (ItemAddEmbedVideo::handleRequest)
* in ??? at line 0 (ItemAddController::handleRequestWithProgressBar)
* in modules/core/classes/GalleryTemplateAdapter.class at line 1092
* in /var/local/g2data/smarty/templates_c/%%626616196/carbon/%%2E^2E1^2E11E2E2%%theme.tpl.php at line 141 (GalleryTemplateAdapter::trailer)
* in lib/smarty/Smarty.class.php at line 1255
* in modules/core/classes/GallerySmarty.class at line 61 (Smarty::fetch)
* in modules/core/classes/GalleryTemplate.class at line 241 (GallerySmarty::fetch)
* in main.php at line 506 (GalleryTemplate::display)
* in main.php at line 104
* in main.php at line 88

Continue...
Variable Parameters
debugOutput=true
useInternalFlvPlayer=true
youtubeShowRelated=false
width=640
height=480
externalFlvPlayer=
externalFlvPlayerVars=
flvThumbnail=
useRemoteSize=false
autoStart=false
watermarkVideos=false
watermarkImage=
watermarkAlignment=left
wordwrapSummary=0
wordwrapDescription=0
Youtube URL Parsing Results
video_id: L0pgc1lSMwo
extra_embed_params:
gdata feed: http://gdata.youtube.com/feeds/api/videos/L0pgc1lSMwo

 
apippin

Joined: 2007-06-11
Posts: 190
Posted: Thu, 2009-06-18 02:30
madrocketscientist wrote:
Thanks for all the great work. Though Google has stopped offering video hosting since they bought YouTube, so that will be one less format to deal with (though they still continue to host any previously uploaded content). Now I'm having trouble with YouTube. I uploaded 3 vids, and 2 of them embedded fine. The 3rd one (http://www.youtube.com/watch?v=L0pgc1lSMwo) fails with the following:
Error (ERROR_BAD_PATH) : Unable to get video information at url: http://www.youtube.com/watch?v=L0pgc1lSMwo - HTTP/1.0 404 Not Found

This is a typical youtube error. Basically, youtube can take a few days to make the "metadata" available for your video. So, if you get this error, and it is a video that was recently added to youtube, give it a day or 2 and try again. I just tried to embed the video that gave you the error, and it works fine now!

 
apippin

Joined: 2007-06-11
Posts: 190
Posted: Wed, 2009-10-14 06:28

I've just released a new version of embedvideo, version 1.1.4, and have attached it here.

Here are the release notes for 1.1.4:
- Fixed dailymotion parsing algorithm.
- Added new allowFullScreen youtube parameter.
- Fixed google video thumbnail parsing algorithm.

 
hhtmp88

Joined: 2007-02-09
Posts: 120
Posted: Sun, 2009-06-28 16:17
apippin wrote:
I've just released a new version of embedvideo, version 1.1.3, and have attached it here.

Here are the release notes for 1.1.4:
- Fixed dailymotion parsing algorithm.
- Added new allowFullScreen youtube parameter.
- Fixed google video thumbnail parsing algorithm.

"embedvideo_1_1_4.zip" is not in the "update list" of G2,
-> so How to install it?

Thanks for any kind of help!
________________

JMY(晉明夷)
http://kb.HealthKB.org -- JMY's Knowledge-Base
http://en.HealthKB.org -- Your Health Knowledge-Base

 
apippin

Joined: 2007-06-11
Posts: 190
Posted: Sun, 2009-06-28 23:16
hhtmp88 wrote:
"embedvideo_1_1_4.zip" is not in the "update list" of G2,
-> so How to install it?

Check out the wiki page for this project, specifically, the install section!

http://codex.gallery2.org/Gallery2:Modules:embedvideo#Installation

 
joemonster
joemonster's picture

Joined: 2006-04-12
Posts: 236
Posted: Thu, 2009-07-02 01:32

Perhaps I overlooked something, but is it possible to remove the extra thumbnail beside the video on the actual item page? For instance, on this video, there is no need for the extra thumbnail as there already is one in the navigation thumbnail pane (Carbon theme). This would also probably help fix odd positioning of elements on the page that make it look like things have been rearranged.

http://www.gschneiderphoto.com/gallery/v/birds/sparrows/clay-colored_sparrow/Clay-colored_sparrow_singing.html

 
petri
petri's picture

Joined: 2005-12-15
Posts: 253
Posted: Wed, 2009-07-15 11:06

Hello

I just installed this wonderful module and it works almost fine, thanx for the great idea !!!

Unfortunately, I get two little problems with it :

1) I can't add any variables, I can delete them but can't add any... I click on "add variable" the page reload but no change on the list.
Is there another way for me to change the variables ? I tried modifying the module.inc but it did not help.

2) The video places itself in my item title and description field, which does not look nice, I would like the video to be on the photo field, with or without the frame around it, I don't care.

See for yourself :

http://www.coquille.org/gallery/v/reports/cowfight/kingsqueens/Swiss-China_expo_in_Guangzhou.html

Any boday has an idea ?

PS : I am using PGLightbox theme....

Gallery version = 2.3 core 1.3.0
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.2.6 apache2handler
Webserver = Apache/2.0.52 (CentOS)
Database = mysql 5.0.68, lock.system=flock
Operating system = Linux

 
apippin

Joined: 2007-06-11
Posts: 190
Posted: Wed, 2009-07-15 14:13
petri wrote:
Hello

1) I can't add any variables, I can delete them but can't add any... I click on "add variable" the page reload but no change on the list.
Is there another way for me to change the variables ? I tried modifying the module.inc but it did not help.

2) The video places itself in my item title and description field, which does not look nice, I would like the video to be on the photo field, with or without the frame around it, I don't care.

Adding variables uses Gallery2 core API functions. If this isn't working, there must be something wrong with your gallery setup itself. I'm not sure what that would be. You can override the default values it uses for various settings in the code itself to work around the configurability issue. Just edit ItemAddEmbedVideo.inc lines 80-96.

As for the video showing up in the description field, this is what this module does. It overrides the description field with the code to embed the video. That has some unfortunate side effects, but it is the only way the module works today. To work around this issue, you would need to modify your theme. Others have posted in this forum various ways to do that. You'd have to search this message forum to see how they worked around this in their themes.

 
apippin

Joined: 2007-06-11
Posts: 190
Posted: Wed, 2009-07-15 14:15
joemonster wrote:
Perhaps I overlooked something, but is it possible to remove the extra thumbnail beside the video on the actual item page? For instance, on this video, there is no need for the extra thumbnail as there already is one in the navigation thumbnail pane (Carbon theme). This would also probably help fix odd positioning of elements on the page that make it look like things have been rearranged.

You haven't overlooked anything. This module overrides the description field with the code to embed the video. That has some unfortunate side effects, but it is the only way the module works today. One of those side effects is the thumbnail being displayed (the photo) along with the video (the description). To work around this issue, you would need to modify your theme. Others have posted in this forum various ways to do that. You'd have to search this message forum to see how they worked around this in their themes.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2009-07-16 01:57

@ hiding and moving the movie; I thought that was added to the module. I guess it has not. There was a post about this in this thread but being 7 pages long I don't want to search. Let me know if you find it. There should be a way to add some CSS to hide the thumbnail and some JS to move the movie to the description.

Some CSS guru and css guru should be able to come up with this.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
petri
petri's picture

Joined: 2005-12-15
Posts: 253
Posted: Thu, 2009-07-16 03:31

Thank you apippin and Dave for your answer.

1) I tried to change the values in ItemAddEmbedVideo.inc but I get no changes online, seems like smth is overwriting what I want, even if I have no variable in the module admin page.

2) I guess I'll have to create a new theme just for video albums, so I can change gidescription to align:center and then find a way to get rid of the thumbnails. I will check in the forum how to do it. and let you know where I found what

Petri

Gallery version = 2.3 core 1.3.0
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.2.6 apache2handler
Webserver = Apache/2.0.52 (CentOS)
Database = mysql 5.0.68, lock.system=flock
Operating system = Linux

 
smoker22

Joined: 2009-07-22
Posts: 1
Posted: Wed, 2009-07-22 01:28

hello,

great module...

- i have the same problem as petri has, i cant edit/add any variables..
tried to edit the .inc file like you suggested for him but it didnt help either..

would b nice to find a solution for this.

- also is there a way to enable Full Screen in youtube embeded videos?

- and one last thing, is there a way to manually add a thumbnail for the .flv videos?

thanks in advance

 
apippin

Joined: 2007-06-11
Posts: 190
Posted: Wed, 2009-07-22 03:58
smoker22 wrote:
hello,

great module...

- i have the same problem as petri has, i cant edit/add any variables..
tried to edit the .inc file like you suggested for him but it didnt help either..
would b nice to find a solution for this.

- also is there a way to enable Full Screen in youtube embeded videos?

- and one last thing, is there a way to manually add a thumbnail for the .flv videos?

I don't understand how you and Petri are hitting an issue with setting variables for the module using the gallery framework. Since this mechanism is one that uses the gallery framework, I'm not sure why it is failing. I would look at the logfiles that gallery dumps to and see if you see any error messages or other things going on when you try to save the variables in the admin section. Again, it is a gallery configuration problem of some kind. I'm also not sure why modifying the default values I assign the variables in the .inc file isn't working, I think that should work. For example, if I wanted to change the value of allowFullScreen, I would do this:

Change this code:
$allowFullScreen = $this->getParameter($ItemAddEmbedVideo, 'allowFullScreen', "false");

To this:
$allowFullScreen = "true";

I tried to figure out a way to get the youtube embeded videos to playback in full screen mode. You have to click a button on the embedded video to get it to play in full screen mode, but I couldn't find a way to get it to come up that way by default.

As for changing the thumbnail of an embedded flv file, I think you can edit the item after it is added, and upload a new thumbnail image as a new "photo" (Modify Photo -> Reupload photo). That's the best answer I can come up with at the moment in that regard!

 
petri
petri's picture

Joined: 2005-12-15
Posts: 253
Posted: Thu, 2009-07-23 09:34

Hello everyone,

I finally managed to have what I wanted :

http://www.coquille.org/gallery/v/reports/cowfight/kingsqueens/video/

Apippin : you were right, it is possible to manage the settings through ItemAddEmbedVideo.inc, but the settings will only change the videos you add after changing the settings, that's why I thought it was not doing any change. So I just deleted all my videos and added them again.

Dave, I read all the post, found some tricks here and there but nothing was working for me, so I just duplicated my theme and changed the theme.css and photo.tpl to get what I wanted. It only allows me to have special video albums but it's fine with me because I don't want to mix the two medias in the same page.

Let's just hope Gallery 3 will be a proper multimedia CMS. Video seems to be taking more and more space on the web :-)

Gallery version = 2.3 core 1.3.0
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.2.6 apache2handler
Webserver = Apache/2.0.52 (CentOS)
Database = mysql 5.0.68, lock.system=flock
Operating system = Linux

 
twister777

Joined: 2009-09-04
Posts: 1
Posted: Sun, 2009-09-06 14:53

thanks apippin great module...

 
apippin

Joined: 2007-06-11
Posts: 190
Posted: Tue, 2009-09-08 06:09
twister777 wrote:
thanks apippin great module...

Twister777, based on an email you sent to me, it looks like you had a question that didn't show up on the message board. What question do you have about the module?

 
tlwmsu
tlwmsu's picture

Joined: 2009-09-23
Posts: 21
Posted: Wed, 2009-09-23 20:31

Just installed embedvideo today and it looks great for youtubes, etc. I am trying to link directly to a swf, and I get the following:

Error (ERROR_STORAGE_FAILURE) : Unable to copy thumbnail from url: http://www.buzzardsroost.us/gallery2/modules/embedvideo/images/G2video_thumbnail.jpg - HTTP/1.1 404 Not Found in modules/embedvideo/ItemAddEmbedVideo.inc at line 1065 (GalleryCoreApi::error) in modules/core/ItemAdd.inc at line 159 (ItemAddEmbedVideo::handleRequest) in ??? at line 0 (ItemAddController::handleRequestWithProgressBar) in modules/core/classes/GalleryTemplateAdapter.class at line 1092 in g2data/smarty/templates_c/%%1013030616/carbon/%%2E^2E1^2E11E2E2%%theme.tpl.php at line 142 (GalleryTemplateAdapter::trailer) in lib/smarty/Smarty.class.php at line 1255 in modules/core/classes/GallerySmarty.class at line 61 (Smarty::fetch) in modules/core/classes/GalleryTemplate.class at line 241 (GallerySmarty::fetch) in main.php at line 506 (GalleryTemplate::display) in main.php at line 104 in main.php at line 88

The thumbnail works fine directly linking : http://www.buzzardsroost.us/gallery2/modules/embedvideo/images/G2video_thumbnail.jpg

Any ideas?

 
zi94sm65

Joined: 2006-07-25
Posts: 38
Posted: Sat, 2009-10-03 14:33

Any chance you might consider taking a second look at adding support for Animoto videos to this module? Animoto has been making changes and i noticed this source code on the page that might be helpful in adding support for embedding Animoto videos:

var flashVars = {
              file:  'qt3aQN6YnrEe07s24niyAA',
              image: 'http://s3-p.animoto.com/Video/qt3aQN6YnrEe07s24niyAA/cover_432x240.jpg',
              environment:  'production',
              animoto_mode: 'consumer',
              autostart: doAutoStart,
              duration: '33319',
              created: '1254160952',
              calltoaction_text: '',
              calltoaction_url: '',
              id: 'videoPlayer' // need this to control w/ 'sendEvent' commands in Firefox & Safari
            };

The animoto URL seems to be standard at http://animoto.com/play/qt3aQN6YnrEe07s24niyAA

 
mcnesco

Joined: 2009-08-09
Posts: 14
Posted: Sat, 2009-10-03 23:49

Hello.

I have a very simple problem. I have made the required change to line 859, and have enabled Raw HTML. After copying the unzipped folder to my modules directory, the option to add or install the module doesn't appear in my plugins page??? Did I put it in the wrong directory? I'm new to this, and have never installed a module this way before.

Thank you,
Scott McNeil

Disregard. I copied the directory as awhole, without eliminating the first layer folder. Sorry..

 
apippin

Joined: 2007-06-11
Posts: 190
Posted: Wed, 2009-10-14 03:15
tlwmsu wrote:
Just installed embedvideo today and it looks great for youtubes, etc. I am trying to link directly to a swf, and I get the following:

Error (ERROR_STORAGE_FAILURE) : Unable to copy thumbnail from url: http://www.buzzardsroost.us/gallery2/modules/embedvideo/images/G2video_thumbnail.jpg ...

The thumbnail works fine directly linking : http://www.buzzardsroost.us/gallery2/modules/embedvideo/images/G2video_thumbnail.jpg

Any ideas?

The code is pretty simple, and relies on some Gallery internals to get the job done:

/* Get a local tmp file to save the thumbnail URL to */
$tmpDir = $gallery->getConfig('data.gallery.tmp');
$tmpFile = $platform->tempnam($tmpDir, 'add');
$tmpFile.= ".jpg";

/* Fetch the thumbnail and save it to a local file */
list ($successfullyCopied, $response, $headers) = GalleryCoreApi::fetchWebFile($thumbnail, $tmpFile, $extraHeaders);

As long as you can browse to the URL (which you can, I just tried it). It should work. Yet, somehow, the response we get from your webserver when making this request is "HTTP/1.1 404 Not Found". So, I'm not sure why Gallery's fetchWebFile call is failing, especially when I can point a web browser to the URL it used to make the request, and get a valid response/image from your server. I wonder if the URL to the outside world is accessible, but somehow, if the server is trying to access a URL to itself, it may not be able to do so? My other suggestion is to set this variable under Site Admin for EmbedVideo: "flvThumbnail". Set it to a value of a URL outside of your server, and see if it can get it. You can set it to this for example: http://www.pippins.net/gallery2/modules/embedvideo/images/G2video_thumbnail.jpg. See how that works.

 
apippin

Joined: 2007-06-11
Posts: 190
Posted: Wed, 2009-10-14 03:28
smoker22 wrote:
hello,

great module...

- i have the same problem as petri has, i cant edit/add any variables..
tried to edit the .inc file like you suggested for him but it didnt help either..

would b nice to find a solution for this.

- also is there a way to enable Full Screen in youtube embeded videos?

- and one last thing, is there a way to manually add a thumbnail for the .flv videos?

thanks in advance

You can enable Full screen in youtube embeded videos, just set the allowFullScreen option to true. You can manually add a thumbnail for an .flv video. After adding it, edit the photo item in gallery, and upload a new thumbnail via the photo properties.

 
apippin

Joined: 2007-06-11
Posts: 190
Posted: Wed, 2009-10-14 04:42
zi94sm65 wrote:
Any chance you might consider taking a second look at adding support for Animoto videos to this module? Animoto has been making changes and i noticed this source code on the page that might be helpful in adding support for embedding Animoto videos: ...

It was trickier than I thought, but I did get it to work with the example you sent to me. I don't have a bunch of other animoto links I can try, so please send me any you encounter that don't work. I think I have a good, generic, algorithm to embed any animoto video now. It will be in the next release (coming very soon).

 
apippin

Joined: 2007-06-11
Posts: 190
Posted: Wed, 2009-10-14 06:30

I've just released a new version of embedvideo, version 1.1.5, and have attached it here.

Here are the release notes for 1.1.5:
- Added support for Animoto embedded videos.
- Added new centerVideo parameter.

 
zi94sm65

Joined: 2006-07-25
Posts: 38
Posted: Fri, 2009-10-16 14:26

I downloaded your latest version, installed the plugin, and am happy to report that the Animoto embedded video support you added to the latest version is currently working on my gallery2 installation! I'll let you know if any problems crop up, but i've got 14 animoto vids in an album and all seem to fire-up and play without any problems so far.

Thanks for taking the time to add this feature into your plugin; your work is appreciated!

 
mcnesco

Joined: 2009-08-09
Posts: 14
Posted: Sun, 2009-10-18 05:30

Any chance that you might add a feature to force the video to open in a popup window? I'd like to to be able to force a new window from the thumbnail click. Ideally, in combination with the ability to force full screen, and autostart...

 
apippin

Joined: 2007-06-11
Posts: 190
Posted: Sun, 2009-10-18 05:44
mcnesco wrote:
Any chance that you might add a feature to force the video to open in a popup window? I'd like to to be able to force a new window from the thumbnail click. Ideally, in combination with the ability to force full screen, and autostart...

The only chance we have of making something like that work is in the actual HTML code embedded in the description field of a given video that has been added to Gallery using this module. So, you would have to edit your video items in Gallery, and edit the HTML code in the description field of these items. If you can come up with a way to get the HTML code in the description field to do what you want it to do, simply share it with me, and I can add an option for it.

 
damapema
damapema's picture

Joined: 2009-10-24
Posts: 5
Posted: Wed, 2009-10-28 02:52

Hi all; apippin there some way to combine your video embed script with the script located in http://1.leefjedichter.nl, this script allows you to use the link to the video on youtube hq format and pass it as a variable to the JW PLAYER, because when inserting youtube videos in other pages uses the low quality and the HQ & HD buttons are disabled to embedded videos (using the youtube´s player), I think it might be interesting, in fact all we need to do this is to modify the "flashvar" "file" with the path that returns the php file that I mentioned, the instructions in the site of the script are:

<script type="text/javascript" src="http://www.jeroenwijering.com/embed/swfobject.js"></script>

<div id="player">Please install the newest version of the adobe flashplayer and enable javascript.</div>

<script type="text/javascript">
var so = new SWFObject('mediaplayer/player.swf','mpl','470','320','9');
so.addParam('allowscriptaccess','always');
so.addParam('allowfullscreen','true');
so.addParam('flashvars','&file=http://yourwebsite.com/[folder]/video/index.php[Parameter]&type=video');
so.write('player');
</script>

Full instructions are in http://1.leefjedichter.nl/yt/readme.php

The script needs to be passed one parameter, plus the video ID and it automatically returns the path for the reproduction in jw player to start in the best possible quality rather than low quality by default uses youtube, I tried to modify your script and from there call the php script, but I can not do it, I replaced from the line 308 to line 316 in file ItemAddEmbedVideo.inc of your module, with these lines:

/* Format the description to hold a reference to the embedded video */
		   $macromedia_url = "http://download.macromedia.com/pub/shockwave/cabs/flash/";
		   $description = '<script type="text/javascript">'."\n";
		   $description.= '// <![CDATA['."\n";
		   $description.= 'function divResize(id, nw, nh) {'."\n";
		   $description.= 'var obj = document.getElementById(id);'."\n";
		   $description.= 'obj.style.width = nw + "px";'."\n";
		   $description.= 'obj.style.height = nh + "px";'."\n";
		   $description.= '}'."\n";
		   $description.= '// ]]>'."\n";
		   $description.= '</script>'."\n";
		   $description.= '<div id="flashvideo" style="align:left;width:525px;height:392px">'."\n";
		   $description.= '<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000"';
		   $description.= 'codebase="'.$macromedia_url.'swflash.cab#version=8,0,0,0"';
		   $description.= 'width="100%" height="100%" id="IFid1" class="ImageFrame_image">';
		   $description.= '<param name="movie" value="'.$gallery2_url.$gallery2_flv_player.'"/>';
		   $description.= '<param name="FlashVars" value="flvUrl='.$url;
		   $description.= '&Width='.$width.'&Height='.$height.'&title='.$title;
		   $description.= '&allowDl=true&thumbUrl='.$thumbnail.'&autoStart='.$autoStart;
		   $description.= '&langDownload=Download&langLarge=Large&langNormal=Normal"/>';
		   $description.= '<param name="quality" value="high"/>';
		   $description.= '<param name="scale" value="noscale"/>';
		   $description.= '<param name="salign" value="lt"/>';
		   $description.= '<param name="wmode" value="transparent"/>';
		   $description.= '<param name="allowScriptAccess" value="always"/>';
		   $description.= '<embed src="'.$gallery2_url.$gallery2_flv_player.'" ';
		   $description.= 'flashvars="flvUrl='.$url;
		   $description.= '&Width='.$width.'&Height='.$height.'&title='.$title;
		   $description.= '&allowDl=true&thumbUrl='.$thumbnail.'&autoStart='.$autoStart;
		   $description.= '&langDownload=Download&langLarge=Large&langNormal=Normal" ';
		   $description.= 'type="application/x-shockwave-flash" ';
		   $description.= 'width="100%" height="100%" quality="high" scale="noscale" salign="lt" ';
		   $description.= 'wmode="transparent" allowScriptAccess="always" ';
		   $description.= 'pluginspage="http://www.macromedia.com/go/getflashplayer"/>';
		   $description.= '</object></div>';
	       }

but I can not insert the "flashvar" "file" calling the other php, or use "swfobject.js" which is the most currently used to embed the player... (the flashvar *file* is equal to *flvUrl*)...these lines are of your code section to add a flv or mp4, which is the file that the script comes from youtube,
I appreciate any help or indication to initiate change, thank you, excuse my bad English but I speak Spanish and little English.

 
hhtmp88

Joined: 2007-02-09
Posts: 120
Posted: Thu, 2009-10-29 06:36

Hi all,

Possible to embed facebook video too?
-> of course, after we have logged-in facebook!
-> or supplying our facebook login name and password

________________

JMY(晉明夷)
http://TimYoga.net -- Train Your Body & Mind
http://en.HealthKB.org -- Your Health Knowledge-Base

 
damapema
damapema's picture

Joined: 2009-10-24
Posts: 5
Posted: Thu, 2009-10-29 09:34

hhtmp88 to embed the player in facebook have to send them a request, just say so in your page:
"* To make your videos embeddable on Facebook, please send a request using this form. Your request should include the domain names of the values you will use for the video source URL (in the link tag video_src above). You must do this to Ensure your videos play correctly. "
Official info here: http://wiki.developers.facebook.com/index.php/Facebook_Share/Specifying_Meta_Tags

You also have to define the tags to the script of facebook recognize your videos and your thumbnails.. bye

Lol, please somebody answer my question...

Thanks in advance...

David P.

 
hhtmp88

Joined: 2007-02-09
Posts: 120
Posted: Fri, 2009-10-30 10:24

Thanks damapema!
Will try it out!

Rgds,
________________

JMY(晉明夷)
http://TimYoga.net -- Strengthening Your Body & Mind
http://en.HealthKB.org -- Promoting Healthy Body, Mind &Environment

 
iLive

Joined: 2008-05-11
Posts: 21
Posted: Sun, 2010-01-31 22:13
madrocketscientist wrote:
Thanks for all the great work. Though Google has stopped offering video hosting since they bought YouTube, so that will be one less format to deal with (though they still continue to host any previously uploaded content). Now I'm having trouble with YouTube. I uploaded 3 vids, and 2 of them embedded fine. The 3rd one (http://www.youtube.com/watch?v=L0pgc1lSMwo) fails with the following:
Error (ERROR_BAD_PATH) : Unable to get video information at url: http://www.youtube.com/watch?v=L0pgc1lSMwo - HTTP/1.0 404 Not Found

* in modules/embedvideo/ItemAddEmbedVideo.inc at line 229 (GalleryCoreApi::error)
* in modules/core/ItemAdd.inc at line 159 (ItemAddEmbedVideo::handleRequest)
* in ??? at line 0 (ItemAddController::handleRequestWithProgressBar)
* in modules/core/classes/GalleryTemplateAdapter.class at line 1092
* in /var/local/g2data/smarty/templates_c/%%626616196/carbon/%%2E^2E1^2E11E2E2%%theme.tpl.php at line 141 (GalleryTemplateAdapter::trailer)
* in lib/smarty/Smarty.class.php at line 1255
* in modules/core/classes/GallerySmarty.class at line 61 (Smarty::fetch)
* in modules/core/classes/GalleryTemplate.class at line 241 (GallerySmarty::fetch)
* in main.php at line 506 (GalleryTemplate::display)
* in main.php at line 104
* in main.php at line 88

did you solve this?

 
apippin

Joined: 2007-06-11
Posts: 190
Posted: Sat, 2010-02-20 22:32
iLive wrote:
madrocketscientist wrote:
Thanks for all the great work. Though Google has stopped offering video hosting since they bought YouTube, so that will be one less format to deal with (though they still continue to host any previously uploaded content). Now I'm having trouble with YouTube. I uploaded 3 vids, and 2 of them embedded fine. The 3rd one (http://www.youtube.com/watch?v=L0pgc1lSMwo) fails with the following:
Error (ERROR_BAD_PATH) : Unable to get video information at url: http://www.youtube.com/watch?v=L0pgc1lSMwo - HTTP/1.0 404 Not Found

did you solve this?

This is a typical youtube error. Basically, youtube can take a few days to make the "metadata" available for your video. So, if you get this error, and it is a video that was recently added to youtube, give it a day or 2 and try again. If it is still a problem, please let me know. Generally, this is why it happens though.

 
Thales

Joined: 2010-02-28
Posts: 1
Posted: Sun, 2010-02-28 14:06
apippin wrote:
smoker22 wrote:
hello,

great module...

- i have the same problem as petri has, i cant edit/add any variables..
tried to edit the .inc file like you suggested for him but it didnt help either..
would b nice to find a solution for this.

- also is there a way to enable Full Screen in youtube embeded videos?

- and one last thing, is there a way to manually add a thumbnail for the .flv videos?

I don't understand how you and Petri are hitting an issue with setting variables for the module using the gallery framework. Since this mechanism is one that uses the gallery framework, I'm not sure why it is failing. I would look at the logfiles that gallery dumps to and see if you see any error messages or other things going on when you try to save the variables in the admin section. Again, it is a gallery configuration problem of some kind. I'm also not sure why modifying the default values I assign the variables in the .inc file isn't working, I think that should work. For example, if I wanted to change the value of allowFullScreen, I would do this:

Change this code:
$allowFullScreen = $this->getParameter($ItemAddEmbedVideo, 'allowFullScreen', "false");

To this:
$allowFullScreen = "true";

I tried to figure out a way to get the youtube embeded videos to playback in full screen mode. You have to click a button on the embedded video to get it to play in full screen mode, but I couldn't find a way to get it to come up that way by default.

As for changing the thumbnail of an embedded flv file, I think you can edit the item after it is added, and upload a new thumbnail image as a new "photo" (Modify Photo -> Reupload photo). That's the best answer I can come up with at the moment in that regard!

Not sure if this was covered, but I couldn't add variables in Safari, but when I switched to Firefox, I could. Everything else seems to work in Safari.

 
playrhq

Joined: 2010-03-07
Posts: 1
Posted: Tue, 2010-03-09 13:09

Hi, Excellent application. I need something similar for a website I am creating. Would you be interested in modifying your code for a fee?

 
maxman

Joined: 2008-09-14
Posts: 11
Posted: Sat, 2010-09-04 11:38

Hi,
I have embed video 1.1.5 on my gallery many years and everything was fine until today. When i add video from Vimeo, it says:

Error (ERROR_STORAGE_FAILURE) : Unable to copy thumbnail from url: -
in modules/embedvideo/ItemAddEmbedVideo.inc at line 1131 (GalleryCoreApi::error)
in modules/core/ItemAdd.inc at line 159 (ItemAddEmbedVideo::handleRequest)
in ??? at line 0 (ItemAddController::handleRequestWithProgressBar)
in modules/core/classes/GalleryTemplateAdapter.class at line 1092
in /home1/cechovci/cech_nopublic/g2data/smarty/templates_c/%%2148573673/matrix/%%3A^3A8^3A818B59%%theme.tpl.php at line 85 (GalleryTemplateAdapter::trailer)
in lib/smarty/Smarty.class.php at line 1255
in modules/core/classes/GallerySmarty.class at line 61 (Smarty::fetch)
in modules/core/classes/GalleryTemplate.class at line 241 (GallerySmarty::fetch)
in main.php at line 506 (GalleryTemplate::display)
in main.php at line 104
in main.php at line 88

I do not know where is problem. Can you help?

 
maxman

Joined: 2008-09-14
Posts: 11
Posted: Tue, 2010-09-28 20:01

Is there anyone who help me?

Has anyone contact to apippin?

 
apippin

Joined: 2007-06-11
Posts: 190
Posted: Thu, 2010-09-30 16:46
maxman wrote:
Is there anyone who help me?

Has anyone contact to apippin?

Sorry maxman. I'm back. I'll comment on your issue shortly.

 
apippin

Joined: 2007-06-11
Posts: 190
Posted: Thu, 2010-09-30 16:50
maxman wrote:
Hi,
I have embed video 1.1.5 on my gallery many years and everything was fine until today. When i add video from Vimeo, it says:

Error (ERROR_STORAGE_FAILURE) : Unable to copy thumbnail from url: -
in modules/embedvideo/ItemAddEmbedVideo.inc at line 1131 (GalleryCoreApi::error)
in modules/core/ItemAdd.inc at line 159 (ItemAddEmbedVideo::handleRequest)
in ??? at line 0 (ItemAddController::handleRequestWithProgressBar)
in modules/core/classes/GalleryTemplateAdapter.class at line 1092
in /home1/cechovci/cech_nopublic/g2data/smarty/templates_c/%%2148573673/matrix/%%3A^3A8^3A818B59%%theme.tpl.php at line 85 (GalleryTemplateAdapter::trailer)
in lib/smarty/Smarty.class.php at line 1255
in modules/core/classes/GallerySmarty.class at line 61 (Smarty::fetch)
in modules/core/classes/GalleryTemplate.class at line 241 (GallerySmarty::fetch)
in main.php at line 506 (GalleryTemplate::display)
in main.php at line 104
in main.php at line 88

I do not know where is problem. Can you help?

Maxman, sorry for the delay in getting back to you on this. Basically, it looks like the pattern match algorithm for Vimeo is no longer able to extract the thumbnail from the video page. Can you send me the URL you are trying to add to the gallery? If I can reproduce it on my end, I can change/fix the algorithm to do the right thing. The Vimeo video page must have changed slightly to throw it off.

 
maxman

Joined: 2008-09-14
Posts: 11
Posted: Thu, 2010-09-30 17:01

Hi,

Need to enter a few videos. For example:
http://www.vimeo.com/15292976

I have more videos in the profile: http://www.vimeo.com/user694736/videos
But neither does not add to my gallery.

Thank you for returning
Regards
Maxman

 
apippin

Joined: 2007-06-11
Posts: 190
Posted: Sun, 2010-10-03 03:43

I've just released a new version of embedvideo, version 1.1.6, and have attached it here.

Here are the release notes for 1.1.6:
- Fixed vimeo embedded video parsing algorithm.
- Fixed dailymotion embedded video parsing algorithm.
- Added urlencode to youtube api feed.

 
zi94sm65

Joined: 2006-07-25
Posts: 38
Posted: Thu, 2010-10-21 13:01

New problem to report, must be something in the web-water, the embed code you added to support embedding of Animoto videos has started to fail with any new Animoto's i tried to add since September with the two failing vids error messages:

Error (ERROR_BAD_PATH) : Unable to extract xml information from url: http://animoto.com/play/1oucezdkVCuPsBIT1ovSIA

Error (ERROR_BAD_PATH) : Unable to extract xml information from url:http://animoto.com/play/nhjLQ1wKhLNlaZECfOsEvg

I tried contacting the developers at Animoto and asking if they had recently changed anything relating to XML or their structure for Animoto vids but all i got back was some support-Bambi telling me to "clear the cache in my web browser". Which had nothing to do with the problem.

If you have some time can you take a look and see what they might have changed and if the code for your plugin can be updated?

 
joeonart

Joined: 2010-07-16
Posts: 1
Posted: Sat, 2010-11-06 07:14

i have error

Error (ERROR_TOOLKIT_FAILURE, ERROR_PLATFORM_FAILURE)
in modules\gd\classes\GdFunctionality.class at line 213 (GalleryCoreApi::error)
in modules\gd\classes\GdFunctionality.class at line 273 (GdFunctionality::checkResource)
in modules\gd\classes\GdToolkit.class at line 471 (GdFunctionality::imageCreateFromPng)
in modules\gd\classes\GdToolkit.class at line 362 (GdToolkit::_getImageResource)
in modules\embedvideo\ItemAddEmbedVideo.inc at line 1338 (GdToolkit::performOperation)
in modules\core\ItemAdd.inc at line 159 (ItemAddEmbedVideo::handleRequest)
in ??? at line 0 (ItemAddController::handleRequestWithProgressBar)
in modules\core\classes\GalleryTemplateAdapter.class at line 1089
in g2data\smarty\templates_c\%%3474239550\carbon\%%2E^2E1^2E11E2E2%%theme.tpl.php at line 134 (GalleryTemplateAdapter::trailer)
in lib\smarty\Smarty.class.php at line 1255
in modules\core\classes\GallerySmarty.class at line 61 (Smarty::fetch)
in modules\core\classes\GalleryTemplate.class at line 241 (GallerySmarty::fetch)
in main.php at line 506 (GalleryTemplate::display)
in main.php at line 104
in main.php at line 88