Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If you can include support for livestream.com, preferable both with and without chat option, that would be swell.
Comment | File | Size | Author |
---|---|---|---|
#9 | livestream.inc_.txt | 13.27 KB | XiaN Vizjereij |
#9 | no-pre.png | 12.56 KB | XiaN Vizjereij |
#2 | livestream.patch | 12.87 KB | Sheldon Rampton |
Comments
Comment #1
aaron CreditAttribution: aaron commentedpatches are welcome. with and without chat option. that would be swell too :D
Comment #2
Sheldon Rampton CreditAttribution: Sheldon Rampton commentedI'm attaching a patch adding a file livestream.inc to directory contrib/emvideo/providers that seems to work for embedding video from Livestream.com. I'd appreciate it if someone could look it over and consider adding it to the module.
It seems to work well enough for our website, but it's still a bit incomplete. For example, Livestream has an API for retrieving thumbnail images, but I didn't want to take the time to code that part, so I just hard-coded a URL to a single thumbnail image of ours. If someone wants to use my patch for their own website, therefore they would want to change that part.
Comment #3
youkho CreditAttribution: youkho commenteddefinitely a good start thanks Sheldon
Comment #4
micahw156I couldn't get this to work for me. The problem I encountered was that it appeared to simply bring the URI over into $embed for use in theme_emvideo_livestream_flash().
The resulting code left flashVars set to "channel=channelname/video?clipId=pla_513a86e5-8..." but it needs to be "channel=channelname&clipId=pla_513a86e5-8..."
I did an ugly hack to get this working with str_replace on $embed to make it work, but I'm sure that's not the right way to fix it. I didn't have time to fully research where this should be modified.
Also, it appears that references to static.livestream.com should probably be replaced with cdn.livestream.com.
Comment #5
Sheldon Rampton CreditAttribution: Sheldon Rampton commentedCould you attach a copy of your hacked version so I can take a look at it?
Comment #6
micahw156Sheldon,
Here are my changes from your patch in #2 above:
Again, I'm pretty sure this is a bad way to do this. I also had to fudge the video URL to make this work, too.
For example, the actual URL from Livestream was like this:
http://www.livestream.com/channelname/video?clip=pla_513a86e5-.....
and I had to do this to make it work:
http://www.livestream.com/channelname?clip=pla_513a86e5-.....
I think this really needs to be changed where the URL is parsed, not on the output side, but I can't figure out which function should get these changes.
Micah
Comment #7
Sheldon Rampton CreditAttribution: Sheldon Rampton commentedThanks for the code. I'll probably need to do some follow-up with Livestream to figure some of this out.
Comment #8
micahw156I made some more progress on this tonight. I think the better place for the fix will be to make changes to the emvideo_livestream_data() function, then change the calls to theme_emvideo_livestream_flash to incorporate the $item value as an argument. (The $item array is available to the emvideo_livestream_video() and emvideo_livestream_preview() functions, so that part won't be a problem.)
For a first pass at updating emvideo_livestream_data(), it should be possible to just hack apart the $item['value'] string and return $item['channel'] and $item['clip'] values that can replace the $embed string now used by the theming function. It's probably not even worth doing an API call to LiveStream to make this work. Right now, the call to emfield_request_header is only getting the header for the wrapper page on LiveStream's site, so the values it's returning aren't helpful.
I can't promise I'll have time to work on this, so I'll leave it unassigned for now, but if I get a chance, I'll take a crack at this one.
Ultimately it would be nice to do some actual API calls to LiveStream and grab the desired data for the flash video and thumbnail, but this probably isn't a bad next step.
Comment #9
XiaN Vizjereij CreditAttribution: XiaN Vizjereij commentedI attached my version with some additions ( based on the last patches + bugfixes )
Added features
-> Thumbnail creation for Livestream links coming from API RSS calls ( It will NOT work for copy&pasted links from livestream .. i will provide a patch for that soon. Currently it ONLY works for links from the RSS API of livestream )
-> Fall back to {ThemeDir>}/no-pre.png if the API call to the thumbnail function on livestream failed ( so it will show {ThemeDir}/no-pre.png if this module couldn't get a thumbnail from livestream for the current video ). Unreproducible, the livestream api 2.0 fails to get the thumbnail. This is a reported bug in the livestream api.
-> Player integration works again. Fixed some problem with the flash player integration ( they changed some variables )
Tested features
-> Autoplay / AllowFullscreen ( both are working correctly for thousands of nodes )
Open issues
-> Support for the 1.0 API will disappear soon. We NEED to update the provider to the 2.0 api asap !
-> You can only request 10 api calls per second. This might not be an issue for your "normal" side, but its an extremely high priority for big sides. I messed around with manually ( without api calls ) getting the thumnail, but i can't find a way to get the right path manually. It would save a LOT of api calls, if we could fetch the thumbnail without a api call.
-> Support for normal copy&pasted links from livestream ( will do that soon )
Comment #10
Alex UA CreditAttribution: Alex UA commentedThis really needs its own Media: Livestream.com module created for it. Marking as won't fix, as we won't be adding this to emfield. If you'd like, I'm fine with adding it to the Media: Video Flotsam module for now.
Comment #11
sftranna CreditAttribution: sftranna commentedcan anyone plz complete this module or atleast organize it in a folder so that a newbie ,like me, can use it
plz help me
Regards
shahzeb Chohan
Comment #12
mixedfeelings CreditAttribution: mixedfeelings commentedhas there been any luck getting this into the Media: Video Flotsam module?
Thanks!
Comment #13
Alex UA CreditAttribution: Alex UA commentedI added this to Media: Video Flotsam dev. It will be available in the full release when I roll a new one...
Comment #14
napounet CreditAttribution: napounet commentedSubscribe