Moodle Video Filter

Moodle Video Filter

by Torsten Händler -
Number of replies: 26

Hi  @ all

I have a problem, with the new updates moodle updated the code, so you can post embedded videos with a timecode like youtube with #t or &start parameter. But this doesn't work, test it with a new moodle 2.8.3 installation and a moodle 2.7.5+ but doesn't even work,

create with a friend our own filter btw. update the core files and this works.

I take a look at the $url object but there is not time parameter, only the video-ID


anybody has the same issue? 

Average of ratings: -
In reply to Torsten Händler

Re: Moodle Video Filter

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Hi Torsten  -the only one I know of is this tracker issue here MDL-49059 and that fix has not been released yet.

Average of ratings: Useful (1)
In reply to Mary Cooch

Re: Moodle Video Filter

by Torsten Händler -

thanks mary, so I let my code in the file ;) an look at the tracker and maybe I can help 

In reply to Torsten Händler

Re: Moodle Video Filter

by Justin Hunt -
Picture of Particularly helpful Moodlers Picture of Plugin developers

You might look at my videoeasy filter Torsten. 

It allows you to customize how you handle video via user editable templates, without the need to edit the filter code itself. It can handle pretty much any player. I have not posted it on Moodle.org, because there are a few changes I want to make before I do that. But it is available from here:

https://github.com/justinhunt/moodle-filter_videoeasy

In reply to Justin Hunt

Re: Moodle Video Filter

by ben reynolds -

Justin,

I'm trying to install Video Easy. When I unzip into moodle/filter, I get a folder called "moodle-filter_videoeasy-master." Site Admin > notifications doesn't notice that it is installed.

Is this a matter of named to folder something else?

I'm on WAMP localhost 2.7.1 Thanks!

In reply to ben reynolds

Re: Moodle Video Filter

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

You just need to rename it videoeasy instead of "moodle-filter_videoeasy-master."

I just installed it too and am starting to try it out.

Average of ratings: Useful (2)
In reply to AL Rachels

Re: Moodle Video Filter

by ben reynolds -

Thanks, Al. That's what I did, and I tested in Chrome to no effect. But 5 hours later, doing it in FF on my localhost, I had success.

It looks very configurable. Great stuff!

Justin, Thanks!

In reply to Torsten Händler

Re: Moodle Video Filter

by Justin Hunt -
Picture of Particularly helpful Moodlers Picture of Plugin developers

@Al you are so fast, I never get to answer any questions ...

When downloading from github the folder has to be renamed to last part of the repository name. So in this case, that is "videoeasy"

VideoEasy is almost identical to the Generico filter in how it works, with the chief difference being that it filters on file extensions. When it gets a match it uses the player template you have allocated to the file extension.

Before it gets too many users I had better make those changes I talked about. So I will do that today. 

Average of ratings: Useful (1)
In reply to Torsten Händler

Re: Moodle Video Filter

by Justin Hunt -
Picture of Particularly helpful Moodlers Picture of Plugin developers

I am sorry to Torsten for taking over this thread. I hope it has helped though.

I have updated VideoEasy with the changes that were necessary before submitting it to Moodle plugins database.  You should upgrade, and you will need to re-choose the player/template for each file extension after upgrading. 

In reply to Justin Hunt

Re: Moodle Video Filter

by Torsten Händler -

Justin no problem its ok, 

I think it's also good for you so you get feedback and you can update the code ;)

I'm fine with that.

In reply to Justin Hunt

Re: Moodle Video Filter

by Derek Chirnside -

Justin, I was not sure where to post.  Have you heard any progress from Plugins yet?

I just installed this filter, and it killed admin access.  Moodle 2.8+

All went well until I clicked the update databases, the screen went white, and nothing.  I could log in as a student, but not an admin, and neither could one other admin.

Moving the folder on the server fixed it.

-Derek

In reply to Derek Chirnside

Re: Moodle Video Filter

