Linking to Mediaplayer Stream causes moodle to display blank page

Linking to Mediaplayer Stream causes moodle to display blank page

by Joseph Vargas -
Number of replies: 21

Hi all:

I am looking to place a link in a course that opens mediaplayer, plays a file from a video server and leaves the moodle page at the course page.

Right now when I use the resource web link, mediaplayer opens and plays, but the moodle frame displays a white empty page.  I need to press the back button to get back to the course.

How do I fix this

Average of ratings: -
In reply to Joseph Vargas

Re: Linking to Mediaplayer Stream causes moodle to display blank page

by Paul Duff -

We experience a similar issue when we put a link to a ZIP file in a course (as an uploaded file with a pop-up window).  I our case, a new blank window is opened just before the Open/Save dialogue box is displayed.  The file downloads normally and we just close the blank window. 

We chose to use the pop-up as the 'lesser of two evils'.  If we set the resource NOT to open a pop-up, then we get exactly the same effect as you - ie blank page which has to be 'backed up' after the download.

Ideally, the download would take place on top of the course page, but I suspect there's a conflict here.  In any case, it's not a show-stopper.

In reply to Joseph Vargas

Re: Linking to Mediaplayer Stream causes moodle to display blank page

by Ger Tielemans -

embed your mediaplayer in a HTML page:

Clase net, Enlace Académico
&nbsp
Deze video in ASF-formaat wordt vanaf een externe site geladen. Ook de videoplayer wordt vanaf Microsoft zelf gedownload, dus de gebruiker hoeft het niet al op zijn computer te hebben staan. Je kunt dus hier naast deze video andere informatie op deze pagina zetten, bijvoorbeeld instructie over de video. Ik moet de instructies hiervoor nog verder uitwerken, nu alleen als voorbeeld wat kan... dus geen uitspraak van mij over dat rare geluid op de achtergrond of het wel erg kleine formaat van die geestverschijning bij de elektronische overheadprojector. (De eerste keer dat u deze pagina bezoekt wordt u ook gevraagd of u een audio plugin van Microsoft wil installeren.)
In reply to Ger Tielemans

Re: Linking to Mediaplayer Stream causes moodle to display blank page

by Paul Norrod -
ger, I have a lot of .wmv videos that I currently zip up and have my students download.  It has worked really well since most of my students are on dial-up.  However, more students are getting dsl or cable and I would also like to give them the ability to do what you are doing.  I created at test page from your embedded player page (thanks!) and it works just great.

But, my videos are screen captures that have aspect ratios that vary from one video to the next.  In your code you have:

type="application/x-oleobject" height="250" width="300"  >

and

  <embed height="250" width="300" src="http://enlaceacademico.com.mx/media/cien.asf"  name="MediaPlayer1" AutoStart=1

The 250 and 300 fix the aspect ratio and some of my videos are distorted as a result.  Is there a way to get the page to dynamically adjust the height and/or the width based on the aspect ratio of the video that is being played?

If I could get that one problem solved, I would be able to do exactly what I want.  Thank you for sharing your ideas and coding!
In reply to Paul Norrod

Re: Linking to Mediaplayer Stream causes moodle to display blank page

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
What happens if you leave out height and width?  
In reply to Martin Dougiamas

Re: Linking to Mediaplayer Stream causes moodle to display blank page

by Paul Norrod -
Martin, duh.... never thought of that!  I took both occurrences of Height and Width out and now it autosizes just fine.  Now, the only negative here is that I have to build a page for each video that I have (I have over 50 plus the count is growing).

Would it be possible to bring up any .wmv or .asf (video) or .wma (audio) file that is setup as a an uploded file resource in a page with WMP embedded in it?  Similar to what you have done with the MP3 player?  Then I could just add my videos as a Resource of an uploaded file and Moodle would take care of things.

I would love to be able write this functionality myself, but teaching and lack of knowledge of Moodle and php (at this point) are holding me back.  If someone could mod Moodle to deal with these resource file types or at least point me in the correct direction so I could do it myself, I would really appreciate it.  Thanks!    
In reply to Paul Norrod

Re: Linking to Mediaplayer Stream causes moodle to display blank page

by Ger Tielemans -

I support this wish..Would be great if normal teachers could hang in multimedia, just by choosing the source from the resources-area  cool

By the way, I hear now this great lecture double, but do not see the remove buttons in my forum-entries...HELP!! (Did I cause this with the media-script?)

In reply to Ger Tielemans

Re: Linking to Mediaplayer Stream causes moodle to display blank page

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
I've actually implemented embedding support for .wmv files but it's not in CVS yet.
In reply to Martin Dougiamas

Re: Linking to Mediaplayer Stream causes moodle to display blank page

by Ger Tielemans -

Does this mean that a user can dump a filename (with the right MIME extension) in a field and Moodle will play it? Would be great.

(Maybe also checkboxes for autostart on/off, and show/hide controlbar?)

