Front Page Video - Automatic Play and no controls

Front Page Video - Automatic Play and no controls

by Graham Moir -
Number of replies: 9
Hello, I have a feeling this is a silly question, but I'll ask it anyway.

I'm trying to get a video to play automatically and without any controls showing in the middle section of the front page. With a swf video there's no problem, however I've noted the security issues and so I'm trying to avoid swfs.

So, I've tried an FLV and can get it to appear OK, but it does not play automatically and shows the controls. If I embed an FLV into a course activity then I can get it to player automatically because I have the settings available to configure the video, but on the front page I'm basically just setting up an HTML link without any parameters.

Is it possible to specify the settings in the HTML ? If so can someone point in the direction of the documentation that I don't seem to be able to find
thanks

Average of ratings: -
In reply to Graham Moir

Re: Front Page Video - Automatic Play and no controls

by Mary Cooch (personal account) -
Picture of Documentation writers Picture of Testers
Hi Graham. (No question is a silly question by the way!) I am sorry I can't help with the automatic playing but -are you sure you want to have a video coming on automatically whenever someone accesses your front page? Whenever I go to sites that have music/video playing like that I go away immediately. I'd consider thinking again personally.
Average of ratings: Useful (1)
In reply to Mary Cooch (personal account)

Re: Front Page Video - Automatic Play and no controls

by Graham Moir -

Well that's a good point Mary,  but the video is intended solely to add some dynamic graphic content to the front page.  There won't be any sound and it will be very short, i.e. less than 20 seconds,  for example the pieces of a jigsaw being placed together.  

I can get this to display and play without controls as a SWF but not as an FLV,  I'm assuming SWF is not an option due to comments on security in various places.  I haven't tried MP4 or WMV, but I have a feeling the same issue may exist.   Just wondered if there's some way in the HTML to specify no pause at start etc..

G.

In reply to Graham Moir

Re: Front Page Video - Automatic Play and no controls

by Patrick Pollet -
I guest that using the embed syntax ( in HTML mode of the Moodle's HTML Editor) you can achiev it by adding some parameters to the flv's URL such as :

<embed width="640" height="480" src="http://moodle.insa-lyon.fr/filter/mediaplugin/flvplayer.swf?file=http://moodle.insa-lyon.fr/file.php/1/test.flv&autostart=true&bufferLength=3" quality="high" bgcolor="#FFFFFF" name="flvplayer" type="application/x-shockwave-flash" flashvars="bgColour=000000&btnColour=ffffff&btnBorderColour=cccccc&iconColour=000000&iconOverColour=00cc00&trackColour=cccccc&handleColour=ffffff&loaderColour=ffffff&waitForPlay=yes" pluginspage="http://www.macromedia.com/go/getflashplayer" />

see this site http://developer.longtailvideo.com/trac/wiki/Player5FlashVars for the list of allowed params and flashvars


Cheers

Edit : you may have to enable embed and object syntax inside administration ; search for allowobjectembed


Average of ratings: Useful (1)
In reply to Patrick Pollet

Re: Front Page Video - Automatic Play and no controls

by Graham Moir -

Thanks for the example and that documentation page looks like just the thing I need ! 

One additional question though, I assume using the embed syntax bypasses the Moodle Multimedia Plugins/Filters ?   Any downside to this ?   I only need to do this on the front page I think so shouldn't be a big issue. 

In reply to Graham Moir

Re: Front Page Video - Automatic Play and no controls

by sam marshall -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
It will probably be fine to do it manually for your case.

When using the filters, the main advantage (apart from that it's easier) is that embedding is standardised across the system and will always use the same player, etc - so you/Moodle can easily improve the video player at a later point, and that will apply everywhere it's used.

For example, we have started using MP4 format videos here, but by default these are played using QuickTime which is a horrific abomination. By changing the filter code in an upcoming local release, I have been able to change all these to use our custom Flash-based player, which will apply to all MP4 videos across our whole system.

Possibly the filters might also be usable in 'student-editable' content areas (which don't allow things like object tags) - however not certain about this, haven't checked.

The only 'option' when using the media filters is normally the size parameter ?d=123x456.

--sam
In reply to Graham Moir

Re: Front Page Video - Automatic Play and no controls

by Hubert Chathi -
Since there's no sound, and the animation is short, you can go old-school, and make an animated GIF. This should work in pretty much any graphical browser, without any need for any plugins.
Average of ratings: Useful (1)
In reply to Graham Moir

Re: Front Page Video - Automatic Play and no controls

by Matt Bury -
Picture of Plugin developers
Hi Graham,

You may also find this option useful: http://code.google.com/apis/youtube/youtube_player_demo.html

Chromeless means without player controls.

BTW, Moodle's filters often interfere with FlashVars passed in with W3C standards compliant code. If you do anything out of the ordinary, the results can be nasty!

I hope this helps! smile
Average of ratings: Useful (1)
In reply to Graham Moir

Re: Front Page Video - Automatic Play and no controls

by Graham Moir -

Well after much trial and error and gnashing of teeth I think I may have found an easy way to do this, so I thought I would share it.

Unfortunately I couldn't get Moodle and the suggested "embed" option to work the way I wanted, and eventually I decided to set things up from scratch.  I selected jwplayer from LongTail  (http://www.longtailvideo.com/) as it's already used in a couple of guises in Moodle.  The steps I then followed are:

1) downloaded the required files for jwplayer (player.swf and swjobject.js) and then uploaded them, plus the video I want to play onto my site but outside of Moodle.  

2) I used the excellent wizard on the longtail site to build the code to show the video, including references/links to the files I had uploaded.  The wizard also allows the options I was originally looking for (automatic play, no controls/chrome) to be set. I could then preview my video on the longtail site. 

3) Once I was happy with the preview, I copied the script code that had been generated and using Moodle to edit the site summary block, I pasted/placed it right there.

Magically it all worked and the video plays on the main Moodle page (version 1.9) !

There were however a couple of issues. 

a) Version 5.x of jwplayer appends either a blank black frame or a provided static png/jpg to the video.  I wanted the video just to stop on the last frame and keep that displayed, but it doesn't appear possible in version 5.   After a bit of digging I found that various 4.x versions of jwplayer also do this.  I had to revert to version 4.0 to achieve what I wanted.   Luckily I don't seem to be missing any bugfixes or functionality by going back to this version. 

b) By default there's an option when you download jwplayer 5 called "Include Viral, a video sharing plugin" which is selected by default.  If you download with this ticked, then after your video has completed playing you end up with a panel to allow people to share the video, copy the code to run it etc..  There is no way to turn this off.  What you have to do is deselect the "viral" option when you download.  You then get a version that does not have this included. 

If anyone wants to try this approach the wizards mentioned above on the longtail site can be found as follows

Version 5  http://www.longtailvideo.com/support/jw-player-setup-wizard

Version 4  http://www.longtailvideo.com/support/jw-player-setup-wizard-4

Like many things, very easy and very nice - once you know how of course!

In reply to Graham Moir

Re: Front Page Video - Automatic Play and no controls

by Carol Thomson -

I've been trying to embed video on my front page too, so thanks for this info