Embedding videos hosted on your website (solved!)

Looking for a MOD? Have a MOD request? Post here for help. (Note: This forum is community supported; phpBB does not have official MOD authors)
Suggested Hosts
User avatar
Linda Carter
Registered User
Posts: 514
Joined: Fri Feb 15, 2008 6:45 am

Embedding videos hosted on your website (solved!)

Post by Linda Carter »

There is a free FLV player explained on these links:

http://granades.com/2006/09/14/how-to-p ... asy-steps/
http://www.jeroenwijering.com/?item=JW_FLV_Media_Player

And this is the source-code from my website, made using HTML.

Code: Select all

<p align="center">
<font face="Verdana" style="font-size: 28pt; font-weight: 700">TESTING</font></p>
<div align="center">
<table border="0" cellpadding="0" style="border-collapse: collapse" width="78%" id="table1">
<tr>
<td align="center">&nbsp;<script type="text/javascript" src="http://www.jeroenwijering.com/embed/swfobject.js"></script>

<div id="player">This text will be replaced</div>

<script type="text/javascript">
var so = new SWFObject('player.swf','mpl','450','360','9');
so.addParam('allowscriptaccess','always');
so.addParam('allowfullscreen','true');
so.addParam('flashvars','&file=personalvideoconverted.flv&skin=snel.swf&volume=50&displayclick=none&fullscreen=true');
so.write('player');
</script></td>
</tr>

<tr>
<td align="center">&nbsp;</td>
</tr>
</table>

</div>
As you can see this was meant to be "the final solution" for those who want get rid of Youtube/GoogleVideo and start hosting their own videos.

This is a preview of Jeroen's FLV player using a different skin (other than the original one which is bad in my opinion). Unfortunatelly it's not possible to have the same skin Youtube it's using, but the SNEL skin is almost the same.

http://www.longtailvideo.com/skins.asp

Flash variables can be found and are explained here.
http://code.jeroenwijering.com/trac/wik ... ars#Layout


VERY IMPORTANT! Go to the setup wizard and see them working:
http://www.jeroenwijering.com/?page=wizard


And this is the thread about how we may use this player on phpBB 3 (BBCode area):
http://www.jeroenwijering.com/?thread=12194


A short explanation of what's wrong here:

- There is no way to use the second skin (not the default/original one called player.swf). The snel.swf

These flashvars cannot be added to phpBB 3:

Code: Select all

skin=snel.swf
volume=50
displayclick=none
Therefore I am forced to use these on the HTML replacement. It's working, but I can't change the skin and use all flashvars:

Code: Select all

<embed
src="mediaplayer.swf"
width="364"
height="19"
allowscriptaccess="always"
allowfullscreen="false"
flashvars="width=364&file={TEXT}"
/>
I was wondering if something can be done to improve this Replacement code above. After all, if it's working on my website why not on phpBB 3? :)
"Whoever has not known himself has known nothing. But whoever has known himself has simultaneously achieved knowledge about the depth of all things."

User avatar
Linda Carter
Registered User
Posts: 514
Joined: Fri Feb 15, 2008 6:45 am

Re: Embedding videos hosted on your website (solved!)

Post by Linda Carter »

I did it!!!! :) :) :) :)

Here's the correct code:

Original thread (Custom BBCodes):
http://www.phpbb.com/community/viewtopi ... 6&t=579376

External website (embed video in post)

Using the full URI

Description: Allows you to embed your FLV videos in your posts using the full URL of the video.

BBCode usage:

Code: Select all

[flv]{TEXT}[/flv]
HTML Replacement:

Code: Select all

<embed
src="http://www.mywebsite.com/player.swf"
width="450"
height="360"
allowscriptaccess="always"
allowfullscreen="true"
flashvars="width=450&&skin=http://www.mywebsite.com/snel.swf&volume=50&displayclick=none&fullscreen=true&file={TEXT}"
/>
Download these files and upload them to your website:
player.swf
snel.swf


http://rapidshare.com/files/135508974/s ... n.rar.html