In reply to Ger Tielemans

Re: Linking to Mediaplayer Stream causes moodle to display blank page

by Paul Norrod -

ger, Martin placed the code in CVS to do this. You can add a video to your Moodle site as an uploaded file resource with a .wmv (I am not sure about other MS multimedia extensions) extension and it will play in the window similar to the sample you posted earlier.  If is really slick.

The files he gave me that were changed were:

files/mimetypes.php
lang/en/resource.php
mod/resource/view.php

I am already using it with great success to allow my students to stream .wmv videos from my site.

The only problem we have run into is that it only works with IE. When I or my students use Mozilla (Netscape also I would assume) or Firebird we get a screen as shown below that just sits there. If I click on the direct link to it opens up WMP, but I get an error popup from WMP that says The source filter for this file could not be loaded. .

In Opera, the window shows a different skin (more modern) than shown below, but the results are the same as below.

I am pretty clueless about what is going on under the hood with the embedded media player, so I am at a loss to try and solve the non-IE browser issue (teaching sometimes gets in the way of all of my tech fun thoughtful).

I was also trying to figure out if there was a way to show the total time of the video and the current position (in mm:ss) of the video.  I looked around for some way to do this, but could not come up with any.

If you or anyone else out there could look into the browser issue, I know that it would certainly be appreciated.

Thanks!  

Attachment Embedded_WMV_Problem.jpg
In reply to Paul Norrod

Re: Linking to Mediaplayer Stream causes moodle to display blank page

by John Gone -
Mozilla works fine. Browser settings?

Just for fun: when I first came to this thread I almost had a virtual cardiac arrest. I'm looking around trying to figure out how this old man got into my computer and why is he lecturing us? My wife was standing next to me watching me try to figure this out. Now she knows I'm not as smart as she thought I was. A good lesson for me to watch the speaker volume smile The upside? She thinks the whole embedded media thing is great! No clicking, no pointing. It's just there.
In reply to John Gone

Re: Linking to Mediaplayer Stream causes moodle to display blank page

by Paul Norrod -

John, I asked Martin about this via email and he indicated that he had the same problem.  So, I am wondering what you are doing differently?  My videos are .wmvs encoded with the Microsoft version 9 codec.  I will attach a relatively small one so that you can play with it if you want.

Your post is very interesting because I had a somewhat similar experience.  I have a laptop that I take home every night and a docking station for it here at work.  With the tiny speakers on the laptop, I have to leave the windows volume way up to hear anything.  The docking station, however, connects to traditional speakers.  Well .... I had used the laptop to listen to the "Computer Guys" at wamu.org at home the evening before and had the volume WAY up.  At work, I clicked on the original post and (like you) was about blasted out of my chair trying to figure out what was going on.  I did not see the video at first and initially paniced that some type of virus had invaded my computer and that the voice was telling me (in a language I could not understand) that in 30 seconds it was going to do a format C: on my machine or some other disasterous act surprise!

On the serious side, this is a great feature.  I initially had a majority of students in my online courses who used dial-up.  To accomodate them, I would zip up the videos and they could download, extract, and view them.  They liked that because they could watch them without tying up their phone line while watching them.  More recently, however, more and more of my students are getting dsl or cable access, so streaming makes a lot more sense.  I have started to put both versions on my site - the .zip and the .wmv.  It takes a lot of space, but I have a hosting account with 4GB, so it is not a problem.