by Justin Hunt -
Picture of Particularly helpful Moodlers Picture of Plugin developers

Ouch sorry. I wonder what went wrong? It is pretty stable these days,  so I think it must have been a misnamed folder or something.

I had been holding off posting it onto Moodle.org until I had added a few more things. But its enough already. I will do a test on a fresh install today and make sure the problem you describe does not occur. Then I will post it on the plugins database today. Promise.

Justin

In reply to Justin Hunt

Re: Moodle Video Filter

by Derek Chirnside -

This is cool.  Today has been a bit of wheel spinning.

Problem 1: Atto not like TinyMCE.  https://moodle.org/mod/forum/discuss.php?d=310691 therefore my old video deployment hack not working.

Thinks.  "Install Videoeasy"  I may try it again, but I do need a server admion to fix it if it flunks.

Thinks.  "Try Generico" Didn't quite display right.  https://moodle.org/mod/forum/discuss.php?d=261896#p1243318

But I feel like I am making progress.  Generico is a marvelous plugin, and if I can get Videoeasy going, even better.

-Derek

In reply to Derek Chirnside

Re: Moodle Video Filter

by Justin Hunt -
Picture of Particularly helpful Moodlers Picture of Plugin developers

Ok. I posted VideoEasy on Moodle.org. It will be a week or two I guess.

Let me know if you need a hand with the current situation. 

In reply to Justin Hunt

Re: Moodle Video Filter

by Derek Chirnside -

OK, tried again. Used the new version from yesterday.  Renamed folder to videoeasy.  Failed, Same thing, with one added detail.  It said "Databases successfully updated" - Continue.  Then I got the white screen.  And can log in as a student.

Fix is to rename videoeasy folder on server.

-Derek

In reply to Derek Chirnside

Re: Moodle Video Filter | white screen and cache=1 URL

by Derek Chirnside -

Tried a fourth time.  This time clearing caches immediately before installing.

This time, no "Databases successfully updated" - Continue - message.

Straight to white screen with this URL:  http://vle.tpp.ac.nz/admin/index.php?cache=1

-Derek

In reply to Derek Chirnside

Re: Moodle Video Filter | white screen and cache=1 URL

by Justin Hunt -
Picture of Particularly helpful Moodlers Picture of Plugin developers

Ok. Well something is up, clearly. White screens are usually PHP fatal errors, and generate a few lines in your error log. If I could have those, that would be really helpful. If you turn debugging up to its highest level before installing, the error should get dumped on screen.


Actually David Mudrak is processing plugins at lightspeed these days. And VideoEasy is now available on the plugins database:

https://moodle.org/plugins/view/filter_videoeasy

I have started a proper support thread in the General Plugins forum. 

In reply to Justin Hunt

Re: Moodle Video Filter | white screen and cache=1 URL

by Derek Chirnside -

Why didn't I think of that?

Sure enough, one line:

Attachment 15 install error.jpg
In reply to Derek Chirnside

Re: Moodle Video Filter | white screen and cache=1 URL

by Justin Hunt -
Picture of Particularly helpful Moodlers Picture of Plugin developers

Nice catch! Thanks. 

For anyone who is interested ...that was a problem that only appears if PHP is lower than version 5.5 and using the "empty" function with return of a function call ... in this case the bad line was: empty(trim($variable)) 

It should be fixed now on both GitHub and on Moodle.org

In reply to Justin Hunt

Re: Moodle Video Filter | white screen and cache=1 URL

by Derek Chirnside -

Probably my final post of the day.  After the fix, Videoeasy is installing OK.  Sadly it clashes somehow with the theme we use (Decaf).  It works well with Clean.  So: back to the drawing board.  I've posted in the Decaf Plugins forum.

eg: http://vle.tpp.ac.nz/course/view.php?id=189

Clips below show before and after pressing play.

Thanks Justin for the help.  Will see what comes from the Decaf forum.

-Derek



Attachment 14 Video Glitch 1.jpg
Attachment 14 Video Glitch 2.jpg
In reply to Derek Chirnside