Also, upload your FLV file created (your video).

So when you need to embed this FLV file, you might use this:
[flv]http://www.my-website.com/adventures.flv[/flv]

And you will get this player:
Image

That's it! I don't need Youtube anymore! :mrgreen:
"Whoever has not known himself has known nothing. But whoever has known himself has simultaneously achieved knowledge about the depth of all things."

Z.Bee
Registered User
Posts: 1
Joined: Thu Nov 06, 2008 10:46 am

Re: Embedding videos hosted on your website (solved!)

Post by Z.Bee »

Cool!!! Linda!

It´s working!!! :D :D :D

Thanks so much for the easy instructions!

has
Registered User
Posts: 70
Joined: Mon Aug 24, 2009 10:20 pm

Re: Embedding videos hosted on your website (solved!)

Post by has »

Hi everyone

Thanks to Linda, I have the player on my bb3 board.

I am wondering if anyone has tried inserting a logo in the player. I know the default undefined logo flashvars exists to display a defined logo on the top right.

But i have no idea how to use it (yeah I am a newbie :? )

So here is the flashvars i need to add

Code: Select all

s1.addParam("flashvars","file=video.flv&logo=logo.png");
Question is how and where do I add this within the following html replacement to work?:

HTML Replacement:

Code: Select all

    <embed
    src="http://www.mywebsite.com/player.swf"
    width="450"
    height="360"
    allowscriptaccess="always"
    allowfullscreen="true"
    flashvars="width=450&&skin=http://www.mywebsite.com/snel.swf&volume=50&displayclick=none&fullscreen=true&file={TEXT}"
    />

has
Registered User
Posts: 70
Joined: Mon Aug 24, 2009 10:20 pm

Re: Embedding videos hosted on your website (solved!)

Post by has »

any hints on how to add a logo to the top left of my jw-player skin?

has
Registered User
Posts: 70
Joined: Mon Aug 24, 2009 10:20 pm

Re: Embedding videos hosted on your website (solved!)

Post by has »

managed to do it :D

binarybrainwash
Registered User
Posts: 1
Joined: Sun Sep 27, 2009 8:20 pm

Re: Embedding videos hosted on your website (solved!)

Post by binarybrainwash »

Hi,

I followed the instructions to the letter but when I load an FLV file the audio plays perfectly but there is no video?!?

I have several flv's to post so any help would be greatly appreciated...thnx

oh..I have the latest version of phpBB3 (3.0.5) and only 1 mod (this was installed AFTER the bbcode edits)
it is called Add_user.
I have also installed codecs (flash player for firefox) it plays youtube videos fine which are flv I believe so the codecs are fine, I have deleted the bbcode and re-done it yet still no video..weird city.

shrshr471
Registered User
Posts: 8
Joined: Fri Sep 25, 2009 1:06 am

Re: Embedding videos hosted on your website (solved!)

Post by shrshr471 »

done it in my way :mrgreen:
http://ma3allah.com/forum/viewtopic.php?f=7&t=10

but its in arabic :D:D:D

shrshr471
Registered User
Posts: 8
Joined: Fri Sep 25, 2009 1:06 am

Re: Embedding videos hosted on your website (solved!)

Post by shrshr471 »

you can see this BBcode too

in {TEXT} you will but direct full url for .flv or link

and you can replace this link "http://ma3allah.com/with66.jpg" (in the html replacement)
with the vedio image or your own copy right

you can also edit
the width and hight of the vedio



bbcode text :

Code: Select all

[flv]{TEXT}[/flv]
bbcode html replacement:

Code: Select all