The only thing I don't like about it is using the Microsoft .wmv technology in that it limits my clients.  All of my online students are running Windows, so it is not a problem for me.  There is a WMP for the Mac, so I don't think .wmv would be a problem for them either (haven't tried it though).  I am not sure how many people are actually running OSs besides Win and Mac, but they are (as far as I know) left out of being able to view .wmvs.

I build my screen capture videos with Camtasia and it produces excellent quality .avi videos.  Unfortunately, they are also very large in size (30 - 40MB is not uncommon).  I found that by fiddling with the settings of Windows Media Encoder, I could make very good quality .wmvs of those same videos with a roughly 10:1 reduction in video size.

In reply to Paul Norrod

Re: Linking to Mediaplayer Stream causes moodle to display blank page

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Yes, the .asf that Ger included (from Claudio's site! smile) further up in this thread works fine in Mozilla/Firebird.  However, .wmv's included the same way (although with the appropriately different mime-type) do not.  The Media Player plugin loads, but the video doesn't ... right-clicking on it to show "Error details" gives you:

  Cannot open.  Please verify that the path and filename are correct and try again.

Needless to say the path is is fine ... I got stuck and left it ... If anyone else wants to have a crack at this problem just try the latest CVS, upload a .wmv file and add it as an "Uploaded" resource.

Here's what the plugin code looks like - IE is obviously loading the slick-looking Active-X control and Mozilla loads the plugin ...

<object 
classid
="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95"
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
standby="Loading Microsoft® Windows® Media Player components..."
id="wmvplayer"
align
=""
type
="application/x-oleobject">

<param name="Filename" value="http://myserver.net/moodle/file.php/2/pnorrod_sample_video.wmv">
<param name="ShowControls" value=true>
<param name="AutoRewind" value=true>
<param name="AutoStart" value=true>
<param name="Autosize" value=true>
<param name="EnableContextMenu" value=true>
<param name="TransparentAtStart" value=false>
<param name="AnimationAtStart" value=false>
<param name="ShowGotoBar" value=false>
<param name="EnableFullScreenControls" value=true>

<embed src="http://myserver.net/moodle/file.php/2/pnorrod_sample_video.wmv"
name
="wmvplayer" type="application/x-mplayer2"
ShowControls="1" AutoRewind="1" AutoStart="1" Autosize="1"
EnableContextMenu="1" TransparentAtStart="0"
AnimationAtStart
="0" ShowGotoBar="0" EnableFullScreenControls="1"
pluginspage
="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/">
</embed>

</object>

In reply to Martin Dougiamas

Re: Linking to Mediaplayer Stream causes moodle to display blank page

by Ger Tielemans -

I saw in Multimedia Bible  a script that first checks what browser it is and then chooses the player for that browser. (It also contains examples of different player interfaces for One Player. (Instead of the Modrian painting that I get normally with the new real one pl;ayer.)

The book is also about streaming media, but you need a separate stream-server..

(And I cannot kill the old professor because my edit button was gone:... my script did that...  Question to Martin: If I give students their own course as teachers, how dangereous can their scripts be forother courses and the server?)

In reply to Paul Norrod

Re: Linking to Mediaplayer Stream causes moodle to display blank page

by John Gone -
In fact it doesn't work in Mozilla, of course. I've been meaning to look into this issue of wmv since seeing a story on tv a while back. The gist of the story was that MS had gotten it right with MP9 and that it was worth a second look. To everyone's surprise MP9 ranked #1 in a test of efficiency and quality in several editing tasks. Unfortunately there were a few privacy and security concerns, when using MP9,  mentioned in the same story.

I think audio/video is an essential part of the distance learning environment so will be following this topic. I'll let you know if I find anything interesting.

Thanks
In reply to John Gone

Re: Linking to Mediaplayer Stream causes moodle to display blank page

by Ger Tielemans -
Above professor does show up in The Mozilla spin-off Firebird 0.7, but maybe you must first install a plugin player?
In reply to Ger Tielemans

Re: Linking to Mediaplayer Stream causes moodle to display blank page

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Ger, the .asf file you posted does work, but .wmv diles using the same plugin do not. See this post.
In reply to Paul Norrod

Re: Linking to Mediaplayer Stream causes moodle to display blank page

by Bryan Williams -
The embed Windows Media Player is an ActiveX control I believe, which is why is won't work on Mozilla.  If Opera is set in properties to behave like IE, it should work as you mention. Forget Mac and Unix unless there is a plug-in somewhere that will display ActiveX controls (doubtful). I imagine what you are seeing in Mozilla is an image file with a link to the WMP, and that is why it tries to activate.
In reply to Ger Tielemans

Re: Linking to Mediaplayer Stream causes moodle to display blank page

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
>>shiver<< ... brings back horrible memories of old boring lecturers.  big grin
In reply to Martin Dougiamas

Re: Linking to Mediaplayer Stream causes moodle to display blank page

by Ger Tielemans -

I saw it somewhere in the Moodle forum and used it as a good example knipoog 

Students ordial and learning results depend a lot of the skills of the actor: some teachers are great performers: they can turn students into ACTIVE listeners.

I remember an old professor, jumping on the table to show how monkeys handle a stick in a fight during his lectures in Antropobiology. I still know when a big monkey wants to kill you or just wants to frigthen you: sweet memories.. I never will forget.

 (A good script can do the same, like they often show at Discovery Channel: Yes, just watching but.. nothing wrong with old wine in new bottles, as long as the wine is of good quality.. And also good to bring in some variation in the menu.)

In reply to Ger Tielemans

Re: Linking to Mediaplayer Stream causes moodle to display blank page

by Art Lader -
I have always responded to teachers who had a sense of humor.

I still fondly remember a professor of American history from almost thirty years ago who would write something interesting on the board before class and let us ponder it while. My favorite: "The king pissed blue."

We freshmen all just looked and looked and looked at it, wondering what the heck we were going to learn in THAT class. big grin

Turns out George III may have suffered from an illness which caused his urine to be discolored. This illness might have also caused bouts of irrationality which may have impaired his judgment. This was noted in the diary of one of his personal servants.

See, I still remember!

Regards,
Art Lader
Aiken High School
http://ahshornets.moodle.com/

In reply to Art Lader

Re: Linking to Mediaplayer Stream causes moodle to display blank page

by rick shepherd -
Why no just put the video into Flash. There seem to be no problems with embedded SWFs?

Just a thought


Rick