Re: Moodle Video Filter | white screen and cache=1 URL

by Justin Hunt -
Picture of Particularly helpful Moodlers Picture of Plugin developers

Bummer. VideoEasy is basically a wrapper for loading in other players via JS and CSS. So if a player is broken on your theme, there is hope because you can actually edit the css and js for each template in your browser on the templates page.  You might try toggling the "jquery" checkbox on that settings page first though, and see if that makes a difference. Or choose video.js as your player and see if that works. That will at least tell you if the issue is flowplayer specific.

The other thing is that labels are evil. I don't know why, but the way the filters are applied in labels is somehow different to other parts of Moodle. In particular the order of filter application at site level does not seem to be the same at label level.  So try putting viewing a video in a forum post and see if that works.


Average of ratings: Useful (2)
In reply to Justin Hunt

Videoeasy + Decaf | yes, works in Forum. Beautifully.

by Derek Chirnside -

In a forum, with Decaf, Moodle 2.8+ Videoeasy works as expected.  It gives a much better look to Flowplayer.  

http://vle.tpp.ac.nz/mod/forum/discuss.php?d=1947

So, Labels are evil eh.  How on earth are you deploy video properly then?  I feel a tracker item coming on.

-Derek

Edit: Darn it, just a little bit too soon.  Admin menu in Decaf is stuffed.


In reply to Derek Chirnside

Re: Videoeasy + Decaf | yes, works in Forum. Beautifully.

by Justin Hunt -
Picture of Particularly helpful Moodlers Picture of Plugin developers

There was some discussion about labels and filters 2 weeks ago. I had the impression that there was an issue that people were aware of. In fact it generally works fine in labels if the multimedia plugins filter is turned right off. But I don't really like suggesting that to people and I am not very sure of my ground either. I just know  multimedia plugins filter seems to hijack labels regardless of settings.

In this case however there seems to be more widespread weirdness anyway. Did toggling jquery in the flowplayer template do anything? How about using video.js instead of flowplayer? Does that have the same effect?

In reply to Justin Hunt

Re: Videoeasy + Decaf | Using Video JS

by Derek Chirnside -

Sorry to be so long.

Tried with Video JS

Better.

In label


In Post

It seems to be OK in the post option.



Tracker item:

https://tracker.moodle.org/browse/MDL-49978

Not even sure how to express this yet.

-Derek



In reply to Derek Chirnside

Re: Videoeasy + Decaf | Using Video JS

by Derek Chirnside -

This has now become a bit complicated.

There is no error in Clean theme (which I didn't think of checking until later)

So: back to the drawing board.

I have posted an issue on the Decaf Git page.  https://github.com/CTANZ/moodle-theme_decaf/issues/21

Really, this has again got me a bit fatigued.  I just checked out the Moodle Orange school and The test site with a small standard MP4 clip.  Looks terrible.  Really terrible. I had a workflow with the tiny bit of JS that Tiny MCE added in, but that is now non-existent with ATTO.  I'm going to see if we can get a CSS fix to Decaf.

-Derek

In reply to Derek Chirnside

Re: Videoeasy + Decaf | Using Video JS

by Justin Hunt -
Picture of Particularly helpful Moodlers Picture of Plugin developers
The premade templates are pretty basic, and it looks like they could do with a bit more testing on different themes.

The thing about VideoEasy is that while you can use it out of the box, you can actually use any CSS/JS/HTML you like in the templates. its designed to be possible to customize the templates or to create new ones. So I think you could just tweak things till you get it right. If you know how to JS and CSS that is.

I don't want to guess too much at causes for the label issue, but I would say it is some javascript on the course page, that is not on the post page. This could be because the theme, or a block, on the course page loading up a different version of jquery or something like that. 

I have a deadline to meet today so I can't look into it. But I will do so next week. Sorry. Anyway I hope to be in NZ mid year, you can bang me over the head with a beer at that time perhaps.