<!-- START OF THE PLAYER EMBEDDING TO COPY-PASTE -->

	<script type="text/javascript" src="http://ma3allah.com/swfobject.js"></script>
	<script type="text/javascript">
		swfobject.registerObject("player","9.0.98","http://ma3allah.com/expressInstall.swf");
	</script>

	<object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" width="350" height="350">
		<param name="movie" value="http://ma3allah.com/player-viral.swf" />
		<param name="allowfullscreen" value="true" />
		<param name="allowscriptaccess" value="always" />
		<param name="flashvars" value="file={TEXT}&image=http://ma3allah.com/with66.jpg" />
		<object type="application/x-shockwave-flash" data="http://ma3allah.com/player-viral.swf" width="350" height="350">
			<param name="movie" value="http://ma3allah.com/player-viral.swf" />
			<param name="allowfullscreen" value="true" />
			<param name="allowscriptaccess" value="always" />
			<param name="flashvars" value="file={TEXT}&image=http://ma3allah.com/with66.jpg" />
			<p><a href="http://get.adobe.com/flashplayer">please get flash</a>  to see the vedio</p>
		</object>
	</object>

	<!-- END OF THE PLAYER EMBEDDING -->

andrew55
Registered User
Posts: 236
Joined: Wed Jan 28, 2009 7:43 pm

Re: Embedding videos hosted on your website (solved!)

Post by andrew55 »

Thank you Linda for a great solution - I used the last piece of code provided by you.

Any ideas on how to make it where the user only has to click the play button once to load and play the video?

As of now, the first time the play button is played, the file seems to be loaded. Then, the play button has to be clicked again to actually play the video. Thank you for any suggestions.

grangonzo
Registered User
Posts: 12
Joined: Thu Jul 02, 2009 11:46 pm

Re: Embedding videos hosted on your website (solved!)

Post by grangonzo »

has wrote:managed to do it :D
It would be great if you could share with us how did you manage to do it...

m101
Registered User
Posts: 30
Joined: Sun Dec 13, 2009 8:37 pm

Re: Embedding videos hosted on your website (solved!)

Post by m101 »

Thanks for the code!

I only have one problem. I can play the video by clicking the play button arrow at the lower left corner, but I can't play the video by clicking on the main play button in the center. It just doesn't do anything when I click on it. When I move my mouse button over it, it doesn't change to the finger pointer. It only changes when I move it over the lower left play button. Any suggestions as to how to get the main play button working would be very much appreciated!

Thanks!

User avatar
Dzien Dobry
Registered User
Posts: 614
Joined: Thu Nov 08, 2001 3:55 pm

Re: Embedding videos hosted on your website (solved!)

Post by Dzien Dobry »

Linda Carter wrote:I did it!!!! :) :) :) :)

Here's the correct code:
When I tried to insert Linda's code into the BBcode text boxes at my forum, I got this warning message:
Warning

The BBCode you are trying to add seems to use a {TEXT} token inside a HTML attribute. This is a possible XSS security issue. Try using the more restrictive {SIMPLETEXT} or {INTTEXT} types instead. Only proceed if you understand the risks involved and you consider the use of {TEXT} absolutely unavoidable.
Is there a safer way to do this?

dan filipi
Registered User
Posts: 82
Joined: Fri Dec 21, 2007 6:36 pm

Re: Embedding videos hosted on your website (solved!)

Post by dan filipi »

m101 wrote:Thanks for the code!

I only have one problem. I can play the video by clicking the play button arrow at the lower left corner, but I can't play the video by clicking on the main play button in the center. It just doesn't do anything when I click on it. When I move my mouse button over it, it doesn't change to the finger pointer. It only changes when I move it over the lower left play button. Any suggestions as to how to get the main play button working would be very much appreciated!

Thanks!

I was so jazzed to figure out all by myself why mine was acting the same way I just had to post it!

In this line of the HTML replacement code change "none" to "play" (without the quotes)

Code: Select all

50&displayclick=none&fullscreen=true&file={TEXT}
Should look like this for center play button to play and pause video:

Code: Select all

50&displayclick=play&fullscreen=true&file={TEXT}

wahid.a.a
Registered User
Posts: 2
Joined: Sun May 08, 2011 5:51 am
Location: Indonesia
Contact:

Re: Embedding videos hosted on your website (solved!)

Post by wahid.a.a »

Oh :o

It's works perfect.

Thank you so much :D


btw i replaced {TEXT} with {URL}

Locked

Return to “[3.0.x] MOD Requests”