Jump to content

Recommended Posts

Hi guys

 

I found a nice script that removes all the work of writing individual embedding for a long list of video host, it works well and pretty easy to be tweaked even by non coders such as me. One problem seems to be that some host have that annoying autostart or autoplay feature when a person places a link to a forum.  So if you have a forum page with multiple urls for videos that auto start or play feature drives you nuts.

 

I have tried to tweak the code by adding a param name= and used the 0 token and the false alpha word, still no luck with vimeo, it continues to start as soon as it finishes loading.  This code block shows the script file for vimeo, there are only two files in my includes to run this script so both must be tweaked with the changes, I use the nifty free PSPad editor to do this and have no trouble making any changes needed.

 

My question is at what level can an option like disabling a feature take place, is this something that must be performed by the host or can this script actually take a param name= to disable it. 

 

Thanks for any input or advice, pointing to a good read is most welcome also.

 

if (($vimeo) && (strpos($message, 'www.vimeo.com/') !== false)){
$message = preg_replace('#<a class="postlink" href="http:\/\/www.vimeo.com\/(.*?)">(.*?)<\/a>#U', '<object type="application/x-shockwave-flash" style="width:400px;height:230px;" data="http://vimeo.com/moogaloop.swf?clip_id=$1&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=$1&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1" /></object>', $message);}

Link to comment
https://forums.phpfreaks.com/topic/251489-inline-video-host-posting-to-forums/
Share on other sites

Yes vimeo has issues with their autoplay always working, even the embed codes from their site do not work.

 

see my example here

http://get.blogdns.com/test/vimeoembed.php

 

You can obtain the multi-media embed script from here.

http://webcodingeasy.com/PHP-classes/Get-information-about-video-and-images-from-link

 

BTW, I made a better google and youtube embed script, just ask me.

 

 

Thank you Sir,

 

I tried putting my BB code embedding back for at least until I can straighten out the php script to turn it off, I may have made some headway just by finding the right location in vimeo's script to place this little piece of code

&fullscreen=1&autoplay=0")

this did work with the BB code entry for phpBB3, however the player does not show a > start tab but rather the pause, I guess this is the best you could get.  Now I'm hoping I can take this and place it in the right spot on the php script and it should work.

 

I'm sure you've seen this a hundred times before, but to show what I have working in BB

<object width="400" height="300"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id={NUMBER}&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1&autoplay=0"] /><embed src="http://vimeo.com/moogaloop.swf?clip_id={NUMBER}&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1&autoplay=0"] type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300"></embed></object>

 

I have IP issues for now , live in the country!, soon as I can make a connection I'll check out your recommendations.

Thanks again

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.