Embed Local Video Mod?

Started by GirlinGray, October 16, 2015, 01:32:07 AM

Previous topic - Next topic

GirlinGray

Embed and play mp4 hosted on local server.

If it were reasonable I'd pay for it.

I've been looking for a mod that will allow me to embed and play short mp4 clips hosted on my website and I haven't found anything I can use. Everything seems to be about playing youtube clips or vimeo clips -- which is fine except I don't want to host my clips on youtube or vimeo just so I can play them in my forum. I want to host the clips on my site and skip the youtube/vimeo middle man.

I currently am using Ohara YouTube embed to play youtube and vimeo files.

I tried Simple Audio Video Embedder but when I try to load it I get warnings there are problems with the file so I haven't loaded it.

I also looked at HTML5 but after downloading that the forum package uplaoder told me the file was either corrupted or incompatible with my version of SMF so I didn't load that either.

I'm using SMF 2.0.10.

I'm surprised I can't find this it seems like a no brainer there's already a flash player built into the forum.

Help?

**********
Edit: PS: It's possible there's a way to use the existing flash player fuction and bb code to make this work and I just don't know how to use it that way. If anyone knows code that would make that work that would rock too.

Thanks for any help.

That Adams Girl

nend

Have you tried the [html][/html] tag?

You can add html between it, like the video or iframe tag which would make embedding possible with HTML5.

If your looking for member abiliy to add then one may have to be coded. If so I may be able to help but not til Saturday.

GirlinGray

I have not tried that, I will give it a shot and see what happens.

Also that last mp4 file corrupted so I'm concentrating on the .mov files now.

Thanks I will go give this a shot and see what happens.
That Adams Girl

GirlinGray

Okay that is working with one video play code I have, not perfectly, the controls are missing, but it is playing. Hot damn.

(Another one is yelling about mime not being supported, html is so surly sometimes.)

I think I can make this work. Very cool. I just have to find a better html code that includes the controls to play the vid.

Thank you so much.
That Adams Girl

Gluz

If you want to use HTML5 then you need to read this: https://html.spec.whatwg.org/multipage/embedded-content.html#video

There you can find all the attributes you can use to play a video/audio in HTML5.

For what you want, you can use something like this:
[html]<video controls height="480" src="/path/to/the/video.mp4" ></video>[/html]

Also, if don't want to use the  tags, then you can add a new BBCode to use it for the local video files, something like this [video]/path/to/the/video.mp4[/video] and then it will show in the post like the code I added before.

nend

Quote from: Gluz on October 16, 2015, 06:04:55 AM

Also, if don't want to use the  tags, then you can add a new BBCode to use it for the local video files, something like this [video]/path/to/the/video.mp4[/video] and then it will show in the post like the code I added before.

That looks super easy to code, I may give that a try Saturday, schedule super booked til then. That is if no one beats me to it.

GirlinGray

I've got this working but when the post opens the clip starts playing and I'm trying to turn that off by inserting autoplay="false" and it's not working. Maybe I should be using a loop command? Help...

Anybody have a smart (or obvious that I am not snapping too I just do this so sporadically these days it's not second nature anymore oog) fix for this?

This is the code I'm using right now that won't turn off autoplay:

"<iframe width="700" height="380" src="http://theafw.com/forum/clips/AMERICAN_BEAUTY_sell_house.mov" autostart="false" frameborder="0"  ></iframe>"

Any help appreciated.


******
Caveat in case anyone flips a whig over studio copyright on that clip: These are mini clips for educational purposes only and maintained in a private classroom forum and short enough to fall under fair use for educational purposes only.
That Adams Girl

GirlinGray

Hmm, I have battled it and gone with an object embed and parameter control commands and that worked to stop auto play using the autostart="false" but now I'm arguing with it about showing controls.
That Adams Girl

Gluz

For a .MOV files you need to use either a local video player (a flash video player) or have the quicktime plugin (not tested, but I think that VLC plugin work as well for MOV files) in the browser if you use the iframe thing. In this case the controls are thing of the plugin, or if you use a flash video player then you need to specify in the player's parameters all kind of stuff needed to show it like you want.

The easy way is using HTML5 video tag, but for that you need all files in .mp4 or .webm for maximum compatibility, aside of that the usage is pretty straight forward:
[html]<video preload controls autoplay height="height in pixels" src="/path/to/the/video.mp4" ></video>[/html]

GirlinGray

That's perfect, the mp4's totally win. Yay!

Thank you so much.
That Adams Girl

erikgracht

i struggled with the same problem and used now your html code without the autoplay parameter. Then they load in every browser and also under iOS. When i put the autoplay=false parameter back i begin to play in all browser except iOS.

Advertisement: